ShihQuadraticKE.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::incompressible::RASModels::ShihQuadraticKE
26 
27 Description
28  Shih's quadratic algebraic Reynolds stress k-epsilon turbulence model for
29  incompressible flows
30 
31  This turbulence model is described in:
32  \verbatim
33  Shih, T. H., Zhu, J., & Lumley, J. L. (1993).
34  A realizable Reynolds stress algebraic equation model.
35  NASA technical memorandum 105993.
36  \endverbatim
37 
38  Implemented according to the specification in:
39  <a href=
40  "https://personalpages.manchester.ac.uk/staff/david.d.apsley/turbmod.pdf"
41  >Apsley: Turbulence Models 2002</a>
42 
43 SourceFiles
44  ShihQuadraticKE.C
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef ShihQuadraticKE_H
49 #define ShihQuadraticKE_H
50 
52 #include "nonlinearEddyViscosity.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace incompressible
59 {
60 namespace RASModels
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class ShihQuadraticKE Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class ShihQuadraticKE
68 :
69  public nonlinearEddyViscosity<incompressible::RASModel>
70 {
71 
72 protected:
73 
74  // Protected data
75 
76  // Model coefficients
77 
89 
90 
91  // Fields
92 
95 
96 
97  // Protected Member Functions
98 
99  //- Bound epsilon
100  void boundEpsilon();
101 
102  //- Correct the eddy-viscosity nut
103  virtual void correctNut();
104 
105  virtual void correctNonlinearStress(const volTensorField& gradU);
106 
107 
108 public:
109 
110  //- Runtime type information
111  TypeName("ShihQuadraticKE");
112 
113 
114  // Constructors
115 
116  //- Construct from components
118  (
119  const geometricOneField& alpha,
120  const geometricOneField& rho,
121  const volVectorField& U,
122  const surfaceScalarField& alphaRhoPhi,
123  const surfaceScalarField& phi,
124  const viscosity& viscosity,
125  const word& type = typeName
126  );
127 
128 
129  //- Destructor
130  virtual ~ShihQuadraticKE()
131  {}
132 
133 
134  // Member Functions
135 
136  //- Read RASProperties dictionary
137  virtual bool read();
138 
139  //- Return the effective diffusivity for k
140  tmp<volScalarField> DkEff() const
141  {
142  return volScalarField::New
143  (
144  "DkEff",
145  nut_/sigmak_ + nu()
146  );
147  }
148 
149  //- Return the effective diffusivity for epsilon
151  {
152  return volScalarField::New
153  (
154  "DepsilonEff",
155  nut_/sigmaEps_ + nu()
156  );
157  }
158 
159  //- Return the turbulence kinetic energy
160  virtual tmp<volScalarField> k() const
161  {
162  return k_;
163  }
164 
165  //- Return the turbulence kinetic energy dissipation rate
166  virtual tmp<volScalarField> epsilon() const
167  {
168  return epsilon_;
169  }
170 
171  //- Return the turbulence specific dissipation rate
172  virtual tmp<volScalarField> omega() const
173  {
174  return volScalarField::New
175  (
176  "omega",
177  epsilon_/(0.09*k_)
178  );
179  }
180 
181  //- Solve the turbulence equations and correct the turbulence viscosity
182  virtual void correct();
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace RASModels
189 } // End namespace incompressible
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Shih's quadratic algebraic Reynolds stress k-epsilon turbulence model for incompressible flows.
virtual void correctNut()
Correct the eddy-viscosity nut.
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
ShihQuadraticKE(const geometricOneField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
TypeName("ShihQuadraticKE")
Runtime type information.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
virtual void correctNonlinearStress(const volTensorField &gradU)
virtual bool read()
Read RASProperties dictionary.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Eddy viscosity turbulence model with non-linear correction base class.
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488