kOmega2006.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) 2021-2023 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::kOmega2006
26 
27 Description
28  Standard (2006) high Reynolds-number k-omega turbulence model for
29  incompressible and compressible flows.
30 
31  References:
32  \verbatim
33  Wilcox, D. C. (2006).
34  Turbulence modeling for CFD, 3rd edition
35  La Canada, CA: DCW industries, Inc.
36 
37  Wilcox, D. C. (2008).
38  Formulation of the kw turbulence model revisited.
39  AIAA journal, 46(11), 2823-2838.
40  \endverbatim
41 
42  The default model coefficients are
43  \verbatim
44  kOmega2006Coeffs
45  {
46  Cmu 0.09;
47  beta0 0.0708;
48  gamma 0.52;
49  Clim 0.875;
50  alphak 0.6;
51  alphaOmega 0.5;
52  }
53  \endverbatim
54 
55 SourceFiles
56  kOmega2006.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef kOmega2006_H
61 #define kOmega2006_H
62 
63 #include "RASModel.H"
64 #include "eddyViscosity.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace RASModels
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class kOmega2006 Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 template<class BasicMomentumTransportModel>
78 class kOmega2006
79 :
80  public eddyViscosity<RASModel<BasicMomentumTransportModel>>
81 {
82  // Private Member Functions
83 
84  void correctNut(const volTensorField& gradU);
85 
86  tmp<volScalarField::Internal> beta(const volTensorField& gradU) const;
87 
88  tmp<volScalarField::Internal> CDkOmega() const;
89 
90 
91 protected:
92 
93  // Protected data
94 
95  // Model coefficients
96 
104 
105 
106  // Fields
107 
110 
111 
112  // Protected Member Functions
113 
114  //- Bound omega
115  void boundOmega();
116 
117  //- Correct the eddy-viscosity nut
118  virtual void correctNut();
119 
120  //- Source term for the k equation
121  virtual tmp<fvScalarMatrix> kSource() const;
122 
123  //- Source term for the omega equation
124  virtual tmp<fvScalarMatrix> omegaSource() const;
125 
126 
127 public:
128 
129  typedef typename BasicMomentumTransportModel::alphaField alphaField;
130  typedef typename BasicMomentumTransportModel::rhoField rhoField;
131 
132 
133  //- Runtime type information
134  TypeName("kOmega2006");
135 
136 
137  // Constructors
138 
139  //- Construct from components
140  kOmega2006
141  (
142  const alphaField& alpha,
143  const rhoField& rho,
144  const volVectorField& U,
145  const surfaceScalarField& alphaRhoPhi,
146  const surfaceScalarField& phi,
147  const viscosity& viscosity,
148  const word& type = typeName
149  );
150 
151 
152  //- Destructor
153  virtual ~kOmega2006()
154  {}
155 
156 
157  // Member Functions
158 
159  //- Read RASProperties dictionary
160  virtual bool read();
161 
162  //- Return the effective diffusivity for k
163  tmp<volScalarField> DkEff() const
164  {
165  return volScalarField::New
166  (
167  "DkEff",
168  alphaK_*this->nut_ + this->nu()
169  );
170  }
171 
172  //- Return the effective diffusivity for omega
174  {
175  return volScalarField::New
176  (
177  "DomegaEff",
178  alphaOmega_*this->nut_ + this->nu()
179  );
180  }
181 
182  //- Return the turbulence kinetic energy
183  virtual tmp<volScalarField> k() const
184  {
185  return k_;
186  }
187 
188  //- Return the turbulence specific dissipation rate
189  virtual tmp<volScalarField> omega() const
190  {
191  return omega_;
192  }
193 
194  //- Return the turbulence kinetic energy dissipation rate
195  virtual tmp<volScalarField> epsilon() const
196  {
197  return volScalarField::New
198  (
199  "epsilon",
201  );
202  }
203 
204  //- Solve the turbulence equations and correct the turbulence viscosity
205  virtual void correct();
206 };
207 
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 } // End namespace RASModels
212 } // End namespace Foam
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 #ifdef NoRepository
216  #include "kOmega2006.C"
217 #endif
218 
219 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 
221 #endif
222 
223 // ************************************************************************* //
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
Standard (2006) high Reynolds-number k-omega turbulence model for incompressible and compressible flo...
Definition: kOmega2006.H:80
BasicMomentumTransportModel::alphaField alphaField
Definition: kOmega2006.H:128
void boundOmega()
Bound omega.
Definition: kOmega2006.C:41
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega2006.H:162
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega2006.H:172
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega2006.H:182
virtual ~kOmega2006()
Destructor.
Definition: kOmega2006.H:152
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega2006.H:188
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega2006.C:283
dimensionedScalar alphaOmega_
Definition: kOmega2006.H:102
dimensionedScalar beta0_
Definition: kOmega2006.H:97
dimensionedScalar gamma_
Definition: kOmega2006.H:98
virtual tmp< fvScalarMatrix > omegaSource() const
Source term for the omega equation.
Definition: kOmega2006.C:122
virtual void correctNut()
Correct the eddy-viscosity nut.
Definition: kOmega2006.C:100
dimensionedScalar sigmaDo_
Definition: kOmega2006.H:100
virtual tmp< fvScalarMatrix > kSource() const
Source term for the k equation.
Definition: kOmega2006.C:107
TypeName("kOmega2006")
Runtime type information.
kOmega2006(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
Definition: kOmega2006.C:139
dimensionedScalar Clim_
Definition: kOmega2006.H:99
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: kOmega2006.H:194
dimensionedScalar betaStar_
Definition: kOmega2006.H:96
dimensionedScalar alphaK_
Definition: kOmega2006.H:101
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega2006.C:262
BasicMomentumTransportModel::rhoField rhoField
Definition: kOmega2006.H:129
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
BasicMomentumTransportModel::alphaField alphaField
BasicMomentumTransportModel::rhoField rhoField
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488