LienCubicKE.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-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::LienCubicKE
29 
30 Group
31  grpIcoRASTurbulence
32 
33 Description
34  Lien cubic non-linear low-Reynolds k-epsilon turbulence models for
35  incompressible flows.
36 
37  This turbulence model is described in:
38  \verbatim
39  Lien, F.S., Chen, W.L. & Leschziner, M.A. (1996).
40  Low-Reynolds-number eddy-viscosity modeling based on non-linear
41  stress-strain/vorticity relations.
42  Engineering Turbulence Modelling and Experiments 3, 91-100.
43  \endverbatim
44 
45  Implemented according to the specification in:
46  <a href=
47  "http://personalpages.manchester.ac.uk/staff/david.d.apsley/specturb.pdf"
48  >Apsley: Turbulence Models 2002</a>
49 
50  In addition to the low-Reynolds number damping functions support for
51  wall-functions is also included to allow for low- and high-Reynolds number
52  operation.
53 
54 See also
55  Foam::incompressible::RASModels::ShihQuadraticKE
56 
57 SourceFiles
58  LienCubicKE.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef LienCubicKE_H
63 #define LienCubicKE_H
64 
66 #include "nonlinearEddyViscosity.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace incompressible
73 {
74 namespace RASModels
75 {
76 
77 /*---------------------------------------------------------------------------*\
78  Class LienCubicKE Declaration
79 \*---------------------------------------------------------------------------*/
80 
81 class LienCubicKE
82 :
83  public nonlinearEddyViscosity<incompressible::RASModel>
84 {
85 
86 protected:
87 
88  // Protected data
89 
90  // Model coefficients
91 
105 
108 
111 
112 
113  // Fields
114 
117 
118  //- Wall distance
119  // Note: different to wall distance in parent RASModel
120  // which is for near-wall cells only
121  const volScalarField& y_;
122 
123 
124  // Protected Member Functions
125 
126  tmp<volScalarField> fMu() const;
127  tmp<volScalarField> f2() const;
128  tmp<volScalarField> E(const volScalarField& f2) const;
129 
130  virtual void correctNut();
131  virtual void correctNonlinearStress(const volTensorField& gradU);
132 
133 
134 public:
135 
136  //- Runtime type information
137  TypeName("LienCubicKE");
138 
139  // Constructors
140 
141  //- Construct from components
143  (
144  const geometricOneField& alpha,
145  const geometricOneField& rho,
146  const volVectorField& U,
147  const surfaceScalarField& alphaRhoPhi,
148  const surfaceScalarField& phi,
149  const transportModel& transport,
150  const word& propertiesName = turbulenceModel::propertiesName,
151  const word& type = typeName
152  );
153 
154 
155  //- Destructor
156  virtual ~LienCubicKE() = default;
157 
158 
159  // Member Functions
160 
161  //- Re-read model coefficients if they have changed
162  virtual bool read();
163 
164  //- Return the effective diffusivity for k
165  tmp<volScalarField> DkEff() const
166  {
167  return tmp<volScalarField>
168  (
169  new volScalarField("DkEff", nut_/sigmak_ + nu())
170  );
171  }
172 
173  //- Return the effective diffusivity for epsilon
175  {
176  return tmp<volScalarField>
177  (
178  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
179  );
180  }
181 
182  //- Return the turbulence kinetic energy
183  virtual tmp<volScalarField> k() const
184  {
185  return k_;
186  }
187 
188  //- Return the turbulence kinetic energy dissipation rate
189  virtual tmp<volScalarField> epsilon() const
190  {
191  return epsilon_;
192  }
193 
194  //- Return the (estimated) specific dissipation rate
195  virtual tmp<volScalarField> omega() const
196  {
198  (
199  IOobject
200  (
201  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
202  this->runTime_.timeName(),
203  this->mesh_
204  ),
205  epsilon_/(Cmu_*k_)
206  );
207  }
208 
209  //- Solve the turbulence equations and correct the turbulence viscosity
210  virtual void correct();
211 };
212 
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 } // End namespace RASModels
217 } // Edn namespace incompressible
218 } // End namespace Foam
219 
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 
222 #endif
223 
224 // ************************************************************************* //
Foam::incompressible::RASModels::LienCubicKE::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: LienCubicKE.H:194
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::incompressible::RASModels::LienCubicKE::LienCubicKE
LienCubicKE(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: LienCubicKE.C:126
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::incompressible::RASModels::LienCubicKE::Cmu1_
dimensionedScalar Cmu1_
Definition: LienCubicKE.H:95
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::LienCubicKE::k_
volScalarField k_
Definition: LienCubicKE.H:114
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::LienCubicKE::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LienCubicKE.H:182
Foam::incompressible::RASModels::LienCubicKE::Cgamma1_
dimensionedScalar Cgamma1_
Definition: LienCubicKE.H:101
Foam::incompressible::RASModels::LienCubicKE::TypeName
TypeName("LienCubicKE")
Runtime type information.
Foam::incompressible::RASModels::LienCubicKE::~LienCubicKE
virtual ~LienCubicKE()=default
Destructor.
Foam::incompressible::RASModels::LienCubicKE::Cgamma4_
dimensionedScalar Cgamma4_
Definition: LienCubicKE.H:103
rho
rho
Definition: readInitialConditions.H:88
Foam::incompressible::RASModels::LienCubicKE::f2
tmp< volScalarField > f2() const
Definition: LienCubicKE.C:60
Foam::incompressible::RASModels::LienCubicKE::Cbeta1_
dimensionedScalar Cbeta1_
Definition: LienCubicKE.H:98
Foam::nonlinearEddyViscosity
Eddy viscosity turbulence model with non-linear correction base class.
Definition: nonlinearEddyViscosity.H:55
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::incompressible::RASModels::LienCubicKE::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: LienCubicKE.H:164
Foam::incompressible::RASModels::LienCubicKE::sigmak_
dimensionedScalar sigmak_
Definition: LienCubicKE.H:93
Foam::incompressible::RASModels::LienCubicKE
Lien cubic non-linear low-Reynolds k-epsilon turbulence models for incompressible flows.
Definition: LienCubicKE.H:80
Foam::incompressible::RASModels::LienCubicKE::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: LienCubicKE.C:343
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::incompressible::RASModels::LienCubicKE::correctNonlinearStress
virtual void correctNonlinearStress(const volTensorField &gradU)
Definition: LienCubicKE.C:88
Foam::incompressible::RASModels::LienCubicKE::DepsilonEff
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LienCubicKE.H:173
Foam::incompressible::RASModels::LienCubicKE::Ceps1_
dimensionedScalar Ceps1_
Definition: LienCubicKE.H:91
Foam::incompressible::RASModels::LienCubicKE::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LienCubicKE.H:188
Foam::incompressible::RASModels::LienCubicKE::sigmaEps_
dimensionedScalar sigmaEps_
Definition: LienCubicKE.H:94
Foam::incompressible::RASModels::LienCubicKE::Ceps2_
dimensionedScalar Ceps2_
Definition: LienCubicKE.H:92
Foam::dimensioned< scalar >
Foam::incompressible::RASModels::LienCubicKE::y_
const volScalarField & y_
Wall distance.
Definition: LienCubicKE.H:120
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::incompressible::RASModels::LienCubicKE::AE_
dimensionedScalar AE_
Definition: LienCubicKE.H:109
Foam::incompressible::RASModels::LienCubicKE::Cbeta2_
dimensionedScalar Cbeta2_
Definition: LienCubicKE.H:99
Foam::incompressible::RASModels::LienCubicKE::Cbeta3_
dimensionedScalar Cbeta3_
Definition: LienCubicKE.H:100
Foam::transportModel
Base-class for all transport models used by the incompressible turbulence models.
Definition: transportModel.H:53
Foam::incompressible::RASModels::LienCubicKE::correctNut
virtual void correctNut()
Definition: LienCubicKE.C:82
Foam::incompressible::RASModels::LienCubicKE::Anu_
dimensionedScalar Anu_
Definition: LienCubicKE.H:108
Foam::incompressible::RASModels::LienCubicKE::Cgamma2_
dimensionedScalar Cgamma2_
Definition: LienCubicKE.H:102
U
U
Definition: pEqn.H:72
nonlinearEddyViscosity.H
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::LienCubicKE::fMu
tmp< volScalarField > fMu() const
Definition: LienCubicKE.C:50
Foam::incompressible::RASModels::LienCubicKE::epsilon_
volScalarField epsilon_
Definition: LienCubicKE.H:115
Foam::incompressible::RASModels::LienCubicKE::Cmu2_
dimensionedScalar Cmu2_
Definition: LienCubicKE.H:96
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::LienCubicKE::E
tmp< volScalarField > E(const volScalarField &f2) const
Definition: LienCubicKE.C:68
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::incompressible::RASModels::LienCubicKE::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: LienCubicKE.C:372
Foam::incompressible::RASModels::LienCubicKE::Cmu_
dimensionedScalar Cmu_
Definition: LienCubicKE.H:105
Foam::incompressible::RASModels::LienCubicKE::kappa_
dimensionedScalar kappa_
Definition: LienCubicKE.H:106
Foam::incompressible::RASModels::LienCubicKE::Cbeta_
dimensionedScalar Cbeta_
Definition: LienCubicKE.H:97