Templated base class for dsmc cloud. More...
Public Types | |
typedef ParcelType | parcelType |
Type of parcel the cloud was instantiated for. More... | |
![]() | |
typedef ParticleType | particleType |
typedef IDLList< ParticleType >::iterator | iterator |
typedef IDLList< ParticleType >::const_iterator | const_iterator |
Public Member Functions | |
DSMCCloud (const word &cloudName, const fvMesh &mesh, bool readFields=true) | |
Construct given name and mesh, will read Parcels and fields from. More... | |
DSMCCloud (const word &cloudName, const fvMesh &mesh, const IOdictionary &dsmcInitialiseDict) | |
Construct given name, mesh and initialisation dictionary. More... | |
virtual | ~DSMCCloud () |
Destructor. More... | |
const word & | cloudName () const |
Return the cloud type. More... | |
const fvMesh & | mesh () const |
Return refernce to the mesh. More... | |
const IOdictionary & | particleProperties () const |
Return particle properties dictionary. More... | |
const List< word > & | typeIdList () const |
Return the idList. More... | |
scalar | nParticle () const |
Return the number of real particles represented by one. More... | |
const List< DynamicList< ParcelType * > > & | cellOccupancy () const |
Return the cell occupancy addressing. More... | |
volScalarField & | sigmaTcRMax () |
Return the sigmaTcRMax field. non-const access to allow. More... | |
scalarField & | collisionSelectionRemainder () |
Return the collision selection remainder field. non-const. More... | |
const List< typename ParcelType::constantProperties > & | constProps () const |
Return all of the constant properties. More... | |
const ParcelType::constantProperties & | constProps (label typeId) const |
Return the constant properties of the given typeId. More... | |
Random & | rndGen () |
Return refernce to the random object. More... | |
volScalarField::GeometricBoundaryField & | qBF () |
Return non-const heat flux boundary field reference. More... | |
volVectorField::GeometricBoundaryField & | fDBF () |
Return non-const force density at boundary field reference. More... | |
volScalarField::GeometricBoundaryField & | rhoNBF () |
Return non-const number density boundary field reference. More... | |
volScalarField::GeometricBoundaryField & | rhoMBF () |
Return non-const mass density boundary field reference. More... | |
volScalarField::GeometricBoundaryField & | linearKEBF () |
Return non-const linear kinetic energy density boundary. More... | |
volScalarField::GeometricBoundaryField & | internalEBF () |
Return non-const internal energy density boundary field. More... | |
volScalarField::GeometricBoundaryField & | iDofBF () |
Return non-const internal degree of freedom density boundary. More... | |
volVectorField::GeometricBoundaryField & | momentumBF () |
Return non-const momentum density boundary field reference. More... | |
const volScalarField & | boundaryT () const |
Return macroscopic temperature. More... | |
const volVectorField & | boundaryU () const |
Return macroscopic velocity. More... | |
const volScalarField & | q () const |
Return heat flux at surface field. More... | |
const volVectorField & | fD () const |
Return force density at surface field. More... | |
const volScalarField & | rhoN () const |
Return the real particle number density field. More... | |
const volScalarField & | rhoM () const |
Return the particle mass density field. More... | |
const volScalarField & | dsmcRhoN () const |
Return the field of number of DSMC particles. More... | |
const volScalarField & | linearKE () const |
Return the total linear kinetic energy (translational and. More... | |
const volScalarField & | internalE () const |
Return the internal energy density field. More... | |
const volScalarField & | iDof () const |
Return the average internal degrees of freedom field. More... | |
const volVectorField & | momentum () const |
Return the momentum density field. More... | |
vector | equipartitionLinearVelocity (scalar temperature, scalar mass) |
Generate a random velocity sampled from the Maxwellian speed. More... | |
scalar | equipartitionInternalEnergy (scalar temperature, direction internalDegreesOfFreedom) |
Generate a random internal energy, sampled from the. More... | |
scalar | maxwellianAverageSpeed (scalar temperature, scalar mass) const |
Average particle speed. More... | |
scalarField | maxwellianAverageSpeed (scalarField temperature, scalar mass) const |
scalar | maxwellianRMSSpeed (scalar temperature, scalar mass) const |
RMS particle speed. More... | |
scalarField | maxwellianRMSSpeed (scalarField temperature, scalar mass) const |
scalar | maxwellianMostProbableSpeed (scalar temperature, scalar mass) const |
Most probable speed. More... | |
scalarField | maxwellianMostProbableSpeed (scalarField temperature, scalar mass) const |
const BinaryCollisionModel< DSMCCloud< ParcelType > > & | binaryCollision () const |
Return reference to binary elastic collision model. More... | |
BinaryCollisionModel< DSMCCloud< ParcelType > > & | binaryCollision () |
Return non-const reference to binary elastic collision model. More... | |
const WallInteractionModel< DSMCCloud< ParcelType > > & | wallInteraction () const |
Return reference to wall interaction model. More... | |
WallInteractionModel< DSMCCloud< ParcelType > > & | wallInteraction () |
Return non-const reference to wall interaction model. More... | |
const InflowBoundaryModel< DSMCCloud< ParcelType > > & | inflowBoundary () const |
Return reference to wall interaction model. More... | |
InflowBoundaryModel< DSMCCloud< ParcelType > > & | inflowBoundary () |
Return non-const reference to wall interaction model. More... | |
scalar | massInSystem () const |
Total mass in system. More... | |
vector | linearMomentumOfSystem () const |
Total linear momentum of the system. More... | |
scalar | linearKineticEnergyOfSystem () const |
Total linear kinetic energy in the system. More... | |
scalar | internalEnergyOfSystem () const |
Total internal energy in the system. More... | |
void | info () const |
Print cloud information. More... | |
void | dumpParticlePositions () const |
Dump particle positions to .obj file. More... | |
void | addNewParcel (const vector &position, const vector &U, const scalar Ei, const label cellI, const label tetFaceI, const label tetPtI, const label typeId) |
Add new parcel. More... | |
void | evolve () |
Evolve the cloud (move, collide) More... | |
void | clear () |
Clear the Cloud. More... | |
virtual void | autoMap (const mapPolyMesh &) |
Remap the particles to the correct cells following mesh change. More... | |
![]() | |
TypeName ("Cloud") | |
Runtime type information. More... | |
Cloud (const polyMesh &mesh, const IDLList< ParticleType > &particles) | |
Construct from mesh and a list of particles. More... | |
Cloud (const polyMesh &mesh, const word &cloudName, const IDLList< ParticleType > &particles) | |
Construct from mesh, cloud name, and a list of particles. More... | |
Cloud (const polyMesh &mesh, const bool checkClass=true) | |
Construct from mesh by reading from file. More... | |
Cloud (const polyMesh &pMesh, const word &cloudName, const bool checkClass=true) | |
Construct from mesh by reading from file with given cloud instance. More... | |
const polyMesh & | pMesh () const |
Return the polyMesh reference. More... | |
label | size () const |
DynamicList< label > & | labels () |
label | nTrackingRescues () const |
Return nTrackingRescues. More... | |
void | trackingRescue () const |
Increment the nTrackingRescues counter. More... | |
const PackedBoolList & | cellHasWallFaces () const |
Whether each cell has any wall faces (demand driven data) More... | |
virtual bool | hasWallImpactDistance () const |
Switch to specify if particles of the cloud can return. More... | |
const const_iterator | begin () const |
iterator | begin () |
const const_iterator | cbegin () const |
const const_iterator | end () const |
iterator | end () |
const const_iterator | cend () const |
void | clear () |
void | addParticle (ParticleType *pPtr) |
Transfer particle to cloud. More... | |
void | deleteParticle (ParticleType &) |
Remove particle from cloud and delete. More... | |
void | cloudReset (const Cloud< ParticleType > &c) |
Reset the particles. More... | |
void | move (TrackData &td, const scalar trackTime) |
Move the particles. More... | |
void | autoMap (TrackData &td, const mapPolyMesh &) |
Remap the cells of particles corresponding to the. More... | |
IOobject | fieldIOobject (const word &fieldName, const IOobject::readOption r) const |
Helper to construct IOobject for field and current time. More... | |
void | checkFieldIOobject (const Cloud< ParticleType > &c, const IOField< DataType > &data) const |
Check lagrangian data field. More... | |
void | checkFieldFieldIOobject (const Cloud< ParticleType > &c, const CompactIOField< Field< DataType >, DataType > &data) const |
Check lagrangian data fieldfield. More... | |
virtual void | readFields () |
Read the field data for the cloud of particles. Dummy at. More... | |
virtual void | writeFields () const |
Write the field data for the cloud of particles Dummy at. More... | |
virtual bool | writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const |
Write using given format, version and compression. More... | |
void | writePositions () const |
Write positions to <cloudName>_positions.obj file. More... | |
![]() | |
TypeName ("DSMCBaseCloud") | |
Runtime type information. More... | |
DSMCBaseCloud () | |
Null constructor. More... | |
virtual | ~DSMCBaseCloud () |
Destructor. More... | |
Private Member Functions | |
void | buildConstProps () |
Build the constant properties for all of the species. More... | |
void | buildCellOccupancy () |
Record which particles are in which cell. More... | |
void | initialise (const IOdictionary &dsmcInitialiseDict) |
Initialise the system. More... | |
void | collisions () |
Calculate collisions between molecules. More... | |
void | resetFields () |
Reset the data accumulation field values to zero. More... | |
void | calculateFields () |
Calculate the volume field data. More... | |
DSMCCloud (const DSMCCloud &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const DSMCCloud &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const word | cloudName_ |
Cloud type - used to set the name of the parcel properties. More... | |
const fvMesh & | mesh_ |
References to the mesh and time databases. More... | |
IOdictionary | particleProperties_ |
Dictionary of particle properties. More... | |
List< word > | typeIdList_ |
A list of unique instances of molecule types in the. More... | |
scalar | nParticle_ |
Number of real atoms/molecules represented by a parcel. More... | |
List< DynamicList< ParcelType * > > | cellOccupancy_ |
A data structure holding which particles are in which cell. More... | |
volScalarField | sigmaTcRMax_ |
A field holding the value of (sigmaT * cR)max for each. More... | |
DimensionedField< scalar, volMesh > | collisionSelectionRemainder_ |
A field holding the remainder from the previous collision selections. More... | |
volScalarField | q_ |
Heat flux at surface field. More... | |
volVectorField | fD_ |
Force density at surface field. More... | |
volScalarField | rhoN_ |
Number density field. More... | |
volScalarField | rhoM_ |
Mass density field. More... | |
volScalarField | dsmcRhoN_ |
Dsmc particle density field. More... | |
volScalarField | linearKE_ |
Linear kinetic energy density field. More... | |
volScalarField | internalE_ |
Internal energy density field. More... | |
volScalarField | iDof_ |
volVectorField | momentum_ |
Momentum density field. More... | |
List< typename ParcelType::constantProperties > | constProps_ |
Parcel constant properties - one for each type. More... | |
Random | rndGen_ |
Random number generator. More... | |
volScalarField | boundaryT_ |
Boundary temperature. More... | |
volVectorField | boundaryU_ |
Boundary velocity. More... | |
autoPtr< BinaryCollisionModel< DSMCCloud< ParcelType > > > | binaryCollisionModel_ |
Binary collision model. More... | |
autoPtr< WallInteractionModel< DSMCCloud< ParcelType > > > | wallInteractionModel_ |
Wall interaction model. More... | |
autoPtr< InflowBoundaryModel< DSMCCloud< ParcelType > > > | inflowBoundaryModel_ |
Inflow boundary model. More... | |
Additional Inherited Members | |
![]() | |
static word | cloudPropertiesName |
Name of cloud properties dictionary. More... | |
Templated base class for dsmc cloud.
Definition at line 68 of file DSMCCloud.H.
typedef ParcelType parcelType |
Type of parcel the cloud was instantiated for.
Definition at line 217 of file DSMCCloud.H.
Construct given name and mesh, will read Parcels and fields from.
file
Definition at line 495 of file DSMCCloud.C.
DSMCCloud | ( | const word & | cloudName, |
const fvMesh & | mesh, | ||
const IOdictionary & | dsmcInitialiseDict | ||
) |
Construct given name, mesh and initialisation dictionary.
Definition at line 726 of file DSMCCloud.C.
|
virtual |
Destructor.
Definition at line 954 of file DSMCCloud.C.
|
private |
Build the constant properties for all of the species.
Definition at line 39 of file DSMCCloud.C.
|
private |
Record which particles are in which cell.
Definition at line 64 of file DSMCCloud.C.
|
private |
Initialise the system.
Definition at line 80 of file DSMCCloud.C.
|
private |
Calculate collisions between molecules.
Definition at line 216 of file DSMCCloud.C.
|
private |
Reset the data accumulation field values to zero.
Definition at line 387 of file DSMCCloud.C.
|
private |
Calculate the volume field data.
Definition at line 415 of file DSMCCloud.C.
|
inline |
Return the cloud type.
Definition at line 34 of file DSMCCloudI.H.
|
inline |
Return refernce to the mesh.
Definition at line 41 of file DSMCCloudI.H.
Referenced by Relaxation< CloudType >::cacheFields(), Implicit< CloudType >::cacheFields(), Explicit< CloudType >::cacheFields(), Stochastic< CloudType >::calculate(), SprayCloud< CloudType >::cloneBare(), MPPICCloud< CloudType >::cloneBare(), CollidingCloud< CloudType >::cloneBare(), ReactingCloud< CloudType >::cloneBare(), ReactingMultiphaseCloud< CloudType >::cloneBare(), ThermoCloud< CloudType >::cloneBare(), FacePostProcessing< CloudType >::FacePostProcessing(), PatchFlowRateInjection< CloudType >::flowRate(), InflationInjection< CloudType >::InflationInjection(), SurfaceFilmModel< CloudType >::inject(), InjectionModel< CloudType >::inject(), InjectionModel< CloudType >::InjectionModel(), InjectionModel< CloudType >::injectSteadyState(), InflationInjection< CloudType >::parcelsToInject(), ParticleErosion< CloudType >::ParticleErosion(), PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchInjection< CloudType >::PatchInjection(), PatchPostProcessing< CloudType >::PatchPostProcessing(), VoidFraction< CloudType >::postEvolve(), FacePostProcessing< CloudType >::postFace(), VoidFraction< CloudType >::preEvolve(), ParticleTrap< CloudType >::preEvolve(), ParticleErosion< CloudType >::preEvolve(), GradientDispersionRAS< CloudType >::update(), CellZoneInjection< CloudType >::updateMesh(), Implicit< CloudType >::velocityCorrection(), and Explicit< CloudType >::velocityCorrection().
|
inline |
Return particle properties dictionary.
Definition at line 49 of file DSMCCloudI.H.
|
inline |
Return the idList.
Definition at line 57 of file DSMCCloudI.H.
|
inline |
Return the number of real particles represented by one.
parcel
Definition at line 64 of file DSMCCloudI.H.
|
inline |
Return the cell occupancy addressing.
Definition at line 72 of file DSMCCloudI.H.
Referenced by InflationInjection< CloudType >::parcelsToInject().
|
inline |
Return the sigmaTcRMax field. non-const access to allow.
updating.
Definition at line 79 of file DSMCCloudI.H.
|
inline |
Return the collision selection remainder field. non-const.
access to allow updating.
Definition at line 87 of file DSMCCloudI.H.
|
inline |
Return all of the constant properties.
Definition at line 95 of file DSMCCloudI.H.
Referenced by PatchFlowRateInjection< CloudType >::volumeToInject().
|
inline |
Return the constant properties of the given typeId.
Definition at line 104 of file DSMCCloudI.H.
|
inline |
Return refernce to the random object.
Definition at line 121 of file DSMCCloudI.H.
Referenced by Stochastic< CloudType >::calculate(), ConeInjection< CloudType >::ConeInjection(), ConeNozzleInjection< CloudType >::ConeNozzleInjection(), PatchInjection< CloudType >::parcelsToInject(), InflationInjection< CloudType >::parcelsToInject(), Stochastic< CloudType >::sampleGauss(), KinematicLookupTableInjection< CloudType >::setPositionAndCell(), ReactingLookupTableInjection< CloudType >::setPositionAndCell(), ThermoLookupTableInjection< CloudType >::setPositionAndCell(), ReactingMultiphaseLookupTableInjection< CloudType >::setPositionAndCell(), ConeNozzleInjection< CloudType >::setPositionAndCell(), ConeInjection< CloudType >::setProperties(), ConeNozzleInjection< CloudType >::setProperties(), StochasticDispersionRAS< CloudType >::update(), GradientDispersionRAS< CloudType >::update(), TAB< CloudType >::update(), and SHF< CloudType >::update().
|
inline |
Return non-const heat flux boundary field reference.
Definition at line 129 of file DSMCCloudI.H.
|
inline |
Return non-const force density at boundary field reference.
Definition at line 137 of file DSMCCloudI.H.
|
inline |
Return non-const number density boundary field reference.
Definition at line 145 of file DSMCCloudI.H.
|
inline |
Return non-const mass density boundary field reference.
Definition at line 153 of file DSMCCloudI.H.
|
inline |
Return non-const linear kinetic energy density boundary.
field reference
Definition at line 161 of file DSMCCloudI.H.
|
inline |
Return non-const internal energy density boundary field.
reference
Definition at line 169 of file DSMCCloudI.H.
|
inline |
Return non-const internal degree of freedom density boundary.
field reference
Definition at line 177 of file DSMCCloudI.H.
|
inline |
Return non-const momentum density boundary field reference.
Definition at line 185 of file DSMCCloudI.H.
|
inline |
Return macroscopic temperature.
Definition at line 193 of file DSMCCloudI.H.
|
inline |
Return macroscopic velocity.
Definition at line 201 of file DSMCCloudI.H.
|
inline |
Return heat flux at surface field.
Definition at line 412 of file DSMCCloudI.H.
|
inline |
Return force density at surface field.
Definition at line 419 of file DSMCCloudI.H.
|
inline |
Return the real particle number density field.
Definition at line 427 of file DSMCCloudI.H.
|
inline |
Return the particle mass density field.
Definition at line 434 of file DSMCCloudI.H.
|
inline |
Return the field of number of DSMC particles.
Definition at line 442 of file DSMCCloudI.H.
|
inline |
Return the total linear kinetic energy (translational and.
thermal density field
Definition at line 450 of file DSMCCloudI.H.
|
inline |
Return the internal energy density field.
Definition at line 458 of file DSMCCloudI.H.
|
inline |
Return the average internal degrees of freedom field.
Definition at line 466 of file DSMCCloudI.H.
|
inline |
Return the momentum density field.
Definition at line 473 of file DSMCCloudI.H.
Foam::vector equipartitionLinearVelocity | ( | scalar | temperature, |
scalar | mass | ||
) |
Generate a random velocity sampled from the Maxwellian speed.
distribution
Definition at line 1035 of file DSMCCloud.C.
Foam::scalar equipartitionInternalEnergy | ( | scalar | temperature, |
direction | internalDegreesOfFreedom | ||
) |
Generate a random internal energy, sampled from the.
equilibrium distribution (Bird eqn 11.22 and 11.23 and adapting code from DSMC3.FOR)
Definition at line 1053 of file DSMCCloud.C.
|
inline |
Average particle speed.
Definition at line 338 of file DSMCCloudI.H.
|
inline |
Definition at line 350 of file DSMCCloudI.H.
|
inline |
RMS particle speed.
Definition at line 363 of file DSMCCloudI.H.
|
inline |
Definition at line 374 of file DSMCCloudI.H.
|
inline |
Most probable speed.
Definition at line 388 of file DSMCCloudI.H.
|
inline |
Definition at line 400 of file DSMCCloudI.H.
|
inline |
Return reference to binary elastic collision model.
Definition at line 209 of file DSMCCloudI.H.
|
inline |
Return non-const reference to binary elastic collision model.
|
inline |
Return reference to wall interaction model.
Definition at line 225 of file DSMCCloudI.H.
|
inline |
Return non-const reference to wall interaction model.
|
inline |
Return reference to wall interaction model.
Definition at line 241 of file DSMCCloudI.H.
|
inline |
Return non-const reference to wall interaction model.
|
inline |
Total mass in system.
Definition at line 256 of file DSMCCloudI.H.
|
inline |
Total linear momentum of the system.
Definition at line 277 of file DSMCCloudI.H.
|
inline |
Total linear kinetic energy in the system.
Definition at line 299 of file DSMCCloudI.H.
|
inline |
Total internal energy in the system.
Definition at line 321 of file DSMCCloudI.H.
void info |
Print cloud information.
Definition at line 991 of file DSMCCloud.C.
void dumpParticlePositions |
Dump particle positions to .obj file.
Definition at line 1089 of file DSMCCloud.C.
void addNewParcel | ( | const vector & | position, |
const vector & | U, | ||
const scalar | Ei, | ||
const label | cellI, | ||
const label | tetFaceI, | ||
const label | tetPtI, | ||
const label | typeId | ||
) |
Add new parcel.
Definition at line 465 of file DSMCCloud.C.
void evolve |
Evolve the cloud (move, collide)
Definition at line 961 of file DSMCCloud.C.
|
inline |
Clear the Cloud.
Definition at line 480 of file DSMCCloudI.H.
|
virtual |
Remap the particles to the correct cells following mesh change.
Reimplemented in KinematicCloud< CloudType >, ThermoCloud< CloudType >, ReactingCloud< CloudType >, and ReactingMultiphaseCloud< CloudType >.
Definition at line 1113 of file DSMCCloud.C.
|
private |
Cloud type - used to set the name of the parcel properties.
dictionary by appending "Properties"
Definition at line 77 of file DSMCCloud.H.
|
private |
References to the mesh and time databases.
Definition at line 80 of file DSMCCloud.H.
|
private |
Dictionary of particle properties.
Definition at line 83 of file DSMCCloud.H.
A list of unique instances of molecule types in the.
simulation. The position of an entry in the list maps to the label identifying the typeId, i.e. where typeIdList_ = (N2 O2 CO2) N2 has typeId label = 0, O2 = 1, CO2 = 2.
Definition at line 89 of file DSMCCloud.H.
|
private |
Number of real atoms/molecules represented by a parcel.
Definition at line 92 of file DSMCCloud.H.
|
private |
A data structure holding which particles are in which cell.
Definition at line 95 of file DSMCCloud.H.
|
private |
A field holding the value of (sigmaT * cR)max for each.
cell (see Bird p220). Initialised with the parcels, updated as required, and read in on start/restart.
Definition at line 100 of file DSMCCloud.H.
|
private |
A field holding the remainder from the previous collision selections.
Definition at line 103 of file DSMCCloud.H.
|
private |
Heat flux at surface field.
Definition at line 106 of file DSMCCloud.H.
|
private |
Force density at surface field.
Definition at line 109 of file DSMCCloud.H.
|
private |
Number density field.
Definition at line 112 of file DSMCCloud.H.
|
private |
Mass density field.
Definition at line 115 of file DSMCCloud.H.
|
private |
Dsmc particle density field.
Definition at line 118 of file DSMCCloud.H.
|
private |
Linear kinetic energy density field.
Definition at line 121 of file DSMCCloud.H.
|
private |
Internal energy density field.
Definition at line 124 of file DSMCCloud.H.
|
private |
Definition at line 127 of file DSMCCloud.H.
|
private |
Momentum density field.
Definition at line 130 of file DSMCCloud.H.
|
private |
Parcel constant properties - one for each type.
Definition at line 133 of file DSMCCloud.H.
|
private |
Random number generator.
Definition at line 136 of file DSMCCloud.H.
|
private |
Boundary temperature.
Definition at line 142 of file DSMCCloud.H.
|
private |
Boundary velocity.
Definition at line 145 of file DSMCCloud.H.
|
private |
Binary collision model.
Definition at line 152 of file DSMCCloud.H.
|
private |
Wall interaction model.
Definition at line 156 of file DSMCCloud.H.
|
private |
Inflow boundary model.
Definition at line 160 of file DSMCCloud.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.