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
00039
00040
00041
00042
00043 #ifndef compressibleLESmodel_H
00044 #define compressibleLESmodel_H
00045
00046 #include "LESdelta.H"
00047 #include "fvm.H"
00048 #include "fvc.H"
00049 #include "fvMatrices.H"
00050 #include "basicThermo.H"
00051 #include "bound.H"
00052 #include "autoPtr.H"
00053 #include "runTimeSelectionTables.H"
00054
00055
00056
00057 namespace Foam
00058 {
00059 namespace compressible
00060 {
00061
00062
00063
00064
00065
00066 class LESmodel
00067 :
00068 public IOdictionary
00069 {
00070
00071 protected:
00072
00073
00074
00075 const Time& runTime_;
00076 const fvMesh& mesh_;
00077
00078
00079 private:
00080
00081
00082
00083 const volScalarField& rho_;
00084 const volVectorField& U_;
00085 const surfaceScalarField& phi_;
00086
00087 const basicThermo& thermoPhysicalModel_;
00088
00089 dictionary LESmodelProperties_;
00090
00091 dimensionedScalar k0_;
00092
00093 autoPtr<LESdelta> delta_;
00094
00095
00096
00097
00098
00099 LESmodel(const LESmodel&);
00100 LESmodel& operator=(const LESmodel&);
00101
00102
00103 public:
00104
00105
00106 TypeName("LESmodel");
00107
00108
00109
00110
00111 declareRunTimeSelectionTable
00112 (
00113 autoPtr,
00114 LESmodel,
00115 dictionary,
00116 (
00117 const volScalarField& rho,
00118 const volVectorField& U,
00119 const surfaceScalarField& phi,
00120 const basicThermo& thermoPhysicalModel
00121 ),
00122 (rho, U, phi, thermoPhysicalModel)
00123 );
00124
00125
00126
00127
00128
00129 LESmodel
00130 (
00131 const word& type,
00132 const volScalarField& rho,
00133 const volVectorField& U,
00134 const surfaceScalarField& phi,
00135 const basicThermo& thermoPhysicalModel
00136 );
00137
00138
00139
00140
00141
00142 static autoPtr<LESmodel> New
00143 (
00144 const volScalarField& rho,
00145 const volVectorField& U,
00146 const surfaceScalarField& phi,
00147 const basicThermo& thermoPhysicalModel
00148 );
00149
00150
00151
00152
00153 virtual ~LESmodel()
00154 {}
00155
00156
00157
00158
00159
00160
00161
00162 inline const volScalarField& rho() const
00163 {
00164 return rho_;
00165 }
00166
00167
00168 inline const volVectorField& U() const
00169 {
00170 return U_;
00171 }
00172
00173
00174 inline const surfaceScalarField& phi() const
00175 {
00176 return phi_;
00177 }
00178
00179
00180 inline const basicThermo& thermo() const
00181 {
00182 return thermoPhysicalModel_;
00183 }
00184
00185
00186
00187 inline const dictionary& LESmodelProperties()
00188 {
00189 return LESmodelProperties_;
00190 }
00191
00192
00193 inline const volScalarField& delta() const
00194 {
00195 return delta_();
00196 }
00197
00198
00199 const dimensionedScalar& k0() const
00200 {
00201 return k0_;
00202 }
00203
00204
00205 dimensionedScalar& k0()
00206 {
00207 return k0_;
00208 }
00209
00210
00211 tmp<volScalarField> mu() const
00212 {
00213 return thermoPhysicalModel_.mu();
00214 }
00215
00216
00217 tmp<volScalarField> alpha() const
00218 {
00219 return thermoPhysicalModel_.alpha();
00220 }
00221
00222
00223
00224 virtual tmp<volTensorField> B() const = 0;
00225
00226
00227 virtual tmp<volScalarField> k() const = 0;
00228
00229
00230 virtual tmp<volScalarField> epsilon() const = 0;
00231
00232
00233 virtual tmp<volScalarField> muSgs() const = 0;
00234
00235
00236 virtual tmp<volScalarField> muEff() const
00237 {
00238 return tmp<volScalarField>
00239 (
00240 new volScalarField("muEff", muSgs() + mu())
00241 );
00242 }
00243
00244
00245 virtual tmp<volScalarField> alphaEff() const = 0;
00246
00247
00248
00249 virtual tmp<fvVectorMatrix> divRhoB(volVectorField& U) const = 0;
00250
00251
00252
00253
00254 void correct();
00255
00256
00257 virtual void correct(const tmp<volTensorField>& gradU);
00258
00259
00260 virtual bool read() = 0;
00261 };
00262
00263
00264
00265
00266 }
00267 }
00268
00269
00270
00271 #endif
00272
00273