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

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-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::compressible::RASModels::realizableKE
00026 
00027 Description
00028     Realizable k-epsilon turbulence model for compressible flows.
00029 
00030     Model described in the paper:
00031     @verbatim
00032         "A New k-epsilon Eddy Viscosity Model for High Reynolds Number
00033         Turbulent Flows"
00034 
00035         Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
00036         Jiang Zhu
00037 
00038         Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
00039     @endverbatim
00040 
00041     The default model coefficients correspond to the following:
00042     @verbatim
00043         realizableKECoeffs
00044         {
00045             Cmu         0.09;
00046             A0          4.0;
00047             C2          1.9;
00048             sigmak      1.0;
00049             sigmaEps    1.2;
00050             Prt         1.0;    // only for compressible
00051         }
00052     @endverbatim
00053 
00054 SourceFiles
00055     realizableKE.C
00056 
00057 \*---------------------------------------------------------------------------*/
00058 
00059 #ifndef realizableKE_H
00060 #define realizableKE_H
00061 
00062 #include <compressibleRASModels/RASModel.H>
00063 
00064 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00065 
00066 namespace Foam
00067 {
00068 namespace compressible
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             dimensionedScalar Prt_;
00091 
00092 
00093         // Fields
00094 
00095             volScalarField k_;
00096             volScalarField epsilon_;
00097             volScalarField mut_;
00098             volScalarField alphat_;
00099 
00100 
00101    // Private member functions
00102 
00103         tmp<volScalarField> rCmu
00104         (
00105             const volTensorField& gradU,
00106             const volScalarField& S2,
00107             const volScalarField& magS
00108         );
00109 
00110         tmp<volScalarField> rCmu(const volTensorField& gradU);
00111 
00112 
00113 public:
00114 
00115     //- Runtime type information
00116     TypeName("realizableKE");
00117 
00118     // Constructors
00119 
00120         //- Construct from components
00121         realizableKE
00122         (
00123             const volScalarField& rho,
00124             const volVectorField& U,
00125             const surfaceScalarField& phi,
00126             const basicThermo& thermophysicalModel
00127         );
00128 
00129 
00130     //- Destructor
00131     virtual ~realizableKE()
00132     {}
00133 
00134 
00135     // Member Functions
00136 
00137         //- Return the effective diffusivity for k
00138         tmp<volScalarField> DkEff() const
00139         {
00140             return tmp<volScalarField>
00141             (
00142                 new volScalarField("DkEff", mut_/sigmak_ + mu())
00143             );
00144         }
00145 
00146         //- Return the effective diffusivity for epsilon
00147         tmp<volScalarField> DepsilonEff() const
00148         {
00149             return tmp<volScalarField>
00150             (
00151                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
00152             );
00153         }
00154 
00155         //- Return the turbulence viscosity
00156         virtual tmp<volScalarField> mut() const
00157         {
00158             return mut_;
00159         }
00160 
00161         //- Return the effective turbulent thermal diffusivity
00162         virtual tmp<volScalarField> alphaEff() const
00163         {
00164             return tmp<volScalarField>
00165             (
00166                 new volScalarField("alphaEff", alphat_ + alpha())
00167             );
00168         }
00169 
00170         //- Return the turbulence kinetic energy
00171         virtual tmp<volScalarField> k() const
00172         {
00173             return k_;
00174         }
00175 
00176         //- Return the turbulence kinetic energy dissipation rate
00177         virtual tmp<volScalarField> epsilon() const
00178         {
00179             return epsilon_;
00180         }
00181 
00182         //- Return the Reynolds stress tensor
00183         virtual tmp<volSymmTensorField> R() const;
00184 
00185         //- Return the effective stress tensor including the laminar stress
00186         virtual tmp<volSymmTensorField> devRhoReff() const;
00187 
00188         //- Return the source term for the momentum equation
00189         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00190 
00191         //- Solve the turbulence equations and correct the turbulence viscosity
00192         virtual void correct();
00193 
00194         //- Read RASProperties dictionary
00195         virtual bool read();
00196 };
00197 
00198 
00199 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00200 
00201 } // End namespace RASModels
00202 } // End namespace compressible
00203 } // End namespace Foam
00204 
00205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00206 
00207 #endif
00208 
00209 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines