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 
126 
127  //- Runtime type information
128  TypeName("kOmega2006");
129 
130 
131  // Constructors
132 
133  //- Construct from components
134  kOmega2006
135  (
136  const alphaField& alpha,
137  const rhoField& rho,
138  const volVectorField& U,
139  const surfaceScalarField& alphaRhoPhi,
140  const surfaceScalarField& phi,
141  const viscosity& viscosity,
142  const word& type = typeName
143  );
144 
145 
146  //- Destructor
147  virtual ~kOmega2006()
148  {}
149 
150 
151  // Member Functions
152 
153  //- Read RASProperties dictionary
154  virtual bool read();
155 
156  //- Return the effective diffusivity for k
157  tmp<volScalarField> DkEff() const
158  {
159  return volScalarField::New
160  (
161  "DkEff",
162  alphaK_*this->nut_ + this->nu()
163  );
164  }
165 
166  //- Return the effective diffusivity for omega
168  {
169  return volScalarField::New
170  (
171  "DomegaEff",
172  alphaOmega_*this->nut_ + this->nu()
173  );
174  }
175 
176  //- Return the turbulence kinetic energy
177  virtual tmp<volScalarField> k() const
178  {
179  return k_;
180  }
181 
182  //- Return the turbulence specific dissipation rate
183  virtual tmp<volScalarField> omega() const
184  {
185  return omega_;
186  }
187 
188  //- Return the turbulence kinetic energy dissipation rate
189  virtual tmp<volScalarField> epsilon() const
190  {
191  return volScalarField::New
192  (
193  "epsilon",
194  betaStar_*k_*omega_,
195  omega_.boundaryField().types()
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 "kOmega2006.C"
212 #endif
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 #endif
217 
218 // ************************************************************************* //
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:166
dimensionedScalar betaStar_
Definition: kOmega2006.H:98
dimensionedScalar alphaK_
Definition: kOmega2006.H:103
U
Definition: pEqn.H:72
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))
wordList types() const
Return a list of the patch field types.
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:176
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:188
dimensionedScalar sigmaDo_
Definition: kOmega2006.H:102
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:146
phi
Definition: correctPhi.H:3
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
virtual void correctNut()
Definition: kOmega2006.C:91
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega2006.H:156
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
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
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:130
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
Definition: RASModel.H:208
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega2006.H:182
dimensionedScalar alphaOmega_
Definition: kOmega2006.H:104
Namespace for OpenFOAM.