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