LRR.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::RASModels::LRR
29 
30 Group
31  grpRASTurbulence
32 
33 Description
34  Launder, Reece and Rodi Reynolds-stress turbulence model for
35  incompressible and compressible flows.
36 
37  Reference:
38  \verbatim
39  Launder, B. E., Reece, G. J., & Rodi, W. (1975).
40  Progress in the development of a Reynolds-stress turbulence closure.
41  Journal of fluid mechanics, 68(03), 537-566.
42  \endverbatim
43 
44  Including the recommended generalized gradient diffusion model of
45  Daly and Harlow:
46  \verbatim
47  Daly, B. J., & Harlow, F. H. (1970).
48  Transport equations in turbulence.
49  Physics of Fluids (1958-1988), 13(11), 2634-2649.
50  \endverbatim
51 
52  Optional Gibson-Launder wall-reflection is also provided:
53  \verbatim
54  Gibson, M. M., & Launder, B. E. (1978).
55  Ground effects on pressure fluctuations in the
56  atmospheric boundary layer.
57  Journal of Fluid Mechanics, 86(03), 491-511.
58  \endverbatim
59 
60  The default model coefficients are:
61  \verbatim
62  LRRCoeffs
63  {
64  Cmu 0.09;
65  C1 1.8;
66  C2 0.6;
67  Ceps1 1.44;
68  Ceps2 1.92;
69  Cs 0.25;
70  Ceps 0.15;
71 
72  wallReflection yes;
73  kappa 0.41
74  Cref1 0.5;
75  Cref2 0.3;
76 
77  couplingFactor 0.0;
78  }
79  \endverbatim
80 
81 SourceFiles
82  LRR.C
83 
84 \*---------------------------------------------------------------------------*/
85 
86 #ifndef LRR_H
87 #define LRR_H
88 
89 #include "RASModel.H"
90 #include "ReynoldsStress.H"
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 namespace Foam
95 {
96 namespace RASModels
97 {
98 
99 /*---------------------------------------------------------------------------*\
100  Class LRR Declaration
101 \*---------------------------------------------------------------------------*/
102 
103 template<class BasicTurbulenceModel>
104 class LRR
105 :
106  public ReynoldsStress<RASModel<BasicTurbulenceModel>>
107 {
108  // Private Member Functions
109 
110  //- No copy construct
111  LRR(const LRR&) = delete;
112 
113  //- No copy assignment
114  void operator=(const LRR&) = delete;
115 
116 
117 protected:
118 
119  // Protected data
120 
121  // Model coefficients
122 
124 
127 
132 
133 
134  // Wall-refection coefficients
135 
140 
141 
142  // Fields
143 
146 
147 
148  // Protected Member Functions
149 
150  //- Update the eddy-viscosity
151  virtual void correctNut();
152 
153 
154 public:
155 
156  typedef typename BasicTurbulenceModel::alphaField alphaField;
157  typedef typename BasicTurbulenceModel::rhoField rhoField;
158  typedef typename BasicTurbulenceModel::transportModel transportModel;
159 
160 
161  //- Runtime type information
162  TypeName("LRR");
163 
164 
165  // Constructors
166 
167  //- Construct from components
168  LRR
169  (
170  const alphaField& alpha,
171  const rhoField& rho,
172  const volVectorField& U,
173  const surfaceScalarField& alphaRhoPhi,
174  const surfaceScalarField& phi,
175  const transportModel& transport,
176  const word& propertiesName = turbulenceModel::propertiesName,
177  const word& type = typeName
178  );
179 
180 
181  //- Destructor
182  virtual ~LRR() = default;
183 
184 
185  // Member Functions
186 
187  //- Read model coefficients if they have changed
188  virtual bool read();
189 
190  //- Return the turbulence kinetic energy
191  virtual tmp<volScalarField> k() const
192  {
193  return k_;
194  }
195 
196  //- Return the turbulence kinetic energy dissipation rate
197  virtual tmp<volScalarField> epsilon() const
198  {
199  return epsilon_;
200  }
201 
202  //- Return the (estimated) specific dissipation rate
203  virtual tmp<volScalarField> omega() const
204  {
206  (
207  IOobject
208  (
209  IOobject::groupName("omega", this->alphaRhoPhi_.group()),
210  this->mesh_.time().timeName(),
211  this->mesh_
212  ),
213  epsilon_/(Cmu_*k_)
214  );
215  }
216 
217  //- Return the effective diffusivity for R
219 
220  //- Return the effective diffusivity for epsilon
222 
223  //- Solve the turbulence equations and correct eddy-Viscosity and
224  // related properties
225  virtual void correct();
226 };
227 
228 
229 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 
231 } // End namespace RASModels
232 } // End namespace Foam
233 
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
235 
236 #ifdef NoRepository
237  #include "LRR.C"
238 #endif
239 
240 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
241 
242 #endif
243 
244 // ************************************************************************* //
Foam::RASModels::LRR::epsilon_
volScalarField epsilon_
Definition: LRR.H:144
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::RASModels::LRR::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: LRR.H:156
Foam::RASModels::LRR::Cref2_
dimensionedScalar Cref2_
Definition: LRR.H:138
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::RASModels::LRR::Cmu_
dimensionedScalar Cmu_
Definition: LRR.H:122
Foam::RASModels::LRR::Cs_
dimensionedScalar Cs_
Definition: LRR.H:129
Foam::RASModels::LRR::C1_
dimensionedScalar C1_
Definition: LRR.H:124
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::RASModels::LRR::k_
volScalarField k_
Definition: LRR.H:143
Foam::turbulenceModel::propertiesName
static const word propertiesName
Default name of the turbulence properties dictionary.
Definition: turbulenceModel.H:100
Foam::RASModels::LRR::wallReflection_
Switch wallReflection_
Definition: LRR.H:135
rho
rho
Definition: readInitialConditions.H:88
Foam::RASModels::LRR
Launder, Reece and Rodi Reynolds-stress turbulence model for incompressible and compressible flows.
Definition: LRR.H:103
ReynoldsStress.H
Foam::RASModels::LRR::kappa_
dimensionedScalar kappa_
Definition: LRR.H:136
Foam::ReynoldsStress
Reynolds-stress turbulence model base class.
Definition: ReynoldsStress.H:53
Foam::RASModels::LRR::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: LRR.H:155
Foam::RASModels::LRR::correctNut
virtual void correctNut()
Update the eddy-viscosity.
Definition: LRR.C:43
Foam::RASModels::LRR::DepsilonEff
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LRR.C:259
Foam::RASModels::LRR::k
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LRR.H:190
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::RASModels::LRR::read
virtual bool read()
Read model coefficients if they have changed.
Definition: LRR.C:220
RASModel.H
Foam::dimensioned< scalar >
Foam::RASModels::LRR::correct
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Definition: LRR.C:273
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::RASModels::LRR::omega
virtual tmp< volScalarField > omega() const
Return the (estimated) specific dissipation rate.
Definition: LRR.H:202
Foam::RASModels::LRR::epsilon
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LRR.H:196
U
U
Definition: pEqn.H:72
Foam::RASModels::LRR::~LRR
virtual ~LRR()=default
Destructor.
Foam::RASModels::LRR::Ceps_
dimensionedScalar Ceps_
Definition: LRR.H:130
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::RASModels::LRR::Ceps2_
dimensionedScalar Ceps2_
Definition: LRR.H:128
Foam::RASModels::LRR::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: LRR.H:157
LRR.C
Foam::RASModels::LRR::TypeName
TypeName("LRR")
Runtime type information.
Foam::tmp::New
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
Foam::RASModels::LRR::DREff
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Definition: LRR.C:245
Foam::RASModels::LRR::Ceps1_
dimensionedScalar Ceps1_
Definition: LRR.H:127
Foam::IOobject::groupName
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::RASModels::LRR::Cref1_
dimensionedScalar Cref1_
Definition: LRR.H:137
Foam::RASModels::LRR::C2_
dimensionedScalar C2_
Definition: LRR.H:125