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

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