initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / turbulenceModels / RAS / incompressible / realizableKE / realizableKE.H
blobd3587b2f51b04c80eeb64214f55b48b24a5002ea
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 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         realizableKE
45         {
46             Cmu         0.09;
47             A0          4.0;
48             C2          1.9;
49             alphak      1.0;
50             alphaEps    0.833333;
51             alphah      1.0;    // only for compressible
52         }
53     @endverbatim
55 SourceFiles
56     realizableKE.C
58 \*---------------------------------------------------------------------------*/
60 #ifndef realizableKE_H
61 #define realizableKE_H
63 #include "RASModel.H"
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 namespace Foam
69 namespace incompressible
71 namespace RASModels
74 /*---------------------------------------------------------------------------*\
75                            Class realizableKE Declaration
76 \*---------------------------------------------------------------------------*/
78 class realizableKE
80     public RASModel
82     // Private data
84         dimensionedScalar Cmu_;
85         dimensionedScalar A0_;
86         dimensionedScalar C2_;
87         dimensionedScalar alphak_;
88         dimensionedScalar alphaEps_;
90         volScalarField k_;
91         volScalarField epsilon_;
92         volScalarField nut_;
94         tmp<volScalarField> rCmu
95         (
96             const volTensorField& gradU,
97             const volScalarField& S2,
98             const volScalarField& magS
99         );
101         tmp<volScalarField> rCmu
102         (
103             const volTensorField& gradU
104         );
106 public:
108     //- Runtime type information
109     TypeName("realizableKE");
111     // Constructors
113         //- from components
114         realizableKE
115         (
116             const volVectorField& U,
117             const surfaceScalarField& phi,
118             transportModel& transport
119         );
122     // Destructor
124         ~realizableKE()
125         {}
128     // Member Functions
130         //- Return the turbulence viscosity
131         tmp<volScalarField> nut() const
132         {
133             return nut_;
134         }
136         //- Return the effective diffusivity for k
137         tmp<volScalarField> DkEff() const
138         {
139             return tmp<volScalarField>
140             (
141                 new volScalarField("DkEff", alphak_*nut_ + nu())
142             );
143         }
145         //- Return the effective diffusivity for epsilon
146         tmp<volScalarField> DepsilonEff() const
147         {
148             return tmp<volScalarField>
149             (
150                 new volScalarField("DepsilonEff", alphaEps_*nut_ + nu())
151             );
152         }
154         //- Return the turbulence kinetic energy
155         tmp<volScalarField> k() const
156         {
157             return k_;
158         }
160         //- Return the turbulence kinetic energy dissipation rate
161         tmp<volScalarField> epsilon() const
162         {
163             return epsilon_;
164         }
166         //- Return the Reynolds stress tensor
167         tmp<volSymmTensorField> R() const;
169         //- Return the effective stress tensor including the laminar stress
170         tmp<volSymmTensorField> devReff() const;
172         //- Return the source term for the momentum equation
173         tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
175         //- Solve the turbulence equations and correct the turbulence viscosity
176         void correct();
178         //- Read turbulenceProperties dictionary
179         bool read();
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace RASModels
186 } // End namespace incompressible
187 } // End namespace Foam
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 #endif
193 // ************************************************************************* //