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::compressible::RASModels::realizableKE
00027 
00028 Description
00029     Realizable k-epsilon turbulence model for compressible 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             Prt         1.0;    // only for compressible
00052         }
00053     @endverbatim
00054 
00055 SourceFiles
00056     realizableKE.C
00057 
00058 \*---------------------------------------------------------------------------*/
00059 
00060 #ifndef realizableKE_H
00061 #define realizableKE_H
00062 
00063 #include "RASModel.H"
00064 
00065 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00066 
00067 namespace Foam
00068 {
00069 namespace compressible
00070 {
00071 namespace RASModels
00072 {
00073 
00074 /*---------------------------------------------------------------------------*\
00075                         Class realizableKE Declaration
00076 \*---------------------------------------------------------------------------*/
00077 
00078 class realizableKE
00079 :
00080     public RASModel
00081 {
00082     // Private data
00083 
00084         // Model coefficients
00085 
00086             dimensionedScalar Cmu_;
00087             dimensionedScalar A0_;
00088             dimensionedScalar C2_;
00089             dimensionedScalar sigmak_;
00090             dimensionedScalar sigmaEps_;
00091             dimensionedScalar Prt_;
00092 
00093 
00094         // Fields
00095 
00096             volScalarField k_;
00097             volScalarField epsilon_;
00098             volScalarField mut_;
00099             volScalarField alphat_;
00100 
00101 
00102    // Private member functions
00103 
00104         tmp<volScalarField> rCmu
00105         (
00106             const volTensorField& gradU,
00107             const volScalarField& S2,
00108             const volScalarField& magS
00109         );
00110 
00111         tmp<volScalarField> rCmu(const volTensorField& gradU);
00112 
00113 
00114 public:
00115 
00116     //- Runtime type information
00117     TypeName("realizableKE");
00118 
00119     // Constructors
00120 
00121         //- Construct from components
00122         realizableKE
00123         (
00124             const volScalarField& rho,
00125             const volVectorField& U,
00126             const surfaceScalarField& phi,
00127             const basicThermo& thermophysicalModel
00128         );
00129 
00130 
00131     //- Destructor
00132     virtual ~realizableKE()
00133     {}
00134 
00135 
00136     // Member Functions
00137 
00138         //- Return the effective diffusivity for k
00139         tmp<volScalarField> DkEff() const
00140         {
00141             return tmp<volScalarField>
00142             (
00143                 new volScalarField("DkEff", mut_/sigmak_ + mu())
00144             );
00145         }
00146 
00147         //- Return the effective diffusivity for epsilon
00148         tmp<volScalarField> DepsilonEff() const
00149         {
00150             return tmp<volScalarField>
00151             (
00152                 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu())
00153             );
00154         }
00155 
00156         //- Return the turbulence viscosity
00157         virtual tmp<volScalarField> mut() const
00158         {
00159             return mut_;
00160         }
00161 
00162         //- Return the effective turbulent thermal diffusivity
00163         virtual tmp<volScalarField> alphaEff() const
00164         {
00165             return tmp<volScalarField>
00166             (
00167                 new volScalarField("alphaEff", alphat_ + alpha())
00168             );
00169         }
00170 
00171         //- Return the turbulence kinetic energy
00172         virtual tmp<volScalarField> k() const
00173         {
00174             return k_;
00175         }
00176 
00177         //- Return the turbulence kinetic energy dissipation rate
00178         virtual tmp<volScalarField> epsilon() const
00179         {
00180             return epsilon_;
00181         }
00182 
00183         //- Return the Reynolds stress tensor
00184         virtual tmp<volSymmTensorField> R() const;
00185 
00186         //- Return the effective stress tensor including the laminar stress
00187         virtual tmp<volSymmTensorField> devRhoReff() const;
00188 
00189         //- Return the source term for the momentum equation
00190         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00191 
00192         //- Solve the turbulence equations and correct the turbulence viscosity
00193         virtual void correct();
00194 
00195         //- Read RASProperties dictionary
00196         virtual bool read();
00197 };
00198 
00199 
00200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00201 
00202 } // End namespace RASModels
00203 } // End namespace compressible
00204 } // End namespace Foam
00205 
00206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00207 
00208 #endif
00209 
00210 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd