Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / turbulenceModels / incompressible / RAS / LaunderGibsonRSTM / LaunderGibsonRSTM.H
blob6db99d1e426d95e761befa0a537c8e826e7357e8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-2011 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
13     the Free Software Foundation, either version 3 of the License, or
14     (at your 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, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::incompressible::RASModels::LaunderGibsonRSTM
27 Description
28     Launder-Gibson Reynolds stress turbulence model for incompressible flows.
30     The default model coefficients correspond to the following:
31     \verbatim
32         LaunderGibsonRSTMCoeffs
33         {
34             Cmu         0.09;
35             kappa       0.41;
36             Clg1        1.8;
37             Clg2        0.6;
38             C1          1.44;
39             C2          1.92;
40             C1Ref       0.5;
41             C2Ref       0.3;
42             Cs          0.25;
43             Ceps        0.15;
44             sigmaEps    1.3;
45             sigmaR      0.81967;
46             couplingFactor  0.0;
47         }
48     \endverbatim
50 SourceFiles
51     LaunderGibsonRSTM.C
53 \*---------------------------------------------------------------------------*/
55 #ifndef LaunderGibsonRSTM_H
56 #define LaunderGibsonRSTM_H
58 #include "RASModel.H"
59 #include "wallDistReflection.H"
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 namespace Foam
65 namespace incompressible
67 namespace RASModels
70 /*---------------------------------------------------------------------------*\
71                            Class LaunderGibsonRSTM Declaration
72 \*---------------------------------------------------------------------------*/
74 class LaunderGibsonRSTM
76     public RASModel
79 protected:
81     // Protected data
83         // Model coefficients
85             dimensionedScalar Cmu_;
86             dimensionedScalar kappa_;
88             dimensionedScalar Clg1_;
89             dimensionedScalar Clg2_;
91             dimensionedScalar C1_;
92             dimensionedScalar C2_;
93             dimensionedScalar Cs_;
94             dimensionedScalar Ceps_;
95             dimensionedScalar sigmaR_;
96             dimensionedScalar sigmaEps_;
98             dimensionedScalar C1Ref_;
99             dimensionedScalar C2Ref_;
101             dimensionedScalar couplingFactor_;
104         // Fields
106             wallDistReflection yr_;
108             volSymmTensorField R_;
109             volScalarField k_;
110             volScalarField epsilon_;
111             volScalarField nut_;
114 public:
116     //- Runtime type information
117     TypeName("LaunderGibsonRSTM");
119     // Constructors
121         //- Construct from components
122         LaunderGibsonRSTM
123         (
124             const volVectorField& U,
125             const surfaceScalarField& phi,
126             transportModel& transport,
127             const word& turbulenceModelName = turbulenceModel::typeName,
128             const word& modelName = typeName
129         );
132     //- Destructor
133     virtual ~LaunderGibsonRSTM()
134     {}
137     // Member Functions
139         //- Return the turbulence viscosity
140         virtual tmp<volScalarField> nut() const
141         {
142             return nut_;
143         }
145         //- Return the effective diffusivity for R
146         tmp<volScalarField> DREff() const
147         {
148             return tmp<volScalarField>
149             (
150                 new volScalarField("DREff", nut_/sigmaR_ + nu())
151             );
152         }
154         //- Return the effective diffusivity for epsilon
155         tmp<volScalarField> DepsilonEff() const
156         {
157             return tmp<volScalarField>
158             (
159                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
160             );
161         }
163         //- Return the turbulence kinetic energy
164         virtual tmp<volScalarField> k() const
165         {
166             return k_;
167         }
169         //- Return the turbulence kinetic energy dissipation rate
170         virtual tmp<volScalarField> epsilon() const
171         {
172             return epsilon_;
173         }
175         //- Return the Reynolds stress tensor
176         virtual tmp<volSymmTensorField> R() const
177         {
178             return R_;
179         }
181         //- Return the effective stress tensor including the laminar stress
182         virtual tmp<volSymmTensorField> devReff() const;
184         //- Return the source term for the momentum equation
185         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
187         //- Solve the turbulence equations and correct the turbulence viscosity
188         virtual void correct();
190         //- Read RASProperties dictionary
191         virtual bool read();
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 } // End namespace RASModels
198 } // End namespace incompressible
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 #endif
205 // ************************************************************************* //