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  virtual void correctNut();
115  virtual tmp<fvScalarMatrix> kSource() const;
116  virtual tmp<fvScalarMatrix> omegaSource() const;
117 
118 
119 public:
120 
121  typedef typename BasicMomentumTransportModel::alphaField alphaField;
122  typedef typename BasicMomentumTransportModel::rhoField rhoField;
123 
124 
125  //- Runtime type information
126  TypeName("kOmega2006");
127 
128 
129  // Constructors
130 
131  //- Construct from components
132  kOmega2006
133  (
134  const alphaField& alpha,
135  const rhoField& rho,
136  const volVectorField& U,
137  const surfaceScalarField& alphaRhoPhi,
138  const surfaceScalarField& phi,
139  const viscosity& viscosity,
140  const word& type = typeName
141  );
142 
143 
144  //- Destructor
145  virtual ~kOmega2006()
146  {}
147 
148 
149  // Member Functions
150 
151  //- Read RASProperties dictionary
152  virtual bool read();
153 
154  //- Return the effective diffusivity for k
155  tmp<volScalarField> DkEff() const
156  {
157  return volScalarField::New
158  (
159  "DkEff",
160  alphaK_*this->nut_ + this->nu()
161  );
162  }
163 
164  //- Return the effective diffusivity for omega
166  {
167  return volScalarField::New
168  (
169  "DomegaEff",
170  alphaOmega_*this->nut_ + this->nu()
171  );
172  }
173 
174  //- Return the turbulence kinetic energy
175  virtual tmp<volScalarField> k() const
176  {
177  return k_;
178  }
179 
180  //- Return the turbulence specific dissipation rate
181  virtual tmp<volScalarField> omega() const
182  {
183  return omega_;
184  }
185 
186  //- Return the turbulence kinetic energy dissipation rate
187  virtual tmp<volScalarField> epsilon() const
188  {
189  return volScalarField::New
190  (
191  "epsilon",
193  );
194  }
195 
196  //- Solve the turbulence equations and correct the turbulence viscosity
197  virtual void correct();
198 };
199 
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 } // End namespace RASModels
204 } // End namespace Foam
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 #ifdef NoRepository
208  #include "kOmega2006.C"
209 #endif
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #endif
214 
215 // ************************************************************************* //
Generic GeometricField class.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &)
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:120
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega2006.H:154
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega2006.H:164
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega2006.H:174
virtual ~kOmega2006()
Destructor.
Definition: kOmega2006.H:144
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega2006.H:180
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega2006.C:274
dimensionedScalar alphaOmega_
Definition: kOmega2006.H:102
dimensionedScalar beta0_
Definition: kOmega2006.H:97
dimensionedScalar gamma_
Definition: kOmega2006.H:98
virtual tmp< fvScalarMatrix > omegaSource() const
Definition: kOmega2006.C:113
virtual void correctNut()
Definition: kOmega2006.C:91
dimensionedScalar sigmaDo_
Definition: kOmega2006.H:100
virtual tmp< fvScalarMatrix > kSource() const
Definition: kOmega2006.C:98
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:130
dimensionedScalar Clim_
Definition: kOmega2006.H:99
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: kOmega2006.H:186
dimensionedScalar betaStar_
Definition: kOmega2006.H:96
dimensionedScalar alphaK_
Definition: kOmega2006.H:101
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega2006.C:253
BasicMomentumTransportModel::rhoField rhoField
Definition: kOmega2006.H:121
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