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::realizableKE 00026 00027 Description 00028 Realizable k-epsilon turbulence model for incompressible flows. 00029 00030 Model described in the paper: 00031 @verbatim 00032 "A New k-epsilon Eddy Viscosity Model for High Reynolds Number 00033 Turbulent Flows" 00034 00035 Tsan-Hsing Shih, William W. Liou, Aamir Shabbir, Zhigang Tang and 00036 Jiang Zhu 00037 00038 Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995 00039 @endverbatim 00040 00041 The default model coefficients correspond to the following: 00042 @verbatim 00043 realizableKECoeffs 00044 { 00045 Cmu 0.09; 00046 A0 4.0; 00047 C2 1.9; 00048 sigmak 1.0; 00049 sigmaEps 1.2; 00050 } 00051 @endverbatim 00052 00053 SourceFiles 00054 realizableKE.C 00055 00056 \*---------------------------------------------------------------------------*/ 00057 00058 #ifndef realizableKE_H 00059 #define realizableKE_H 00060 00061 #include <incompressibleRASModels/RASModel.H> 00062 00063 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00064 00065 namespace Foam 00066 { 00067 namespace incompressible 00068 { 00069 namespace RASModels 00070 { 00071 00072 /*---------------------------------------------------------------------------*\ 00073 Class realizableKE Declaration 00074 \*---------------------------------------------------------------------------*/ 00075 00076 class realizableKE 00077 : 00078 public RASModel 00079 { 00080 // Private data 00081 00082 // Model coefficients 00083 00084 dimensionedScalar Cmu_; 00085 dimensionedScalar A0_; 00086 dimensionedScalar C2_; 00087 dimensionedScalar sigmak_; 00088 dimensionedScalar sigmaEps_; 00089 00090 00091 // Fields 00092 00093 volScalarField k_; 00094 volScalarField epsilon_; 00095 volScalarField nut_; 00096 00097 00098 // Private member functions 00099 00100 tmp<volScalarField> rCmu 00101 ( 00102 const volTensorField& gradU, 00103 const volScalarField& S2, 00104 const volScalarField& magS 00105 ); 00106 00107 tmp<volScalarField> rCmu(const volTensorField& gradU); 00108 00109 00110 public: 00111 00112 //- Runtime type information 00113 TypeName("realizableKE"); 00114 00115 // Constructors 00116 00117 //- Construct from components 00118 realizableKE 00119 ( 00120 const volVectorField& U, 00121 const surfaceScalarField& phi, 00122 transportModel& transport 00123 ); 00124 00125 00126 //- Destructor 00127 virtual ~realizableKE() 00128 {} 00129 00130 00131 // Member Functions 00132 00133 //- Return the turbulence viscosity 00134 virtual tmp<volScalarField> nut() const 00135 { 00136 return nut_; 00137 } 00138 00139 //- Return the effective diffusivity for k 00140 tmp<volScalarField> DkEff() const 00141 { 00142 return tmp<volScalarField> 00143 ( 00144 new volScalarField("DkEff", nut_/sigmak_ + nu()) 00145 ); 00146 } 00147 00148 //- Return the effective diffusivity for epsilon 00149 tmp<volScalarField> DepsilonEff() const 00150 { 00151 return tmp<volScalarField> 00152 ( 00153 new volScalarField("DepsilonEff", nut_/sigmaEps_ + nu()) 00154 ); 00155 } 00156 00157 //- Return the turbulence kinetic energy 00158 virtual tmp<volScalarField> k() const 00159 { 00160 return k_; 00161 } 00162 00163 //- Return the turbulence kinetic energy dissipation rate 00164 virtual tmp<volScalarField> epsilon() const 00165 { 00166 return epsilon_; 00167 } 00168 00169 //- Return the Reynolds stress tensor 00170 virtual tmp<volSymmTensorField> R() const; 00171 00172 //- Return the effective stress tensor including the laminar stress 00173 virtual tmp<volSymmTensorField> devReff() const; 00174 00175 //- Return the source term for the momentum equation 00176 virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; 00177 00178 //- Solve the turbulence equations and correct the turbulence viscosity 00179 virtual void correct(); 00180 00181 //- Read RASProperties dictionary 00182 virtual bool read(); 00183 }; 00184 00185 00186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00187 00188 } // End namespace RASModels 00189 } // End namespace incompressible 00190 } // End namespace Foam 00191 00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00193 00194 #endif 00195 00196 // ************************ vim: set sw=4 sts=4 et: ************************ //