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