LienLeschziner.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::LienLeschziner
29 
30 Group
31  grpIcoRASTurbulence
32 
33 Description
34  Lien and Leschziner low-Reynolds number k-epsilon turbulence model for
35  incompressible flows.
36 
37  This turbulence model is described in:
38  \verbatim
39  Lien, F. S., & Leschziner, M. A. (1993).
40  A pressure-velocity solution strategy for compressible flow
41  and its application to shock/boundary-layer interaction
42  using second-moment turbulence closure.
43  Journal of fluids engineering, 115(4), 717-725.
44  \endverbatim
45 
46  Implemented according to the specification in:
47  <a href=
48  "http://personalpages.manchester.ac.uk/staff/david.d.apsley/specturb.pdf"
49  >Apsley: Turbulence Models 2002</a>
50 
51  In addition to the low-Reynolds number damping functions support for
52  wall-functions is also included to allow for low- and high-Reynolds number
53  operation.
54 
55 SourceFiles
56  LienLeschziner.C
57 
58 \*---------------------------------------------------------------------------*/
59 
60 #ifndef LienLeschziner_H
61 #define LienLeschziner_H
62 
64 #include "eddyViscosity.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 namespace incompressible
71 {
72 namespace RASModels
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class LienLeschziner Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class LienLeschziner
80 :
81  public eddyViscosity<incompressible::RASModel>
82 {
83 
84 protected:
85 
86  // Protected data
87 
88  // Model coefficients
89 
94 
97 
101 
102 
103  // Fields
104 
107 
108  //- Wall distance
109  // Note: different to wall distance in parent RASModel
110  // which is for near-wall cells only
111  const volScalarField& y_;
112 
113 
114  // Protected Member Functions
115 
116  tmp<volScalarField> fMu() const;
117  tmp<volScalarField> f2() const;
118  tmp<volScalarField> E(const volScalarField& f2) const;
119 
120  virtual void correctNut();
121 
122 
123 public:
124 
125  TypeName("LienLeschziner");
126 
127  // Constructors
128 
129  //- Construct from components
131  (
132  const geometricOneField& alpha,
133  const geometricOneField& rho,
134  const volVectorField& U,
135  const surfaceScalarField& alphaRhoPhi,
136  const surfaceScalarField& phi,
137  const transportModel& transport,
138  const word& propertiesName = turbulenceModel::propertiesName,
139  const word& type = typeName
140  );
141 
142 
143  //- Destructor
144  virtual ~LienLeschziner() = default;
145 
146 
147  // Member Functions
148 
149  //- Re-read model coefficients if they have changed
150  virtual bool read();
151 
152  //- Return the effective diffusivity for k
153  tmp<volScalarField> DkEff() const
154  {
155  return tmp<volScalarField>
156  (
157  new volScalarField("DkEff", nut_/sigmak_ + nu())
158  );
159  }
160 
161  //- Return the effective diffusivity for epsilon
163  {
164  return tmp<volScalarField>
165  (
166  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
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 kinetic energy dissipation rate
177  virtual tmp<volScalarField> epsilon() const
178  {
179  return epsilon_;
180  }
181 
182  //- Return the (estimated) specific dissipation rate
183  virtual tmp<volScalarField> omega() const
184  {
186  (
187  IOobject
188  (
189  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
190  this->runTime_.timeName(),
191  this->mesh_
192  ),
193  epsilon_/(Cmu_*k_)
194  );
195  }
196 
197  //- Solve the turbulence equations and correct the turbulence viscosity
198  virtual void correct();
199 };
200 
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 } // End namespace RASModels
205 } // End namespace incompressible
206 } // End namespace Foam
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 #endif
211 
212 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::incompressible::RASModels::LienLeschziner::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LienLeschziner.H:176
Foam::incompressible::RASModels::LienLeschziner::fMu
tmp< volScalarField > fMu() const
Definition: LienLeschziner.C:50
Foam::incompressible::RASModels::LienLeschziner::Ceps2_
dimensionedScalar Ceps2_
Definition: LienLeschziner.H:90
Foam::incompressible::RASModels::LienLeschziner::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: LienLeschziner.H:182
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::incompressible::RASModels::LienLeschziner::~LienLeschziner
virtual ~LienLeschziner()=default
Destructor.
Foam::incompressible::RASModels::LienLeschziner::E
tmp< volScalarField > E(const volScalarField &f2) const
Definition: LienLeschziner.C:68
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::LienLeschziner::sigmak_
dimensionedScalar sigmak_
Definition: LienLeschziner.H:91
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::LienLeschziner::LienLeschziner
LienLeschziner(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: LienLeschziner.C:92
Foam::incompressible::RASModels::LienLeschziner::epsilon_
volScalarField epsilon_
Definition: LienLeschziner.H:105
rho
rho
Definition: readInitialConditions.H:88
Foam::incompressible::RASModels::LienLeschziner::sigmaEps_
dimensionedScalar sigmaEps_
Definition: LienLeschziner.H:92
Foam::incompressible::RASModels::LienLeschziner::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LienLeschziner.H:170
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
eddyViscosity.H
Foam::incompressible::RASModels::LienLeschziner::Cmu_
dimensionedScalar Cmu_
Definition: LienLeschziner.H:94
Foam::incompressible::RASModels::LienLeschziner::DepsilonEff
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LienLeschziner.H:161
Foam::incompressible::RASModels::LienLeschziner
Lien and Leschziner low-Reynolds number k-epsilon turbulence model for incompressible flows.
Definition: LienLeschziner.H:78
Foam::incompressible::RASModels::LienLeschziner::kappa_
dimensionedScalar kappa_
Definition: LienLeschziner.H:95
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::transportModel
Base-class for all transport models used by the incompressible turbulence models.
Definition: transportModel.H:53
U
U
Definition: pEqn.H:72
Foam::incompressible::RASModels::LienLeschziner::Aeps_
dimensionedScalar Aeps_
Definition: LienLeschziner.H:98
Foam::incompressible::RASModels::LienLeschziner::f2
tmp< volScalarField > f2() const
Definition: LienLeschziner.C:60
Foam::incompressible::RASModels::LienLeschziner::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: LienLeschziner.C:237
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::incompressible::RASModels::LienLeschziner::Anu_
dimensionedScalar Anu_
Definition: LienLeschziner.H:97
Foam::incompressible::RASModels::LienLeschziner::correctNut
virtual void correctNut()
Definition: LienLeschziner.C:82
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::incompressible::RASModels::LienLeschziner::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: LienLeschziner.C:258
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::eddyViscosity< incompressible::RASModel >::nut_
volScalarField nut_
Definition: eddyViscosity.H:66
Foam::incompressible::RASModels::LienLeschziner::TypeName
TypeName("LienLeschziner")
Foam::IOobject::groupName
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Foam::incompressible::RASModels::LienLeschziner::Ceps1_
dimensionedScalar Ceps1_
Definition: LienLeschziner.H:89
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::incompressible::RASModels::LienLeschziner::y_
const volScalarField & y_
Wall distance.
Definition: LienLeschziner.H:110
Foam::incompressible::RASModels::LienLeschziner::AE_
dimensionedScalar AE_
Definition: LienLeschziner.H:99
Foam::incompressible::RASModels::LienLeschziner::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: LienLeschziner.H:152
Foam::incompressible::RASModels::LienLeschziner::k_
volScalarField k_
Definition: LienLeschziner.H:104