initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / LaunderGibsonRSTM / LaunderGibsonRSTM.H
blob00db2c304f9d9338575f2de850098349a894ce02
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::LaunderGibsonRSTM
28 Description
29     Launder-Gibson Reynolds stress turbulence model for compressible flows.
31     The default model coefficients correspond to the following:
32     @verbatim
33         LaunderGibsonRSTMCoeffs
34         {
35             Cmu         0.09;
36             kappa       0.41;
37             Clg1        1.8;
38             Clg2        0.6;
39             C1          1.44;
40             C2          1.92;
41             C1Ref       0.5;
42             C2Ref       0.3;
43             Cs          0.25;
44             Ceps        0.15;
45             sigmah      1.0;    // only for compressible
46             sigmaEps    1.3;
47             sigmaR      0.81967;
48             couplingFactor  0.0;
49         }
50     @endverbatim
52 SourceFiles
53     LaunderGibsonRSTM.C
54     LaunderGibsonRSTMcorrect.C
56 \*---------------------------------------------------------------------------*/
58 #ifndef compressibleLaunderGibsonRSTM_H
59 #define compressibleLaunderGibsonRSTM_H
61 #include "RASModel.H"
62 #include "wallDistReflection.H"
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 namespace Foam
68 namespace compressible
70 namespace RASModels
73 /*---------------------------------------------------------------------------*\
74                            Class LaunderGibsonRSTM Declaration
75 \*---------------------------------------------------------------------------*/
77 class LaunderGibsonRSTM
79     public RASModel
81     // Private 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_;
96             dimensionedScalar C1Ref_;
97             dimensionedScalar C2Ref_;
99             dimensionedScalar couplingFactor_;
101             dimensionedScalar sigmaR_;
102             dimensionedScalar sigmaEps_;
103             dimensionedScalar Prt_;
106         // Fields
108             wallDistReflection y_;
110             volSymmTensorField R_;
111             volScalarField k_;
112             volScalarField epsilon_;
113             volScalarField mut_;
114             volScalarField alphat_;
117 public:
119     //- Runtime type information
120     TypeName("LaunderGibsonRSTM");
122     // Constructors
124         //- Construct from components
125         LaunderGibsonRSTM
126         (
127             const volScalarField& rho,
128             const volVectorField& U,
129             const surfaceScalarField& phi,
130             const basicThermo& thermophysicalModel
131         );
134     //- Destructor
135     virtual ~LaunderGibsonRSTM()
136     {}
139     // Member Functions
141         //- Return the effective diffusivity for R
142         tmp<volScalarField> DREff() const
143         {
144             return tmp<volScalarField>
145             (
146                 new volScalarField("DREff", mut_/sigmaR_ + mu())
147             );
148         }
150         //- Return the effective diffusivity for epsilon
151         tmp<volScalarField> DepsilonEff() const
152         {
153             return tmp<volScalarField>
154             (
155                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
156             );
157         }
159         //- Return the turbulence viscosity
160         virtual tmp<volScalarField> mut() const
161         {
162             return mut_;
163         }
165         //- Return the effective turbulent thermal diffusivity
166         virtual tmp<volScalarField> alphaEff() const
167         {
168             return tmp<volScalarField>
169             (
170                 new volScalarField("alphaEff", alphat_ + alpha())
171             );
172         }
174         //- Return the turbulence kinetic energy
175         virtual tmp<volScalarField> k() const
176         {
177             return k_;
178         }
180         //- Return the turbulence kinetic energy dissipation rate
181         virtual tmp<volScalarField> epsilon() const
182         {
183             return epsilon_;
184         }
186         //- Return the Reynolds stress tensor
187         virtual tmp<volSymmTensorField> R() const
188         {
189             return R_;
190         }
192         //- Return the effective stress tensor including the laminar stress
193         virtual tmp<volSymmTensorField> devRhoReff() const;
195         //- Return the source term for the momentum equation
196         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
198         //- Solve the turbulence equations and correct the turbulence viscosity
199         virtual void correct();
201         //- Read RASProperties dictionary
202         virtual bool read();
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 } // End namespace RASModels
209 } // End namespace compressible
210 } // End namespace Foam
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 #endif
216 // ************************************************************************* //