initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / incompressible / RAS / RNGkEpsilon / RNGkEpsilon.H
blob55cc9b1775e9858996ccb48502df566465244e8f
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::RNGkEpsilon
28 Description
29     Renormalisation group k-epsilon turbulence model for incompressible flows.
31     The default model coefficients correspond to the following:
32     @verbatim
33         RNGkEpsilonCoeffs
34         {
35             Cmu         0.0845;
36             C1          1.42;
37             C2          1.68;
38             sigmak      0.71942;
39             sigmaEps    0.71942;
40             eta0        4.38;
41             beta        0.012;
42         }
43     @endverbatim
45 SourceFiles
46     RNGkEpsilon.C
48 \*---------------------------------------------------------------------------*/
50 #ifndef RNGkEpsilon_H
51 #define RNGkEpsilon_H
53 #include "RASModel.H"
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 namespace Foam
59 namespace incompressible
61 namespace RASModels
64 /*---------------------------------------------------------------------------*\
65                            Class RNGkEpsilon Declaration
66 \*---------------------------------------------------------------------------*/
68 class RNGkEpsilon
70     public RASModel
72     // Private data
74         // Model coefficients
76             dimensionedScalar Cmu_;
77             dimensionedScalar C1_;
78             dimensionedScalar C2_;
79             dimensionedScalar sigmak_;
80             dimensionedScalar sigmaEps_;
81             dimensionedScalar eta0_;
82             dimensionedScalar beta_;
85         // Fields
87             volScalarField k_;
88             volScalarField epsilon_;
89             volScalarField nut_;
92 public:
94     //- Runtime type information
95     TypeName("RNGkEpsilon");
97     // Constructors
99         //- Construct from components
100         RNGkEpsilon
101         (
102             const volVectorField& U,
103             const surfaceScalarField& phi,
104             transportModel& transport
105         );
108     //- Destructor
109     virtual ~RNGkEpsilon()
110     {}
113     // Member Functions
115         //- Return the turbulence viscosity
116         virtual tmp<volScalarField> nut() const
117         {
118             return nut_;
119         }
121         //- Return the effective diffusivity for k
122         tmp<volScalarField> DkEff() const
123         {
124             return tmp<volScalarField>
125             (
126                 new volScalarField("DkEff", nut_/sigmak_ + nu())
127             );
128         }
130         //- Return the effective diffusivity for epsilon
131         tmp<volScalarField> DepsilonEff() const
132         {
133             return tmp<volScalarField>
134             (
135                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
136             );
137         }
139         //- Return the turbulence kinetic energy
140         virtual tmp<volScalarField> k() const
141         {
142             return k_;
143         }
145         //- Return the turbulence kinetic energy dissipation rate
146         virtual tmp<volScalarField> epsilon() const
147         {
148             return epsilon_;
149         }
151         //- Return the Reynolds stress tensor
152         virtual tmp<volSymmTensorField> R() const;
154         //- Return the effective stress tensor including the laminar stress
155         virtual tmp<volSymmTensorField> devReff() const;
157         //- Return the source term for the momentum equation
158         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
160         //- Solve the turbulence equations and correct the turbulence viscosity
161         virtual void correct();
163         //- Read RASProperties dictionary
164         virtual bool read();
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 } // End namespace RASModels
171 } // End namespace incompressible
172 } // End namespace Foam
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 #endif
178 // ************************************************************************* //