initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / kEpsilon / kEpsilon.H
blob841c2b7154e48720078d97ea5e339b96518849ab
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::incompressible::RASModels::kEpsilon
28 Description
29     Standard k-epsilon turbulence model for incompressible flows.
31     The default model coefficients correspond to the following:
32     @verbatim
33         kEpsilonCoeffs
34         {
35             Cmu         0.09;
36             C1          1.44;
37             C2          1.92;
38             sigmaEps    1.3;
39         }
40     @endverbatim
42 SourceFiles
43     kEpsilon.C
45 \*---------------------------------------------------------------------------*/
47 #ifndef kEpsilon_H
48 #define kEpsilon_H
50 #include "RASModel.H"
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 namespace Foam
56 namespace incompressible
58 namespace RASModels
61 /*---------------------------------------------------------------------------*\
62                            Class kEpsilon Declaration
63 \*---------------------------------------------------------------------------*/
65 class kEpsilon
67     public RASModel
69     // Private data
71         // Model coefficients
73             dimensionedScalar Cmu_;
74             dimensionedScalar C1_;
75             dimensionedScalar C2_;
76             dimensionedScalar sigmaEps_;
79         // Fields
81             volScalarField k_;
82             volScalarField epsilon_;
83             volScalarField nut_;
86 public:
88     //- Runtime type information
89     TypeName("kEpsilon");
91     // Constructors
93         //- Construct from components
94         kEpsilon
95         (
96             const volVectorField& U,
97             const surfaceScalarField& phi,
98             transportModel& transport
99         );
102     //- Destructor
103     virtual ~kEpsilon()
104     {}
107     // Member Functions
109         //- Return the turbulence viscosity
110         virtual tmp<volScalarField> nut() const
111         {
112             return nut_;
113         }
115         //- Return the effective diffusivity for k
116         tmp<volScalarField> DkEff() const
117         {
118             return tmp<volScalarField>
119             (
120                 new volScalarField("DkEff", nut_ + nu())
121             );
122         }
124         //- Return the effective diffusivity for epsilon
125         tmp<volScalarField> DepsilonEff() const
126         {
127             return tmp<volScalarField>
128             (
129                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
130             );
131         }
133         //- Return the turbulence kinetic energy
134         virtual tmp<volScalarField> k() const
135         {
136             return k_;
137         }
139         //- Return the turbulence kinetic energy dissipation rate
140         virtual tmp<volScalarField> epsilon() const
141         {
142             return epsilon_;
143         }
145         //- Return the Reynolds stress tensor
146         virtual tmp<volSymmTensorField> R() const;
148         //- Return the effective stress tensor including the laminar stress
149         virtual tmp<volSymmTensorField> devReff() const;
151         //- Return the source term for the momentum equation
152         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
154         //- Solve the turbulence equations and correct the turbulence viscosity
155         virtual void correct();
157         //- Read RASProperties dictionary
158         virtual bool read();
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace RASModels
165 } // End namespace incompressible
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 #endif
172 // ************************************************************************* //