OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

RNGkEpsilon.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::incompressible::RASModels::RNGkEpsilon
00027 
00028 Description
00029     Renormalisation group k-epsilon turbulence model for incompressible flows.
00030 
00031     The default model coefficients correspond to the following:
00032     @verbatim
00033         RNGkEpsilonCoeffs
00034         {
00035             Cmu         0.0845;
00036             C1          1.42;
00037             C2          1.68;
00038             sigmak      0.71942;
00039             sigmaEps    0.71942;
00040             eta0        4.38;
00041             beta        0.012;
00042         }
00043     @endverbatim
00044 
00045 SourceFiles
00046     RNGkEpsilon.C
00047 
00048 \*---------------------------------------------------------------------------*/
00049 
00050 #ifndef RNGkEpsilon_H
00051 #define RNGkEpsilon_H
00052 
00053 #include "RASModel.H"
00054 
00055 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00056 
00057 namespace Foam
00058 {
00059 namespace incompressible
00060 {
00061 namespace RASModels
00062 {
00063 
00064 /*---------------------------------------------------------------------------*\
00065                            Class RNGkEpsilon Declaration
00066 \*---------------------------------------------------------------------------*/
00067 
00068 class RNGkEpsilon
00069 :
00070     public RASModel
00071 {
00072     // Private data
00073 
00074         // Model coefficients
00075 
00076             dimensionedScalar Cmu_;
00077             dimensionedScalar C1_;
00078             dimensionedScalar C2_;
00079             dimensionedScalar sigmak_;
00080             dimensionedScalar sigmaEps_;
00081             dimensionedScalar eta0_;
00082             dimensionedScalar beta_;
00083 
00084 
00085         // Fields
00086 
00087             volScalarField k_;
00088             volScalarField epsilon_;
00089             volScalarField nut_;
00090 
00091 
00092 public:
00093 
00094     //- Runtime type information
00095     TypeName("RNGkEpsilon");
00096 
00097     // Constructors
00098 
00099         //- Construct from components
00100         RNGkEpsilon
00101         (
00102             const volVectorField& U,
00103             const surfaceScalarField& phi,
00104             transportModel& transport
00105         );
00106 
00107 
00108     //- Destructor
00109     virtual ~RNGkEpsilon()
00110     {}
00111 
00112 
00113     // Member Functions
00114 
00115         //- Return the turbulence viscosity
00116         virtual tmp<volScalarField> nut() const
00117         {
00118             return nut_;
00119         }
00120 
00121         //- Return the effective diffusivity for k
00122         tmp<volScalarField> DkEff() const
00123         {
00124             return tmp<volScalarField>
00125             (
00126                 new volScalarField("DkEff", nut_/sigmak_ + nu())
00127             );
00128         }
00129 
00130         //- Return the effective diffusivity for epsilon
00131         tmp<volScalarField> DepsilonEff() const
00132         {
00133             return tmp<volScalarField>
00134             (
00135                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
00136             );
00137         }
00138 
00139         //- Return the turbulence kinetic energy
00140         virtual tmp<volScalarField> k() const
00141         {
00142             return k_;
00143         }
00144 
00145         //- Return the turbulence kinetic energy dissipation rate
00146         virtual tmp<volScalarField> epsilon() const
00147         {
00148             return epsilon_;
00149         }
00150 
00151         //- Return the Reynolds stress tensor
00152         virtual tmp<volSymmTensorField> R() const;
00153 
00154         //- Return the effective stress tensor including the laminar stress
00155         virtual tmp<volSymmTensorField> devReff() const;
00156 
00157         //- Return the source term for the momentum equation
00158         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00159 
00160         //- Solve the turbulence equations and correct the turbulence viscosity
00161         virtual void correct();
00162 
00163         //- Read RASProperties dictionary
00164         virtual bool read();
00165 };
00166 
00167 
00168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00169 
00170 } // End namespace RASModels
00171 } // End namespace incompressible
00172 } // End namespace Foam
00173 
00174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00175 
00176 #endif
00177 
00178 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd