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::incompressible::RASModels::LaunderGibsonRSTM
00026 
00027 Description
00028     Launder-Gibson Reynolds stress turbulence model for incompressible 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             sigmaEps    1.3;
00045             sigmaR      0.81967;
00046             couplingFactor  0.0;
00047         }
00048     @endverbatim
00049 
00050 SourceFiles
00051     LaunderGibsonRSTM.C
00052 
00053 \*---------------------------------------------------------------------------*/
00054 
00055 #ifndef LaunderGibsonRSTM_H
00056 #define LaunderGibsonRSTM_H
00057 
00058 #include <incompressibleRASModels/RASModel.H>
00059 #include <finiteVolume/wallDistReflection.H>
00060 
00061 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00062 
00063 namespace Foam
00064 {
00065 namespace incompressible
00066 {
00067 namespace RASModels
00068 {
00069 
00070 /*---------------------------------------------------------------------------*\
00071                            Class LaunderGibsonRSTM Declaration
00072 \*---------------------------------------------------------------------------*/
00073 
00074 class LaunderGibsonRSTM
00075 :
00076     public RASModel
00077 {
00078     // Private data
00079 
00080         // Model coefficients
00081 
00082             dimensionedScalar Cmu_;
00083             dimensionedScalar kappa_;
00084 
00085             dimensionedScalar Clg1_;
00086             dimensionedScalar Clg2_;
00087 
00088             dimensionedScalar C1_;
00089             dimensionedScalar C2_;
00090             dimensionedScalar Cs_;
00091             dimensionedScalar Ceps_;
00092             dimensionedScalar sigmaR_;
00093             dimensionedScalar sigmaEps_;
00094 
00095             dimensionedScalar C1Ref_;
00096             dimensionedScalar C2Ref_;
00097 
00098             dimensionedScalar couplingFactor_;
00099 
00100 
00101         // Fields
00102 
00103             wallDistReflection yr_;
00104 
00105             volSymmTensorField R_;
00106             volScalarField k_;
00107             volScalarField epsilon_;
00108             volScalarField nut_;
00109 
00110 
00111 public:
00112 
00113     //- Runtime type information
00114     TypeName("LaunderGibsonRSTM");
00115 
00116     // Constructors
00117 
00118         //- Construct from components
00119         LaunderGibsonRSTM
00120         (
00121             const volVectorField& U,
00122             const surfaceScalarField& phi,
00123             transportModel& transport
00124         );
00125 
00126 
00127     //- Destructor
00128     virtual ~LaunderGibsonRSTM()
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 R
00141         tmp<volScalarField> DREff() const
00142         {
00143             return tmp<volScalarField>
00144             (
00145                 new volScalarField("DREff", nut_/sigmaR_ + 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 R_;
00174         }
00175 
00176         //- Return the effective stress tensor including the laminar stress
00177         virtual tmp<volSymmTensorField> devReff() const;
00178 
00179         //- Return the source term for the momentum equation
00180         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00181 
00182         //- Solve the turbulence equations and correct the turbulence viscosity
00183         virtual void correct();
00184 
00185         //- Read RASProperties dictionary
00186         virtual bool read();
00187 };
00188 
00189 
00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00191 
00192 } // End namespace RASModels
00193 } // End namespace incompressible
00194 } // End namespace Foam
00195 
00196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00197 
00198 #endif
00199 
00200 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines