FreeFOAM The Cross-Platform CFD Toolkit
RNGkEpsilon.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::RNGkEpsilon
26 
27 Description
28  Renormalisation group k-epsilon turbulence model for incompressible flows.
29 
30  The default model coefficients correspond to the following:
31  @verbatim
32  RNGkEpsilonCoeffs
33  {
34  Cmu 0.0845;
35  C1 1.42;
36  C2 1.68;
37  sigmak 0.71942;
38  sigmaEps 0.71942;
39  eta0 4.38;
40  beta 0.012;
41  }
42  @endverbatim
43 
44 SourceFiles
45  RNGkEpsilon.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef RNGkEpsilon_H
50 #define RNGkEpsilon_H
51 
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace incompressible
59 {
60 namespace RASModels
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class RNGkEpsilon Declaration
65 \*---------------------------------------------------------------------------*/
66 
68 :
69  public RASModel
70 {
71  // Private data
72 
73  // Model coefficients
74 
75  dimensionedScalar Cmu_;
78  dimensionedScalar sigmak_;
79  dimensionedScalar sigmaEps_;
80  dimensionedScalar eta0_;
81  dimensionedScalar beta_;
82 
83 
84  // Fields
85 
86  volScalarField k_;
87  volScalarField epsilon_;
88  volScalarField nut_;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("RNGkEpsilon");
95 
96  // Constructors
97 
98  //- Construct from components
100  (
101  const volVectorField& U,
102  const surfaceScalarField& phi,
104  );
105 
106 
107  //- Destructor
108  virtual ~RNGkEpsilon()
109  {}
110 
111 
112  // Member Functions
113 
114  //- Return the turbulence viscosity
115  virtual tmp<volScalarField> nut() const
116  {
117  return nut_;
118  }
119 
120  //- Return the effective diffusivity for k
122  {
123  return tmp<volScalarField>
124  (
125  new volScalarField("DkEff", nut_/sigmak_ + nu())
126  );
127  }
128 
129  //- Return the effective diffusivity for epsilon
131  {
132  return tmp<volScalarField>
133  (
134  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
135  );
136  }
137 
138  //- Return the turbulence kinetic energy
139  virtual tmp<volScalarField> k() const
140  {
141  return k_;
142  }
143 
144  //- Return the turbulence kinetic energy dissipation rate
145  virtual tmp<volScalarField> epsilon() const
146  {
147  return epsilon_;
148  }
149 
150  //- Return the Reynolds stress tensor
151  virtual tmp<volSymmTensorField> R() const;
152 
153  //- Return the effective stress tensor including the laminar stress
154  virtual tmp<volSymmTensorField> devReff() const;
155 
156  //- Return the source term for the momentum equation
158 
159  //- Solve the turbulence equations and correct the turbulence viscosity
160  virtual void correct();
161 
162  //- Read RASProperties dictionary
163  virtual bool read();
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace RASModels
170 } // End namespace incompressible
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************ vim: set sw=4 sts=4 et: ************************ //