ReactingParcel.H
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 #ifndef ReactingParcel_H
00040 #define ReactingParcel_H
00041
00042 #include "IOstream.H"
00043 #include "autoPtr.H"
00044 #include "interpolationCellPoint.H"
00045 #include "contiguous.H"
00046
00047 #include "ThermoParcel.H"
00048 #include "ReactingCloud.H"
00049 #include "reactingParcel.H"
00050
00051
00052
00053 namespace Foam
00054 {
00055
00056 template<class ParcelType>
00057 class ReactingParcel;
00058
00059 template<class ParcelType>
00060 Ostream& operator<<
00061 (
00062 Ostream&,
00063 const ReactingParcel<ParcelType>&
00064 );
00065
00066
00067
00068
00069
00070 template<class ParcelType>
00071 class ReactingParcel
00072 :
00073 public reactingParcel,
00074 public ThermoParcel<ParcelType>
00075 {
00076 public:
00077
00078
00079 class constantProperties
00080 :
00081 public ThermoParcel<ParcelType>::constantProperties
00082 {
00083
00084
00085
00086 const scalar pMin_;
00087
00088
00089 Switch constantVolume_;
00090
00091
00092 const scalar Tvap_;
00093
00094
00095 const scalar Tbp_;
00096
00097
00098 public:
00099
00100
00101 constantProperties(const dictionary& parentDict);
00102
00103
00104
00105
00106 inline scalar pMin() const;
00107
00108
00109 inline Switch constantVolume() const;
00110
00111
00112 inline scalar Tvap() const;
00113
00114
00115 inline scalar Tbp() const;
00116 };
00117
00118
00119
00120 class trackData
00121 :
00122 public ThermoParcel<ParcelType>::trackData
00123 {
00124
00125
00126
00127
00128 ReactingCloud<ParcelType>& cloud_;
00129
00130
00131 const constantProperties& constProps_;
00132
00133
00134 const interpolation<scalar>& pInterp_;
00135
00136
00137 public:
00138
00139
00140
00141
00142 inline trackData
00143 (
00144 ReactingCloud<ParcelType>& cloud,
00145 const constantProperties& constProps,
00146 const interpolation<scalar>& rhoInterp,
00147 const interpolation<vector>& UInterp,
00148 const interpolation<scalar>& muInterp,
00149 const interpolation<scalar>& TInterp,
00150 const interpolation<scalar>& CpInterp,
00151 const interpolation<scalar>& pInterp,
00152 const vector& g
00153 );
00154
00155
00156
00157
00158
00159 inline ReactingCloud<ParcelType>& cloud();
00160
00161
00162 inline const constantProperties& constProps() const;
00163
00164
00165
00166 inline const interpolation<scalar>& pInterp() const;
00167 };
00168
00169
00170 protected:
00171
00172
00173
00174
00175
00176
00177 scalar mass0_;
00178
00179
00180 scalarField Y_;
00181
00182
00183
00184
00185
00186 scalar pc_;
00187
00188
00189
00190
00191
00192 template<class TrackData>
00193 void calcPhaseChange
00194 (
00195 TrackData& td,
00196 const scalar dt,
00197 const label cellI,
00198 const scalar d,
00199 const scalar T,
00200 const vector& U,
00201 const scalar mass,
00202 const label idPhase,
00203 const scalar YPhase,
00204 const scalarField& YComponents,
00205 scalarField& dMassPC,
00206 scalar& Sh,
00207 scalar& dhsTrans
00208 );
00209
00210
00211 scalar updateMassFraction
00212 (
00213 const scalar mass0,
00214 const scalarField& dMass,
00215 scalarField& Y
00216 ) const;
00217
00218
00219 public:
00220
00221
00222
00223
00224 static string propHeader;
00225
00226
00227 TypeName("ReactingParcel");
00228
00229
00230 friend class Cloud<ParcelType>;
00231
00232
00233
00234
00235
00236
00237 inline ReactingParcel
00238 (
00239 ReactingCloud<ParcelType>& owner,
00240 const vector& position,
00241 const label cellI
00242 );
00243
00244
00245 inline ReactingParcel
00246 (
00247 ReactingCloud<ParcelType>& owner,
00248 const vector& position,
00249 const label cellI,
00250 const label typeId,
00251 const scalar nParticle0,
00252 const scalar d0,
00253 const vector& U0,
00254 const scalarField& Y0,
00255 const constantProperties& constProps
00256 );
00257
00258
00259 ReactingParcel
00260 (
00261 const Cloud<ParcelType>& c,
00262 Istream& is,
00263 bool readFields = true
00264 );
00265
00266
00267 ReactingParcel(const ReactingParcel& p);
00268
00269
00270 autoPtr<ReactingParcel> clone() const
00271 {
00272 return autoPtr<ReactingParcel>(new ReactingParcel(*this));
00273 }
00274
00275
00276
00277
00278
00279
00280
00281 inline scalar mass0() const;
00282
00283
00284 inline const scalarField& Y() const;
00285
00286
00287 inline scalar pc() const;
00288
00289
00290
00291
00292
00293 inline scalar& mass0();
00294
00295
00296 inline scalarField& Y();
00297
00298
00299
00300
00301
00302 template<class TrackData>
00303 void setCellValues
00304 (
00305 TrackData& td,
00306 const scalar dt,
00307 const label cellI
00308 );
00309
00310
00311 template<class TrackData>
00312 void cellValueSourceCorrection
00313 (
00314 TrackData& td,
00315 const scalar dt,
00316 const label cellI
00317 );
00318
00319
00320 template<class TrackData>
00321 void calc
00322 (
00323 TrackData& td,
00324 const scalar dt,
00325 const label cellI
00326 );
00327
00328
00329
00330
00331
00332 static void readFields(ReactingCloud<ParcelType>& c);
00333
00334
00335 static void writeFields(const ReactingCloud<ParcelType>& c);
00336
00337
00338
00339
00340 friend Ostream& operator<< <ParcelType>
00341 (
00342 Ostream&,
00343 const ReactingParcel<ParcelType>&
00344 );
00345 };
00346
00347
00348
00349
00350 }
00351
00352
00353
00354 #include "ReactingParcelI.H"
00355
00356
00357
00358 #ifdef NoRepository
00359 #include "ReactingParcel.C"
00360 #endif
00361
00362
00363
00364 #endif
00365
00366
Copyright © 2000-2009 OpenCFD Ltd