All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LRR.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-2022 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::RASModels::LRR
26 
27 Description
28  Launder, Reece and Rodi Reynolds-stress turbulence model for
29  incompressible and compressible flows.
30 
31  Reference:
32  \verbatim
33  Launder, B. E., Reece, G. J., & Rodi, W. (1975).
34  Progress in the development of a Reynolds-stress turbulence closure.
35  Journal of fluid mechanics, 68(03), 537-566.
36  \endverbatim
37 
38  Including the recommended generalised gradient diffusion model of
39  Daly and Harlow:
40  \verbatim
41  Daly, B. J., & Harlow, F. H. (1970).
42  Transport equations in turbulence.
43  Physics of Fluids (1958-1988), 13(11), 2634-2649.
44  \endverbatim
45 
46  Optional Gibson-Launder wall-reflection is also provided:
47  \verbatim
48  Gibson, M. M., & Launder, B. E. (1978).
49  Ground effects on pressure fluctuations in the
50  atmospheric boundary layer.
51  Journal of Fluid Mechanics, 86(03), 491-511.
52  \endverbatim
53 
54  The default model coefficients are:
55  \verbatim
56  LRRCoeffs
57  {
58  Cmu 0.09;
59  C1 1.8;
60  C2 0.6;
61  Ceps1 1.44;
62  Ceps2 1.92;
63  Cs 0.25;
64  Ceps 0.15;
65 
66  wallReflection yes;
67  kappa 0.41
68  Cref1 0.5;
69  Cref2 0.3;
70 
71  couplingFactor 0.0;
72  }
73  \endverbatim
74 
75 SourceFiles
76  LRR.C
77 
78 \*---------------------------------------------------------------------------*/
79 
80 #ifndef LRR_H
81 #define LRR_H
82 
83 #include "RASModel.H"
84 #include "ReynoldsStress.H"
85 
86 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 
88 namespace Foam
89 {
90 namespace RASModels
91 {
92 
93 /*---------------------------------------------------------------------------*\
94  Class LRR Declaration
95 \*---------------------------------------------------------------------------*/
96 
97 template<class BasicMomentumTransportModel>
98 class LRR
99 :
100  public ReynoldsStress<RASModel<BasicMomentumTransportModel>>
101 {
102 protected:
103 
104  // Protected data
105 
106  // Model coefficients
117 
118 
119  // Wall-refection coefficients
125 
126 
127  // Fields
131 
132 
133  // Protected Member Functions
134 
135  //- Update the eddy-viscosity
136  virtual void correctNut();
137 
138  //- Source term for the epsilon equation
139  virtual tmp<fvScalarMatrix> epsilonSource() const;
140 
141 
142 public:
144  typedef typename BasicMomentumTransportModel::alphaField alphaField;
145  typedef typename BasicMomentumTransportModel::rhoField rhoField;
146 
147 
148  //- Runtime type information
149  TypeName("LRR");
150 
151 
152  // Constructors
153 
154  //- Construct from components
155  LRR
156  (
157  const alphaField& alpha,
158  const rhoField& rho,
159  const volVectorField& U,
160  const surfaceScalarField& alphaRhoPhi,
161  const surfaceScalarField& phi,
162  const viscosity& viscosity,
163  const word& type = typeName
164  );
165 
166  //- Disallow default bitwise copy construction
167  LRR(const LRR&) = delete;
168 
169 
170  //- Destructor
171  virtual ~LRR()
172  {}
173 
174 
175  // Member Functions
176 
177  //- Read model coefficients if they have changed
178  virtual bool read();
179 
180  //- Return the turbulence kinetic energy
181  virtual tmp<volScalarField> k() const
182  {
183  return k_;
184  }
185 
186  //- Return the turbulence kinetic energy dissipation rate
187  virtual tmp<volScalarField> epsilon() const
188  {
189  return epsilon_;
190  }
191 
192  //- Return the turbulence specific dissipation rate
193  virtual tmp<volScalarField> omega() const
194  {
195  return volScalarField::New
196  (
197  "omega",
198  epsilon_/(Cmu_*k_),
199  epsilon_.boundaryField().types()
200  );
201  }
202 
203  //- Return the effective diffusivity for R
205 
206  //- Return the effective diffusivity for epsilon
208 
209  //- Solve the turbulence equations and correct eddy-Viscosity and
210  // related properties
211  virtual void correct();
212 
213 
214  // Member Operators
215 
216  //- Disallow default bitwise assignment
217  void operator=(const LRR&) = delete;
218 };
219 
220 
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 
223 } // End namespace RASModels
224 } // End namespace Foam
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 #ifdef NoRepository
229  #include "LRR.C"
230 #endif
231 
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 
234 #endif
235 
236 // ************************************************************************* //
dimensionedScalar C2_
Definition: LRR.H:110
dimensionedScalar Cref2_
Definition: LRR.H:123
volScalarField epsilon_
Definition: LRR.H:129
virtual tmp< fvScalarMatrix > epsilonSource() const
Source term for the epsilon equation.
Definition: LRR.C:50
U
Definition: pEqn.H:72
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Definition: LRR.C:255
const Boundary & boundaryField() const
Return const-reference to the boundary field.
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LRR.H:180
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
LRR(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity, const word &type=typeName)
Construct from components.
Definition: LRR.C:67
wordList types() const
Return a list of the patch field types.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Definition: Switch.H:60
Switch wallReflection_
Definition: LRR.H:120
virtual bool read()
Read model coefficients if they have changed.
Definition: LRR.C:228
BasicMomentumTransportModel::alphaField alphaField
Definition: LRR.H:143
virtual tmp< volScalarField > omega() const
Return the turbulence specific dissipation rate.
Definition: LRR.H:192
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LRR.C:266
Launder, Reece and Rodi Reynolds-stress turbulence model for incompressible and compressible flows...
Definition: LRR.H:97
dimensionedScalar Cs_
Definition: LRR.H:114
virtual void correctNut()
Update the eddy-viscosity.
Definition: LRR.C:41
dimensionedScalar Ceps2_
Definition: LRR.H:113
A class for handling words, derived from string.
Definition: word.H:59
dimensionedScalar kappa_
Definition: LRR.H:121
void operator=(const LRR &)=delete
Disallow default bitwise assignment.
phi
Definition: correctPhi.H:3
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LRR.H:186
dimensionedScalar Cref1_
Definition: LRR.H:122
Abstract base class for all fluid physical properties.
Definition: viscosity.H:49
BasicMomentumTransportModel::rhoField rhoField
Definition: LRR.H:144
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Definition: LRR.C:277
virtual ~LRR()
Destructor.
Definition: LRR.H:170
dimensionedScalar Ceps1_
Definition: LRR.H:112
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
dimensionedScalar Cmu_
Definition: LRR.H:107
TypeName("LRR")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:53
dimensionedScalar C1_
Definition: LRR.H:109
volScalarField k_
Definition: LRR.H:128
dimensionedScalar Ceps_
Definition: LRR.H:115
Namespace for OpenFOAM.
Reynolds-stress turbulence model base class.