Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / turbulenceModels / compressible / RAS / LaunderGibsonRSTM / LaunderGibsonRSTM.H
bloba14283c5ca4d2d0129c9a07bdc04d3582f55cde7
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::compressible::RASModels::LaunderGibsonRSTM
27 Description
28     Launder-Gibson Reynolds stress turbulence model for compressible 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             sigmah      1.0;    // only for compressible
45             sigmaEps    1.3;
46             sigmaR      0.81967;
47             couplingFactor  0.0;
48         }
49     @endverbatim
51 SourceFiles
52     LaunderGibsonRSTM.C
53     LaunderGibsonRSTMcorrect.C
55 \*---------------------------------------------------------------------------*/
57 #ifndef compressibleLaunderGibsonRSTM_H
58 #define compressibleLaunderGibsonRSTM_H
60 #include "RASModel.H"
61 #include "wallDistReflection.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 namespace Foam
67 namespace compressible
69 namespace RASModels
72 /*---------------------------------------------------------------------------*\
73                            Class LaunderGibsonRSTM Declaration
74 \*---------------------------------------------------------------------------*/
76 class LaunderGibsonRSTM
78     public RASModel
80     // Private data
82         // Model coefficients
84             dimensionedScalar Cmu_;
85             dimensionedScalar kappa_;
87             dimensionedScalar Clg1_;
88             dimensionedScalar Clg2_;
90             dimensionedScalar C1_;
91             dimensionedScalar C2_;
92             dimensionedScalar Cs_;
93             dimensionedScalar Ceps_;
95             dimensionedScalar C1Ref_;
96             dimensionedScalar C2Ref_;
98             dimensionedScalar couplingFactor_;
100             dimensionedScalar sigmaR_;
101             dimensionedScalar sigmaEps_;
102             dimensionedScalar Prt_;
105         // Fields
107             wallDistReflection y_;
109             volSymmTensorField R_;
110             volScalarField k_;
111             volScalarField epsilon_;
112             volScalarField mut_;
113             volScalarField alphat_;
116 public:
118     //- Runtime type information
119     TypeName("LaunderGibsonRSTM");
121     // Constructors
123         //- Construct from components
124         LaunderGibsonRSTM
125         (
126             const volScalarField& rho,
127             const volVectorField& U,
128             const surfaceScalarField& phi,
129             const basicThermo& thermophysicalModel
130         );
133     //- Destructor
134     virtual ~LaunderGibsonRSTM()
135     {}
138     // Member Functions
140         //- Return the effective diffusivity for R
141         tmp<volScalarField> DREff() const
142         {
143             return tmp<volScalarField>
144             (
145                 new volScalarField("DREff", mut_/sigmaR_ + mu())
146             );
147         }
149         //- Return the effective diffusivity for epsilon
150         tmp<volScalarField> DepsilonEff() const
151         {
152             return tmp<volScalarField>
153             (
154                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
155             );
156         }
158         //- Return the turbulence viscosity
159         virtual tmp<volScalarField> mut() const
160         {
161             return mut_;
162         }
164         //- Return the effective turbulent thermal diffusivity
165         virtual tmp<volScalarField> alphaEff() const
166         {
167             return tmp<volScalarField>
168             (
169                 new volScalarField("alphaEff", alphat_ + alpha())
170             );
171         }
173         //- Return the turbulence kinetic energy
174         virtual tmp<volScalarField> k() const
175         {
176             return k_;
177         }
179         //- Return the turbulence kinetic energy dissipation rate
180         virtual tmp<volScalarField> epsilon() const
181         {
182             return epsilon_;
183         }
185         //- Return the Reynolds stress tensor
186         virtual tmp<volSymmTensorField> R() const
187         {
188             return R_;
189         }
191         //- Return the effective stress tensor including the laminar stress
192         virtual tmp<volSymmTensorField> devRhoReff() const;
194         //- Return the source term for the momentum equation
195         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
197         //- Solve the turbulence equations and correct the turbulence viscosity
198         virtual void correct();
200         //- Read RASProperties dictionary
201         virtual bool read();
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 } // End namespace RASModels
208 } // End namespace compressible
209 } // End namespace Foam
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 #endif
215 // ************************************************************************* //