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