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

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