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-2015 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:
106 
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_,
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 // ************************************************************************* //
Foam::RASModels::kOmega::read
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega.C:158
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::RASModels::kOmega::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: kOmega.H:106
Foam::RASModels::kOmega::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega.H:142
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::RASModels::kOmega::correctNut
virtual void correctNut()
Definition: kOmega.C:40
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::RASModels::kOmega::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: kOmega.H:107
Foam::RASModels::kOmega::~kOmega
virtual ~kOmega()
Destructor.
Definition: kOmega.H:132
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:97
Foam::GeometricField::boundaryField
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Definition: GeometricField.C:735
Foam::RASModels::kOmega::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega.C:178
U
U
Definition: pEqn.H:46
kOmega.C
nu
volScalarField & nu
Definition: readMechanicalProperties.H:179
Foam::RASModels::kOmega::beta_
dimensionedScalar beta_
Definition: kOmega.H:87
eddyViscosity.H
Foam::RASModels::kOmega::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: kOmega.H:108
Foam::RASModels::kOmega::alphaOmega_
dimensionedScalar alphaOmega_
Definition: kOmega.H:90
Foam::RASModels::kOmega::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega.H:168
Foam::RASModels::kOmega::k_
volScalarField k_
Definition: kOmega.H:95
Foam::RASModels::kOmega::omega
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega.H:174
RASModel.H
Foam::RASModels::kOmega::kOmega
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:51
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam::RASModels::kOmega::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: kOmega.H:180
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::RASModels::kOmega::alphaK_
dimensionedScalar alphaK_
Definition: kOmega.H:89
Foam::RASModels::kOmega::TypeName
TypeName("kOmega")
Runtime type information.
rho
rho
Definition: pEqn.H:3
Foam::GeometricField::GeometricBoundaryField::types
wordList types() const
Return a list of the patch types.
Definition: GeometricBoundaryField.C:534
Foam::RASModels::kOmega::gamma_
dimensionedScalar gamma_
Definition: kOmega.H:88
Foam::RASModels::kOmega::DomegaEff
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega.H:155
Foam::RASModels::kOmega::Cmu_
dimensionedScalar Cmu_
Definition: kOmega.H:86
Foam::RASModels::kOmega::omega_
volScalarField omega_
Definition: kOmega.H:96
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
Foam::eddyViscosity< RASModel< BasicTurbulenceModel > >::nut_
volScalarField nut_
Definition: eddyViscosity.H:63
Foam::RASModels::kOmega
Standard high Reynolds-number k-omega turbulence model for incompressible and compressible flows.
Definition: kOmega.H:75
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52