From fd87d0af172db314a73f3e44968c0a3e953c4259 Mon Sep 17 00:00:00 2001 From: sergio Date: Wed, 21 Jun 2017 12:26:40 -0700 Subject: [PATCH] Taking out the low-Re behaviour for epsilon and omega wall functions as they are not reliable for medium yPlus and needs more verification for Low-Re cases. This option proved to be overall the most robust for a range of yPlus --- .../epsilonWallFunctionFvPatchScalarField.C | 25 +++++---------- .../omegaWallFunctionFvPatchScalarField.C | 32 ++++++------------- 2 files changed, 18 insertions(+), 39 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 5f19867486..1d8e807045 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -234,25 +234,16 @@ void Foam::epsilonWallFunctionFvPatchScalarField::calculate { const label celli = patch.faceCells()[facei]; - const scalar yPlus = Cmu25*y[facei]*sqrt(k[celli])/nuw[facei]; - const scalar w = cornerWeights[facei]; - if (yPlus > yPlusLam_) - { - epsilon0[celli] += w*Cmu75*pow(k[celli], 1.5)/(kappa_*y[facei]); + epsilon0[celli] += w*Cmu75*pow(k[celli], 1.5)/(kappa_*y[facei]); - G0[celli] += - w - *(nutw[facei] + nuw[facei]) - *magGradUw[facei] - *Cmu25*sqrt(k[celli]) - /(kappa_*y[facei]); - } - else - { - epsilon0[celli] += w*2.0*k[celli]*nuw[facei]/sqr(y[facei]); - } + G0[celli] += + w + *(nutw[facei] + nuw[facei]) + *magGradUw[facei] + *Cmu25*sqrt(k[celli]) + /(kappa_*y[facei]); } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 5bed4060c5..59145dc988 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -238,8 +238,6 @@ void omegaWallFunctionFvPatchScalarField::calculate { const label celli = patch.faceCells()[facei]; - const scalar yPlus = Cmu25*y[facei]*sqrt(k[celli])/nuw[facei]; - const scalar w = cornerWeights[facei]; const scalar omegaVis = 6*nuw[facei]/(beta1_*sqr(y[facei])); @@ -257,27 +255,17 @@ void omegaWallFunctionFvPatchScalarField::calculate omega0[celli] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); } - if (yPlus > yPlusLam_) + if (!blended_) { - if (!blended_) - { - omega0[celli] += w*omegaLog; - } + omega0[celli] += w*omegaLog; + } - G0[celli] += - w - *(nutw[facei] + nuw[facei]) - *magGradUw[facei] - *Cmu25*sqrt(k[celli]) - /(kappa_*y[facei]); - } - else - { - if (!blended_) - { - omega0[celli] += w*omegaVis; - } - } + G0[celli] += + w + *(nutw[facei] + nuw[facei]) + *magGradUw[facei] + *Cmu25*sqrt(k[celli]) + /(kappa_*y[facei]); } }