CollidingCloud< CloudType > Class Template Reference

Adds coolisions to kinematic clouds. More...

Inheritance diagram for CollidingCloud< CloudType >:
[legend]
Collaboration diagram for CollidingCloud< CloudType >:
[legend]

Public Types

typedef CloudType cloudType
 Type of cloud this cloud was instantiated for. More...
 
typedef CloudType::particleType parcelType
 Type of parcel the cloud was instantiated for. More...
 
typedef CollidingCloud< CloudTypecollidingCloudType
 Convenience typedef for this cloud type. More...
 
- Public Types inherited from DSMCCloud< ParcelType >
typedef ParcelType parcelType
 Type of parcel the cloud was instantiated for. More...
 
- Public Types inherited from Cloud< ParticleType >
typedef ParticleType particleType
 
typedef ParticleType parcelType
 Parcels are just particles. More...
 

Public Member Functions

 CollidingCloud (const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, bool readFields=true)
 Construct given carrier gas fields. More...
 
 CollidingCloud (CollidingCloud< CloudType > &c, const word &name)
 Copy constructor with new name. More...
 
 CollidingCloud (const fvMesh &mesh, const word &name, const CollidingCloud< CloudType > &c)
 Copy constructor with new name - creates bare cloud. More...
 
virtual autoPtr< Cloud< parcelType > > clone (const word &name)
 Construct and return clone based on (this) with new name. More...
 
virtual autoPtr< Cloud< parcelType > > cloneBare (const word &name) const
 Construct and return bare clone based on (this) with new name. More...
 
virtual ~CollidingCloud ()
 Destructor. More...
 
const CollidingCloudcloudCopy () const
 Return a reference to the cloud copy. More...
 
const parcelType::constantProperties & constProps () const
 Return the constant properties. More...
 
const CollisionModel< CollidingCloud< CloudType > > & collision () const
 Return const access to the collision model. More...
 
CollisionModel< CollidingCloud< CloudType > > & collision ()
 Return reference to the collision model. More...
 
scalar rotationalKineticEnergyOfSystem () const
 Total rotational kinetic energy in the system. More...
 
void storeState ()
 Store the current cloud state. More...
 
void restoreState ()
 Reset the current cloud to the previously stored state. More...
 
void evolve ()
 Evolve the cloud. More...
 
template<class TrackCloudType >
void motion (TrackCloudType &cloud, typename parcelType::trackingData &td)
 Particle motion. More...
 
void info ()
 Print cloud information. More...
 
- Public Member Functions inherited from DSMCCloud< ParcelType >
 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 wordcloudName () const
 Return the cloud type. More...
 
const fvMeshmesh () const
 Return reference to the mesh. More...
 
const IOdictionaryparticleProperties () 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...
 
volScalarFieldsigmaTcRMax ()
 Return the sigmaTcRMax field. non-const access to allow. More...
 
scalarFieldcollisionSelectionRemainder ()
 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...
 
RandomrndGen ()
 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 volScalarFieldboundaryT () const
 Return macroscopic temperature. More...
 
const volVectorFieldboundaryU () const
 Return macroscopic velocity. More...
 
const volScalarFieldq () const
 Return heat flux at surface field. More...
 
const volVectorFieldfD () const
 Return force density at surface field. More...
 
const volScalarFieldrhoN () const
 Return the real particle number density field. More...
 
const volScalarFieldrhoM () const
 Return the particle mass density field. More...
 
const volScalarFielddsmcRhoN () const
 Return the field of number of DSMC particles. More...
 
