1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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::kEpsilon
28 Standard k-epsilon turbulence model for compressible flows
30 The default model coefficients correspond to the following:
37 C3 -0.33; // only for compressible
38 sigmak 1.0; // only for compressible
40 Prt 1.0; // only for compressible
48 \*---------------------------------------------------------------------------*/
50 #ifndef compressiblekEpsilon_H
51 #define compressiblekEpsilon_H
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 namespace compressible
64 /*---------------------------------------------------------------------------*\
65 Class kEpsilon Declaration
66 \*---------------------------------------------------------------------------*/
76 dimensionedScalar Cmu_;
77 dimensionedScalar C1_;
78 dimensionedScalar C2_;
79 dimensionedScalar C3_;
80 dimensionedScalar sigmak_;
81 dimensionedScalar sigmaEps_;
82 dimensionedScalar Prt_;
87 volScalarField epsilon_;
89 volScalarField alphat_;
94 //- Runtime type information
99 //- Construct from components
102 const volScalarField& rho,
103 const volVectorField& U,
104 const surfaceScalarField& phi,
105 const basicThermo& thermophysicalModel
116 //- Return the effective diffusivity for k
117 tmp<volScalarField> DkEff() const
119 return tmp<volScalarField>
121 new volScalarField("DkEff", mut_/sigmak_ + mu())
125 //- Return the effective diffusivity for epsilon
126 tmp<volScalarField> DepsilonEff() const
128 return tmp<volScalarField>
130 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
134 //- Return the turbulence viscosity
135 virtual tmp<volScalarField> mut() const
140 //- Return the effective turbulent thermal diffusivity
141 virtual tmp<volScalarField> alphaEff() const
143 return tmp<volScalarField>
145 new volScalarField("alphaEff", alphat_ + alpha())
149 //- Return the turbulence kinetic energy
150 virtual tmp<volScalarField> k() const
155 //- Return the turbulence kinetic energy dissipation rate
156 virtual tmp<volScalarField> epsilon() const
161 //- Return the Reynolds stress tensor
162 virtual tmp<volSymmTensorField> R() const;
164 //- Return the effective stress tensor including the laminar stress
165 virtual tmp<volSymmTensorField> devRhoReff() const;
167 //- Return the source term for the momentum equation
168 virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
170 //- Solve the turbulence equations and correct the turbulence viscosity
171 virtual void correct();
173 //- Read RASProperties dictionary
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 } // End namespace RASModels
181 } // End namespace compressible
182 } // End namespace Foam
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 // ************************************************************************* //