LienLeschziner.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) 2011-2020 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::incompressible::RASModels::LienLeschziner
26 
27 Description
28  Lien and Leschziner low-Reynolds number k-epsilon turbulence model for
29  incompressible flows.
30 
31  This turbulence model is described in:
32  \verbatim
33  Lien, F. S., & Leschziner, M. A. (1993).
34  A pressure-velocity solution strategy for compressible flow
35  and its application to shock/boundary-layer interaction
36  using second-moment turbulence closure.
37  Journal of fluids engineering, 115(4), 717-725.
38  \endverbatim
39 
40  Implemented according to the specification in:
41  <a href=
42  "https://personalpages.manchester.ac.uk/staff/david.d.apsley/turbmod.pdf"
43  >Apsley: Turbulence Models 2002</a>
44 
45  In addition to the low-Reynolds number damping functions support for
46  wall-functions is also included to allow for low- and high-Reynolds number
47  operation.
48 
49 SourceFiles
50  LienLeschziner.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef LienLeschziner_H
55 #define LienLeschziner_H
56 
58 #include "eddyViscosity.H"
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace incompressible
65 {
66 namespace RASModels
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class LienLeschziner Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class LienLeschziner
74 :
75  public eddyViscosity<incompressible::RASModel>
76 {
77 
78 protected:
79 
80  // Protected data
81 
82  // Model coefficients
83 
88 
91 
95 
96 
97  // Fields
98 
101 
102  //- Wall distance
103  // Note: different to wall distance in parent RASModel
104  // which is for near-wall cells only
105  const volScalarField& y_;
106 
107 
108  // Protected Member Functions
109 
110  tmp<volScalarField> fMu() const;
111  tmp<volScalarField> f2() const;
112  tmp<volScalarField> E(const volScalarField& f2) const;
113 
114  virtual void correctNut();
115 
116 
117 public:
118 
119  TypeName("LienLeschziner");
120 
121  // Constructors
122 
123  //- Construct from components
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& type = typeName
133  );
134 
135 
136  //- Destructor
137  virtual ~LienLeschziner()
138  {}
139 
140 
141  // Member Functions
142 
143  //- Read RASProperties dictionary
144  virtual bool read();
145 
146  //- Return the effective diffusivity for k
147  tmp<volScalarField> DkEff() const
148  {
149  return volScalarField::New
150  (
151  "DkEff",
152  nut_/sigmak_ + nu()
153  );
154  }
155 
156  //- Return the effective diffusivity for epsilon
158  {
159  return volScalarField::New
160  (
161  "DepsilonEff",
162  nut_/sigmaEps_ + nu()
163  );
164  }
165 
166  //- Return the turbulence kinetic energy
167  virtual tmp<volScalarField> k() const
168  {
169  return k_;
170  }
171 
172  //- Return the turbulence kinetic energy dissipation rate
173  virtual tmp<volScalarField> epsilon() const
174  {
175  return epsilon_;
176  }
177 
178  //- Solve the turbulence equations and correct the turbulence viscosity
179  virtual void correct();
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace RASModels
186 } // End namespace incompressible
187 } // End namespace Foam
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
tmp< volScalarField > E(const volScalarField &f2) const
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:49
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
incompressible::RASModel ::transportModel transportModel
Definition: eddyViscosity.H:72
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool read()
Read RASProperties dictionary.
phi
Definition: correctPhi.H:3
Lien and Leschziner low-Reynolds number k-epsilon turbulence model for incompressible flows...
const volScalarField & y_
Wall distance.
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
U
Definition: pEqn.H:72
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
A class for managing temporary objects.
Definition: PtrList.H:53
LienLeschziner(const geometricOneField &alpha, const geometricOneField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &type=typeName)
Construct from components.
Namespace for OpenFOAM.