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 ParticleType | parcelType |
Parcels are just particles. More... | |
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 reference 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 reference to the random object. More... | |
volScalarField::Boundary & | qBF () |
Return non-const heat flux boundary field reference. More... | |
volVectorField::Boundary & | fDBF () |
Return non-const force density at boundary field reference. More... | |
volScalarField::Boundary & | rhoNBF () |
Return non-const number density boundary field reference. More... | |
volScalarField::Boundary & | rhoMBF () |
Return non-const mass density boundary field reference. More... | |
volScalarField::Boundary & | linearKEBF () |
Return non-const linear kinetic energy density boundary. More... | |
volScalarField::Boundary & | internalEBF () |
Return non-const internal energy density boundary field. More... | |
volScalarField::Boundary & | iDofBF () |
Return non-const internal degree of freedom density boundary. More... | |
volVectorField::Boundary & | 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 label celli, const vector &U, const scalar Ei, 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 word &cloudName, const IDLList< ParticleType > &particles) | |
Construct from mesh and a list of particles. 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... | |
virtual label | nParcels () const |
Return the number of particles in the cloud. More... | |
DynamicList< label > & | labels () const |
Return temporary addressing. More... | |
void | addParticle (ParticleType *pPtr) |
Transfer particle to cloud. More... | |
void | deleteParticle (ParticleType &p) |
Remove particle from cloud and delete. More... | |
void | deleteLostParticles () |
Remove lost particles from cloud and delete. More... | |
void | cloudReset (const Cloud< ParticleType > &c) |
Reset the particles. More... | |
template<class TrackCloudType > | |
void | move (TrackCloudType &cloud, typename ParticleType::trackingData &td, const scalar trackTime) |
Move the particles. More... | |
void | autoMap (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... | |
template<class DataType > | |
void | checkFieldIOobject (const Cloud< ParticleType > &c, const IOField< DataType > &data) const |
Check lagrangian data field. More... | |
template<class DataType > | |
void | checkFieldFieldIOobject (const Cloud< ParticleType > &c, const CompactIOField< Field< DataType >, DataType > &data) const |
Check lagrangian data fieldfield. More... | |
template<class Type > | |
bool | readStoreFile (const IOobject &io, const IOobject &ioNew) const |
Helper function to store a cloud field on its registry. More... | |
void | readFromFiles (objectRegistry &obr, const wordRes &selectFields) const |
Read from files into objectRegistry. More... | |
virtual void | writeFields () const |
Write the field data for the cloud of particles Dummy at. More... | |
virtual bool | writeObject (IOstreamOption streamOpt, const bool valid) const |
Write using stream options. More... | |
void | writePositions () const |
Write positions to <cloudName>_positions.obj file. More... | |
void | storeGlobalPositions () const |
Call this before a topology change. More... | |
![]() | |
TypeName ("DSMCBaseCloud") | |
Runtime type information. More... | |
DSMCBaseCloud ()=default | |
Null constructor. More... | |
virtual | ~DSMCBaseCloud ()=default |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
static word | cloudPropertiesName |
Name of cloud properties dictionary. More... | |
![]() | |
cloud::geometryType | geometryType_ |
Geometry type. More... | |
Templated base class for dsmc cloud.
Definition at line 71 of file DSMCCloud.H.
typedef ParcelType parcelType |
Type of parcel the cloud was instantiated for.
Definition at line 220 of file DSMCCloud.H.
Construct given name and mesh, will read Parcels and fields from.
file
Definition at line 459 of file DSMCCloud.C.
References forAll, and Foam::readFields().
DSMCCloud | ( | const word & | cloudName, |
const fvMesh & | mesh, | ||
const IOdictionary & | dsmcInitialiseDict | ||
) |
Construct given name, mesh and initialisation dictionary.
Definition at line 690 of file DSMCCloud.C.
References clear().
|
virtual |
Destructor.
Definition at line 903 of file DSMCCloud.C.
|
inline |
Return the cloud type.
Definition at line 37 of file DSMCCloudI.H.
|
inline |
Return reference to the mesh.
Definition at line 44 of file DSMCCloudI.H.
Referenced by Relaxation< CloudType >::cacheFields(), Implicit< CloudType >::cacheFields(), Explicit< CloudType >::cacheFields(), Stochastic< CloudType >::calculate(), ReactingHeterogeneousCloud< Foam::DSMCCloud >::cloneBare(), MPPICCloud< Foam::DSMCCloud >::cloneBare(), CollidingCloud< KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::cloneBare(), ReactingCloud< Foam::DSMCCloud >::cloneBare(), ReactingMultiphaseCloud< Foam::DSMCCloud >::cloneBare(), ThermoCloud< Foam::DSMCCloud >::cloneBare(), CloudFunctionObject< CloudType >::CloudFunctionObject(), FaceInteraction< CloudType >::FaceInteraction(), FacePostProcessing< CloudType >::FacePostProcessing(), PatchFlowRateInjection< CloudType >::flowRate(), InflationInjection< CloudType >::InflationInjection(), SurfaceFilmModel< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::inject(), InjectionModel< CloudType >::inject(), InjectionModel< CloudType >::InjectionModel(), SurfaceFilmModel< Foam::KinematicCloud< Cloud< basicKinematicCollidingParcel > > >::injectParticles(), InjectionModel< CloudType >::injectSteadyState(), InflationInjection< CloudType >::parcelsToInject(), ParticleErosion< CloudType >::ParticleErosion(), PatchFlowRateInjection< CloudType >::PatchFlowRateInjection(), PatchInjection< CloudType >::PatchInjection(), PatchParticleHistogram< CloudType >::PatchParticleHistogram(), PatchPostProcessing< CloudType >::PatchPostProcessing(), VoidFraction< CloudType >::postEvolve(), FacePostProcessing< CloudType >::postFace(), RemoveParcels< CloudType >::postFace(), FaceInteraction< CloudType >::postFace(), PatchCollisionDensity< CloudType >::postPatch(), VoidFraction< CloudType >::preEvolve(), ParticleTrap< CloudType >::preEvolve(), RemoveParcels< CloudType >::RemoveParcels(), GradientDispersionRAS< CloudType >::update(), CellZoneInjection< CloudType >::updateMesh(), and Implicit< CloudType >::velocityCorrection().
|
inline |
Return particle properties dictionary.
Definition at line 52 of file DSMCCloudI.H.
|
inline |
Return the idList.
Definition at line 60 of file DSMCCloudI.H.
|
inline |
Return the number of real particles represented by one.
parcel
Definition at line 67 of file DSMCCloudI.H.
|
inline |
Return the cell occupancy addressing.
Definition at line 75 of file DSMCCloudI.H.
Referenced by InflationInjection< CloudType >::parcelsToInject().
|
inline |
Return the sigmaTcRMax field. non-const access to allow.
updating.
Definition at line 82 of file DSMCCloudI.H.
|
inline |
Return the collision selection remainder field. non-const.
access to allow updating.
Definition at line 90 of file DSMCCloudI.H.
|
inline |
Return all of the constant properties.
Definition at line 98 of file DSMCCloudI.H.
Referenced by InjectedParticleDistributionInjection< CloudType >::InjectedParticleDistributionInjection(), InjectedParticleInjection< CloudType >::InjectedParticleInjection(), and PatchFlowRateInjection< CloudType >::volumeToInject().
|
inline |
Return the constant properties of the given typeId.
Definition at line 107 of file DSMCCloudI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
|
inline |
Return reference to the random object.
Definition at line 124 of file DSMCCloudI.H.
Referenced by BrownianMotionForce< CloudType >::calcCoupled(), Stochastic< CloudType >::calculate(), ConeInjection< CloudType >::ConeInjection(), PatchFlowRateInjection< CloudType >::parcelsToInject(), InflationInjection< CloudType >::parcelsToInject(), PatchInjection< CloudType >::parcelsToInject(), ReactingLookupTableInjection< CloudType >::setPositionAndCell(), ThermoLookupTableInjection< CloudType >::setPositionAndCell(), ReactingMultiphaseLookupTableInjection< CloudType >::setPositionAndCell(), ConeInjection< CloudType >::setPositionAndCell(), KinematicLookupTableInjection< CloudType >::setPositionAndCell(), InjectedParticleDistributionInjection< 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 132 of file DSMCCloudI.H.
|
inline |
Return non-const force density at boundary field reference.
Definition at line 140 of file DSMCCloudI.H.
|
inline |
Return non-const number density boundary field reference.
Definition at line 148 of file DSMCCloudI.H.
|
inline |
Return non-const mass density boundary field reference.
Definition at line 156 of file DSMCCloudI.H.
|
inline |
Return non-const linear kinetic energy density boundary.
field reference
Definition at line 164 of file DSMCCloudI.H.
|
inline |
Return non-const internal energy density boundary field.
reference
Definition at line 172 of file DSMCCloudI.H.
|
inline |
Return non-const internal degree of freedom density boundary.
field reference
Definition at line 180 of file DSMCCloudI.H.
|
inline |
Return non-const momentum density boundary field reference.
Definition at line 188 of file DSMCCloudI.H.
|
inline |
Return macroscopic temperature.
Definition at line 196 of file DSMCCloudI.H.
|
inline |
Return macroscopic velocity.
Definition at line 204 of file DSMCCloudI.H.
|
inline |
Return heat flux at surface field.
Definition at line 407 of file DSMCCloudI.H.
|
inline |
Return force density at surface field.
Definition at line 414 of file DSMCCloudI.H.
|
inline |
Return the real particle number density field.
Definition at line 422 of file DSMCCloudI.H.
|
inline |
Return the particle mass density field.
Definition at line 429 of file DSMCCloudI.H.
|
inline |
Return the field of number of DSMC particles.
Definition at line 437 of file DSMCCloudI.H.
|
inline |
Return the total linear kinetic energy (translational and.
thermal density field
Definition at line 445 of file DSMCCloudI.H.
|
inline |
Return the internal energy density field.
Definition at line 453 of file DSMCCloudI.H.
|
inline |
Return the average internal degrees of freedom field.
Definition at line 461 of file DSMCCloudI.H.
|
inline |
Return the momentum density field.
Definition at line 468 of file DSMCCloudI.H.
Foam::vector equipartitionLinearVelocity | ( | scalar | temperature, |
scalar | mass | ||
) |
Generate a random velocity sampled from the Maxwellian speed.
distribution
Definition at line 984 of file DSMCCloud.C.
References Foam::constant::physicoChemical::k, and Foam::sqrt().
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 997 of file DSMCCloud.C.
References Foam::exp(), Foam::constant::physicoChemical::k, Foam::log(), Foam::pow(), and dimensioned< Type >::value().
|
inline |
Average particle speed.
Definition at line 333 of file DSMCCloudI.H.
References Foam::constant::physicoChemical::k, Foam::constant::mathematical::pi(), and Foam::sqrt().
|
inline |
Definition at line 345 of file DSMCCloudI.H.
References Foam::constant::physicoChemical::k, Foam::constant::mathematical::pi(), and Foam::sqrt().
|
inline |
RMS particle speed.
Definition at line 358 of file DSMCCloudI.H.
References Foam::constant::physicoChemical::k, and Foam::sqrt().
|
inline |
Definition at line 369 of file DSMCCloudI.H.
References Foam::constant::physicoChemical::k, and Foam::sqrt().
|
inline |
Most probable speed.
Definition at line 383 of file DSMCCloudI.H.
References Foam::constant::physicoChemical::k, and Foam::sqrt().
|
inline |
Definition at line 395 of file DSMCCloudI.H.
References Foam::constant::physicoChemical::k, and Foam::sqrt().
|
inline |
Return reference to binary elastic collision model.
Definition at line 212 of file DSMCCloudI.H.
|
inline |
Return non-const reference to binary elastic collision model.
Definition at line 220 of file DSMCCloudI.H.
|
inline |
Return reference to wall interaction model.
Definition at line 228 of file DSMCCloudI.H.
|
inline |
Return non-const reference to wall interaction model.
Definition at line 236 of file DSMCCloudI.H.
|
inline |
Return reference to wall interaction model.
Definition at line 244 of file DSMCCloudI.H.
|
inline |
Return non-const reference to wall interaction model.
Definition at line 252 of file DSMCCloudI.H.
|
inline |
|
inline |
Total linear momentum of the system.
Definition at line 278 of file DSMCCloudI.H.
References p, and Foam::Zero.
|
inline |
Total linear kinetic energy in the system.
Definition at line 298 of file DSMCCloudI.H.
References p.
|
inline |
void info | ( | ) | const |
Print cloud information.
Definition at line 940 of file DSMCCloud.C.
References Foam::endl(), Foam::Info, Foam::mag(), Foam::name(), Foam::nl, Foam::reduce(), and Foam::returnReduce().
void dumpParticlePositions | ( | ) | const |
Dump particle positions to .obj file.
Definition at line 1032 of file DSMCCloud.C.
References OSstream::flush(), Foam::name(), Foam::nl, p, path(), and timeName.
void evolve | ( | ) |
Evolve the cloud (move, collide)
Definition at line 910 of file DSMCCloud.C.
References Foam::expressions::patchExpr::debug, and Cloud< ParticleType >::move().
|
inline |
Clear the Cloud.
Definition at line 475 of file DSMCCloudI.H.
References ILList< LListBase, T >::clear().
|
virtual |
Remap the particles to the correct cells following mesh change.
Reimplemented in KinematicCloud< CloudType >, ThermoCloud< CloudType >, ThermoCloud< Foam::DSMCCloud >, ReactingCloud< CloudType >, ReactingCloud< Foam::DSMCCloud >, ReactingMultiphaseCloud< CloudType >, ReactingMultiphaseCloud< Foam::DSMCCloud >, ReactingHeterogeneousCloud< CloudType >, and ReactingHeterogeneousCloud< Foam::DSMCCloud >.
Definition at line 1054 of file DSMCCloud.C.
References Cloud< ParticleType >::autoMap().