OpenFOAM logo
Open Source CFD Toolkit

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-2005 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     realizableKE
00027 
00028 Description
00029     Realizable k-epsilon turbulence model from the paper:
00030     
00031     "A New k-epsilon Eddy Viscosity Model for High Reynolds Number
00032     Turbulent Flows"
00033     
00034     Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and
00035     Jiang Zhu
00036     
00037     Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995
00038 
00039 SourceFiles
00040     realizableKE.C
00041 
00042 \*---------------------------------------------------------------------------*/
00043 
00044 #ifndef realizableKE_H
00045 #define realizableKE_H
00046 
00047 #include "turbulenceModel.H"
00048 
00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00050 
00051 namespace Foam
00052 {
00053 namespace turbulenceModels
00054 {
00055 
00056 /*---------------------------------------------------------------------------*\
00057                            Class realizableKE Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 class realizableKE
00061 :
00062     public turbulenceModel
00063 {
00064     // Private data
00065     
00066         dimensionedScalar Cmu;
00067         dimensionedScalar A0;
00068         dimensionedScalar C2;
00069         dimensionedScalar alphak;
00070         dimensionedScalar alphaEps;
00071 
00072         volScalarField k_;
00073         volScalarField epsilon_;
00074         volScalarField nut_;
00075 
00076         tmp<volScalarField> rCmu
00077         (
00078             const volTensorField& gradU,
00079             const volScalarField& S2,
00080             const volScalarField& magS
00081         );
00082         
00083         tmp<volScalarField> rCmu
00084         (
00085             const volTensorField& gradU
00086         );
00087 
00088 public:
00089 
00090     //- Runtime type information
00091     TypeName("realizableKE");
00092 
00093     // Constructors
00094 
00095         //- from components
00096         realizableKE
00097         (
00098             const volVectorField& U,
00099             const surfaceScalarField& phi,
00100             transportModel& transport
00101         );
00102 
00103 
00104     // Destructor
00105 
00106         ~realizableKE(){}
00107 
00108 
00109     // Member Functions
00110 
00111         tmp<volScalarField> nut() const
00112         {
00113             return nut_;
00114         }
00115 
00116         //- Return the effective diffusivity for k
00117         tmp<volScalarField> DkEff() const
00118         {
00119             return tmp<volScalarField> 
00120             (
00121                 new volScalarField("DkEff", alphak*nut_ + nu())
00122             );
00123         }
00124 
00125         //- Return the effective diffusivity for epsilon
00126         tmp<volScalarField> DepsilonEff() const
00127         {
00128             return tmp<volScalarField> 
00129             (
00130                 new volScalarField("DepsilonEff", alphaEps*nut_ + nu())
00131             );
00132         }
00133 
00134         tmp<volScalarField> k() const
00135         {
00136             return k_;
00137         }
00138 
00139         tmp<volScalarField> epsilon() const
00140         {
00141             return epsilon_;
00142         }
00143 
00144         tmp<volTensorField> R() const;
00145 
00146         tmp<fvVectorMatrix> divR(volVectorField& U) const;
00147 
00148         void correct();
00149 
00150         //- Read turbulenceProperties dictionary
00151         bool read();
00152 };
00153 
00154 
00155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00156 
00157 } // End namespace turbulenceModels
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #endif
00163 
00164 // ************************************************************************* //
For further information go to www.openfoam.org