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 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  using IOobject::modelName;
85 
86  void correctNut(const volTensorField& gradU);
87 
88  tmp<volScalarField::Internal> beta(const volTensorField& gradU) const;
89 
90  tmp<volScalarField::Internal> CDkOmega() const;
91 
92 
93 protected:
94 
95  // Protected data
96 
97  // Model coefficients
98 
106 
107 
108  // Fields
112 
113 
114  // Protected Member Functions
115 
116  virtual void correctNut();
117  virtual tmp<fvScalarMatrix> kSource() const;
118  virtual tmp<fvScalarMatrix> omegaSource() const;
119 
120 
121 public:
123  typedef typename BasicMomentumTransportModel::alphaField alphaField;
124  typedef typename BasicMomentumTransportModel::rhoField rhoField;
125  typedef typename BasicMomentumTransportModel::transportModel transportModel;
126 
127 
128  //- Runtime type information
129  TypeName("kOmega2006");
130 
131 
132  // Constructors
133 
134  //- Construct from components
135  kOmega2006
136  (
137  const alphaField& alpha,
138  const rhoField& rho,
139  const volVectorField& U,
140  const surfaceScalarField& alphaRhoPhi,
141  const surfaceScalarField& phi,
142  const transportModel& transport,
143  const word& type = typeName
144  );
145 
146 
147  //- Destructor
148  virtual ~kOmega2006()
149  {}
150 
151 
152  // Member Functions
153 
154  //- Read RASProperties dictionary
155  virtual bool read();
156 
157  //- Return the effective diffusivity for k
158  tmp<volScalarField> DkEff() const
159  {
160  return volScalarField::New
161  (
162  "DkEff",
163  alphaK_*this->nut_ + this->nu()
164  );
165  }
166 
167  //- Return the effective diffusivity for omega
169  {
170  return volScalarField::New
171  (
172  "DomegaEff",
173  alphaOmega_*this->nut_ + this->nu()
174  );
175  }
176 
177  //- Return the turbulence kinetic energy
178  virtual tmp<volScalarField> k() const
179  {
180  return k_;
181  }
182 
183  //- Return the turbulence specific dissipation rate
184  virtual tmp<volScalarField> omega() const
185  {
186  return omega_;
187  }
188 
189  //- Return the turbulence kinetic energy dissipation rate
190  virtual tmp<volScalarField> epsilon() const
191  {
192  return volScalarField::New
193  (
194  "epsilon",
195  betaStar_*k_*omega_,
196  omega_.boundaryField().types()
197  );
198  }
199 
200  //- Solve the turbulence equations and correct the turbulence viscosity
201  virtual void correct();
202 };
203 
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 } // End namespace RASModels
208 } // End namespace Foam
209 
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 #ifdef NoRepository
212  #include "kOmega2006.C"
213 #endif
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 #endif
218 
219 // ************************************************************************* //
dimensionedScalar Clim_
Definition: kOmega2006.H:101
virtual tmp< fvScalarMatrix > kSource() const
Definition: kOmega2006.C:98
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega2006.H:167
dimensionedScalar betaStar_
Definition: kOmega2006.H:98
dimensionedScalar alphaK_
Definition: kOmega2006.H:103
kOmega2006(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &type=typeName)
Construct from components.
Definition: kOmega2006.C:130
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega2006.C:253
const Boundary & boundaryField() const
Return const-reference to the boundary field.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega2006.H:177
TypeName("kOmega2006")
Runtime type information.
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:49
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: kOmega2006.H:189
dimensionedScalar sigmaDo_
Definition: kOmega2006.H:102
BasicMomentumTransportModel::transportModel transportModel
Definition: kOmega2006.H:124
dimensionedScalar gamma_
Definition: kOmega2006.H:100
BasicMomentumTransportModel::alphaField alphaField
Definition: kOmega2006.H:122
A class for handling words, derived from string.
Definition: word.H:59
virtual ~kOmega2006()
Destructor.
Definition: kOmega2006.H:147
phi
Definition: correctPhi.H:3
virtual void correctNut()
Definition: kOmega2006.C:91
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega2006.H:157
Standard (2006) high Reynolds-number k-omega turbulence model for incompressible and compressible flo...
Definition: kOmega2006.H:77
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega2006.C:274
virtual tmp< fvScalarMatrix > omegaSource() const
Definition: kOmega2006.C:113
U
Definition: pEqn.H:72
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
BasicMomentumTransportModel::rhoField rhoField
Definition: kOmega2006.H:123
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
A class for managing temporary objects.
Definition: PtrList.H:53
dimensionedScalar beta0_
Definition: kOmega2006.H:99
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega2006.H:183
dimensionedScalar alphaOmega_
Definition: kOmega2006.H:104
Namespace for OpenFOAM.