initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / realizableKE / realizableKE.H
blobb055f540757a0dd39fbad88a6d74cbf146bf6d1b
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::incompressible::RASModels::realizableKE
28 Description
29     Realizable k-epsilon turbulence model for incompressible flows.
31     Model described in the paper:
32     @verbatim
33         "A New k-epsilon Eddy Viscosity Model for High Reynolds Number
34         Turbulent Flows"
36         Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
37         Jiang Zhu
39         Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
40     @endverbatim
42     The default model coefficients correspond to the following:
43     @verbatim
44         realizableKECoeffs
45         {
46             Cmu         0.09;
47             A0          4.0;
48             C2          1.9;
49             sigmak      1.0;
50             sigmaEps    1.2;
51         }
52     @endverbatim
54 SourceFiles
55     realizableKE.C
57 \*---------------------------------------------------------------------------*/
59 #ifndef realizableKE_H
60 #define realizableKE_H
62 #include "RASModel.H"
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 namespace Foam
68 namespace incompressible
70 namespace RASModels
73 /*---------------------------------------------------------------------------*\
74                            Class realizableKE Declaration
75 \*---------------------------------------------------------------------------*/
77 class realizableKE
79     public RASModel
81     // Private data
83         // Model coefficients
85             dimensionedScalar Cmu_;
86             dimensionedScalar A0_;
87             dimensionedScalar C2_;
88             dimensionedScalar sigmak_;
89             dimensionedScalar sigmaEps_;
92         // Fields
94             volScalarField k_;
95             volScalarField epsilon_;
96             volScalarField nut_;
99     // Private member functions
101         tmp<volScalarField> rCmu
102         (
103             const volTensorField& gradU,
104             const volScalarField& S2,
105             const volScalarField& magS
106         );
108         tmp<volScalarField> rCmu(const volTensorField& gradU);
111 public:
113     //- Runtime type information
114     TypeName("realizableKE");
116     // Constructors
118         //- Construct from components
119         realizableKE
120         (
121             const volVectorField& U,
122             const surfaceScalarField& phi,
123             transportModel& transport
124         );
127     //- Destructor
128     virtual ~realizableKE()
129     {}
132     // Member Functions
134         //- Return the turbulence viscosity
135         virtual tmp<volScalarField> nut() const
136         {
137             return nut_;
138         }
140         //- Return the effective diffusivity for k
141         tmp<volScalarField> DkEff() const
142         {
143             return tmp<volScalarField>
144             (
145                 new volScalarField("DkEff", nut_/sigmak_ + nu())
146             );
147         }
149         //- Return the effective diffusivity for epsilon
150         tmp<volScalarField> DepsilonEff() const
151         {
152             return tmp<volScalarField>
153             (
154                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
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> devReff() const;
176         //- Return the source term for the momentum equation
177         virtual tmp<fvVectorMatrix> divDevReff(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 incompressible
191 } // End namespace Foam
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 #endif
197 // ************************************************************************* //