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::incompressible::RASModels::LRR
26 
27 Description
28  Launder, Reece and Rodi Reynolds-stress turbulence model for
29  incompressible 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  sigmaEps 1.3;
43  couplingFactor 0.0; // only for incompressible
44  }
45  @endverbatim
46 
47 SourceFiles
48  LRR.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef LRR_H
53 #define LRR_H
54 
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace incompressible
62 {
63 namespace RASModels
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class LRR Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 class LRR
71 :
72  public RASModel
73 {
74  // Private data
75 
76  // Model coefficients
77 
78  dimensionedScalar Cmu_;
79 
80  dimensionedScalar Clrr1_;
81  dimensionedScalar Clrr2_;
82 
86  dimensionedScalar Ceps_;
87  dimensionedScalar sigmaEps_;
88 
89  dimensionedScalar couplingFactor_;
90 
91 
92  // Fields
93 
95  volScalarField k_;
96  volScalarField epsilon_;
97  volScalarField nut_;
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("LRR");
104 
105  // Constructors
106 
107  //- Construct from components
108  LRR
109  (
110  const volVectorField& U,
111  const surfaceScalarField& phi,
113  );
114 
115 
116  //- Destructor
117  virtual ~LRR()
118  {}
119 
120 
121  // Member Functions
122 
123  //- Return the turbulence viscosity
124  virtual tmp<volScalarField> nut() const
125  {
126  return nut_;
127  }
128 
129  //- Return the effective diffusivity for R
131  {
132  return tmp<volScalarField>
133  (
134  new volScalarField("DREff", nut_ + nu())
135  );
136  }
137 
138  //- Return the effective diffusivity for epsilon
140  {
141  return tmp<volScalarField>
142  (
143  new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
144  );
145  }
146 
147  //- Return the turbulence kinetic energy
148  virtual tmp<volScalarField> k() const
149  {
150  return k_;
151  }
152 
153  //- Return the turbulence kinetic energy dissipation rate
154  virtual tmp<volScalarField> epsilon() const
155  {
156  return epsilon_;
157  }
158 
159  //- Return the Reynolds stress tensor
160  virtual tmp<volSymmTensorField> R() const
161  {
162  return R_;
163  }
164 
165  //- Return the effective stress tensor including the laminar stress
166  virtual tmp<volSymmTensorField> devReff() const;
167 
168  //- Return the source term for the momentum equation
170 
171  //- Solve the turbulence equations and correct the turbulence viscosity
172  virtual void correct();
173 
174  //- Read RASProperties dictionary
175  virtual bool read();
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace RASModels
182 } // End namespace incompressible
183 } // End namespace Foam
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************ vim: set sw=4 sts=4 et: ************************ //