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

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-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::compressible::RASModels::kEpsilon
00027 
00028 Description
00029     Standard k-epsilon turbulence model for compressible flows
00030 
00031     The default model coefficients correspond to the following:
00032     @verbatim
00033         kEpsilonCoeffs
00034         {
00035             Cmu         0.09;
00036             C1          1.44;
00037             C2          1.92;
00038             C3          -0.33;  // only for compressible
00039             sigmak      1.0;    // only for compressible
00040             sigmaEps    1.3;
00041             Prt         1.0;    // only for compressible
00042         }
00043     @endverbatim
00044 
00045 SourceFiles
00046     kEpsilon.C
00047     kEpsilonCorrect.C
00048 
00049 \*---------------------------------------------------------------------------*/
00050 
00051 #ifndef compressiblekEpsilon_H
00052 #define compressiblekEpsilon_H
00053 
00054 #include "RASModel.H"
00055 
00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00057 
00058 namespace Foam
00059 {
00060 namespace compressible
00061 {
00062 namespace RASModels
00063 {
00064 
00065 /*---------------------------------------------------------------------------*\
00066                            Class kEpsilon Declaration
00067 \*---------------------------------------------------------------------------*/
00068 
00069 class kEpsilon
00070 :
00071     public RASModel
00072 {
00073     // Private data
00074 
00075         // Model coefficients
00076 
00077             dimensionedScalar Cmu_;
00078             dimensionedScalar C1_;
00079             dimensionedScalar C2_;
00080             dimensionedScalar C3_;
00081             dimensionedScalar sigmak_;
00082             dimensionedScalar sigmaEps_;
00083             dimensionedScalar Prt_;
00084 
00085         // Fields
00086 
00087             volScalarField k_;
00088             volScalarField epsilon_;
00089             volScalarField mut_;
00090             volScalarField alphat_;
00091 
00092 
00093 public:
00094 
00095     //- Runtime type information
00096     TypeName("kEpsilon");
00097 
00098     // Constructors
00099 
00100         //- Construct from components
00101         kEpsilon
00102         (
00103             const volScalarField& rho,
00104             const volVectorField& U,
00105             const surfaceScalarField& phi,
00106             const basicThermo& thermophysicalModel
00107         );
00108 
00109 
00110     //- Destructor
00111     virtual ~kEpsilon()
00112     {}
00113 
00114 
00115     // Member Functions
00116 
00117         //- Return the effective diffusivity for k
00118         tmp<volScalarField> DkEff() const
00119         {
00120             return tmp<volScalarField>
00121             (
00122                 new volScalarField("DkEff", mut_/sigmak_ + mu())
00123             );
00124         }
00125 
00126         //- Return the effective diffusivity for epsilon
00127         tmp<volScalarField> DepsilonEff() const
00128         {
00129             return tmp<volScalarField>
00130             (
00131                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
00132             );
00133         }
00134 
00135         //- Return the turbulence viscosity
00136         virtual tmp<volScalarField> mut() const
00137         {
00138             return mut_;
00139         }
00140 
00141         //- Return the effective turbulent thermal diffusivity
00142         virtual tmp<volScalarField> alphaEff() const
00143         {
00144             return tmp<volScalarField>
00145             (
00146                 new volScalarField("alphaEff", alphat_ + alpha())
00147             );
00148         }
00149 
00150         //- Return the turbulence kinetic energy
00151         virtual tmp<volScalarField> k() const
00152         {
00153             return k_;
00154         }
00155 
00156         //- Return the turbulence kinetic energy dissipation rate
00157         virtual tmp<volScalarField> epsilon() const
00158         {
00159             return epsilon_;
00160         }
00161 
00162         //- Return the Reynolds stress tensor
00163         virtual tmp<volSymmTensorField> R() const;
00164 
00165         //- Return the effective stress tensor including the laminar stress
00166         virtual tmp<volSymmTensorField> devRhoReff() const;
00167 
00168         //- Return the source term for the momentum equation
00169         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00170 
00171         //- Solve the turbulence equations and correct the turbulence viscosity
00172         virtual void correct();
00173 
00174         //- Read RASProperties dictionary
00175         virtual bool read();
00176 };
00177 
00178 
00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00180 
00181 } // End namespace RASModels
00182 } // End namespace compressible
00183 } // End namespace Foam
00184 
00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00186 
00187 #endif
00188 
00189 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd