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 | Copyright (C) 2011-2015 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::LamBremhorstKE
26 
27 Group
28  grpIcoRASTurbulence
29 
30 Description
31  Lam and Bremhorst low-Reynolds number k-epsilon turbulence model
32  for incompressible flows
33 
34  This turbulence model is described in:
35  \verbatim
36  Lam, C. K. G., & Bremhorst, K. (1981).
37  A modified form of the k-ε model for predicting wall turbulence.
38  Journal of Fluids Engineering, 103(3), 456-460.
39  \endverbatim
40 
41 SourceFiles
42  LamBremhorstKE.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef LamBremhorstKE_H
47 #define LamBremhorstKE_H
48 
50 #include "eddyViscosity.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 namespace incompressible
57 {
58 namespace RASModels
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class LamBremhorstKE Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 class LamBremhorstKE
66 :
67  public eddyViscosity<incompressible::RASModel>
68 {
69  // Private Member Functions
70 
71  // Disallow default bitwise copy construct and assignment
74 
75  tmp<volScalarField> Rt() const;
79  void correctNut(const volScalarField& fMu);
80 
81 
82 protected:
83 
84  // Protected data
85 
90 
93 
94  //- Wall distance
95  // Note: different to wall distance in parent RASModel
96  // which is for near-wall cells only
97  const volScalarField& y_;
98 
99 
100  // Protected Member Functions
101 
102  virtual void correctNut();
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("LamBremhorstKE");
109 
110 
111  // Constructors
112 
113  //- Construct from components
115  (
116  const geometricOneField& alpha,
117  const geometricOneField& rho,
118  const volVectorField& U,
119  const surfaceScalarField& alphaRhoPhi,
120  const surfaceScalarField& phi,
121  const transportModel& transport,
122  const word& propertiesName = turbulenceModel::propertiesName,
123  const word& type = typeName
124  );
125 
126 
127  //- Destructor
128  virtual ~LamBremhorstKE()
129  {}
130 
131 
132  // Member Functions
133 
134  //- Re-read model coefficients if they have changed
135  virtual bool read();
136 
137  //- Return the effective diffusivity for k
138  tmp<volScalarField> DkEff() const
139  {
140  return tmp<volScalarField>
141  (
142  new volScalarField("DkEff", nut_ + nu())
143  );
144  }
145 
146  //- Return the effective diffusivity for epsilon
148  {
149  return tmp<volScalarField>
150  (
151  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
152  );
153  }
154 
155  //- Return the turbulence kinetic energy
156  virtual tmp<volScalarField> k() const
157  {
158  return k_;
159  }
160 
161  //- Return the turbulence kinetic energy dissipation rate
162  virtual tmp<volScalarField> epsilon() const
163  {
164  return epsilon_;
165  }
166 
167  //- Solve the turbulence equations and correct the turbulence viscosity
168  virtual void correct();
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace RASModels
175 } // End namespace incompressible
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Foam::incompressible::RASModels::LamBremhorstKE::TypeName
TypeName("LamBremhorstKE")
Runtime type information.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::incompressible::RASModels::LamBremhorstKE::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LamBremhorstKE.H:161
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::incompressible::RASModels::LamBremhorstKE::f2
tmp< volScalarField > f2(const volScalarField &Rt) const
Definition: LamBremhorstKE.C:66
turbulentTransportModel.H
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:97
Foam::incompressible::RASModels::LamBremhorstKE
Lam and Bremhorst low-Reynolds number k-epsilon turbulence model for incompressible flows.
Definition: LamBremhorstKE.H:64
Foam::geometricOneField
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Definition: geometricOneField.H:52
Foam::incompressible::RASModels::LamBremhorstKE::DkEff
tmp< volScalarField > DkEff() const
Return the effective diffusivity for k.
Definition: LamBremhorstKE.H:137
Foam::incompressible::RASModels::LamBremhorstKE::Ceps1_
dimensionedScalar Ceps1_
Definition: LamBremhorstKE.H:86
Foam::incompressible::RASModels::LamBremhorstKE::sigmaEps_
dimensionedScalar sigmaEps_
Definition: LamBremhorstKE.H:88
Foam::incompressible::RASModels::LamBremhorstKE::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LamBremhorstKE.H:155
U
U
Definition: pEqn.H:46
nu
volScalarField & nu
Definition: readMechanicalProperties.H:179
eddyViscosity.H
Foam::incompressible::RASModels::LamBremhorstKE::read
virtual bool read()
Re-read model coefficients if they have changed.
Definition: LamBremhorstKE.C:190
Foam::incompressible::RASModels::LamBremhorstKE::fMu
tmp< volScalarField > fMu(const volScalarField &Rt) const
Definition: LamBremhorstKE.C:53
Foam::incompressible::RASModels::LamBremhorstKE::~LamBremhorstKE
virtual ~LamBremhorstKE()
Destructor.
Definition: LamBremhorstKE.H:127
Foam::incompressible::RASModels::LamBremhorstKE::correctNut
virtual void correctNut()
Definition: LamBremhorstKE.C:81
Foam::incompressible::RASModels::LamBremhorstKE::epsilon_
volScalarField epsilon_
Definition: LamBremhorstKE.H:91
Foam::incompressible::RASModels::LamBremhorstKE::correct
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
Definition: LamBremhorstKE.C:208
Foam::incompressible::RASModels::LamBremhorstKE::operator=
LamBremhorstKE & operator=(const LamBremhorstKE &)
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Foam::eddyViscosity< incompressible::RASModel >::transportModel
incompressible::RASModel ::transportModel transportModel
Definition: eddyViscosity.H:75
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
rho
rho
Definition: pEqn.H:3
Foam::incompressible::RASModels::LamBremhorstKE::DepsilonEff
tmp< volScalarField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LamBremhorstKE.H:146
Foam::incompressible::RASModels::LamBremhorstKE::Rt
tmp< volScalarField > Rt() const
Definition: LamBremhorstKE.C:47
Foam::incompressible::RASModels::LamBremhorstKE::Ceps2_
dimensionedScalar Ceps2_
Definition: LamBremhorstKE.H:87
Foam::incompressible::RASModels::LamBremhorstKE::Cmu_
dimensionedScalar Cmu_
Definition: LamBremhorstKE.H:85
Foam::incompressible::RASModels::LamBremhorstKE::f1
tmp< volScalarField > f1(const volScalarField &fMu) const
Definition: LamBremhorstKE.C:60
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
Foam::incompressible::RASModels::LamBremhorstKE::k_
volScalarField k_
Definition: LamBremhorstKE.H:90
Foam::eddyViscosity< incompressible::RASModel >::nut_
volScalarField nut_
Definition: eddyViscosity.H:63
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::incompressible::RASModels::LamBremhorstKE::y_
const volScalarField & y_
Wall distance.
Definition: LamBremhorstKE.H:96
Foam::incompressible::RASModels::LamBremhorstKE::LamBremhorstKE
LamBremhorstKE(const LamBremhorstKE &)