Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / turbulenceModels / incompressible / RAS / LaunderGibsonRSTM / LaunderGibsonRSTM.H
blob1e87bed571448490432e5a60f3b89ec8f76c6875
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::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
78     // Private data
80         // Model coefficients
82             dimensionedScalar Cmu_;
83             dimensionedScalar kappa_;
85             dimensionedScalar Clg1_;
86             dimensionedScalar Clg2_;
88             dimensionedScalar C1_;
89             dimensionedScalar C2_;
90             dimensionedScalar Cs_;
91             dimensionedScalar Ceps_;
92             dimensionedScalar sigmaR_;
93             dimensionedScalar sigmaEps_;
95             dimensionedScalar C1Ref_;
96             dimensionedScalar C2Ref_;
98             dimensionedScalar couplingFactor_;
101         // Fields
103             wallDistReflection yr_;
105             volSymmTensorField R_;
106             volScalarField k_;
107             volScalarField epsilon_;
108             volScalarField nut_;
111 public:
113     //- Runtime type information
114     TypeName("LaunderGibsonRSTM");
116     // Constructors
118         //- Construct from components
119         LaunderGibsonRSTM
120         (
121             const volVectorField& U,
122             const surfaceScalarField& phi,
123             transportModel& transport
124         );
127     //- Destructor
129         virtual ~LaunderGibsonRSTM()
130         {}
133     // Member Functions
135         //- Return the turbulence viscosity
136         virtual tmp<volScalarField> nut() const
137         {
138             return nut_;
139         }
141         //- Return the effective diffusivity for R
142         tmp<volScalarField> DREff() const
143         {
144             return tmp<volScalarField>
145             (
146                 new volScalarField("DREff", nut_/sigmaR_ + nu())
147             );
148         }
150         //- Return the effective diffusivity for epsilon
151         tmp<volScalarField> DepsilonEff() const
152         {
153             return tmp<volScalarField>
154             (
155                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
156             );
157         }
159         //- Return the turbulence kinetic energy
160         virtual tmp<volScalarField> k() const
161         {
162             return k_;
163         }
165         //- Return the turbulence kinetic energy dissipation rate
166         virtual tmp<volScalarField> epsilon() const
167         {
168             return epsilon_;
169         }
171         //- Return the Reynolds stress tensor
172         virtual tmp<volSymmTensorField> R() const
173         {
174             return R_;
175         }
177         //- Return the effective stress tensor including the laminar stress
178         virtual tmp<volSymmTensorField> devReff() const;
180         //- Return the source term for the momentum equation
181         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
183         //- Solve the turbulence equations and correct the turbulence viscosity
184         virtual void correct();
186         //- Read RASProperties dictionary
187         virtual bool read();
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 } // End namespace RASModels
194 } // End namespace incompressible
195 } // End namespace Foam
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 #endif
201 // ************************************************************************* //