From 91f70c395dbb9ef8408f7071dcb356a5a5aced69 Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Thu, 10 Jul 2014 13:43:53 +0100
Subject: [PATCH] kOmegaSST: Updated to make the production terms consistent
 according to the 2001 paper and use the coefficients from the 2003 paper.

---
 .../nutURoughWallFunctionFvPatchScalarField.C |  7 +++++
 .../omegaWallFunctionFvPatchScalarField.H     |  2 +-
 .../incompressible/RAS/kOmegaSST/kOmegaSST.C  | 13 ++++-----
 .../incompressible/RAS/kOmegaSST/kOmegaSST.H  | 27 ++++++++++++-------
 4 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
index 9ec799e3532..fb992f1e940 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
@@ -114,6 +114,13 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus
                 scalar yPlusLast = 0.0;
                 scalar dKsPlusdYPlus = roughnessHeight_/y[facei];
 
+                // Enforce the roughnessHeight to be less than the distance to
+                // the first cell centre
+                if (dKsPlusdYPlus > 1)
+                {
+                    dKsPlusdYPlus = 1;
+                }
+
                 // Additional tuning parameter - nominally = 1
                 dKsPlusdYPlus *= roughnessFactor_;
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H
index 496062792eb..74eef728cf6 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H
@@ -42,7 +42,7 @@ Description
         \omega_{log} | omega in logarithmic region
     \endvartable
 
-    Model described by Eq.(15) of:
+    Model described by Eqs.(14, 15) of:
     \verbatim
         Menter, F., Esch, T.
         "Elements of Industrial Heat Transfer Prediction"
diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C
index ec0c631f290..2a322172666 100644
--- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C
+++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -130,7 +130,7 @@ kOmegaSST::kOmegaSST
         (
             "alphaK1",
             coeffDict_,
-            0.85034
+            0.85
         )
     ),
     alphaK2_
@@ -157,7 +157,7 @@ kOmegaSST::kOmegaSST
         (
             "alphaOmega2",
             coeffDict_,
-            0.85616
+            0.856
         )
     ),
     gamma1_
@@ -166,7 +166,7 @@ kOmegaSST::kOmegaSST
         (
             "gamma1",
             coeffDict_,
-            0.5532
+            5.0/9.0
         )
     ),
     gamma2_
@@ -175,7 +175,7 @@ kOmegaSST::kOmegaSST
         (
             "gamma2",
             coeffDict_,
-            0.4403
+            0.44
         )
     ),
     beta1_
@@ -429,7 +429,8 @@ void kOmegaSST::correct()
       + fvm::div(phi_, omega_)
       - fvm::laplacian(DomegaEff(F1), omega_)
      ==
-        gamma(F1)*S2
+        gamma(F1)
+       *min(S2, (c1_/a1_)*betaStar_*omega_*max(a1_*omega_, b1_*F23()*sqrt(S2)))
       - fvm::Sp(beta(F1)*omega_, omega_)
       - fvm::SuSp
         (
diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H
index 07d16d27321..f591c370dcf 100644
--- a/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H
+++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST/kOmegaSST.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2012 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2014 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -28,7 +28,7 @@ Description
     Implementation of the k-omega-SST turbulence model for incompressible
     flows.
 
-    Turbulence model described in:
+    Turbulence model described in
     \verbatim
         Menter, F., Esch, T.,
         "Elements of Industrial Heat Transfer Prediction",
@@ -36,7 +36,21 @@ Description
         Nov. 2001.
     \endverbatim
 
-    with the addition of the optional F3 term for rough walls from
+    with updated coefficients from
+    \verbatim
+        Menter, F. R., Kuntz, M., and Langtry, R.,
+        "Ten Years of Industrial Experience with the SST Turbulence Model",
+        Turbulence, Heat and Mass Transfer 4, 2003,
+        pp. 625 - 632.
+    \endverbatim
+
+    but with the consistent production terms from the 2001 paper as form in the
+    2003 paper is a typo, see
+    \verbatim
+        http://turbmodels.larc.nasa.gov/sst.html
+    \endverbatim
+
+    and the addition of the optional F3 term for rough walls from
     \verbatim
         Hellsten, A.
         "Some Improvements in Menter’s k-omega-SST turbulence model"
@@ -54,13 +68,6 @@ Description
     Also note that the error in the last term of equation (2) relating to
     sigma has been corrected.
 
-    Wall-functions are applied in this implementation by using equations (14)
-    to specify the near-wall omega as appropriate.
-
-    The blending functions (15) and (16) are not currently used because of the
-    uncertainty in their origin, range of applicability and that is y+ becomes
-    sufficiently small blending u_tau in this manner clearly becomes nonsense.
-
     The default model coefficients correspond to the following:
     \verbatim
         kOmegaSSTCoeffs
-- 
GitLab