![]() |
|
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 kEpsilon 00027 00028 Description 00029 Standard k-epsilon turbulence model. 00030 00031 SourceFiles 00032 kEpsilon.C 00033 kEpsilonCorrect.C 00034 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #ifndef kEpsilon_H 00038 #define kEpsilon_H 00039 00040 #include "turbulenceModel.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 namespace turbulenceModels 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class kEpsilon Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class kEpsilon 00054 : 00055 public turbulenceModel 00056 { 00057 // Private data 00058 00059 dimensionedScalar Cmu; 00060 dimensionedScalar C1; 00061 dimensionedScalar C2; 00062 dimensionedScalar alphaEps; 00063 00064 volScalarField k_; 00065 volScalarField epsilon_; 00066 volScalarField nut_; 00067 00068 00069 public: 00070 00071 //- Runtime type information 00072 TypeName("kEpsilon"); 00073 00074 // Constructors 00075 00076 //- Construct from components 00077 kEpsilon 00078 ( 00079 const volVectorField& U, 00080 const surfaceScalarField& phi, 00081 transportModel& transport 00082 ); 00083 00084 00085 // Destructor 00086 00087 ~kEpsilon() 00088 {} 00089 00090 00091 // Member Functions 00092 00093 tmp<volScalarField> nut() const 00094 { 00095 return nut_; 00096 } 00097 00098 //- Return the effective diffusivity for k 00099 tmp<volScalarField> DkEff() const 00100 { 00101 return tmp<volScalarField> 00102 ( 00103 new volScalarField("DkEff", nut_ + nu()) 00104 ); 00105 } 00106 00107 //- Return the effective diffusivity for epsilon 00108 tmp<volScalarField> DepsilonEff() const 00109 { 00110 return tmp<volScalarField> 00111 ( 00112 new volScalarField("DepsilonEff", alphaEps*nut_ + nu()) 00113 ); 00114 } 00115 00116 tmp<volScalarField> k() const 00117 { 00118 return k_; 00119 } 00120 00121 tmp<volScalarField> epsilon() const 00122 { 00123 return epsilon_; 00124 } 00125 00126 tmp<volTensorField> R() const; 00127 00128 tmp<fvVectorMatrix> divR(volVectorField& U) const; 00129 00130 void correct(); 00131 00132 //- Read turbulenceProperties dictionary 00133 bool read(); 00134 }; 00135 00136 00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00138 00139 } // End namespace turbulenceModels 00140 } // End namespace Foam 00141 00142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00143 00144 #endif 00145 00146 // ************************************************************************* //