From 91439bb30d8929bb5d4f3b6013d46c584d142e7b Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin <kutalmis.bercin@esi-group.com> Date: Fri, 6 Aug 2021 16:08:03 +0100 Subject: [PATCH] BUG: nutLowReWallFunction: add effective viscosity into yPlus (fixes #1843) --- .../nutLowReWallFunctionFvPatchScalarField.C | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C index cbbed4fdc3a..9f4cf26bfa6 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutLowReWallFunction/nutLowReWallFunctionFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -116,11 +116,16 @@ yPlus() const ) ); const scalarField& y = turbModel.y()[patchi]; + const tmp<scalarField> tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); + const fvPatchVectorField& Uw = U(turbModel).boundaryField()[patchi]; - return y*sqrt(nuw*mag(Uw.snGrad()))/nuw; + tmp<scalarField> tnuEff = turbModel.nuEff(patchi); + const scalarField& nuEff = tnuEff(); + + return y*sqrt(nuEff*mag(Uw.snGrad()))/nuw; } -- GitLab