qZeta.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-2015 OpenFOAM Foundation
9  Copyright (C) 2019-2020 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::incompressible::RASModels::qZeta
29 
30 Group
31  grpIcoRASTurbulence
32 
33 Description
34  Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model
35  for incompressible flows
36 
37  This turbulence model is described in:
38  \verbatim
39  Dafa'Alla, A.A., Juntasaro, E. & Gibson, M.M. (1996).
40  Calculation of oscillating boundary layers with the
41  q-zeta turbulence model.
42  Engineering Turbulence Modelling and Experiments 3:
43  Proceedings of the Third International Symposium,
44  Crete, Greece, May 27-29, 141.
45  \endverbatim
46  which is a development of the original q-zeta model described in:
47  \verbatim
48  Gibson, M. M., & Dafa'Alla, A. A. (1995).
49  Two-equation model for turbulent wall flow.
50  AIAA journal, 33(8), 1514-1518.
51  \endverbatim
52 
53 SourceFiles
54  qZeta.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef qZeta_H
59 #define qZeta_H
60 
62 #include "eddyViscosity.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 namespace incompressible
69 {
70 namespace RASModels
71 {
72 
73 /*---------------------------------------------------------------------------*\
74  Class qZeta Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 class qZeta
78 :
79  public eddyViscosity<incompressible::RASModel>
80 {
81 
82 protected:
83 
84  // Protected data
85 
86  // Model coefficients
87 
93 
94  //- Lower limit of q
96 
97  //- Lower limit of zeta
99 
100  // Fields
101 
104 
107 
108 
109  // Protected Member Functions
110 
111  tmp<volScalarField> fMu() const;
112  tmp<volScalarField> f2() const;
113  virtual void correctNut();
114 
115 
116 public:
117 
118  //- Runtime type information
119  TypeName("qZeta");
120 
121  // Constructors
122 
123  //- Construct from components
124  qZeta
125  (
126  const geometricOneField& alpha,
127  const geometricOneField& rho,
128  const volVectorField& U,
129  const surfaceScalarField& alphaRhoPhi,
130  const surfaceScalarField& phi,
131  const transportModel& transport,
132  const word& propertiesName = turbulenceModel::propertiesName,
133  const word& type = typeName
134  );
135 
136 
137  //- Destructor
138  virtual ~qZeta() = default;
139 
140 
141  // Member Functions
142 
143  //- Re-read model coefficients if they have changed
144  virtual bool read();
145 
146  //- Return the lower allowable limit for q (default: SMALL)
147  const dimensionedScalar& qMin() const
148  {
149  return qMin_;
150  }
151 
152  //- Return the lower allowable limit for zeta (default: SMALL)
153  const dimensionedScalar& zetaMin() const
154  {
155  return zetaMin_;
156  }
157 
158  //- Allow qMin to be changed
160  {
161  return qMin_;
162  }
163 
164  //- Allow zetaMin to be changed
166  {
167  return zetaMin_;
168  }
169 
170  //- Return the effective diffusivity for q
171  tmp<volScalarField> DqEff() const
172  {
173  return tmp<volScalarField>
174  (
175  new volScalarField("DqEff", nut_ + nu())
176  );
177  }
178 
179  //- Return the effective diffusivity for epsilon
181  {
182  return tmp<volScalarField>
183  (
184  new volScalarField("DzetaEff", nut_/sigmaZeta_ + nu())
185  );
186  }
187 
188  //- Return the turbulence kinetic energy
189  virtual tmp<volScalarField> k() const
190  {
191  return k_;
192  }
193 
194  //- Return the turbulence kinetic energy dissipation rate
195  virtual tmp<volScalarField> epsilon() const
196  {
197  return epsilon_;
198  }
199 
200  //- Return the (estimated) specific dissipation rate
201  virtual tmp<volScalarField> omega() const
202  {
204  (
205  IOobject
206  (
207  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
208  this->runTime_.timeName(),
209  this->mesh_
210  ),
211  epsilon_/(Cmu_*k_)
212  );
213  }
214 
215  virtual const volScalarField& q() const
216  {
217  return q_;
218  }
219 
220  virtual const volScalarField& zeta() const
221  {
222  return zeta_;
223  }
224 
225  //- Solve the turbulence equations and correct the turbulence viscosity
226  virtual void correct();
227 };
228 
229 
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231 
232 } // End namespace RASModels
233 } // End namespace incompressible
234 } // End namespace Foam
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 #endif
239 
240 // ************************************************************************* //
Foam::incompressible::RASModels::qZeta::zetaMin_
dimensionedScalar zetaMin_
Lower limit of zeta.
Definition: qZeta.H:97
Foam::incompressible::RASModels::qZeta::qMin
const dimensionedScalar & qMin() const
Return the lower allowable limit for q (default: SMALL)
Definition: qZeta.H:146
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
Foam::incompressible::RASModels::qZeta::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: qZeta.H:194
Foam::incompressible::RASModels::qZeta
Gibson and Dafa'Alla's q-zeta two-equation low-Re turbulence model for incompressible flows.
Definition: qZeta.H:76
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::incompressible::RASModels::qZeta::Cmu_
dimensionedScalar Cmu_
Definition: qZeta.H:87
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::incompressible::RASModels::qZeta::C1_
dimensionedScalar C1_
Definition: qZeta.H:88
turbulentTransportModel.H
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:55
Foam::incompressible::RASModels::qZeta::DqEff
tmp< volScalarField > DqEff() const
Return the effective diffusivity for q.
Definition: qZeta.H:170
Foam::incompressible::RASModels::qZeta::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: qZeta.H:200
Foam::incompressible::RASModels::qZeta::qMin_
dimensionedScalar qMin_
Lower limit of q.
Definition: qZeta.H:94
Foam::incompressible::RASModels::qZeta::DzetaEff
tmp< volScalarField > DzetaEff() const
Return the effective diffusivity for epsilon.
Definition: qZeta.H:179
rho
rho
Definition: readInitialConditions.H:88
Foam::incompressible::RASModels::qZeta::qZeta
qZeta(const geometricOneField &alpha, const geometricOneField &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: qZeta.C:83
Foam::incompressible::RASModels::qZeta::qMin
dimensionedScalar & qMin()
Allow qMin to be changed.
Definition: qZeta.H:158
Foam::incompressible::RASModels::qZeta::epsilon_
volScalarField epsilon_
Definition: qZeta.H:102
Foam::incompressible::RASModels::qZeta::zetaMin
dimensionedScalar & zetaMin()
Allow zetaMin to be changed.
Definition: qZeta.H:164
Foam::incompressible::RASModels::qZeta::q_
volScalarField q_
Definition: qZeta.H:104
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
eddyViscosity.H
Foam::incompressible::RASModels::qZeta::k_
volScalarField k_
Definition: qZeta.H:101
Foam::incompressible::RASModels::qZeta::f2
tmp< volScalarField > f2() const
Definition: qZeta.C:66
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::incompressible::RASModels::qZeta::zeta
virtual const volScalarField & zeta() const
Definition: qZeta.H:219
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::incompressible::RASModels::qZeta::sigmaZeta_
dimensionedScalar sigmaZeta_
Definition: qZeta.H:90
Foam::incompressible::RASModels::qZeta::anisotropic_
Switch anisotropic_
Definition: qZeta.H:91
Foam::incompressible::RASModels::qZeta::zetaMin
const dimensionedScalar & zetaMin() const
Return the lower allowable limit for zeta (default: SMALL)
Definition: qZeta.H:152
Foam::incompressible::RASModels::qZeta::C2_
dimensionedScalar C2_
Definition: qZeta.H:89
Foam::incompressible::RASModels::qZeta::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: qZeta.C:220
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::incompressible::RASModels::qZeta::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: qZeta.H:188
Foam::incompressible::RASModels::qZeta::fMu
tmp< volScalarField > fMu() const
Definition: qZeta.C:49
Foam::incompressible::RASModels::qZeta::~qZeta
virtual ~qZeta()=default
Destructor.
Foam::transportModel
Base-class for all transport models used by the incompressible turbulence models.
Definition: transportModel.H:53
Foam::incompressible::RASModels::qZeta::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: qZeta.C:240
Foam::incompressible::RASModels::qZeta::TypeName
TypeName("qZeta")
Runtime type information.
U
U
Definition: pEqn.H:72
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::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::incompressible::RASModels::qZeta::correctNut
virtual void correctNut()
Definition: qZeta.C:73
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::incompressible::RASModels::qZeta::q
virtual const volScalarField & q() const
Definition: qZeta.H:214
Foam::eddyViscosity< incompressible::RASModel >::nut_
volScalarField nut_
Definition: eddyViscosity.H:66
Foam::IOobject::groupName
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Foam::incompressible::RASModels::qZeta::zeta_
volScalarField zeta_
Definition: qZeta.H:105
Foam::GeometricField< scalar, fvPatchField, volMesh >