LamBremhorstKE.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::LamBremhorstKE
29 
30 Group
31  grpIcoRASTurbulence
32 
33 Description
34  Lam and Bremhorst low-Reynolds number k-epsilon turbulence model
35  for incompressible flows
36 
37  This turbulence model is described in:
38  \verbatim
39  Lam, C. K. G., & Bremhorst, K. (1981).
40  A modified form of the k-ε model for predicting wall turbulence.
41  Journal of Fluids Engineering, 103(3), 456-460.
42  \endverbatim
43 
44 SourceFiles
45  LamBremhorstKE.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef LamBremhorstKE_H
50 #define LamBremhorstKE_H
51 
53 #include "eddyViscosity.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 namespace incompressible
60 {
61 namespace RASModels
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class LamBremhorstKE Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 class LamBremhorstKE
69 :
70  public eddyViscosity<incompressible::RASModel>
71 {
72  // Private Member Functions
73 
74  //- No copy construct
75  LamBremhorstKE(const LamBremhorstKE&) = delete;
76 
77  //- No copy assignment
78  void operator=(const LamBremhorstKE&) = delete;
79 
80  tmp<volScalarField> Rt() const;
81  tmp<volScalarField> fMu(const volScalarField& Rt) const;
82  tmp<volScalarField> f1(const volScalarField& fMu) const;
83  tmp<volScalarField> f2(const volScalarField& Rt) const;
84  void correctNut(const volScalarField& fMu);
85 
86 
87 protected:
88 
89  // Protected data
90 
95 
98 
99  //- Wall distance
100  // Note: different to wall distance in parent RASModel
101  // which is for near-wall cells only
102  const volScalarField& y_;
103 
104 
105  // Protected Member Functions
106 
107  virtual void correctNut();
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("LamBremhorstKE");
114 
115 
116  // Constructors
117 
118  //- Construct from components
120  (
121  const geometricOneField& alpha,
122  const geometricOneField& rho,
123  const volVectorField& U,
124  const surfaceScalarField& alphaRhoPhi,
125  const surfaceScalarField& phi,
126  const transportModel& transport,
127  const word& propertiesName = turbulenceModel::propertiesName,
128  const word& type = typeName
129  );
130 
131 
132  //- Destructor
133  virtual ~LamBremhorstKE() = default;
134 
135 
136  // Member Functions
137 
138  //- Re-read model coefficients if they have changed
139  virtual bool read();
140 
141  //- Return the effective diffusivity for k
142  tmp<volScalarField> DkEff() const
143  {
144  return tmp<volScalarField>
145  (
146  new volScalarField("DkEff", nut_ + nu())
147  );
148  }
149 
150  //- Return the effective diffusivity for epsilon
152  {
153  return tmp<volScalarField>
154  (
155  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
156  );
157  }
158 
159  //- Return the turbulence kinetic energy
160  virtual tmp<volScalarField> k() const
161  {
162  return k_;
163  }
164 
165  //- Return the turbulence kinetic energy dissipation rate
166  virtual tmp<volScalarField> epsilon() const
167  {
168  return epsilon_;
169  }
170 
171  //- Return the (estimated) specific dissipation rate
172  virtual tmp<volScalarField> omega() const
173  {
175  (
176  IOobject
177  (
178  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
179  this->runTime_.timeName(),
180  this->mesh_
181  ),
182  epsilon_/(Cmu_*k_)
183  );
184  }
185 
186  //- Solve the turbulence equations and correct the turbulence viscosity
187  virtual void correct();
188 };
189 
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 } // End namespace RASModels
194 } // End namespace incompressible
195 } // End namespace Foam
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 #endif
200 
201 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::incompressible::RASModels::LamBremhorstKE::TypeName
TypeName("LamBremhorstKE")
Runtime type information.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::incompressible::RASModels::LamBremhorstKE::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LamBremhorstKE.H:165
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
turbulentTransportModel.H
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::incompressible::RASModels::LamBremhorstKE
Lam and Bremhorst low-Reynolds number k-epsilon turbulence model for incompressible flows.
Definition: LamBremhorstKE.H:67
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::LamBremhorstKE::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: LamBremhorstKE.H:141
Foam::incompressible::RASModels::LamBremhorstKE::Ceps1_
dimensionedScalar Ceps1_
Definition: LamBremhorstKE.H:91
Foam::incompressible::RASModels::LamBremhorstKE::sigmaEps_
dimensionedScalar sigmaEps_
Definition: LamBremhorstKE.H:93
Foam::incompressible::RASModels::LamBremhorstKE::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LamBremhorstKE.H:159
rho
rho
Definition: readInitialConditions.H:88
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
eddyViscosity.H
Foam::incompressible::RASModels::LamBremhorstKE::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: LamBremhorstKE.C:193
Foam::incompressible::RASModels::LamBremhorstKE::correctNut
virtual void correctNut()
Definition: LamBremhorstKE.C:84
Foam::incompressible::RASModels::LamBremhorstKE::epsilon_
volScalarField epsilon_
Definition: LamBremhorstKE.H:96
Foam::incompressible::RASModels::LamBremhorstKE::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: LamBremhorstKE.C:209
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
Foam::incompressible::RASModels::LamBremhorstKE::DepsilonEff
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LamBremhorstKE.H:150
U
U
Definition: pEqn.H:72
Foam::incompressible::RASModels::LamBremhorstKE::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: LamBremhorstKE.H:171
Foam::incompressible::RASModels::LamBremhorstKE::Ceps2_
dimensionedScalar Ceps2_
Definition: LamBremhorstKE.H:92
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::LamBremhorstKE::Cmu_
dimensionedScalar Cmu_
Definition: LamBremhorstKE.H:90
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::incompressible::RASModels::LamBremhorstKE::k_
volScalarField k_
Definition: LamBremhorstKE.H:95
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::LamBremhorstKE::~LamBremhorstKE
virtual ~LamBremhorstKE()=default
Destructor.
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::incompressible::RASModels::LamBremhorstKE::y_
const volScalarField & y_
Wall distance.
Definition: LamBremhorstKE.H:101