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

LaunderGibsonRSTM.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::LaunderGibsonRSTM
00026 
00027 Description
00028     Launder-Gibson Reynolds stress turbulence model for compressible flows.
00029 
00030     The default model coefficients correspond to the following:
00031     @verbatim
00032         LaunderGibsonRSTMCoeffs
00033         {
00034             Cmu         0.09;
00035             kappa       0.41;
00036             Clg1        1.8;
00037             Clg2        0.6;
00038             C1          1.44;
00039             C2          1.92;
00040             C1Ref       0.5;
00041             C2Ref       0.3;
00042             Cs          0.25;
00043             Ceps        0.15;
00044             sigmah      1.0;    // only for compressible
00045             sigmaEps    1.3;
00046             sigmaR      0.81967;
00047             couplingFactor  0.0;
00048         }
00049     @endverbatim
00050 
00051 SourceFiles
00052     LaunderGibsonRSTM.C
00053     LaunderGibsonRSTMcorrect.C
00054 
00055 \*---------------------------------------------------------------------------*/
00056 
00057 #ifndef compressibleLaunderGibsonRSTM_H
00058 #define compressibleLaunderGibsonRSTM_H
00059 
00060 #include <compressibleRASModels/RASModel.H>
00061 #include <finiteVolume/wallDistReflection.H>
00062 
00063 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00064 
00065 namespace Foam
00066 {
00067 namespace compressible
00068 {
00069 namespace RASModels
00070 {
00071 
00072 /*---------------------------------------------------------------------------*\
00073                            Class LaunderGibsonRSTM Declaration
00074 \*---------------------------------------------------------------------------*/
00075 
00076 class LaunderGibsonRSTM
00077 :
00078     public RASModel
00079 {
00080     // Private data
00081 
00082         // Model coefficients
00083 
00084             dimensionedScalar Cmu_;
00085             dimensionedScalar kappa_;
00086 
00087             dimensionedScalar Clg1_;
00088             dimensionedScalar Clg2_;
00089 
00090             dimensionedScalar C1_;
00091             dimensionedScalar C2_;
00092             dimensionedScalar Cs_;
00093             dimensionedScalar Ceps_;
00094 
00095             dimensionedScalar C1Ref_;
00096             dimensionedScalar C2Ref_;
00097 
00098             dimensionedScalar couplingFactor_;
00099 
00100             dimensionedScalar sigmaR_;
00101             dimensionedScalar sigmaEps_;
00102             dimensionedScalar Prt_;
00103 
00104 
00105         // Fields
00106 
00107             wallDistReflection y_;
00108 
00109             volSymmTensorField R_;
00110             volScalarField k_;
00111             volScalarField epsilon_;
00112             volScalarField mut_;
00113             volScalarField alphat_;
00114 
00115 
00116 public:
00117 
00118     //- Runtime type information
00119     TypeName("LaunderGibsonRSTM");
00120 
00121     // Constructors
00122 
00123         //- Construct from components
00124         LaunderGibsonRSTM
00125         (
00126             const volScalarField& rho,
00127             const volVectorField& U,
00128             const surfaceScalarField& phi,
00129             const basicThermo& thermophysicalModel
00130         );
00131 
00132 
00133     //- Destructor
00134     virtual ~LaunderGibsonRSTM()
00135     {}
00136 
00137 
00138     // Member Functions
00139 
00140         //- Return the effective diffusivity for R
00141         tmp<volScalarField> DREff() const
00142         {
00143             return tmp<volScalarField>
00144             (
00145                 new volScalarField("DREff", mut_/sigmaR_ + mu())
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", mut_/sigmaEps_ + mu())
00155             );
00156         }
00157 
00158         //- Return the turbulence viscosity
00159         virtual tmp<volScalarField> mut() const
00160         {
00161             return mut_;
00162         }
00163 
00164         //- Return the effective turbulent thermal diffusivity
00165         virtual tmp<volScalarField> alphaEff() const
00166         {
00167             return tmp<volScalarField>
00168             (
00169                 new volScalarField("alphaEff", alphat_ + alpha())
00170             );
00171         }
00172 
00173         //- Return the turbulence kinetic energy
00174         virtual tmp<volScalarField> k() const
00175         {
00176             return k_;
00177         }
00178 
00179         //- Return the turbulence kinetic energy dissipation rate
00180         virtual tmp<volScalarField> epsilon() const
00181         {
00182             return epsilon_;
00183         }
00184 
00185         //- Return the Reynolds stress tensor
00186         virtual tmp<volSymmTensorField> R() const
00187         {
00188             return R_;
00189         }
00190 
00191         //- Return the effective stress tensor including the laminar stress
00192         virtual tmp<volSymmTensorField> devRhoReff() const;
00193 
00194         //- Return the source term for the momentum equation
00195         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
00196 
00197         //- Solve the turbulence equations and correct the turbulence viscosity
00198         virtual void correct();
00199 
00200         //- Read RASProperties dictionary
00201         virtual bool read();
00202 };
00203 
00204 
00205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00206 
00207 } // End namespace RASModels
00208 } // End namespace compressible
00209 } // End namespace Foam
00210 
00211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00212 
00213 #endif
00214 
00215 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines