![]() |
|
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 LaunderGibsonRSTM_H 00038 #define LaunderGibsonRSTM_H 00039 00040 #include "turbulenceModel.H" 00041 #include "wallDistReflection.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 namespace turbulenceModels 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class LaunderGibsonRSTM Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class LaunderGibsonRSTM 00055 : 00056 public turbulenceModel 00057 { 00058 // Private data 00059 00060 dimensionedScalar Cmu; 00061 00062 dimensionedScalar Clg1; 00063 dimensionedScalar Clg2; 00064 00065 dimensionedScalar C1; 00066 dimensionedScalar C2; 00067 dimensionedScalar Cs; 00068 dimensionedScalar Ceps; 00069 dimensionedScalar alphaR; 00070 dimensionedScalar alphaEps; 00071 00072 dimensionedScalar C1Ref; 00073 dimensionedScalar C2Ref; 00074 00075 scalar couplingFactor_; 00076 00077 wallDistReflection yr_; 00078 00079 volTensorField R_; 00080 volScalarField k_; 00081 volScalarField epsilon_; 00082 volScalarField nut_; 00083 00084 00085 public: 00086 00087 //- Runtime type information 00088 TypeName("LaunderGibsonRSTM"); 00089 00090 // Constructors 00091 00092 //- from components 00093 LaunderGibsonRSTM 00094 ( 00095 const volVectorField& U, 00096 const surfaceScalarField& phi, 00097 transportModel& transport 00098 ); 00099 00100 00101 // Destructor 00102 00103 ~LaunderGibsonRSTM(){} 00104 00105 00106 // Member Functions 00107 00108 // Access 00109 00110 tmp<volScalarField> nut() const 00111 { 00112 return nut_; 00113 } 00114 00115 //- Return the effective diffusivity for R 00116 tmp<volScalarField> DREff() const 00117 { 00118 return tmp<volScalarField> 00119 ( 00120 new volScalarField("DREff", alphaR*nut_ + nu()) 00121 ); 00122 } 00123 00124 //- Return the effective diffusivity for epsilon 00125 tmp<volScalarField> DepsilonEff() const 00126 { 00127 return tmp<volScalarField> 00128 ( 00129 new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) 00130 ); 00131 } 00132 00133 tmp<volScalarField> k() const 00134 { 00135 return k_; 00136 } 00137 00138 tmp<volScalarField> epsilon() const 00139 { 00140 return epsilon_; 00141 } 00142 00143 00144 tmp<volTensorField> R() const 00145 { 00146 return R_; 00147 } 00148 00149 tmp<fvVectorMatrix> divR(volVectorField& U) const; 00150 00151 void correct(); 00152 00153 //- Read turbulenceProperties dictionary 00154 bool read(); 00155 }; 00156 00157 00158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00159 00160 } // End namespace turbulenceModels 00161 } // End namespace Foam 00162 00163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00164 00165 #endif 00166 00167 // ************************************************************************* //