Forward compatibility: flex
[foam-extend-3.2.git] / src / turbulenceModels / incompressible / RAS / LienLeschzinerLowRe / LienLeschzinerLowRe.H
blob44778a76dfa9f7fed3910fa300eb350051922c1e
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::LienLeschzinerLowRe
27 Description
28     Lien and Leschziner low-Reynolds k-epsilon turbulence model for
29     incompressible flows.
31 SourceFiles
32     LienLeschzinerLowRe.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef LienLeschzinerLowRe_H
37 #define LienLeschzinerLowRe_H
39 #include "RASModel.H"
40 #include "wallDist.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
46 namespace incompressible
48 namespace RASModels
51 /*---------------------------------------------------------------------------*\
52                            Class LienLeschzinerLowRe Declaration
53 \*---------------------------------------------------------------------------*/
55 class LienLeschzinerLowRe
57     public RASModel
59     // Private data
61         // Model coefficients
63             dimensionedScalar C1_;
64             dimensionedScalar C2_;
65             dimensionedScalar sigmak_;
66             dimensionedScalar sigmaEps_;
67             dimensionedScalar Cmu_;
68             dimensionedScalar kappa_;
70             dimensionedScalar Am_;
71             dimensionedScalar Aepsilon_;
72             dimensionedScalar Amu_;
75         // Fields
77             volScalarField k_;
78             volScalarField epsilon_;
80             wallDist y_;
82             volScalarField yStar_;
84             volScalarField nut_;
87 public:
89     TypeName("LienLeschzinerLowRe");
91     // Constructors
93         //- Construct from components
94         LienLeschzinerLowRe
95         (
96             const volVectorField& U,
97             const surfaceScalarField& phi,
98             transportModel& transport
99         );
102     //- Destructor
104         virtual ~LienLeschzinerLowRe()
105         {}
108     // Member Functions
110         //- Return the turbulence viscosity
111         virtual tmp<volScalarField> nut() const
112         {
113             return nut_;
114         }
116         //- Return the effective diffusivity for k
117         tmp<volScalarField> DkEff() const
118         {
119             return tmp<volScalarField>
120             (
121                 new volScalarField("DkEff", nut_/sigmak_ + nu())
122             );
123         }
125         //- Return the effective diffusivity for epsilon
126         tmp<volScalarField> DepsilonEff() const
127         {
128             return tmp<volScalarField>
129             (
130                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
131             );
132         }
134         //- Return the turbulence kinetic energy
135         virtual tmp<volScalarField> k() const
136         {
137             return k_;
138         }
140         //- Return the turbulence kinetic energy dissipation rate
141         virtual tmp<volScalarField> epsilon() const
142         {
143             return epsilon_;
144         }
146         //- Return the Reynolds stress tensor
147         virtual tmp<volSymmTensorField> R() const;
149         //- Return the effective stress tensor including the laminar stress
150         virtual tmp<volSymmTensorField> devReff() const;
152         //- Return the source term for the momentum equation
153         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
155         //- Solve the turbulence equations and correct the turbulence viscosity
156         virtual void correct();
158         //- Read RASProperties dictionary
159         virtual bool read();
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 } // End namespace RASModels
166 } // End namespace incompressible
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //