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