DsmcCloud.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 #ifndef DsmcCloud_H
00038 #define DsmcCloud_H
00039
00040 #include "Cloud.H"
00041 #include "DsmcBaseCloud.H"
00042 #include "IOdictionary.H"
00043 #include "autoPtr.H"
00044 #include "Random.H"
00045 #include "fvMesh.H"
00046 #include "volFields.H"
00047 #include "scalarIOField.H"
00048
00049
00050
00051 namespace Foam
00052 {
00053
00054
00055
00056 template<class CloudType>
00057 class BinaryCollisionModel;
00058
00059 template<class CloudType>
00060 class WallInteractionModel;
00061
00062 template<class CloudType>
00063 class InflowBoundaryModel;
00064
00065
00066
00067
00068
00069 template<class ParcelType>
00070 class DsmcCloud
00071 :
00072 public Cloud<ParcelType>,
00073 public DsmcBaseCloud
00074 {
00075
00076
00077
00078
00079 const word cloudName_;
00080
00081
00082 const fvMesh& mesh_;
00083
00084
00085 IOdictionary particleProperties_;
00086
00087
00088
00089
00090
00091 List<word> typeIdList_;
00092
00093
00094 scalar nParticle_;
00095
00096
00097 List<DynamicList<ParcelType*> > cellOccupancy_;
00098
00099
00100
00101
00102 volScalarField sigmaTcRMax_;
00103
00104
00105 scalarField collisionSelectionRemainder_;
00106
00107
00108 volScalarField q_;
00109
00110
00111 volVectorField fD_;
00112
00113
00114 List<typename ParcelType::constantProperties> constProps_;
00115
00116
00117 Random rndGen_;
00118
00119
00120
00121 scalar cachedDeltaT_;
00122
00123
00124
00125
00126
00127 const volScalarField& T_;
00128
00129
00130 const volVectorField& U_;
00131
00132
00133
00134
00135
00136 autoPtr<BinaryCollisionModel<DsmcCloud<ParcelType> > >
00137 binaryCollisionModel_;
00138
00139
00140 autoPtr<WallInteractionModel<DsmcCloud<ParcelType> > >
00141 wallInteractionModel_;
00142
00143
00144 autoPtr<InflowBoundaryModel<DsmcCloud<ParcelType> > >
00145 inflowBoundaryModel_;
00146
00147
00148
00149
00150
00151 void buildConstProps();
00152
00153
00154 void buildCellOccupancy();
00155
00156
00157 void initialise(const IOdictionary& dsmcInitialiseDict);
00158
00159
00160 void collisions();
00161
00162
00163 void resetSurfaceDataFields();
00164
00165
00166 DsmcCloud(const DsmcCloud&);
00167
00168
00169 void operator=(const DsmcCloud&);
00170
00171
00172 public:
00173
00174
00175
00176
00177 static scalar kb;
00178
00179
00180
00181
00182
00183 DsmcCloud
00184 (
00185 const word& cloudName,
00186 const volScalarField& T,
00187 const volVectorField& U
00188 );
00189
00190
00191 DsmcCloud
00192 (
00193 const word& cloudName,
00194 const fvMesh& mesh
00195 );
00196
00197
00198
00199 virtual ~DsmcCloud();
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209 inline const word& cloudName() const;
00210
00211
00212 inline const fvMesh& mesh() const;
00213
00214
00215
00216
00217
00218 inline const IOdictionary& particleProperties() const;
00219
00220
00221 inline const List<word>& typeIdList() const;
00222
00223
00224
00225 inline scalar nParticle() const;
00226
00227
00228 inline const List<DynamicList<ParcelType*> >&
00229 cellOccupancy() const;
00230
00231
00232
00233 inline volScalarField& sigmaTcRMax();
00234
00235
00236
00237 inline scalarField& collisionSelectionRemainder();
00238
00239
00240 inline const List<typename ParcelType::constantProperties>&
00241 constProps() const;
00242
00243
00244 inline const typename ParcelType::constantProperties&
00245 constProps(label typeId) const;
00246
00247
00248 inline Random& rndGen();
00249
00250
00251 inline void storeDeltaT();
00252
00253
00254 inline scalar cachedDeltaT() const;
00255
00256
00257
00258
00259
00260 inline const volScalarField& q() const;
00261
00262
00263 inline volScalarField& q();
00264
00265
00266 inline const volVectorField& fD() const;
00267
00268
00269 inline volVectorField& fD();
00270
00271
00272
00273
00274
00275 inline const volScalarField& T() const;
00276
00277
00278 inline const volVectorField& U() const;
00279
00280
00281
00282
00283
00284
00285 vector equipartitionLinearVelocity
00286 (
00287 scalar temperature,
00288 scalar mass
00289 );
00290
00291
00292
00293
00294 scalar equipartitionInternalEnergy
00295 (
00296 scalar temperature,
00297 scalar internalDegreesOfFreedom
00298 );
00299
00300
00301
00302
00303 inline scalar maxwellianAverageSpeed
00304 (
00305 scalar temperature,
00306 scalar mass
00307 ) const;
00308
00309 inline scalarField maxwellianAverageSpeed
00310 (
00311 scalarField temperature,
00312 scalar mass
00313 ) const;
00314
00315
00316 inline scalar maxwellianRMSSpeed
00317 (
00318 scalar temperature,
00319 scalar mass
00320 ) const;
00321
00322 inline scalarField maxwellianRMSSpeed
00323 (
00324 scalarField temperature,
00325 scalar mass
00326 ) const;
00327
00328
00329 inline scalar maxwellianMostProbableSpeed
00330 (
00331 scalar temperature,
00332 scalar mass
00333 ) const;
00334
00335 inline scalarField maxwellianMostProbableSpeed
00336 (
00337 scalarField temperature,
00338 scalar mass
00339 ) const;
00340
00341
00342
00343
00344 inline const BinaryCollisionModel<DsmcCloud<ParcelType> >&
00345 binaryCollision() const;
00346
00347
00348 inline BinaryCollisionModel<DsmcCloud<ParcelType> >&
00349 binaryCollision();
00350
00351
00352 inline const WallInteractionModel<DsmcCloud<ParcelType> >&
00353 wallInteraction() const;
00354
00355
00356 inline WallInteractionModel<DsmcCloud<ParcelType> >&
00357 wallInteraction();
00358
00359
00360 inline const InflowBoundaryModel<DsmcCloud<ParcelType> >&
00361 inflowBoundary() const;
00362
00363
00364 inline InflowBoundaryModel<DsmcCloud<ParcelType> >&
00365 inflowBoundary();
00366
00367
00368
00369
00370
00371 inline scalar massInjected() const;
00372
00373
00374 inline scalar massInSystem() const;
00375
00376
00377 inline vector linearMomentumOfSystem() const;
00378
00379
00380 inline scalar linearKineticEnergyOfSystem() const;
00381
00382
00383 inline scalar internalEnergyOfSystem() const;
00384
00385
00386 void info() const;
00387
00388
00389 void dumpParticlePositions() const;
00390
00391
00392
00393
00394
00395 inline const tmp<volScalarField> rhoN() const;
00396
00397
00398 inline const tmp<volScalarField> rhoM() const;
00399
00400
00401 inline const tmp<volScalarField> dsmcRhoN() const;
00402
00403
00404 inline const tmp<volVectorField> momentum() const;
00405
00406
00407
00408 inline const tmp<volScalarField> linearKE() const;
00409
00410
00411 inline const tmp<volScalarField> internalE() const;
00412
00413
00414 inline const tmp<volScalarField> iDof() const;
00415
00416
00417
00418
00419
00420 void addNewParcel
00421 (
00422 const vector& position,
00423 const vector& U,
00424 const scalar Ei,
00425 const label cellId,
00426 const label typeId
00427 );
00428
00429
00430 void evolve();
00431
00432
00433
00434 inline void clear();
00435
00436
00437 };
00438
00439
00440
00441
00442 }
00443
00444
00445
00446 #include "DsmcCloudI.H"
00447
00448
00449
00450 #ifdef NoRepository
00451 # include "DsmcCloud.C"
00452 #endif
00453
00454
00455
00456 #endif
00457
00458
Copyright © 2000-2009 OpenCFD Ltd