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

realizableKE.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::realizableKE
00027 
00028 Description
00029     Realizable k-epsilon turbulence model for incompressible flows.
00030 
00031     Model described in the paper:
00032     @verbatim
00033         "A New k-epsilon Eddy Viscosity Model for High Reynolds Number
00034         Turbulent Flows"
00035 
00036         Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
00037         Jiang Zhu
00038 
00039         Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
00040     @endverbatim
00041 
00042     The default model coefficients correspond to the following:
00043     @verbatim
00044         realizableKECoeffs
00045         {
00046             Cmu         0.09;
00047             A0          4.0;
00048             C2          1.9;
00049             sigmak      1.0;
00050             sigmaEps    1.2;
00051         }
00052     @endverbatim
00053 
00054 SourceFiles
00055     realizableKE.C
00056 
00057 \*---------------------------------------------------------------------------*/
00058 
00059 #ifndef realizableKE_H
00060 #define realizableKE_H
00061 
00062 #include "RASModel.H"
00063 
00064 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00065 
00066 namespace Foam
00067 {
00068 namespace incompressible
00069 {
00070 namespace RASModels
00071 {
00072 
00073 /*---------------------------------------------------------------------------*\
00074                            Class realizableKE Declaration
00075 \*---------------------------------------------------------------------------*/
00076 
00077 class realizableKE
00078 :
00079     public RASModel
00080 {
00081     // Private data
00082 
00083         // Model coefficients
00084 
00085             dimensionedScalar Cmu_;
00086             dimensionedScalar A0_;
00087             dimensionedScalar C2_;
00088             dimensionedScalar sigmak_;
00089             dimensionedScalar sigmaEps_;
00090 
00091 
00092         // Fields
00093 
00094             volScalarField k_;
00095             volScalarField epsilon_;
00096             volScalarField nut_;
00097 
00098 
00099     // Private member functions
00100 
00101         tmp<volScalarField> rCmu
00102         (
00103             const volTensorField& gradU,
00104             const volScalarField& S2,
00105             const volScalarField& magS
00106         );
00107 
00108         tmp<volScalarField> rCmu(const volTensorField& gradU);
00109 
00110 
00111 public:
00112 
00113     //- Runtime type information
00114     TypeName("realizableKE");
00115 
00116     // Constructors
00117 
00118         //- Construct from components
00119         realizableKE
00120         (
00121             const volVectorField& U,
00122             const surfaceScalarField& phi,
00123             transportModel& transport
00124         );
00125 
00126 
00127     //- Destructor
00128     virtual ~realizableKE()
00129     {}
00130 
00131 
00132     // Member Functions
00133 
00134         //- Return the turbulence viscosity
00135         virtual tmp<volScalarField> nut() const
00136         {
00137             return nut_;
00138         }
00139 
00140         //- Return the effective diffusivity for k
00141         tmp<volScalarField> DkEff() const
00142         {
00143             return tmp<volScalarField>
00144             (
00145                 new volScalarField("DkEff", nut_/sigmak_ + nu())
00146             );
00147         }
00148 
00149         //- Return the effective diffusivity for epsilon
00150         tmp<volScalarField> DepsilonEff() const
00151         {
00152             return tmp<volScalarField>
00153             (
00154                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
00155             );
00156         }
00157 
00158         //- Return the turbulence kinetic energy
00159         virtual tmp<volScalarField> k() const
00160         {
00161             return k_;
00162         }
00163 
00164         //- Return the turbulence kinetic energy dissipation rate
00165         virtual tmp<volScalarField> epsilon() const
00166         {
00167             return epsilon_;
00168         }
00169 
00170         //- Return the Reynolds stress tensor
00171         virtual tmp<volSymmTensorField> R() const;
00172 
00173         //- Return the effective stress tensor including the laminar stress
00174         virtual tmp<volSymmTensorField> devReff() const;
00175 
00176         //- Return the source term for the momentum equation
00177         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00178 
00179         //- Solve the turbulence equations and correct the turbulence viscosity
00180         virtual void correct();
00181 
00182         //- Read RASProperties dictionary
00183         virtual bool read();
00184 };
00185 
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 } // End namespace RASModels
00190 } // End namespace incompressible
00191 } // End namespace Foam
00192 
00193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00194 
00195 #endif
00196 
00197 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd