|
|
|
LaunderSharmaKE.HGo 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::compressible::RASModels::LaunderSharmaKE 00027 00028 Description 00029 Launder and Sharma low-Reynolds k-epsilon turbulence model for 00030 compressible and combusting 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 alphah 1.0; // only for compressible 00041 alphahk 1.0; // only for compressible 00042 alphaEps 0.76923; 00043 } 00044 @endverbatim 00045 00046 SourceFiles 00047 LaunderSharmaKE.C 00048 LaunderSharmaKECorrect.C 00049 00050 \*---------------------------------------------------------------------------*/ 00051 00052 #ifndef compressibleLaunderSharmaKE_H 00053 #define compressibleLaunderSharmaKE_H 00054 00055 #include "RASModel.H" 00056 00057 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00058 00059 namespace Foam 00060 { 00061 namespace compressible 00062 { 00063 namespace RASModels 00064 { 00065 00066 /*---------------------------------------------------------------------------*\ 00067 Class LaunderSharmaKE Declaration 00068 \*---------------------------------------------------------------------------*/ 00069 00070 class LaunderSharmaKE 00071 : 00072 public RASModel 00073 { 00074 // Private data 00075 00076 // Model coefficients 00077 00078 dimensionedScalar Cmu_; 00079 dimensionedScalar C1_; 00080 dimensionedScalar C2_; 00081 dimensionedScalar C3_; 00082 dimensionedScalar sigmak_; 00083 dimensionedScalar sigmaEps_; 00084 dimensionedScalar Prt_; 00085 00086 00087 // Fields 00088 00089 volScalarField k_; 00090 volScalarField epsilon_; 00091 volScalarField mut_; 00092 volScalarField alphat_; 00093 00094 00095 // Private member functions 00096 00097 tmp<volScalarField> fMu() const; 00098 tmp<volScalarField> f2() const; 00099 00100 00101 public: 00102 00103 //- Runtime type information 00104 TypeName("LaunderSharmaKE"); 00105 00106 // Constructors 00107 00108 //- Construct from components 00109 LaunderSharmaKE 00110 ( 00111 const volScalarField& rho, 00112 const volVectorField& U, 00113 const surfaceScalarField& phi, 00114 const basicThermo& thermophysicalModel 00115 ); 00116 00117 00118 //- Destructor 00119 virtual ~LaunderSharmaKE() 00120 {} 00121 00122 00123 // Member Functions 00124 00125 //- Return the effective diffusivity for k 00126 tmp<volScalarField> DkEff() const 00127 { 00128 return tmp<volScalarField> 00129 ( 00130 new volScalarField("DkEff", mut_/sigmak_ + mu()) 00131 ); 00132 } 00133 00134 //- Return the effective diffusivity for epsilon 00135 tmp<volScalarField> DepsilonEff() const 00136 { 00137 return tmp<volScalarField> 00138 ( 00139 new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) 00140 ); 00141 } 00142 00143 //- Return the turbulence viscosity 00144 virtual tmp<volScalarField> mut() const 00145 { 00146 return mut_; 00147 } 00148 00149 //- Return the effective turbulent thermal diffusivity 00150 virtual tmp<volScalarField> alphaEff() const 00151 { 00152 return tmp<volScalarField> 00153 ( 00154 new volScalarField("alphaEff", alphat_ + alpha()) 00155 ); 00156 } 00157 00158 //- Return the turbulence kinetic energy 00159 virtual tmp<volScalarField> k() const 00160 { 00161 return k_; 00162 } 00163 00164 //- Return the turbulence kinetic energy dissipation rate 00165 virtual tmp<volScalarField> epsilon() const 00166 { 00167 return epsilon_; 00168 } 00169 00170 //- Return the Reynolds stress tensor 00171 virtual tmp<volSymmTensorField> R() const; 00172 00173 //- Return the effective stress tensor including the laminar stress 00174 virtual tmp<volSymmTensorField> devRhoReff() const; 00175 00176 //- Return the source term for the momentum equation 00177 virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; 00178 00179 //- Solve the turbulence equations and correct the turbulence viscosity 00180 virtual void correct(); 00181 00182 //- Read RASProperties dictionary 00183 virtual bool read(); 00184 }; 00185 00186 00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00188 00189 } // End namespace RASModels 00190 } // End namespace compressible 00191 } // End namespace Foam 00192 00193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00194 00195 #endif 00196 00197 // ************************************************************************* // |