FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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::compressible::RASModels::LRR
26 
27 Description
28  Launder, Reece and Rodi Reynolds-stress turbulence model for
29  compressible flows.
30 
31  The default model coefficients correspond to the following:
32  @verbatim
33  LRRCoeffs
34  {
35  Cmu 0.09;
36  Clrr1 1.8;
37  Clrr2 0.6;
38  C1 1.44;
39  C2 1.92;
40  Cs 0.25;
41  Ceps 0.15;
42  Prt 1.0; // only for compressible
43  sigmaEps 1.3;
44  sigmaR 0.81967; // only for compressible
45  couplingFactor 0.0; // only for incompressible
46  }
47  @endverbatim
48 
49 SourceFiles
50  LRR.C
51  LRRcorrect.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef compressibleLRR_H
56 #define compressibleLRR_H
57 
59 
60 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 
62 namespace Foam
63 {
64 namespace compressible
65 {
66 namespace RASModels
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class LRR Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class LRR
74 :
75  public RASModel
76 {
77  // Private data
78 
79  // Model coefficients
80 
81  dimensionedScalar Cmu_;
82 
83  dimensionedScalar Clrr1_;
84  dimensionedScalar Clrr2_;
85 
89  dimensionedScalar Ceps_;
90 
91  dimensionedScalar couplingFactor_;
92 
93  dimensionedScalar sigmaR_;
94  dimensionedScalar sigmaEps_;
95  dimensionedScalar Prt_;
96 
97 
98  // Fields
99 
101  volScalarField k_;
102  volScalarField epsilon_;
103  volScalarField mut_;
104  volScalarField alphat_;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("LRR");
111 
112  // Constructors
113 
114  //- Construct from components
115  LRR
116  (
117  const volScalarField& rho,
118  const volVectorField& U,
119  const surfaceScalarField& phi,
120  const basicThermo& thermophysicalModel
121  );
122 
123 
124  //- Destructor
125  virtual ~LRR()
126  {}
127 
128 
129  // Member Functions
130 
131  //- Return the effective diffusivity for R
133  {
134  return tmp<volScalarField>
135  (
136  new volScalarField("DREff", mut_/sigmaR_ + mu())
137  );
138  }
139 
140  //- Return the effective diffusivity for epsilon
142  {
143  return tmp<volScalarField>
144  (
145  new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
146  );
147  }
148 
149  //- Return the turbulence viscosity
150  virtual tmp<volScalarField> mut() const
151  {
152  return mut_;
153  }
154 
155  //- Return the effective turbulent thermal diffusivity
157  {
158  return tmp<volScalarField>
159  (
160  new volScalarField("alphaEff", alphat_ + alpha())
161  );
162  }
163 
164  //- Return the turbulence kinetic energy
165  virtual tmp<volScalarField> k() const
166  {
167  return k_;
168  }
169 
170  //- Return the turbulence kinetic energy dissipation rate
171  virtual tmp<volScalarField> epsilon() const
172  {
173  return epsilon_;
174  }
175 
176  //- Return the Reynolds stress tensor
177  virtual tmp<volSymmTensorField> R() const
178  {
179  return R_;
180  }
181 
182  //- Return the effective stress tensor including the laminar stress
183  virtual tmp<volSymmTensorField> devRhoReff() const;
184 
185  //- Return the source term for the momentum equation
186  virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
187 
188  //- Solve the turbulence equations and correct the turbulence viscosity
189  virtual void correct();
190 
191  //- Read RASProperties dictionary
192  virtual bool read();
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace RASModels
199 } // End namespace compressible
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************ vim: set sw=4 sts=4 et: ************************ //