FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::incompressible::RASModels::RNGkEpsilon
00026 
00027 Description
00028     Renormalisation group k-epsilon turbulence model for incompressible flows.
00029 
00030     The default model coefficients correspond to the following:
00031     @verbatim
00032         RNGkEpsilonCoeffs
00033         {
00034             Cmu         0.0845;
00035             C1          1.42;
00036             C2          1.68;
00037             sigmak      0.71942;
00038             sigmaEps    0.71942;
00039             eta0        4.38;
00040             beta        0.012;
00041         }
00042     @endverbatim
00043 
00044 SourceFiles
00045     RNGkEpsilon.C
00046 
00047 \*---------------------------------------------------------------------------*/
00048 
00049 #ifndef RNGkEpsilon_H
00050 #define RNGkEpsilon_H
00051 
00052 #include <incompressibleRASModels/RASModel.H>
00053 
00054 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00055 
00056 namespace Foam
00057 {
00058 namespace incompressible
00059 {
00060 namespace RASModels
00061 {
00062 
00063 /*---------------------------------------------------------------------------*\
00064                            Class RNGkEpsilon Declaration
00065 \*---------------------------------------------------------------------------*/
00066 
00067 class RNGkEpsilon
00068 :
00069     public RASModel
00070 {
00071     // Private data
00072 
00073         // Model coefficients
00074 
00075             dimensionedScalar Cmu_;
00076             dimensionedScalar C1_;
00077             dimensionedScalar C2_;
00078             dimensionedScalar sigmak_;
00079             dimensionedScalar sigmaEps_;
00080             dimensionedScalar eta0_;
00081             dimensionedScalar beta_;
00082 
00083 
00084         // Fields
00085 
00086             volScalarField k_;
00087             volScalarField epsilon_;
00088             volScalarField nut_;
00089 
00090 
00091 public:
00092 
00093     //- Runtime type information
00094     TypeName("RNGkEpsilon");
00095 
00096     // Constructors
00097 
00098         //- Construct from components
00099         RNGkEpsilon
00100         (
00101             const volVectorField& U,
00102             const surfaceScalarField& phi,
00103             transportModel& transport
00104         );
00105 
00106 
00107     //- Destructor
00108     virtual ~RNGkEpsilon()
00109     {}
00110 
00111 
00112     // Member Functions
00113 
00114         //- Return the turbulence viscosity
00115         virtual tmp<volScalarField> nut() const
00116         {
00117             return nut_;
00118         }
00119 
00120         //- Return the effective diffusivity for k
00121         tmp<volScalarField> DkEff() const
00122         {
00123             return tmp<volScalarField>
00124             (
00125                 new volScalarField("DkEff", nut_/sigmak_ + nu())
00126             );
00127         }
00128 
00129         //- Return the effective diffusivity for epsilon
00130         tmp<volScalarField> DepsilonEff() const
00131         {
00132             return tmp<volScalarField>
00133             (
00134                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
00135             );
00136         }
00137 
00138         //- Return the turbulence kinetic energy
00139         virtual tmp<volScalarField> k() const
00140         {
00141             return k_;
00142         }
00143 
00144         //- Return the turbulence kinetic energy dissipation rate
00145         virtual tmp<volScalarField> epsilon() const
00146         {
00147             return epsilon_;
00148         }
00149 
00150         //- Return the Reynolds stress tensor
00151         virtual tmp<volSymmTensorField> R() const;
00152 
00153         //- Return the effective stress tensor including the laminar stress
00154         virtual tmp<volSymmTensorField> devReff() const;
00155 
00156         //- Return the source term for the momentum equation
00157         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00158 
00159         //- Solve the turbulence equations and correct the turbulence viscosity
00160         virtual void correct();
00161 
00162         //- Read RASProperties dictionary
00163         virtual bool read();
00164 };
00165 
00166 
00167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00168 
00169 } // End namespace RASModels
00170 } // End namespace incompressible
00171 } // End namespace Foam
00172 
00173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00174 
00175 #endif
00176 
00177 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines