00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef compressibleTurbulenceModel_H
00039 #define compressibleTurbulenceModel_H
00040
00041 #include "volFields.H"
00042 #include "surfaceFields.H"
00043 #include "nearWallDist.H"
00044 #include "fvm.H"
00045 #include "fvc.H"
00046 #include "fvMatrices.H"
00047 #include "basicThermo.H"
00048 #include "IOdictionary.H"
00049 #include "Switch.H"
00050 #include "bound.H"
00051 #include "autoPtr.H"
00052 #include "runTimeSelectionTables.H"
00053
00054
00055
00056 namespace Foam
00057 {
00058 namespace compressible
00059 {
00060
00061
00062
00063
00064
00065 class turbulenceModel
00066 :
00067 public IOdictionary
00068 {
00069
00070 protected:
00071
00072
00073
00074 const Time& runTime_;
00075 const fvMesh& mesh_;
00076
00077 const volScalarField& rho_;
00078 const volVectorField& U_;
00079 const surfaceScalarField& phi_;
00080
00081 basicThermo& thermophysicalModel_;
00082
00083 Switch turbulence_;
00084 dictionary turbulenceModelCoeffs_;
00085
00086 scalar kappa_;
00087 scalar E_;
00088
00089 scalar yPlusLam(const scalar kappa, const scalar E);
00090 scalar yPlusLam_;
00091
00092 dimensionedScalar k0_;
00093 dimensionedScalar epsilon0_;
00094 dimensionedScalar epsilonSmall_;
00095
00096 nearWallDist y_;
00097
00098
00099
00100 const volScalarField& mu() const
00101 {
00102 return thermophysicalModel_.mu();
00103 }
00104
00105
00106 const volScalarField& alpha() const
00107 {
00108 return thermophysicalModel_.alpha();
00109 }
00110
00111
00112 private:
00113
00114
00115
00116
00117 turbulenceModel(const turbulenceModel&);
00118
00119
00120 void operator=(const turbulenceModel&);
00121
00122
00123 public:
00124
00125
00126 TypeName("turbulenceModel");
00127
00128
00129
00130
00131 declareRunTimeSelectionTable
00132 (
00133 autoPtr,
00134 turbulenceModel,
00135 dictionary,
00136 (
00137 const volScalarField& rho,
00138 const volVectorField& U,
00139 const surfaceScalarField& phi,
00140 basicThermo& thermoPhysicalModel
00141 ),
00142 (rho, U, phi, thermoPhysicalModel)
00143 );
00144
00145
00146
00147
00148
00149 turbulenceModel
00150 (
00151 const word& type,
00152 const volScalarField& rho,
00153 const volVectorField& U,
00154 const surfaceScalarField& phi,
00155 basicThermo& thermoPhysicalModel
00156 );
00157
00158
00159
00160
00161
00162 static autoPtr<turbulenceModel> New
00163 (
00164 const volScalarField& rho,
00165 const volVectorField& U,
00166 const surfaceScalarField& phi,
00167 basicThermo& thermoPhysicalModel
00168 );
00169
00170
00171
00172
00173 virtual ~turbulenceModel()
00174 {}
00175
00176
00177
00178
00179
00180
00181
00182 const dimensionedScalar& k0() const
00183 {
00184 return k0_;
00185 }
00186
00187
00188
00189 const dimensionedScalar& epsilon0() const
00190 {
00191 return epsilon0_;
00192 }
00193
00194
00195
00196 const dimensionedScalar& epsilonSmall() const
00197 {
00198 return epsilonSmall_;
00199 }
00200
00201
00202
00203 dimensionedScalar& k0()
00204 {
00205 return k0_;
00206 }
00207
00208
00209 dimensionedScalar& epsilon0()
00210 {
00211 return epsilon0_;
00212 }
00213
00214
00215 dimensionedScalar& epsilonSmall()
00216 {
00217 return epsilonSmall_;
00218 }
00219
00220
00221
00222 scalar kappa() const
00223 {
00224 return kappa_;
00225 }
00226
00227
00228 scalar E() const
00229 {
00230 return E_;
00231 }
00232
00233
00234
00235 scalar yPlusLam() const
00236 {
00237 return yPlusLam_;
00238 }
00239
00240
00241
00242 virtual tmp<volScalarField> mut() const = 0;
00243
00244
00245 virtual tmp<volScalarField> muEff() const
00246 {
00247 return tmp<volScalarField>
00248 (
00249 new volScalarField("muEff", mut() + mu())
00250 );
00251 }
00252
00253
00254 virtual tmp<volScalarField> alphaEff() const = 0;
00255
00256
00257 virtual tmp<volScalarField> k() const = 0;
00258
00259
00260 virtual tmp<volScalarField> epsilon() const = 0;
00261
00262
00263 virtual tmp<volTensorField> R() const = 0;
00264
00265
00266 virtual tmp<fvVectorMatrix> divRhoR(volVectorField& U) const = 0;
00267
00268
00269 virtual tmp<scalarField> yPlus(const label patchI) const;
00270
00271
00272 virtual void correct() = 0;
00273
00274
00275 virtual bool read() = 0;
00276 };
00277
00278
00279
00280
00281 }
00282 }
00283
00284
00285
00286 #endif
00287
00288