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