FreeFOAM The Cross-Platform CFD Toolkit
realizableKE.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::incompressible::RASModels::realizableKE
26 
27 Description
28  Realizable k-epsilon turbulence model for incompressible flows.
29 
30  Model described in the paper:
31  @verbatim
32  "A New k-epsilon Eddy Viscosity Model for High Reynolds Number
33  Turbulent Flows"
34 
35  Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
36  Jiang Zhu
37 
38  Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
39  @endverbatim
40 
41  The default model coefficients correspond to the following:
42  @verbatim
43  realizableKECoeffs
44  {
45  Cmu 0.09;
46  A0 4.0;
47  C2 1.9;
48  sigmak 1.0;
49  sigmaEps 1.2;
50  }
51  @endverbatim
52 
53 SourceFiles
54  realizableKE.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef realizableKE_H
59 #define realizableKE_H
60 
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace incompressible
68 {
69 namespace RASModels
70 {
71 
72 /*---------------------------------------------------------------------------*\
73  Class realizableKE Declaration
74 \*---------------------------------------------------------------------------*/
75 
77 :
78  public RASModel
79 {
80  // Private data
81 
82  // Model coefficients
83 
84  dimensionedScalar Cmu_;
87  dimensionedScalar sigmak_;
88  dimensionedScalar sigmaEps_;
89 
90 
91  // Fields
92 
93  volScalarField k_;
94  volScalarField epsilon_;
95  volScalarField nut_;
96 
97 
98  // Private member functions
99 
101  (
102  const volTensorField& gradU,
103  const volScalarField& S2,
104  const volScalarField& magS
105  );
106 
107  tmp<volScalarField> rCmu(const volTensorField& gradU);
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("realizableKE");
114 
115  // Constructors
116 
117  //- Construct from components
119  (
120  const volVectorField& U,
121  const surfaceScalarField& phi,
123  );
124 
125 
126  //- Destructor
127  virtual ~realizableKE()
128  {}
129 
130 
131  // Member Functions
132 
133  //- Return the turbulence viscosity
134  virtual tmp<volScalarField> nut() const
135  {
136  return nut_;
137  }
138 
139  //- Return the effective diffusivity for k
141  {
142  return tmp<volScalarField>
143  (
144  new volScalarField("DkEff", nut_/sigmak_ + nu())
145  );
146  }
147 
148  //- Return the effective diffusivity for epsilon
150  {
151  return tmp<volScalarField>
152  (
153  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
154  );
155  }
156 
157  //- Return the turbulence kinetic energy
158  virtual tmp<volScalarField> k() const
159  {
160  return k_;
161  }
162 
163  //- Return the turbulence kinetic energy dissipation rate
164  virtual tmp<volScalarField> epsilon() const
165  {
166  return epsilon_;
167  }
168 
169  //- Return the Reynolds stress tensor
170  virtual tmp<volSymmTensorField> R() const;
171 
172  //- Return the effective stress tensor including the laminar stress
173  virtual tmp<volSymmTensorField> devReff() const;
174 
175  //- Return the source term for the momentum equation
177 
178  //- Solve the turbulence equations and correct the turbulence viscosity
179  virtual void correct();
180 
181  //- Read RASProperties dictionary
182  virtual bool read();
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace RASModels
189 } // End namespace incompressible
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************ vim: set sw=4 sts=4 et: ************************ //