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::compressible::RASModels::LaunderSharmaKE 00026 00027 Description 00028 Launder and Sharma low-Reynolds k-epsilon turbulence model for 00029 compressible and combusting 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 alphah 1.0; // only for compressible 00040 alphahk 1.0; // only for compressible 00041 alphaEps 0.76923; 00042 } 00043 @endverbatim 00044 00045 SourceFiles 00046 LaunderSharmaKE.C 00047 LaunderSharmaKECorrect.C 00048 00049 \*---------------------------------------------------------------------------*/ 00050 00051 #ifndef compressibleLaunderSharmaKE_H 00052 #define compressibleLaunderSharmaKE_H 00053 00054 #include <compressibleRASModels/RASModel.H> 00055 00056 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00057 00058 namespace Foam 00059 { 00060 namespace compressible 00061 { 00062 namespace RASModels 00063 { 00064 00065 /*---------------------------------------------------------------------------*\ 00066 Class LaunderSharmaKE Declaration 00067 \*---------------------------------------------------------------------------*/ 00068 00069 class LaunderSharmaKE 00070 : 00071 public RASModel 00072 { 00073 // Private data 00074 00075 // Model coefficients 00076 00077 dimensionedScalar Cmu_; 00078 dimensionedScalar C1_; 00079 dimensionedScalar C2_; 00080 dimensionedScalar C3_; 00081 dimensionedScalar sigmak_; 00082 dimensionedScalar sigmaEps_; 00083 dimensionedScalar Prt_; 00084 00085 00086 // Fields 00087 00088 volScalarField k_; 00089 volScalarField epsilon_; 00090 volScalarField mut_; 00091 volScalarField alphat_; 00092 00093 00094 // Private member functions 00095 00096 tmp<volScalarField> fMu() const; 00097 tmp<volScalarField> f2() const; 00098 00099 00100 public: 00101 00102 //- Runtime type information 00103 TypeName("LaunderSharmaKE"); 00104 00105 // Constructors 00106 00107 //- Construct from components 00108 LaunderSharmaKE 00109 ( 00110 const volScalarField& rho, 00111 const volVectorField& U, 00112 const surfaceScalarField& phi, 00113 const basicThermo& thermophysicalModel 00114 ); 00115 00116 00117 //- Destructor 00118 virtual ~LaunderSharmaKE() 00119 {} 00120 00121 00122 // Member Functions 00123 00124 //- Return the effective diffusivity for k 00125 tmp<volScalarField> DkEff() const 00126 { 00127 return tmp<volScalarField> 00128 ( 00129 new volScalarField("DkEff", mut_/sigmak_ + mu()) 00130 ); 00131 } 00132 00133 //- Return the effective diffusivity for epsilon 00134 tmp<volScalarField> DepsilonEff() const 00135 { 00136 return tmp<volScalarField> 00137 ( 00138 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) 00139 ); 00140 } 00141 00142 //- Return the turbulence viscosity 00143 virtual tmp<volScalarField> mut() const 00144 { 00145 return mut_; 00146 } 00147 00148 //- Return the effective turbulent thermal diffusivity 00149 virtual tmp<volScalarField> alphaEff() const 00150 { 00151 return tmp<volScalarField> 00152 ( 00153 new volScalarField("alphaEff", alphat_ + alpha()) 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> devRhoReff() const; 00174 00175 //- Return the source term for the momentum equation 00176 virtual tmp<fvVectorMatrix> divDevRhoReff(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 compressible 00190 } // End namespace Foam 00191 00192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00193 00194 #endif 00195 00196 // ************************ vim: set sw=4 sts=4 et: ************************ //