RNGkEpsilon.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::RASModels::RNGkEpsilon
29 
30 Group
31  grpRASTurbulence
32 
33 Description
34  Renormalization group k-epsilon turbulence model for incompressible and
35  compressible flows.
36 
37  Reference:
38  \verbatim
39  Yakhot, V., Orszag, S. A., Thangam, S.,
40  Gatski, T. B., & Speziale, C. G. (1992).
41  Development of turbulence models for shear flows
42  by a double expansion technique.
43  Physics of Fluids A: Fluid Dynamics (1989-1993), 4(7), 1510-1520.
44 
45  For the RDT-based compression term:
46  El Tahry, S. H. (1983).
47  k-epsilon equation for compressible reciprocating engine flows.
48  Journal of Energy, 7(4), 345-353.
49  \endverbatim
50 
51  The default model coefficients are
52  \verbatim
53  RNGkEpsilonCoeffs
54  {
55  Cmu 0.0845;
56  C1 1.42;
57  C2 1.68;
58  C3 -0.33;
59  sigmak 0.71942;
60  sigmaEps 0.71942;
61  eta0 4.38;
62  beta 0.012;
63  }
64  \endverbatim
65 
66 SourceFiles
67  RNGkEpsilon.C
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef RNGkEpsilon_H
72 #define RNGkEpsilon_H
73 
74 #include "RASModel.H"
75 #include "eddyViscosity.H"
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 namespace Foam
80 {
81 namespace RASModels
82 {
83 
84 /*---------------------------------------------------------------------------*\
85  Class RNGkEpsilon Declaration
86 \*---------------------------------------------------------------------------*/
87 
88 template<class BasicTurbulenceModel>
89 class RNGkEpsilon
90 :
91  public eddyViscosity<RASModel<BasicTurbulenceModel>>
92 {
93  // Private Member Functions
94 
95  //- No copy construct
96  RNGkEpsilon(const RNGkEpsilon&) = delete;
97 
98  //- No copy assignment
99  void operator=(const RNGkEpsilon&) = delete;
100 
101 
102 protected:
103 
104  // Protected data
105 
106  // Model coefficients
107 
116 
117 
118  // Fields
119 
122 
123 
124  // Protected Member Functions
125 
126  virtual void correctNut();
127  virtual tmp<fvScalarMatrix> kSource() const;
128  virtual tmp<fvScalarMatrix> epsilonSource() const;
129 
130 
131 public:
132 
133  typedef typename BasicTurbulenceModel::alphaField alphaField;
134  typedef typename BasicTurbulenceModel::rhoField rhoField;
135  typedef typename BasicTurbulenceModel::transportModel transportModel;
136 
137 
138  //- Runtime type information
139  TypeName("RNGkEpsilon");
140 
141 
142  // Constructors
143 
144  //- Construct from components
146  (
147  const alphaField& alpha,
148  const rhoField& rho,
149  const volVectorField& U,
150  const surfaceScalarField& alphaRhoPhi,
151  const surfaceScalarField& phi,
152  const transportModel& transport,
153  const word& propertiesName = turbulenceModel::propertiesName,
154  const word& type = typeName
155  );
156 
157 
158  //- Destructor
159  virtual ~RNGkEpsilon() = default;
160 
161 
162  // Member Functions
163 
164  //- Re-read model coefficients if they have changed
165  virtual bool read();
166 
167  //- Return the effective diffusivity for k
168  tmp<volScalarField> DkEff() const
169  {
170  return tmp<volScalarField>
171  (
172  new volScalarField
173  (
174  "DkEff",
175  (this->nut_/sigmak_ + this->nu())
176  )
177  );
178  }
179 
180  //- Return the effective diffusivity for epsilon
182  {
183  return tmp<volScalarField>
184  (
185  new volScalarField
186  (
187  "DepsilonEff",
188  (this->nut_/sigmaEps_ + this->nu())
189  )
190  );
191  }
192 
193  //- Return the turbulence kinetic energy
194  virtual tmp<volScalarField> k() const
195  {
196  return k_;
197  }
198 
199  //- Return the turbulence kinetic energy dissipation rate
200  virtual tmp<volScalarField> epsilon() const
201  {
202  return epsilon_;
203  }
204 
205  //- Return the (estimated) specific dissipation rate
206  virtual tmp<volScalarField> omega() const
207  {
209  (
210  IOobject
211  (
212  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
213  this->runTime_.timeName(),
214  this->mesh_
215  ),
216  epsilon_/(Cmu_*k_)
217  );
218  }
219 
220  //- Solve the turbulence equations and correct the turbulence viscosity
221  virtual void correct();
222 };
223 
224 
225 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 
227 } // End namespace RASModels
228 } // End namespace Foam
229 
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231 
232 #ifdef NoRepository
233  #include "RNGkEpsilon.C"
234 #endif
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 #endif
239 
240 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::RASModels::RNGkEpsilon::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: RNGkEpsilon.H:199
Foam::RASModels::RNGkEpsilon::beta_
dimensionedScalar beta_
Definition: RNGkEpsilon.H:114
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::RASModels::RNGkEpsilon::C2_
dimensionedScalar C2_
Definition: RNGkEpsilon.H:109
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::RASModels::RNGkEpsilon::kSource
virtual tmp< fvScalarMatrix > kSource() const
Definition: RNGkEpsilon.C:54
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::RASModels::RNGkEpsilon::C3_
dimensionedScalar C3_
Definition: RNGkEpsilon.H:110
Foam::RASModels::RNGkEpsilon::epsilonSource
virtual tmp< fvScalarMatrix > epsilonSource() const
Definition: RNGkEpsilon.C:69
Foam::RASModels::RNGkEpsilon::C1_
dimensionedScalar C1_
Definition: RNGkEpsilon.H:108
rho
rho
Definition: readInitialConditions.H:88
Foam::RASModels::RNGkEpsilon::DepsilonEff
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: RNGkEpsilon.H:180
Foam::RASModels::RNGkEpsilon::k_
volScalarField k_
Definition: RNGkEpsilon.H:119
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::RASModels::RNGkEpsilon::epsilon_
volScalarField epsilon_
Definition: RNGkEpsilon.H:120
eddyViscosity.H
Foam::RASModels::RNGkEpsilon
Renormalization group k-epsilon turbulence model for incompressible and compressible flows.
Definition: RNGkEpsilon.H:88
Foam::RASModels::RNGkEpsilon::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: RNGkEpsilon.C:242
Foam::RASModels::RNGkEpsilon::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: RNGkEpsilon.H:132
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::RASModels::RNGkEpsilon::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: RNGkEpsilon.H:205
Foam::RASModels::RNGkEpsilon::eta0_
dimensionedScalar eta0_
Definition: RNGkEpsilon.H:113
Foam::RASModels::RNGkEpsilon::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: RNGkEpsilon.H:167
Foam::RASModel::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: RASModel.H:97
RASModel.H
Foam::RASModels::RNGkEpsilon::sigmaEps_
dimensionedScalar sigmaEps_
Definition: RNGkEpsilon.H:112
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::RASModel::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: RASModel.H:96
Foam::RASModels::RNGkEpsilon::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: RNGkEpsilon.H:134
Foam::RASModels::RNGkEpsilon::Cmu_
dimensionedScalar Cmu_
Definition: RNGkEpsilon.H:107
Foam::RASModels::RNGkEpsilon::correctNut
virtual void correctNut()
Definition: RNGkEpsilon.C:43
Foam::RASModels::RNGkEpsilon::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: RNGkEpsilon.H:133
Foam::RASModel::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: RASModel.H:98
U
U
Definition: pEqn.H:72
Foam::RASModels::RNGkEpsilon::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: RNGkEpsilon.C:221
Foam::RASModels::RNGkEpsilon::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: RNGkEpsilon.H:193
RNGkEpsilon.C
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::RASModels::RNGkEpsilon::~RNGkEpsilon
virtual ~RNGkEpsilon()=default
Destructor.
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::eddyViscosity< RASModel< BasicTurbulenceModel > >::nut_
volScalarField nut_
Definition: eddyViscosity.H:66
Foam::IOobject::groupName
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::RASModels::RNGkEpsilon::sigmak_
dimensionedScalar sigmak_
Definition: RNGkEpsilon.H:111
Foam::RASModels::RNGkEpsilon::TypeName
TypeName("RNGkEpsilon")
Runtime type information.