realizableKE.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-2017 OpenFOAM Foundation
9 Copyright (C) 2019-2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::RASModels::realizableKE
29
30Group
31 grpRASTurbulence
32
33Description
34 Realizable k-epsilon turbulence model for incompressible and compressible
35 flows.
36
37 References:
38 \verbatim
39 Shih, T. H., Liou, W. W., Shabbir, A., Yang, Z., & Zhu, J. (1994).
40 A new k-epsilon eddy viscosity model for high Reynolds number
41 turbulent flows: Model development and validation.
42 NASA STI/Recon Technical Report N, 95, 11442.
43
44 Shih, T. H., Liou, W. W., Shabbir, A., Yang, Z., & Zhu, J. (1995).
45 A New k-epsilon Eddy Viscosity Model for High Reynolds Number
46 Turbulent Flows.
47 Computers and Fluids, 24(3), 227-238.
48 \endverbatim
49
50 The default model coefficients are
51 \verbatim
52 realizableKECoeffs
53 {
54 A0 4.0;
55 C2 1.9;
56 sigmak 1.0;
57 sigmaEps 1.2;
58 }
59 \endverbatim
60
61SourceFiles
62 realizableKE.C
63
64\*---------------------------------------------------------------------------*/
65
66#ifndef realizableKE_H
67#define realizableKE_H
68
69#include "RASModel.H"
70#include "eddyViscosity.H"
71
72// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
74namespace Foam
75{
76namespace RASModels
77{
78
79/*---------------------------------------------------------------------------*\
80 Class realizableKE Declaration
81\*---------------------------------------------------------------------------*/
82
83template<class BasicTurbulenceModel>
84class realizableKE
85:
86 public eddyViscosity<RASModel<BasicTurbulenceModel>>
87{
88
89protected:
90
91 // Protected data
92
93 // Model coefficients
99
100
101 // Fields
105
106
107 // Protected Member Functions
108
110 (
111 const volTensorField& gradU,
112 const volScalarField& S2,
113 const volScalarField& magS
114 );
115
116 virtual void correctNut
117 (
118 const volTensorField& gradU,
119 const volScalarField& S2,
120 const volScalarField& magS
121 );
122
123 virtual void correctNut();
124 virtual tmp<fvScalarMatrix> kSource() const;
125 virtual tmp<fvScalarMatrix> epsilonSource() const;
126
127
128public:
130 typedef typename BasicTurbulenceModel::alphaField alphaField;
131 typedef typename BasicTurbulenceModel::rhoField rhoField;
132 typedef typename BasicTurbulenceModel::transportModel transportModel;
133
134
135 //- Runtime type information
136 TypeName("realizableKE");
137
138 // Constructors
139
140 //- Construct from components
142 (
143 const alphaField& alpha,
144 const rhoField& rho,
145 const volVectorField& U,
146 const surfaceScalarField& alphaRhoPhi,
147 const surfaceScalarField& phi,
148 const transportModel& transport,
149 const word& propertiesName = turbulenceModel::propertiesName,
150 const word& type = typeName
151 );
152
153
154 //- Destructor
155 virtual ~realizableKE() = default;
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
165 {
167 (
169 (
170 "DkEff",
171 (this->nut_/sigmak_ + this->nu())
172 )
173 );
174 }
175
176 //- Return the effective diffusivity for epsilon
178 {
180 (
182 (
183 "DepsilonEff",
184 (this->nut_/sigmaEps_ + this->nu())
185 )
186 );
187 }
188
189 //- Return the turbulence kinetic energy
190 virtual tmp<volScalarField> k() const
191 {
192 return k_;
193 }
194
195 //- Return the turbulence kinetic energy dissipation rate
196 virtual tmp<volScalarField> epsilon() const
197 {
198 return epsilon_;
199 }
200
201 //- Solve the turbulence equations and correct the turbulence viscosity
202 virtual void correct();
203};
204
205
206// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207
208} // End namespace RASModels
209} // End namespace Foam
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213#ifdef NoRepository
214 #include "realizableKE.C"
215#endif
216
217// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218
219#endif
220
221// ************************************************************************* //
surfaceScalarField & phi
Realizable k-epsilon turbulence model for incompressible and compressible flows.
Definition: realizableKE.H:86
BasicTurbulenceModel::alphaField alphaField
Definition: realizableKE.H:129
tmp< volScalarField > rCmu(const volTensorField &gradU, const volScalarField &S2, const volScalarField &magS)
Definition: realizableKE.C:44
virtual tmp< fvScalarMatrix > epsilonSource() const
Definition: realizableKE.C:117
dimensionedScalar sigmak_
Definition: realizableKE.H:96
BasicTurbulenceModel::rhoField rhoField
Definition: realizableKE.H:130
TypeName("realizableKE")
Runtime type information.
dimensionedScalar sigmaEps_
Definition: realizableKE.H:97
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: realizableKE.C:249
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: realizableKE.H:176
virtual ~realizableKE()=default
Destructor.
virtual tmp< fvScalarMatrix > kSource() const
Definition: realizableKE.C:102
BasicTurbulenceModel::transportModel transportModel
Definition: realizableKE.H:131
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: realizableKE.H:189
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: realizableKE.H:195
virtual bool read()
Re-read model coefficients if they have changed.
Definition: realizableKE.C:232
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: realizableKE.H:163
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:58
A class for managing temporary objects.
Definition: tmp.H:65
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
volScalarField & nu
volScalarField & alpha
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73