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-2021 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. (1998).
40  Turbulence modeling for CFD
41  (Vol. 2, pp. 103-217). La Canada, CA: DCW industries.
42  \endverbatim
43 
44  The default model coefficients are
45  \verbatim
46  kOmegaCoeffs
47  {
48  Cmu 0.09; // Equivalent to betaStar
49  alpha 0.52;
50  beta 0.072;
51  alphak 0.5;
52  alphaOmega 0.5;
53  }
54  \endverbatim
55 
56 SourceFiles
57  kOmega.C
58 
59 \*---------------------------------------------------------------------------*/
60 
61 #ifndef kOmega_H
62 #define kOmega_H
63 
64 #include "RASModel.H"
65 #include "eddyViscosity.H"
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 namespace RASModels
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class kOmega Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 template<class BasicTurbulenceModel>
79 class kOmega
80 :
81  public eddyViscosity<RASModel<BasicTurbulenceModel>>
82 {
83 
84 protected:
85 
86  // Protected data
87 
88  // Model coefficients
89 
95 
96 
97  // Fields
98 
101 
102 
103  // Protected Member Functions
104 
105  virtual void correctNut();
106 
107 
108 public:
109 
110  typedef typename BasicTurbulenceModel::alphaField alphaField;
111  typedef typename BasicTurbulenceModel::rhoField rhoField;
112  typedef typename BasicTurbulenceModel::transportModel transportModel;
113 
114 
115  //- Runtime type information
116  TypeName("kOmega");
117 
118 
119  // Constructors
120 
121  //- Construct from components
122  kOmega
123  (
124  const alphaField& alpha,
125  const rhoField& rho,
126  const volVectorField& U,
127  const surfaceScalarField& alphaRhoPhi,
128  const surfaceScalarField& phi,
129  const transportModel& transport,
130  const word& propertiesName = turbulenceModel::propertiesName,
131  const word& type = typeName
132  );
133 
134 
135  //- Destructor
136  virtual ~kOmega() = default;
137 
138 
139  // Member Functions
140 
141  //- Read RASProperties dictionary
142  virtual bool read();
143 
144  //- Return the effective diffusivity for k
145  tmp<volScalarField> DkEff() const
146  {
147  return tmp<volScalarField>
148  (
149  new volScalarField
150  (
151  "DkEff",
152  alphaK_*this->nut_ + this->nu()
153  )
154  );
155  }
156 
157  //- Return the effective diffusivity for omega
159  {
160  return tmp<volScalarField>
161  (
162  new volScalarField
163  (
164  "DomegaEff",
165  alphaOmega_*this->nut_ + this->nu()
166  )
167  );
168  }
169 
170  //- Return the turbulence kinetic energy
171  virtual tmp<volScalarField> k() const
172  {
173  return k_;
174  }
175 
176  //- Return the turbulence specific dissipation rate
177  virtual tmp<volScalarField> omega() const
178  {
179  return omega_;
180  }
181 
182  //- Solve the turbulence equations and correct the turbulence viscosity
183  virtual void correct();
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace RASModels
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 #ifdef NoRepository
194  #include "kOmega.C"
195 #endif
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
Foam::RASModels::kOmega::read
virtual bool read()
Read RASProperties dictionary.
Definition: kOmega.C:164
Foam::RASModels::kOmega::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: kOmega.H:109
Foam::RASModels::kOmega::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: kOmega.H:144
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::RASModels::kOmega::~kOmega
virtual ~kOmega()=default
Destructor.
Foam::RASModels::kOmega::correctNut
virtual void correctNut()
Definition: kOmega.C:43
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::RASModels::kOmega::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: kOmega.H:110
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::RASModels::kOmega::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: kOmega.C:182
rho
rho
Definition: readInitialConditions.H:88
kOmega.C
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::RASModels::kOmega::beta_
dimensionedScalar beta_
Definition: kOmega.H:90
eddyViscosity.H
Foam::RASModels::kOmega::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: kOmega.H:111
Foam::RASModels::kOmega::alphaOmega_
dimensionedScalar alphaOmega_
Definition: kOmega.H:93
Foam::RASModels::kOmega::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: kOmega.H:170
Foam::RASModels::kOmega::k_
volScalarField k_
Definition: kOmega.H:98
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::RASModels::kOmega::omega
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: kOmega.H:176
RASModel.H
Foam::RASModels::kOmega::kOmega
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:57
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::RASModels::kOmega::alphaK_
dimensionedScalar alphaK_
Definition: kOmega.H:92
Foam::RASModels::kOmega::TypeName
TypeName("kOmega")
Runtime type information.
U
U
Definition: pEqn.H:72
Foam::RASModels::kOmega::gamma_
dimensionedScalar gamma_
Definition: kOmega.H:91
Foam::RASModels::kOmega::DomegaEff
tmp< volScalarField > DomegaEff() const
Return the effective diffusivity for omega.
Definition: kOmega.H:157
Foam::RASModels::kOmega::Cmu_
dimensionedScalar Cmu_
Definition: kOmega.H:89
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::RASModels::kOmega::omega_
volScalarField omega_
Definition: kOmega.H:99
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::eddyViscosity< RASModel< BasicTurbulenceModel > >::nut_
volScalarField nut_
Definition: eddyViscosity.H:66
Foam::RASModels::kOmega
Standard high Reynolds-number k-omega turbulence model for incompressible and compressible flows.
Definition: kOmega.H:78
Foam::GeometricField< scalar, fvPatchField, volMesh >