LaunderSharmaKE.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-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::LaunderSharmaKE
29
30Group
31 grpRASTurbulence
32
33Description
34 Launder and Sharma low-Reynolds k-epsilon turbulence model for
35 incompressible and compressible and combusting flows including
36 rapid distortion theory (RDT) based compression term.
37
38 References:
39 \verbatim
40 Launder, B. E., & Sharma, B. I. (1974).
41 Application of the energy-dissipation model of turbulence to the
42 calculation of flow near a spinning disc.
43 Letters in heat and mass transfer, 1(2), 131-137.
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 LaunderSharmaKECoeffs
54 {
55 Cmu 0.09;
56 C1 1.44;
57 C2 1.92;
58 C3 -0.33;
59 alphah 1.0; // only for compressible
60 alphahk 1.0; // only for compressible
61 alphaEps 0.76923;
62 }
63 \endverbatim
64
65SourceFiles
66 LaunderSharmaKE.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef LaunderSharmaKE_H
71#define LaunderSharmaKE_H
72
73#include "RASModel.H"
74#include "eddyViscosity.H"
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80namespace RASModels
81{
82
83/*---------------------------------------------------------------------------*\
84 Class LaunderSharmaKE Declaration
85\*---------------------------------------------------------------------------*/
86
87template<class BasicTurbulenceModel>
89:
90 public eddyViscosity<RASModel<BasicTurbulenceModel>>
91{
92 // Private Member Functions
93
94 //- No copy construct
95 LaunderSharmaKE(const LaunderSharmaKE&) = delete;
96
97 //- No copy assignment
98 void operator=(const LaunderSharmaKE&) = delete;
99
100
101protected:
102
103 // Protected data
104
105 // Model coefficients
113
114
115 // Fields
119
120
121 // Private Member Functions
122
123 tmp<volScalarField> fMu() const;
124 tmp<volScalarField> f2() const;
125
126 virtual void correctNut();
127 virtual tmp<fvScalarMatrix> kSource() const;
128 virtual tmp<fvScalarMatrix> epsilonSource() const;
129
130
131public:
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("LaunderSharmaKE");
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 ~LaunderSharmaKE() = 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
169 {
171 (
173 (
174 "DkEff",
175 (this->nut_/sigmak_ + this->nu())
176 )
177 );
178 }
179
180 //- Return the effective diffusivity for epsilon
182 {
184 (
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 //- Solve the turbulence equations and correct the turbulence viscosity
206 virtual void correct();
207};
208
209
210// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211
212} // End namespace RASModels
213} // End namespace Foam
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217#ifdef NoRepository
218 #include "LaunderSharmaKE.C"
219#endif
220
221// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222
223#endif
224
225// ************************************************************************* //
surfaceScalarField & phi
Launder and Sharma low-Reynolds k-epsilon turbulence model for incompressible and compressible and co...
BasicTurbulenceModel::alphaField alphaField
virtual tmp< fvScalarMatrix > epsilonSource() const
tmp< volScalarField > f2() const
BasicTurbulenceModel::rhoField rhoField
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual ~LaunderSharmaKE()=default
Destructor.
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
TypeName("LaunderSharmaKE")
Runtime type information.
virtual tmp< fvScalarMatrix > kSource() const
BasicTurbulenceModel::transportModel transportModel
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
tmp< volScalarField > fMu() const
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
virtual bool read()
Re-read model coefficients if they have changed.
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
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