1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::compressible::RASModels::realizableKE
28 Realizable k-epsilon turbulence model for compressible flows.
30 Model described in the paper:
32 "A New k-epsilon Eddy Viscosity Model for High Reynolds Number
35 Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
38 Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
41 The default model coefficients correspond to the following:
50 Prt 1.0; // only for compressible
57 \*---------------------------------------------------------------------------*/
59 #ifndef realizableKE_H
60 #define realizableKE_H
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 namespace compressible
73 /*---------------------------------------------------------------------------*\
74 Class realizableKE Declaration
75 \*---------------------------------------------------------------------------*/
88 dimensionedScalar Cmu_;
89 dimensionedScalar A0_;
90 dimensionedScalar C2_;
91 dimensionedScalar sigmak_;
92 dimensionedScalar sigmaEps_;
93 dimensionedScalar Prt_;
99 volScalarField epsilon_;
101 volScalarField alphat_;
104 // Protected Member Functions
106 tmp<volScalarField> rCmu
108 const volTensorField& gradU,
109 const volScalarField& S2,
110 const volScalarField& magS
113 tmp<volScalarField> rCmu(const volTensorField& gradU);
118 //- Runtime type information
119 TypeName("realizableKE");
123 //- Construct from components
126 const volScalarField& rho,
127 const volVectorField& U,
128 const surfaceScalarField& phi,
129 const basicThermo& thermophysicalModel,
130 const word& turbulenceModelName = turbulenceModel::typeName,
131 const word& modelName = typeName
136 virtual ~realizableKE()
142 //- Return the effective diffusivity for k
143 tmp<volScalarField> DkEff() const
145 return tmp<volScalarField>
147 new volScalarField("DkEff", mut_/sigmak_ + mu())
151 //- Return the effective diffusivity for epsilon
152 tmp<volScalarField> DepsilonEff() const
154 return tmp<volScalarField>
156 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
160 //- Return the turbulence viscosity
161 virtual tmp<volScalarField> mut() const
166 //- Return the turbulence thermal diffusivity
167 virtual tmp<volScalarField> alphat() const
172 //- Return the turbulence kinetic energy
173 virtual tmp<volScalarField> k() const
178 //- Return the turbulence kinetic energy dissipation rate
179 virtual tmp<volScalarField> epsilon() const
184 //- Return the Reynolds stress tensor
185 virtual tmp<volSymmTensorField> R() const;
187 //- Return the effective stress tensor including the laminar stress
188 virtual tmp<volSymmTensorField> devRhoReff() const;
190 //- Return the source term for the momentum equation
191 virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
193 //- Solve the turbulence equations and correct the turbulence viscosity
194 virtual void correct();
196 //- Read RASProperties dictionary
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 } // End namespace RASModels
204 } // End namespace compressible
205 } // End namespace Foam
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 // ************************************************************************* //