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-2016 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  void operator=(const LRR&);
110 
111 
112 protected:
113 
114  // Protected data
115 
116  // Model coefficients
127 
128 
129  // Wall-refection coefficients
135 
136 
137  // Fields
141 
142 
143  // Protected Member Functions
144 
145  //- Update the eddy-viscosity
146  virtual void correctNut();
147 
148 
149 public:
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 // ************************************************************************* //
dimensionedScalar C2_
Definition: LRR.H:120
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate.
Definition: LRR.H:192
dimensionedScalar Cref2_
Definition: LRR.H:133
surfaceScalarField & phi
U
Definition: pEqn.H:83
volScalarField epsilon_
Definition: LRR.H:139
tmp< volSymmTensorField > DREff() const
Return the effective diffusivity for R.
Definition: LRR.C:244
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.
Definition: Switch.H:60
Switch wallReflection_
Definition: LRR.H:130
virtual bool read()
Read model coefficients if they have changed.
Definition: LRR.C:217
Launder, Reece and Rodi Reynolds-stress turbulence model for incompressible and compressible flows...
Definition: LRR.H:100
dimensionedScalar Cs_
Definition: LRR.H:124
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual void correctNut()
Update the eddy-viscosity.
Definition: LRR.C:40
dimensionedScalar Ceps2_
Definition: LRR.H:123
A class for handling words, derived from string.
Definition: word.H:59
dimensionedScalar kappa_
Definition: LRR.H:131
BasicTurbulenceModel::transportModel transportModel
Definition: LRR.H:152
dimensionedScalar Cref1_
Definition: LRR.H:132
BasicTurbulenceModel::alphaField alphaField
Definition: LRR.H:150
virtual void correct()
Solve the turbulence equations and correct eddy-Viscosity and.
Definition: LRR.C:272
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
virtual ~LRR()
Destructor.
Definition: LRR.H:176
dimensionedScalar Ceps1_
Definition: LRR.H:122
dimensionedScalar Cmu_
Definition: LRR.H:117
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy.
Definition: LRR.H:186
BasicTurbulenceModel::rhoField rhoField
Definition: LRR.H:151
TypeName("LRR")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:54
dimensionedScalar C1_
Definition: LRR.H:119
volScalarField k_
Definition: LRR.H:138
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
tmp< volSymmTensorField > DepsilonEff() const
Return the effective diffusivity for epsilon.
Definition: LRR.C:258
dimensionedScalar Ceps_
Definition: LRR.H:125
Namespace for OpenFOAM.
Reynolds-stress turbulence model base class.