const volScalarFieldlinearKE () const
 Return the total linear kinetic energy (translational and. More...
 
const volScalarFieldinternalE () const
 Return the internal energy density field. More...
 
const volScalarFieldiDof () const
 Return the average internal degrees of freedom field. More...
 
const volVectorFieldmomentum () 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...
 
- Public Member Functions inherited from Cloud< ParticleType >
 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 polyMeshpMesh () 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...
 
- Public Member Functions inherited from DSMCBaseCloud
 TypeName ("DSMCBaseCloud")
 Runtime type information. More...
 
 DSMCBaseCloud ()=default
 Null constructor. More...
 
virtual ~DSMCBaseCloud ()=default
 Destructor. More...
 

Protected Member Functions

void setModels ()
 Set cloud sub-models. More...
 
template<class TrackCloudType >
void moveCollide (TrackCloudType &cloud, typename parcelType::trackingData &td, const scalar deltaT)
 Move-collide particles. More...
 
void cloudReset (CollidingCloud< CloudType > &c)
 Reset state of cloud. More...
 

Protected Attributes

parcelType::constantProperties constProps_
 Thermo parcel constant properties. More...
 
autoPtr< CollisionModel< CollidingCloud< CloudType > > > collisionModel_
 Collision model. More...
 
- Protected Attributes inherited from Cloud< ParticleType >
cloud::geometryType geometryType_
 Geometry type. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Cloud< ParticleType >
static word cloudPropertiesName
 Name of cloud properties dictionary. More...
 

Detailed Description

template<class CloudType>
class Foam::CollidingCloud< CloudType >

Adds coolisions to kinematic clouds.

Source files

Definition at line 65 of file CollidingCloud.H.

Member Typedef Documentation

◆ cloudType

Type of cloud this cloud was instantiated for.

Definition at line 74 of file CollidingCloud.H.

◆ parcelType

Type of parcel the cloud was instantiated for.

Definition at line 77 of file CollidingCloud.H.

◆ collidingCloudType

Convenience typedef for this cloud type.

Definition at line 80 of file CollidingCloud.H.

Constructor & Destructor Documentation

◆ CollidingCloud() [1/3]

CollidingCloud ( const word cloudName,
const volScalarField rho,
const volVectorField U,
const volScalarField mu,
const dimensionedVector g,
bool  readFields = true 
)

Construct given carrier gas fields.

Definition at line 89 of file CollidingCloud.C.

◆ CollidingCloud() [2/3]

CollidingCloud ( CollidingCloud< CloudType > &  c,
const word name 
)

Copy constructor with new name.

Definition at line 128 of file CollidingCloud.C.

◆ CollidingCloud() [3/3]

CollidingCloud ( const fvMesh mesh,
const word name,
const CollidingCloud< CloudType > &  c 
)

Copy constructor with new name - creates bare cloud.

Definition at line 140 of file CollidingCloud.C.

◆ ~CollidingCloud()

~CollidingCloud ( )
virtual

Destructor.

Definition at line 154 of file CollidingCloud.C.

Member Function Documentation

◆ setModels()

void setModels ( )
protected

Set cloud sub-models.

Definition at line 35 of file CollidingCloud.C.

◆ moveCollide()

void moveCollide ( TrackCloudType &  cloud,
typename parcelType::trackingData &  td,
const scalar  deltaT 
)
protected

Move-collide particles.

Definition at line 51 of file CollidingCloud.C.

◆ cloudReset()

void cloudReset ( CollidingCloud< CloudType > &  c)
protected

Reset state of cloud.

Definition at line 77 of file CollidingCloud.C.

◆ clone()

virtual autoPtr<Cloud<parcelType> > clone ( const word name)
inlinevirtual

Construct and return clone based on (this) with new name.

Definition at line 167 of file CollidingCloud.H.

◆ cloneBare()

virtual autoPtr<Cloud<parcelType> > cloneBare ( const word name) const
inlinevirtual

Construct and return bare clone based on (this) with new name.

Definition at line 176 of file CollidingCloud.H.

◆ cloudCopy()

const Foam::CollidingCloud< CloudType > & cloudCopy ( ) const
inline

Return a reference to the cloud copy.

Definition at line 33 of file CollidingCloudI.H.

◆ constProps()

const CloudType::particleType::constantProperties & constProps ( ) const
inline

Return the constant properties.

Definition at line 41 of file CollidingCloudI.H.

◆ collision() [1/2]

const Foam::CollisionModel< Foam::CollidingCloud< CloudType > > & collision ( ) const
inline

Return const access to the collision model.

Definition at line 49 of file CollidingCloudI.H.

◆ collision() [2/2]

Foam::CollisionModel< Foam::CollidingCloud< CloudType > > & collision ( )
inline

Return reference to the collision model.

Definition at line 57 of file CollidingCloudI.H.

◆ rotationalKineticEnergyOfSystem()

Foam::scalar rotationalKineticEnergyOfSystem ( ) const
inline

Total rotational kinetic energy in the system.

Definition at line 65 of file CollidingCloudI.H.

◆ storeState()

void storeState ( )

Store the current cloud state.

Definition at line 161 of file CollidingCloud.C.

◆ restoreState()

void restoreState ( )

Reset the current cloud to the previously stored state.

Definition at line 174 of file CollidingCloud.C.

◆ evolve()

void evolve ( )

Evolve the cloud.

Definition at line 182 of file CollidingCloud.C.

◆ motion()

void motion ( TrackCloudType &  cloud,
typename parcelType::trackingData &  td 
)

Particle motion.

Definition at line 196 of file CollidingCloud.C.

◆ info()

void info ( )

Print cloud information.

Definition at line 234 of file CollidingCloud.C.

Member Data Documentation

◆ constProps_

parcelType::constantProperties constProps_
protected

Thermo parcel constant properties.

Definition at line 105 of file CollidingCloud.H.

◆ collisionModel_

autoPtr<CollisionModel<CollidingCloud<CloudType> > > collisionModel_
protected

Collision model.

Definition at line 112 of file CollidingCloud.H.


The documentation for this class was generated from the following files: