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::compressible::RASModels::LaunderSharmaKE
26 
27 Description
28  Launder and Sharma low-Reynolds k-epsilon turbulence model for
29  compressible and combusting 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  alphah 1.0; // only for compressible
40  alphahk 1.0; // only for compressible
41  alphaEps 0.76923;
42  }
43  @endverbatim
44 
45 SourceFiles
46  LaunderSharmaKE.C
47  LaunderSharmaKECorrect.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef compressibleLaunderSharmaKE_H
52 #define compressibleLaunderSharmaKE_H
53 
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace compressible
61 {
62 namespace RASModels
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class LaunderSharmaKE Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 :
71  public RASModel
72 {
73  // Private data
74 
75  // Model coefficients
76 
77  dimensionedScalar Cmu_;
81  dimensionedScalar sigmak_;
82  dimensionedScalar sigmaEps_;
83  dimensionedScalar Prt_;
84 
85 
86  // Fields
87 
88  volScalarField k_;
89  volScalarField epsilon_;
90  volScalarField mut_;
91  volScalarField alphat_;
92 
93 
94  // Private member functions
95 
96  tmp<volScalarField> fMu() const;
97  tmp<volScalarField> f2() const;
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("LaunderSharmaKE");
104 
105  // Constructors
106 
107  //- Construct from components
109  (
110  const volScalarField& rho,
111  const volVectorField& U,
112  const surfaceScalarField& phi,
113  const basicThermo& thermophysicalModel
114  );
115 
116 
117  //- Destructor
118  virtual ~LaunderSharmaKE()
119  {}
120 
121 
122  // Member Functions
123 
124  //- Return the effective diffusivity for k
126  {
127  return tmp<volScalarField>
128  (
129  new volScalarField("DkEff", mut_/sigmak_ + mu())
130  );
131  }
132 
133  //- Return the effective diffusivity for epsilon
135  {
136  return tmp<volScalarField>
137  (
138  new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
139  );
140  }
141 
142  //- Return the turbulence viscosity
143  virtual tmp<volScalarField> mut() const
144  {
145  return mut_;
146  }
147 
148  //- Return the effective turbulent thermal diffusivity
150  {
151  return tmp<volScalarField>
152  (
153  new volScalarField("alphaEff", alphat_ + alpha())
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> devRhoReff() const;
174 
175  //- Return the source term for the momentum equation
176  virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
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 compressible
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************ vim: set sw=4 sts=4 et: ************************ //