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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::RASModels::kOmega
29 
30 Group
31  grpRASTurbulence
32 
33 Description
34  Standard high Reynolds-number k-omega turbulence model for
35  incompressible and compressible flows.
36 
37  References:
38  \verbatim
39  Wilcox, D. C. (1988).
40  Reassessment of the scale-determining
41  equation for advanced turbulence models.
42  AIAA Journal, 26(11), 1299-1310.
43  DOI:10.2514/3.10041
44  \endverbatim
45 
46  The default model coefficients are
47  \verbatim
48  kOmegaCoeffs
49  {
50  Cmu 0.09; // Equivalent to betaStar
51  alpha 0.52;
52  beta 0.072;
53  alphak 0.5;
54  alphaOmega 0.5;
55  }
56  \endverbatim
57 
58 SourceFiles
59  kOmega.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef kOmega_H
64 #define kOmega_H
65 
66 #include "RASModel.H"
67 #include "eddyViscosity.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 namespace RASModels
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class kOmega Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 template<class BasicTurbulenceModel>
81 class kOmega
82 :
83  public eddyViscosity<RASModel<BasicTurbulenceModel>>
84 {
85 
86 protected:
87 
88  // Protected data
89 
90  // Model coefficients
91 
97 
98 
99  // Fields
100 
103 
104 
105  // Protected Member Functions
106 
107  virtual void correctNut();
110 public:
111 
112  typedef typename BasicTurbulenceModel::alphaField alphaField;
113  typedef typename BasicTurbulenceModel::rhoField rhoField;
114  typedef typename BasicTurbulenceModel::transportModel transportModel;
115 
116 
117  //- Runtime type information
118  TypeName("kOmega");
119 
120 
121  // Constructors
122 
123  //- Construct from components
124  kOmega
125  (
126  const alphaField& alpha,
127  const rhoField& rho,
128  const volVectorField& U,
129  const surfaceScalarField& alphaRhoPhi,
130  const surfaceScalarField& phi,
131  const transportModel& transport,
132  const word& propertiesName = turbulenceModel::propertiesName,
133  const word& type = typeName
134  );
135 
136 
137  //- Destructor
138  virtual ~kOmega() = default;
139 
140 
141  // Member Functions
142 
143  //- Read RASProperties dictionary
144  virtual bool read();
145 
146  //- Return the effective diffusivity for k
147  tmp<volScalarField> DkEff() const
148  {
149  return tmp<volScalarField>
150  (
151  new volScalarField
152  (
153  "DkEff",
154  alphaK_*this->nut_ + this->nu()
155  )
156  );
157  }
158 
159  //- Return the effective diffusivity for omega
161  {
162  return tmp<volScalarField>
163  (
164  new volScalarField
165  (
166  "DomegaEff",
167  alphaOmega_*this->nut_ + this->nu()
168  )
169  );
170  }
171 
172  //- Return the turbulence kinetic energy
173  virtual tmp<volScalarField> k() const
174  {
175  return k_;
176  }
177 
178  //- Return the turbulence specific dissipation rate
179  virtual tmp<volScalarField> omega() const
180  {
181  return omega_;
182  }
183 
184  //- Solve the turbulence equations and correct the turbulence viscosity
185  virtual void correct();
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 } // End namespace RASModels
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 #ifdef NoRepository
196  #include "kOmega.C"
197 #endif
198 
199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200 
201 #endif
202 
203 // ************************************************************************* //
BasicTurbulenceModel::transportModel transportModel
Definition: kOmega.H:109
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:50
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega.H:182
dimensionedScalar alphaK_
Definition: kOmega.H:90
TypeName("kOmega")
Runtime type information.
BasicTurbulenceModel::alphaField alphaField
Definition: kOmega.H:107
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:51
dimensionedScalar Cmu_
Definition: kOmega.H:87
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega.H:152
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
static const word propertiesName
Default name of the turbulence properties dictionary.
BasicTurbulenceModel::rhoField rhoField
Definition: kOmega.H:108
A class for handling words, derived from Foam::string.
Definition: word.H:63
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega.H:167
dimensionedScalar alphaOmega_
Definition: kOmega.H:91
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega.C:175
volScalarField k_
Definition: kOmega.H:96
dimensionedScalar beta_
Definition: kOmega.H:88
virtual void correctNut()
Definition: kOmega.C:36
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega.C:157
U
Definition: pEqn.H:72
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega.H:190
A class for managing temporary objects.
Definition: HashPtrTable.H:50
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
volScalarField omega_
Definition: kOmega.H:97
Standard high Reynolds-number k-omega turbulence model for incompressible and compressible flows...
Definition: kOmega.H:76
volScalarField & nu
dimensionedScalar gamma_
Definition: kOmega.H:89
Namespace for OpenFOAM.
virtual ~kOmega()=default
Destructor.