Go to the documentation of this file.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 
00044 #ifndef compressibleRASModel_H
00045 #define compressibleRASModel_H
00046 
00047 #include <compressibleTurbulenceModel/turbulenceModel.H>
00048 #include <finiteVolume/volFields.H>
00049 #include <finiteVolume/surfaceFields.H>
00050 #include <finiteVolume/nearWallDist.H>
00051 #include <finiteVolume/fvm.H>
00052 #include <finiteVolume/fvc.H>
00053 #include <finiteVolume/fvMatrices.H>
00054 #include <basicThermophysicalModels/basicThermo.H>
00055 #include <OpenFOAM/IOdictionary.H>
00056 #include <OpenFOAM/Switch.H>
00057 #include <finiteVolume/bound.H>
00058 #include <OpenFOAM/autoPtr.H>
00059 #include <OpenFOAM/runTimeSelectionTables.H>
00060 
00061 
00062 
00063 namespace Foam
00064 {
00065 namespace compressible
00066 {
00067 
00068 
00069 
00070 
00071 
00072 class RASModel
00073 :
00074     public turbulenceModel,
00075     public IOdictionary
00076 {
00077 
00078 protected:
00079 
00080     
00081 
00082         
00083         Switch turbulence_;
00084 
00085         
00086         Switch printCoeffs_;
00087 
00088         
00089         dictionary coeffDict_;
00090 
00091         
00092         scalar yPlusLam_;
00093 
00094         
00095         dimensionedScalar k0_;
00096 
00097         
00098         dimensionedScalar epsilon0_;
00099 
00100         
00101         dimensionedScalar epsilonSmall_;
00102 
00103         
00104         dimensionedScalar omega0_;
00105 
00106         
00107         dimensionedScalar omegaSmall_;
00108 
00109         
00110         nearWallDist y_;
00111 
00112 
00113     
00114 
00115         
00116         virtual void printCoeffs();
00117 
00118 
00119 private:
00120 
00121     
00122 
00123         
00124         RASModel(const RASModel&);
00125 
00126         
00127         void operator=(const RASModel&);
00128 
00129 
00130 public:
00131 
00132     
00133     TypeName("RASModel");
00134 
00135 
00136     
00137 
00138         declareRunTimeSelectionTable
00139         (
00140             autoPtr,
00141             RASModel,
00142             dictionary,
00143             (
00144                 const volScalarField& rho,
00145                 const volVectorField& U,
00146                 const surfaceScalarField& phi,
00147                 const basicThermo& thermoPhysicalModel
00148             ),
00149             (rho, U, phi, thermoPhysicalModel)
00150         );
00151 
00152 
00153     
00154 
00155         
00156         RASModel
00157         (
00158             const word& type,
00159             const volScalarField& rho,
00160             const volVectorField& U,
00161             const surfaceScalarField& phi,
00162             const basicThermo& thermoPhysicalModel
00163         );
00164 
00165 
00166     
00167 
00168         
00169         static autoPtr<RASModel> New
00170         (
00171             const volScalarField& rho,
00172             const volVectorField& U,
00173             const surfaceScalarField& phi,
00174             const basicThermo& thermoPhysicalModel
00175         );
00176 
00177 
00178     
00179     virtual ~RASModel()
00180     {}
00181 
00182 
00183     
00184 
00185         
00186 
00187             
00188             const dimensionedScalar& k0() const
00189             {
00190                 return k0_;
00191             }
00192 
00193             
00194             
00195             const dimensionedScalar& epsilon0() const
00196             {
00197                 return epsilon0_;
00198             }
00199 
00200             
00201             
00202             const dimensionedScalar& epsilonSmall() const
00203             {
00204                 return epsilonSmall_;
00205             }
00206 
00207             
00208             
00209             const dimensionedScalar& omega0() const
00210             {
00211                 return omega0_;
00212             }
00213 
00214             
00215             
00216             const dimensionedScalar& omegaSmall() const
00217             {
00218                 return omegaSmall_;
00219             }
00220 
00221             
00222             dimensionedScalar& k0()
00223             {
00224                 return k0_;
00225             }
00226 
00227             
00228             dimensionedScalar& epsilon0()
00229             {
00230                 return epsilon0_;
00231             }
00232 
00233             
00234             dimensionedScalar& epsilonSmall()
00235             {
00236                 return epsilonSmall_;
00237             }
00238 
00239             
00240             dimensionedScalar& omega0()
00241             {
00242                 return omega0_;
00243             }
00244 
00245             
00246             dimensionedScalar& omegaSmall()
00247             {
00248                 return omegaSmall_;
00249             }
00250 
00251             
00252             const nearWallDist& y() const
00253             {
00254                 return y_;
00255             }
00256 
00257             
00258             scalar yPlusLam(const scalar kappa, const scalar E) const;
00259 
00260             
00261             const dictionary& coeffDict() const
00262             {
00263                 return coeffDict_;
00264             }
00265 
00266 
00267         
00268         virtual tmp<volScalarField> mut() const = 0;
00269 
00270         
00271         virtual tmp<volScalarField> muEff() const
00272         {
00273             return tmp<volScalarField>
00274             (
00275                 new volScalarField("muEff", mut() + mu())
00276             );
00277         }
00278 
00279         
00280         virtual tmp<volScalarField> alphaEff() const = 0;
00281 
00282         
00283         virtual tmp<volScalarField> k() const = 0;
00284 
00285         
00286         virtual tmp<volScalarField> epsilon() const = 0;
00287 
00288         
00289         virtual tmp<volSymmTensorField> R() const = 0;
00290 
00291         
00292         virtual tmp<volSymmTensorField> devRhoReff() const = 0;
00293 
00294         
00295         virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
00296 
00297         
00298         virtual tmp<scalarField> yPlus
00299         (
00300             const label patchI,
00301             const scalar Cmu
00302         ) const;
00303 
00304         
00305         virtual void correct() = 0;
00306 
00307         
00308         virtual bool read() = 0;
00309 };
00310 
00311 
00312 
00313 
00314 } 
00315 } 
00316 
00317 
00318 
00319 #endif
00320 
00321