From eba7058067c5371620851098c49e2374be66e9a0 Mon Sep 17 00:00:00 2001
From: henry <Henry Weller h.weller@opencfd.co.uk>
Date: Tue, 15 Jun 2010 13:07:51 +0100
Subject: [PATCH] Wall-functions: Removed the spurious y+ filter on the
 generation term.

---
 .../epsilonWallFunctionFvPatchScalarField.C   | 21 ++++-------------
 .../omegaWallFunctionFvPatchScalarField.C     | 23 ++++---------------
 .../epsilonWallFunctionFvPatchScalarField.C   | 19 ++++-----------
 .../omegaWallFunctionFvPatchScalarField.C     | 19 ++++-----------
 4 files changed, 20 insertions(+), 62 deletions(-)

diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
index b0c1390c4b9..5cce898e22b 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
@@ -221,24 +221,13 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
     {
         label faceCellI = patch().faceCells()[faceI];
 
-        scalar yPlus =
-            Cmu25*y[faceI]*sqrt(k[faceCellI])
-           /(muw[faceI]/rhow[faceI]);
-
         epsilon[faceCellI] = Cmu75*pow(k[faceCellI], 1.5)/(kappa_*y[faceI]);
 
-        if (yPlus > yPlusLam_)
-        {
-            G[faceCellI] =
-                (mutw[faceI] + muw[faceI])
-               *magGradUw[faceI]
-               *Cmu25*sqrt(k[faceCellI])
-               /(kappa_*y[faceI]);
-        }
-        else
-        {
-            G[faceCellI] = 0.0;
-        }
+        G[faceCellI] =
+            (mutw[faceI] + muw[faceI])
+           *magGradUw[faceI]
+           *Cmu25*sqrt(k[faceCellI])
+           /(kappa_*y[faceI]);
     }
 
     fixedInternalValueFvPatchField<scalar>::updateCoeffs();
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
index d8437b07c54..1ab15d336fb 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
@@ -223,28 +223,15 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
     {
         label faceCellI = patch().faceCells()[faceI];
 
-        scalar yPlus =
-            Cmu25*y[faceI]*sqrt(k[faceCellI])
-           /(muw[faceI]/rhow[faceI]);
-
         scalar omegaVis = 6.0*muw[faceI]/(rhow[faceI]*beta1_*sqr(y[faceI]));
-
         scalar omegaLog = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]);
-
         omega[faceCellI] = sqrt(sqr(omegaVis) + sqr(omegaLog));
 
-        if (yPlus > yPlusLam_)
-        {
-            G[faceCellI] =
-                (mutw[faceI] + muw[faceI])
-               *magGradUw[faceI]
-               *Cmu25*sqrt(k[faceCellI])
-               /(kappa_*y[faceI]);
-        }
-        else
-        {
-            G[faceCellI] = 0.0;
-        }
+        G[faceCellI] =
+            (mutw[faceI] + muw[faceI])
+           *magGradUw[faceI]
+           *Cmu25*sqrt(k[faceCellI])
+           /(kappa_*y[faceI]);
     }
 
     fixedInternalValueFvPatchField<scalar>::updateCoeffs();
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
index e90118f7998..55a309f8abf 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C
@@ -214,22 +214,13 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
     {
         label faceCellI = patch().faceCells()[faceI];
 
-        scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI];
-
         epsilon[faceCellI] = Cmu75*pow(k[faceCellI], 1.5)/(kappa_*y[faceI]);
 
-        if (yPlus > yPlusLam_)
-        {
-            G[faceCellI] =
-                (nutw[faceI] + nuw[faceI])
-               *magGradUw[faceI]
-               *Cmu25*sqrt(k[faceCellI])
-               /(kappa_*y[faceI]);
-        }
-        else
-        {
-            G[faceCellI] = 0.0;
-        }
+        G[faceCellI] =
+            (nutw[faceI] + nuw[faceI])
+           *magGradUw[faceI]
+           *Cmu25*sqrt(k[faceCellI])
+           /(kappa_*y[faceI]);
     }
 
     fixedInternalValueFvPatchField<scalar>::updateCoeffs();
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
index 51622da14c9..5bd1ab97b10 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C
@@ -219,26 +219,17 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
     {
         label faceCellI = patch().faceCells()[faceI];
 
-        scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI];
-
         scalar omegaVis = 6.0*nuw[faceI]/(beta1_*sqr(y[faceI]));
 
         scalar omegaLog = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]);
 
         omega[faceCellI] = sqrt(sqr(omegaVis) + sqr(omegaLog));
 
-        if (yPlus > yPlusLam_)
-        {
-            G[faceCellI] =
-                (nutw[faceI] + nuw[faceI])
-               *magGradUw[faceI]
-               *Cmu25*sqrt(k[faceCellI])
-               /(kappa_*y[faceI]);
-        }
-        else
-        {
-            G[faceCellI] = 0.0;
-        }
+        G[faceCellI] =
+            (nutw[faceI] + nuw[faceI])
+           *magGradUw[faceI]
+           *Cmu25*sqrt(k[faceCellI])
+           /(kappa_*y[faceI]);
     }
 
     fixedInternalValueFvPatchField<scalar>::updateCoeffs();
-- 
GitLab