ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / turbulenceModels / incompressible / RAS / LienCubicKE / LienCubicKE.H
blob1f675ac655d9c86005d694b22ad2428b61e3dd17
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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::LienCubicKE
27 Description
28     Lien cubic non-linear k-epsilon turbulence model for incompressible flows.
30 SourceFiles
31     LienCubicKE.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef LienCubicKE_H
36 #define LienCubicKE_H
38 #include "RASModel.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
44 namespace incompressible
46 namespace RASModels
49 /*---------------------------------------------------------------------------*\
50                            Class LienCubicKE Declaration
51 \*---------------------------------------------------------------------------*/
53 class LienCubicKE
55     public RASModel
58 protected:
60     // Protected data
62         // Model coefficients
64             dimensionedScalar C1_;
65             dimensionedScalar C2_;
66             dimensionedScalar sigmak_;
67             dimensionedScalar sigmaEps_;
68             dimensionedScalar A1_;
69             dimensionedScalar A2_;
70             dimensionedScalar Ctau1_;
71             dimensionedScalar Ctau2_;
72             dimensionedScalar Ctau3_;
73             dimensionedScalar alphaKsi_;
76         // Fields
78             volScalarField k_;
79             volScalarField epsilon_;
81             volTensorField gradU_;
82             volScalarField eta_;
83             volScalarField ksi_;
84             volScalarField Cmu_;
85             volScalarField fEta_;
86             volScalarField C5viscosity_;
88             volScalarField nut_;
90             volSymmTensorField nonlinearStress_;
93 public:
95     //- Runtime type information
96     TypeName("LienCubicKE");
98     // Constructors
100         //- Construct from components
101         LienCubicKE
102         (
103             const volVectorField& U,
104             const surfaceScalarField& phi,
105             transportModel& transport,
106             const word& turbulenceModelName = turbulenceModel::typeName,
107             const word& modelName = typeName
108         );
111     //- Destructor
112     virtual ~LienCubicKE()
113     {}
116     // Member Functions
118         //- Return the turbulence viscosity
119         virtual tmp<volScalarField> nut() const
120         {
121             return nut_;
122         }
124         //- Return the effective diffusivity for k
125         tmp<volScalarField> DkEff() const
126         {
127             return tmp<volScalarField>
128             (
129                 new volScalarField("DkEff", nut_/sigmak_ + nu())
130             );
131         }
133         //- Return the effective diffusivity for epsilon
134         tmp<volScalarField> DepsilonEff() const
135         {
136             return tmp<volScalarField>
137             (
138                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
139             );
140         }
142         //- Return the turbulence kinetic energy
143         virtual tmp<volScalarField> k() const
144         {
145             return k_;
146         }
148         //- Return the turbulence kinetic energy dissipation rate
149         virtual tmp<volScalarField> epsilon() const
150         {
151             return epsilon_;
152         }
154         //- Return the Reynolds stress tensor
155         virtual tmp<volSymmTensorField> R() const;
157         //- Return the effective stress tensor including the laminar stress
158         virtual tmp<volSymmTensorField> devReff() const;
160         //- Return the source term for the momentum equation
161         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
163         //- Solve the turbulence equations and correct the turbulence viscosity
164         virtual void correct();
166         //- Read RASProperties dictionary
167         virtual bool read();
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 } // End namespace RASModels
174 } // End namespace incompressible
175 } // End namespace Foam
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 #endif
181 // ************************************************************************* //