kOmega.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) 2011-2016 OpenFOAM Foundation
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::RASModels::kOmega
26 
27 Group
28  grpRASTurbulence
29 
30 Description
31  Standard high Reynolds-number k-omega turbulence model for
32  incompressible and compressible flows.
33 
34  References:
35  \verbatim
36  Wilcox, D. C. (1998).
37  Turbulence modeling for CFD
38  (Vol. 2, pp. 103-217). La Canada, CA: DCW industries.
39  \endverbatim
40 
41  The default model coefficients are
42  \verbatim
43  kOmegaCoeffs
44  {
45  Cmu 0.09; // Equivalent to betaStar
46  alpha 0.52;
47  beta 0.072;
48  alphak 0.5;
49  alphaOmega 0.5;
50  }
51  \endverbatim
52 
53 SourceFiles
54  kOmega.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef kOmega_H
59 #define kOmega_H
60 
61 #include "RASModel.H"
62 #include "eddyViscosity.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace RASModels
69 {
70 
71 /*---------------------------------------------------------------------------*\
72  Class kOmega Declaration
73 \*---------------------------------------------------------------------------*/
74 
75 template<class BasicTurbulenceModel>
76 class kOmega
77 :
78  public eddyViscosity<RASModel<BasicTurbulenceModel>>
79 {
80 
81 protected:
82 
83  // Protected data
84 
85  // Model coefficients
86 
92 
93 
94  // Fields
95 
98 
99 
100  // Protected Member Functions
101 
102  virtual void correctNut();
103 
104 
105 public:
107  typedef typename BasicTurbulenceModel::alphaField alphaField;
108  typedef typename BasicTurbulenceModel::rhoField rhoField;
109  typedef typename BasicTurbulenceModel::transportModel transportModel;
110 
111 
112  //- Runtime type information
113  TypeName("kOmega");
114 
115 
116  // Constructors
117 
118  //- Construct from components
119  kOmega
120  (
121  const alphaField& alpha,
122  const rhoField& rho,
123  const volVectorField& U,
124  const surfaceScalarField& alphaRhoPhi,
125  const surfaceScalarField& phi,
126  const transportModel& transport,
127  const word& propertiesName = turbulenceModel::propertiesName,
128  const word& type = typeName
129  );
130 
131 
132  //- Destructor
133  virtual ~kOmega()
134  {}
135 
136 
137  // Member Functions
138 
139  //- Read RASProperties dictionary
140  virtual bool read();
141 
142  //- Return the effective diffusivity for k
143  tmp<volScalarField> DkEff() const
144  {
145  return tmp<volScalarField>
146  (
147  new volScalarField
148  (
149  "DkEff",
150  alphaK_*this->nut_ + this->nu()
151  )
152  );
153  }
154 
155  //- Return the effective diffusivity for omega
157  {
158  return tmp<volScalarField>
159  (
160  new volScalarField
161  (
162  "DomegaEff",
163  alphaOmega_*this->nut_ + this->nu()
164  )
165  );
166  }
167 
168  //- Return the turbulence kinetic energy
169  virtual tmp<volScalarField> k() const
170  {
171  return k_;
172  }
173 
174  //- Return the turbulence specific dissipation rate
175  virtual tmp<volScalarField> omega() const
176  {
177  return omega_;
178  }
179 
180  //- Return the turbulence kinetic energy dissipation rate
181  virtual tmp<volScalarField> epsilon() const
182  {
183  return tmp<volScalarField>
184  (
185  new volScalarField
186  (
187  IOobject
188  (
189  "epsilon",
190  this->mesh_.time().timeName(),
191  this->mesh_
192  ),
193  Cmu_*k_*omega_,
194  omega_.boundaryField().types()
195  )
196  );
197  }
198 
199  //- Solve the turbulence equations and correct the turbulence viscosity
200  virtual void correct();
201 };
202 
203 
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 
206 } // End namespace RASModels
207 } // End namespace Foam
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 #ifdef NoRepository
211  #include "kOmega.C"
212 #endif
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
surfaceScalarField & phi
U
Definition: pEqn.H:83
BasicTurbulenceModel::transportModel transportModel
Definition: kOmega.H:108
kOmega(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName, const word &type=typeName)
Construct from components.
Definition: kOmega.C:54
dimensionedScalar alphaK_
Definition: kOmega.H:89
TypeName("kOmega")
Runtime type information.
BasicTurbulenceModel::alphaField alphaField
Definition: kOmega.H:106
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
dimensionedScalar Cmu_
Definition: kOmega.H:86
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega.H:142
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega.H:174
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: kOmega.H:180
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static const word propertiesName
Default name of the turbulence properties dictionary.
BasicTurbulenceModel::rhoField rhoField
Definition: kOmega.H:107
A class for handling words, derived from string.
Definition: word.H:59
dimensionedScalar alphaOmega_
Definition: kOmega.H:90
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega.C:181
volScalarField k_
Definition: kOmega.H:95
dimensionedScalar beta_
Definition: kOmega.H:87
virtual void correctNut()
Definition: kOmega.C:40
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega.C:161
virtual ~kOmega()
Destructor.
Definition: kOmega.H:132
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega.H:155
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega.H:168
A class for managing temporary objects.
Definition: PtrList.H:54
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
volScalarField omega_
Definition: kOmega.H:96
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Standard high Reynolds-number k-omega turbulence model for incompressible and compressible flows...
Definition: kOmega.H:75
volScalarField & nu
dimensionedScalar gamma_
Definition: kOmega.H:88
Namespace for OpenFOAM.