initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / LRR / LRR.H
blob3727b8846467becbd8671a09d9652e32c34bb582
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::incompressible::RASModels::LRR
28 Description
29     Launder, Reece and Rodi Reynolds-stress turbulence model for
30     incompressible 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             sigmaEps    1.3;
44             couplingFactor  0.0;    // only for incompressible
45         }
46     @endverbatim
48 SourceFiles
49     LRR.C
51 \*---------------------------------------------------------------------------*/
53 #ifndef LRR_H
54 #define LRR_H
56 #include "RASModel.H"
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 namespace Foam
62 namespace incompressible
64 namespace RASModels
67 /*---------------------------------------------------------------------------*\
68                            Class LRR Declaration
69 \*---------------------------------------------------------------------------*/
71 class LRR
73     public RASModel
75     // Private data
77         // Model coefficients
79             dimensionedScalar Cmu_;
81             dimensionedScalar Clrr1_;
82             dimensionedScalar Clrr2_;
84             dimensionedScalar C1_;
85             dimensionedScalar C2_;
86             dimensionedScalar Cs_;
87             dimensionedScalar Ceps_;
88             dimensionedScalar sigmaEps_;
90             dimensionedScalar couplingFactor_;
93         // Fields
95             volSymmTensorField R_;
96             volScalarField k_;
97             volScalarField epsilon_;
98             volScalarField nut_;
101 public:
103     //- Runtime type information
104     TypeName("LRR");
106     // Constructors
108         //- Construct from components
109         LRR
110         (
111             const volVectorField& U,
112             const surfaceScalarField& phi,
113             transportModel& transport
114         );
117     //- Destructor
118     virtual ~LRR()
119     {}
122     // Member Functions
124         //- Return the turbulence viscosity
125         virtual tmp<volScalarField> nut() const
126         {
127             return nut_;
128         }
130         //- Return the effective diffusivity for R
131         tmp<volScalarField> DREff() const
132         {
133             return tmp<volScalarField>
134             (
135                 new volScalarField("DREff", nut_ + nu())
136             );
137         }
139         //- Return the effective diffusivity for epsilon
140         tmp<volScalarField> DepsilonEff() const
141         {
142             return tmp<volScalarField>
143             (
144                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
145             );
146         }
148         //- Return the turbulence kinetic energy
149         virtual tmp<volScalarField> k() const
150         {
151             return k_;
152         }
154         //- Return the turbulence kinetic energy dissipation rate
155         virtual tmp<volScalarField> epsilon() const
156         {
157             return epsilon_;
158         }
160         //- Return the Reynolds stress tensor
161         virtual tmp<volSymmTensorField> R() const
162         {
163             return R_;
164         }
166         //- Return the effective stress tensor including the laminar stress
167         virtual tmp<volSymmTensorField> devReff() const;
169         //- Return the source term for the momentum equation
170         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
172         //- Solve the turbulence equations and correct the turbulence viscosity
173         virtual void correct();
175         //- Read RASProperties dictionary
176         virtual bool read();
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace RASModels
183 } // End namespace incompressible
184 } // End namespace Foam
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 #endif
190 // ************************************************************************* //