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

LaunderSharmaKE.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::LaunderSharmaKE
00027 
00028 Description
00029     Launder and Sharma low-Reynolds k-epsilon turbulence model for
00030     incompressible flows.
00031 
00032     The default model coefficients correspond to the following:
00033     @verbatim
00034         LaunderSharmaKECoeffs
00035         {
00036             Cmu         0.09;
00037             C1          1.44;
00038             C2          1.92;
00039             C3          -0.33;
00040             sigmaEps    1.3;
00041         }
00042     @endverbatim
00043 
00044 SourceFiles
00045     LaunderSharmaKE.C
00046 
00047 \*---------------------------------------------------------------------------*/
00048 
00049 #ifndef LaunderSharmaKE_H
00050 #define LaunderSharmaKE_H
00051 
00052 #include "RASModel.H"
00053 
00054 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00055 
00056 namespace Foam
00057 {
00058 namespace incompressible
00059 {
00060 namespace RASModels
00061 {
00062 
00063 /*---------------------------------------------------------------------------*\
00064                            Class LaunderSharmaKE Declaration
00065 \*---------------------------------------------------------------------------*/
00066 
00067 class LaunderSharmaKE
00068 :
00069     public RASModel
00070 {
00071     // Private data
00072 
00073         // Model coefficients
00074 
00075             dimensionedScalar Cmu_;
00076             dimensionedScalar C1_;
00077             dimensionedScalar C2_;
00078             dimensionedScalar sigmaEps_;
00079 
00080 
00081         // Fields
00082 
00083             volScalarField k_;
00084             volScalarField epsilonTilda_;
00085             volScalarField nut_;
00086 
00087 
00088     // Private member functions
00089 
00090         tmp<volScalarField> fMu() const;
00091         tmp<volScalarField> f2() const;
00092 
00093 
00094 public:
00095 
00096     //- Runtime type information
00097     TypeName("LaunderSharmaKE");
00098 
00099     // Constructors
00100 
00101         //- Construct from components
00102         LaunderSharmaKE
00103         (
00104             const volVectorField& U,
00105             const surfaceScalarField& phi,
00106             transportModel& transport
00107         );
00108 
00109 
00110     //- Destructor
00111     virtual ~LaunderSharmaKE()
00112     {}
00113 
00114 
00115     // Member Functions
00116 
00117         //- Return the turbulence viscosity
00118         virtual tmp<volScalarField> nut() const
00119         {
00120             return nut_;
00121         }
00122 
00123         //- Return the effective diffusivity for k
00124         tmp<volScalarField> DkEff() const
00125         {
00126             return tmp<volScalarField>
00127             (
00128                 new volScalarField("DkEff", nut_ + nu())
00129             );
00130         }
00131 
00132         //- Return the effective diffusivity for epsilon
00133         tmp<volScalarField> DepsilonEff() const
00134         {
00135             return tmp<volScalarField>
00136             (
00137                 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu())
00138             );
00139         }
00140 
00141         //- Return the turbulence kinetic energy
00142         virtual tmp<volScalarField> k() const
00143         {
00144             return k_;
00145         }
00146 
00147         //- Note that epsilonTilda is returned as epsilon.
00148         //  This is the appropriate variable for most purposes.
00149         virtual tmp<volScalarField> epsilon() const
00150         {
00151             return epsilonTilda_;
00152         }
00153 
00154         //- Return the Reynolds stress tensor
00155         virtual tmp<volSymmTensorField> R() const;
00156 
00157         //- Return the effective stress tensor including the laminar stress
00158         virtual tmp<volSymmTensorField> devReff() const;
00159 
00160         //- Return the source term for the momentum equation
00161         virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
00162 
00163         //- Solve the turbulence equations and correct the turbulence viscosity
00164         virtual void correct();
00165 
00166         //- Read RASProperties dictionary
00167         virtual bool read();
00168 };
00169 
00170 
00171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00172 
00173 } // End namespace RASModels
00174 } // End namespace incompressible
00175 } // End namespace Foam
00176 
00177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00178 
00179 #endif
00180 
00181 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd