RNGkEpsilon.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-2023 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::RASModels::RNGkEpsilon
26 
27 Description
28  Renormalisation group k-epsilon turbulence model for incompressible and
29  compressible flows.
30 
31  Reference:
32  \verbatim
33  Yakhot, V., Orszag, S. A., Thangam, S.,
34  Gatski, T. B., & Speziale, C. G. (1992).
35  Development of turbulence models for shear flows
36  by a double expansion technique.
37  Physics of Fluids A: Fluid Dynamics (1989-1993), 4(7), 1510-1520.
38 
39  For the RDT-based compression term:
40  El Tahry, S. H. (1983).
41  k-epsilon equation for compressible reciprocating engine flows.
42  Journal of Energy, 7(4), 345-353.
43  \endverbatim
44 
45  The default model coefficients are
46  \verbatim
47  RNGkEpsilonCoeffs
48  {
49  Cmu 0.0845;
50  C1 1.42;
51  C2 1.68;
52  C3 0;
53  sigmak 0.71942;
54  sigmaEps 0.71942;
55  eta0 4.38;
56  beta 0.012;
57  }
58  \endverbatim
59 
60 SourceFiles
61  RNGkEpsilon.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef RNGkEpsilon_H
66 #define RNGkEpsilon_H
67 
68 #include "RASModel.H"
69 #include "eddyViscosity.H"
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 namespace RASModels
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class RNGkEpsilon Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 template<class BasicMomentumTransportModel>
83 class RNGkEpsilon
84 :
85  public eddyViscosity<RASModel<BasicMomentumTransportModel>>
86 {
87 
88 protected:
89 
90  // Protected data
91 
92  // Model coefficients
93 
102 
103 
104  // Fields
105 
108 
109 
110  // Protected Member Functions
111 
112  //- Bound epsilon and return Cmu*sqr(k) for nut
114 
115  //- Correct the eddy-viscosity nut
116  virtual void correctNut();
117 
118  //- Source term for the k equation
119  virtual tmp<fvScalarMatrix> kSource() const;
120 
121  //- Source term for the epsilon equation
122  virtual tmp<fvScalarMatrix> epsilonSource() const;
123 
124 
125 public:
126 
127  typedef typename BasicMomentumTransportModel::alphaField alphaField;
128  typedef typename BasicMomentumTransportModel::rhoField rhoField;
129 
130 
131  //- Runtime type information
132  TypeName("RNGkEpsilon");
133 
134 
135  // Constructors
136 
137  //- Construct from components
139  (
140  const alphaField& alpha,
141  const rhoField& rho,
142  const volVectorField& U,
143  const surfaceScalarField& alphaRhoPhi,
144  const surfaceScalarField& phi,
145  const viscosity& viscosity,
146  const word& type = typeName
147  );
148 
149  //- Disallow default bitwise copy construction
150  RNGkEpsilon(const RNGkEpsilon&) = delete;
151 
152 
153  //- Destructor
154  virtual ~RNGkEpsilon()
155  {}
156 
157 
158  // Member Functions
159 
160  //- Re-read model coefficients if they have changed
161  virtual bool read();
162 
163  //- Return the effective diffusivity for k
164  tmp<volScalarField> DkEff() const
165  {
166  return volScalarField::New
167  (
168  "DkEff",
169  (this->nut_/sigmak_ + this->nu())
170  );
171  }
172 
173  //- Return the effective diffusivity for epsilon
175  {
176  return volScalarField::New
177  (
178  "DepsilonEff",
179  (this->nut_/sigmaEps_ + this->nu())
180  );
181  }
182 
183  //- Return the turbulence kinetic energy
184  virtual tmp<volScalarField> k() const
185  {
186  return k_;
187  }
188 
189  //- Return the turbulence kinetic energy dissipation rate
190  virtual tmp<volScalarField> epsilon() const
191  {
192  return epsilon_;
193  }
194 
195  //- Return the turbulence specific dissipation rate
196  virtual tmp<volScalarField> omega() const
197  {
198  return volScalarField::New
199  (
200  "omega",
201  epsilon_/(Cmu_*k_)
202  );
203  }
204 
205  //- Solve the turbulence equations and correct the turbulence viscosity
206  virtual void correct();
207 
208 
209  // Member Operators
210 
211  //- Disallow default bitwise assignment
212  void operator=(const RNGkEpsilon&) = delete;
213 };
214 
215 
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 
218 } // End namespace RASModels
219 } // End namespace Foam
220 
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 
223 #ifdef NoRepository
224  #include "RNGkEpsilon.C"
225 #endif
226 
227 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
228 
229 #endif
230 
231 // ************************************************************************* //
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
Renormalisation group k-epsilon turbulence model for incompressible and compressible flows.
Definition: RNGkEpsilon.H:85
BasicMomentumTransportModel::alphaField alphaField
Definition: RNGkEpsilon.H:126
virtual tmp< fvScalarMatrix > epsilonSource() const
Source term for the epsilon equation.
Definition: RNGkEpsilon.C:75
dimensionedScalar sigmak_
Definition: RNGkEpsilon.H:97
TypeName("RNGkEpsilon")
Runtime type information.
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: RNGkEpsilon.H:163
dimensionedScalar C1_
Definition: RNGkEpsilon.H:94
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: RNGkEpsilon.H:183
dimensionedScalar sigmaEps_
Definition: RNGkEpsilon.H:98
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: RNGkEpsilon.H:195
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: RNGkEpsilon.C:248
tmp< volScalarField > boundEpsilon()
Bound epsilon and return Cmu*sqr(k) for nut.
Definition: RNGkEpsilon.C:41
virtual ~RNGkEpsilon()
Destructor.
Definition: RNGkEpsilon.H:153
void operator=(const RNGkEpsilon &)=delete
Disallow default bitwise assignment.
dimensionedScalar C2_
Definition: RNGkEpsilon.H:95
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: RNGkEpsilon.H:173
virtual void correctNut()
Correct the eddy-viscosity nut.
Definition: RNGkEpsilon.C:50
virtual tmp< fvScalarMatrix > kSource() const
Source term for the k equation.
Definition: RNGkEpsilon.C:59
dimensionedScalar eta0_
Definition: RNGkEpsilon.H:99
dimensionedScalar Cmu_
Definition: RNGkEpsilon.H:93
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: RNGkEpsilon.H:189
RNGkEpsilon(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
Definition: RNGkEpsilon.C:93
dimensionedScalar C3_
Definition: RNGkEpsilon.H:96
virtual bool read()
Re-read model coefficients if they have changed.
Definition: RNGkEpsilon.C:225
dimensionedScalar beta_
Definition: RNGkEpsilon.H:100
BasicMomentumTransportModel::rhoField rhoField
Definition: RNGkEpsilon.H:127
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
BasicMomentumTransportModel::alphaField alphaField
BasicMomentumTransportModel::rhoField rhoField
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