1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::compressible::RASModels::kEpsilon
29 Standard k-epsilon turbulence model for compressible flows
31 The default model coefficients correspond to the following:
38 C3 -0.33; // only for compressible
39 sigmak 1.0; // only for compressible
41 Prt 1.0; // only for compressible
49 \*---------------------------------------------------------------------------*/
51 #ifndef compressiblekEpsilon_H
52 #define compressiblekEpsilon_H
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 namespace compressible
65 /*---------------------------------------------------------------------------*\
66 Class kEpsilon Declaration
67 \*---------------------------------------------------------------------------*/
77 dimensionedScalar Cmu_;
78 dimensionedScalar C1_;
79 dimensionedScalar C2_;
80 dimensionedScalar C3_;
81 dimensionedScalar sigmak_;
82 dimensionedScalar sigmaEps_;
83 dimensionedScalar Prt_;
88 volScalarField epsilon_;
90 volScalarField alphat_;
95 //- Runtime type information
100 //- Construct from components
103 const volScalarField& rho,
104 const volVectorField& U,
105 const surfaceScalarField& phi,
106 const basicThermo& thermophysicalModel
117 //- Return the effective diffusivity for k
118 tmp<volScalarField> DkEff() const
120 return tmp<volScalarField>
122 new volScalarField("DkEff", mut_/sigmak_ + mu())
126 //- Return the effective diffusivity for epsilon
127 tmp<volScalarField> DepsilonEff() const
129 return tmp<volScalarField>
131 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
135 //- Return the turbulence viscosity
136 virtual tmp<volScalarField> mut() const
141 //- Return the effective turbulent thermal diffusivity
142 virtual tmp<volScalarField> alphaEff() const
144 return tmp<volScalarField>
146 new volScalarField("alphaEff", alphat_ + alpha())
150 //- Return the turbulence kinetic energy
151 virtual tmp<volScalarField> k() const
156 //- Return the turbulence kinetic energy dissipation rate
157 virtual tmp<volScalarField> epsilon() const
162 //- Return the Reynolds stress tensor
163 virtual tmp<volSymmTensorField> R() const;
165 //- Return the effective stress tensor including the laminar stress
166 virtual tmp<volSymmTensorField> devRhoReff() const;
168 //- Return the source term for the momentum equation
169 virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
171 //- Solve the turbulence equations and correct the turbulence viscosity
172 virtual void correct();
174 //- Read RASProperties dictionary
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 } // End namespace RASModels
182 } // End namespace compressible
183 } // End namespace Foam
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 // ************************************************************************* //