initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / LaunderSharmaKE / LaunderSharmaKE.H
blobb7c972a662c05b473d8b8eb2f80b4e7125593e4f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::compressible::RASModels::LaunderSharmaKE
28 Description
29     Launder and Sharma low-Reynolds k-epsilon turbulence model for
30     compressible and combusting flows.
32     The default model coefficients correspond to the following:
33     @verbatim
34         LaunderSharmaKECoeffs
35         {
36             Cmu         0.09;
37             C1          1.44;
38             C2          1.92;
39             C3          -0.33;
40             alphah      1.0;    // only for compressible
41             alphahk     1.0;    // only for compressible
42             alphaEps    0.76923;
43         }
44     @endverbatim
46 SourceFiles
47     LaunderSharmaKE.C
48     LaunderSharmaKECorrect.C
50 \*---------------------------------------------------------------------------*/
52 #ifndef compressibleLaunderSharmaKE_H
53 #define compressibleLaunderSharmaKE_H
55 #include "RASModel.H"
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 namespace Foam
61 namespace compressible
63 namespace RASModels
66 /*---------------------------------------------------------------------------*\
67                         Class LaunderSharmaKE Declaration
68 \*---------------------------------------------------------------------------*/
70 class LaunderSharmaKE
72     public RASModel
74     // Private data
76         // Model coefficients
78             dimensionedScalar Cmu_;
79             dimensionedScalar C1_;
80             dimensionedScalar C2_;
81             dimensionedScalar C3_;
82             dimensionedScalar sigmak_;
83             dimensionedScalar sigmaEps_;
84             dimensionedScalar Prt_;
87         // Fields
89             volScalarField k_;
90             volScalarField epsilon_;
91             volScalarField mut_;
92             volScalarField alphat_;
95     // Private member functions
97         tmp<volScalarField> fMu() const;
98         tmp<volScalarField> f2() const;
101 public:
103     //- Runtime type information
104     TypeName("LaunderSharmaKE");
106     // Constructors
108         //- Construct from components
109         LaunderSharmaKE
110         (
111             const volScalarField& rho,
112             const volVectorField& U,
113             const surfaceScalarField& phi,
114             const basicThermo& thermophysicalModel
115         );
118     //- Destructor
119     virtual ~LaunderSharmaKE()
120     {}
123     // Member Functions
125         //- Return the effective diffusivity for k
126         tmp<volScalarField> DkEff() const
127         {
128             return tmp<volScalarField>
129             (
130                 new volScalarField("DkEff", mut_/sigmak_ + mu())
131             );
132         }
134         //- Return the effective diffusivity for epsilon
135         tmp<volScalarField> DepsilonEff() const
136         {
137             return tmp<volScalarField>
138             (
139                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
140             );
141         }
143         //- Return the turbulence viscosity
144         virtual tmp<volScalarField> mut() const
145         {
146             return mut_;
147         }
149         //- Return the effective turbulent thermal diffusivity
150         virtual tmp<volScalarField> alphaEff() const
151         {
152             return tmp<volScalarField>
153             (
154                 new volScalarField("alphaEff", alphat_ + alpha())
155             );
156         }
158         //- Return the turbulence kinetic energy
159         virtual tmp<volScalarField> k() const
160         {
161             return k_;
162         }
164         //- Return the turbulence kinetic energy dissipation rate
165         virtual tmp<volScalarField> epsilon() const
166         {
167             return epsilon_;
168         }
170         //- Return the Reynolds stress tensor
171         virtual tmp<volSymmTensorField> R() const;
173         //- Return the effective stress tensor including the laminar stress
174         virtual tmp<volSymmTensorField> devRhoReff() const;
176         //- Return the source term for the momentum equation
177         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
179         //- Solve the turbulence equations and correct the turbulence viscosity
180         virtual void correct();
182         //- Read RASProperties dictionary
183         virtual bool read();
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 } // End namespace RASModels
190 } // End namespace compressible
191 } // End namespace Foam
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 #endif
197 // ************************************************************************* //