![]() |
|
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 LaunderGibsonRSTM 00027 00028 Description 00029 Launder-Gibson Reynolds stress turbulence model 00030 00031 SourceFiles 00032 LaunderGibsonRSTM.C 00033 LaunderGibsonRSTMcorrect.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef compressibleLaunderGibsonRSTM_H 00038 #define compressibleLaunderGibsonRSTM_H 00039 00040 #include "turbulenceModel.H" 00041 #include "wallDistReflection.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 namespace compressible 00048 { 00049 namespace turbulenceModels 00050 { 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class LaunderGibsonRSTM Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class LaunderGibsonRSTM 00057 : 00058 public turbulenceModel 00059 { 00060 // Private data 00061 00062 dimensionedScalar Cmu; 00063 00064 dimensionedScalar Clg1; 00065 dimensionedScalar Clg2; 00066 00067 dimensionedScalar C1; 00068 dimensionedScalar C2; 00069 dimensionedScalar Cs; 00070 dimensionedScalar Ceps; 00071 00072 dimensionedScalar C1Ref; 00073 dimensionedScalar C2Ref; 00074 00075 scalar couplingFactor_; 00076 00077 dimensionedScalar alphaR; 00078 dimensionedScalar alphaEps; 00079 dimensionedScalar alphah; 00080 00081 wallDistReflection y_; 00082 00083 volTensorField R_; 00084 volScalarField k_; 00085 volScalarField epsilon_; 00086 volScalarField mut_; 00087 00088 00089 public: 00090 00091 //- Runtime type information 00092 TypeName("LaunderGibsonRSTM"); 00093 00094 // Constructors 00095 00096 //- from components 00097 LaunderGibsonRSTM 00098 ( 00099 const volScalarField& rho, 00100 const volVectorField& U, 00101 const surfaceScalarField& phi, 00102 basicThermo& thermophysicalModel 00103 ); 00104 00105 00106 // Destructor 00107 00108 ~LaunderGibsonRSTM(){} 00109 00110 00111 // Member Functions 00112 00113 // Access 00114 00115 tmp<volScalarField> mut() const 00116 { 00117 return mut_; 00118 } 00119 00120 //- Return the effective diffusivity for R 00121 tmp<volScalarField> DREff() const 00122 { 00123 return tmp<volScalarField> 00124 ( 00125 new volScalarField("DREff", alphaR*mut_ + mu()) 00126 ); 00127 } 00128 00129 //- Return the effective diffusivity for epsilon 00130 tmp<volScalarField> DepsilonEff() const 00131 { 00132 return tmp<volScalarField> 00133 ( 00134 new volScalarField("DepsilonEff", alphaEps*mut_ + mu()) 00135 ); 00136 } 00137 00138 //- Return the effective turbulent thermal diffusivity 00139 tmp<volScalarField> alphaEff() const 00140 { 00141 return tmp<volScalarField> 00142 ( 00143 new volScalarField("alphaEff", alphah*mut_ + alpha()) 00144 ); 00145 } 00146 00147 tmp<volScalarField> k() const 00148 { 00149 return k_; 00150 } 00151 00152 tmp<volScalarField> epsilon() const 00153 { 00154 return epsilon_; 00155 } 00156 00157 00158 tmp<volTensorField> R() const 00159 { 00160 return R_; 00161 } 00162 00163 tmp<fvVectorMatrix> divRhoR(volVectorField& U) const; 00164 00165 tmp<fvScalarMatrix> divRhoUh(volScalarField& h) const; 00166 00167 void correct(); 00168 00169 //- Read turbulenceProperties dictionary 00170 bool read(); 00171 }; 00172 00173 00174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00175 00176 } // End namespace turbulenceModels 00177 } // End namespace compressible 00178 } // End namespace Foam 00179 00180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00181 00182 #endif 00183 00184 // ************************************************************************* //