BUG: PointEdgeWave : n cyclics bool instead of label
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / LRR / LRR.H
blob445faebd39e2534e5c6dec9a2123382120f548bc
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::compressible::RASModels::LRR
28 Description
29     Launder, Reece and Rodi Reynolds-stress turbulence model for
30     compressible flows.
32     The default model coefficients correspond to the following:
33     @verbatim
34         LRRCoeffs
35         {
36             Cmu         0.09;
37             Clrr1       1.8;
38             Clrr2       0.6;
39             C1          1.44;
40             C2          1.92;
41             Cs          0.25;
42             Ceps        0.15;
43             Prt         1.0;        // only for compressible
44             sigmaEps    1.3;
45             sigmaR      0.81967;    // only for compressible
46             couplingFactor  0.0;    // only for incompressible
47         }
48     @endverbatim
50 SourceFiles
51     LRR.C
52     LRRcorrect.C
54 \*---------------------------------------------------------------------------*/
56 #ifndef compressibleLRR_H
57 #define compressibleLRR_H
59 #include "RASModel.H"
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 namespace Foam
65 namespace compressible
67 namespace RASModels
70 /*---------------------------------------------------------------------------*\
71                            Class LRR Declaration
72 \*---------------------------------------------------------------------------*/
74 class LRR
76     public RASModel
78     // Private data
80         // Model coefficients
82             dimensionedScalar Cmu_;
84             dimensionedScalar Clrr1_;
85             dimensionedScalar Clrr2_;
87             dimensionedScalar C1_;
88             dimensionedScalar C2_;
89             dimensionedScalar Cs_;
90             dimensionedScalar Ceps_;
92             dimensionedScalar couplingFactor_;
94             dimensionedScalar sigmaR_;
95             dimensionedScalar sigmaEps_;
96             dimensionedScalar Prt_;
99         // Fields
101             volSymmTensorField R_;
102             volScalarField k_;
103             volScalarField epsilon_;
104             volScalarField mut_;
105             volScalarField alphat_;
108 public:
110     //- Runtime type information
111     TypeName("LRR");
113     // Constructors
115         //- Construct from components
116         LRR
117         (
118             const volScalarField& rho,
119             const volVectorField& U,
120             const surfaceScalarField& phi,
121             const basicThermo& thermophysicalModel
122         );
125     //- Destructor
126     virtual ~LRR()
127     {}
130     // Member Functions
132         //- Return the effective diffusivity for R
133         tmp<volScalarField> DREff() const
134         {
135             return tmp<volScalarField>
136             (
137                 new volScalarField("DREff", mut_/sigmaR_ + mu())
138             );
139         }
141         //- Return the effective diffusivity for epsilon
142         tmp<volScalarField> DepsilonEff() const
143         {
144             return tmp<volScalarField>
145             (
146                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
147             );
148         }
150         //- Return the turbulence viscosity
151         virtual tmp<volScalarField> mut() const
152         {
153             return mut_;
154         }
156         //- Return the effective turbulent thermal diffusivity
157         virtual tmp<volScalarField> alphaEff() const
158         {
159             return tmp<volScalarField>
160             (
161                 new volScalarField("alphaEff", alphat_ + alpha())
162             );
163         }
165         //- Return the turbulence kinetic energy
166         virtual tmp<volScalarField> k() const
167         {
168             return k_;
169         }
171         //- Return the turbulence kinetic energy dissipation rate
172         virtual tmp<volScalarField> epsilon() const
173         {
174             return epsilon_;
175         }
177         //- Return the Reynolds stress tensor
178         virtual tmp<volSymmTensorField> R() const
179         {
180             return R_;
181         }
183         //- Return the effective stress tensor including the laminar stress
184         virtual tmp<volSymmTensorField> devRhoReff() const;
186         //- Return the source term for the momentum equation
187         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
189         //- Solve the turbulence equations and correct the turbulence viscosity
190         virtual void correct();
192         //- Read RASProperties dictionary
193         virtual bool read();
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace RASModels
200 } // End namespace compressible
201 } // End namespace Foam
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 #endif
207 // ************************************************************************* //