Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
MPPICCloud< CloudType > Class Template Reference

Adds MPPIC modelling to kinematic clouds. More...

Inheritance diagram for MPPICCloud< CloudType >:
Inheritance graph
[legend]
Collaboration diagram for MPPICCloud< CloudType >:
Collaboration graph
[legend]

Public Types

typedef CloudType cloudType
 Type of cloud this cloud was instantiated for. More...
 
typedef CloudType::parcelType parcelType
 Type of parcel the cloud was instantiated for. More...
 
typedef MPPICCloud< CloudTypeMPPICCloudType
 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< ParcelType >
typedef ParticleType particleType
 
typedef IDLList< ParticleType >::iterator iterator
 
typedef IDLList< ParticleType >::const_iterator const_iterator
 

Public Member Functions

 MPPICCloud (const word &cloudName, const volScalarField &rho, const volVectorField &U, const volScalarField &mu, const dimensionedVector &g, bool readFields=true)
 Construct given carrier gas fields. More...
 
 MPPICCloud (MPPICCloud< CloudType > &c, const word &name)
 Copy constructor with new name. More...
 
 MPPICCloud (const fvMesh &mesh, const word &name, const MPPICCloud< 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 ~MPPICCloud ()
 Destructor. More...
 
const MPPICCloudcloudCopy () const
 Return a reference to the cloud copy. More...
 
const PackingModel< MPPICCloud< CloudType > > & packingModel () const
 Return const access to the packing model. More...
 
PackingModel< MPPICCloud< CloudType > > & packingModel ()
 Return a reference to the packing model. More...
 
const DampingModel< MPPICCloud< CloudType > > & dampingModel () const
 Return condt access to the damping model. More...
 
DampingModel< MPPICCloud< CloudType > > & dampingModel ()
 Return a reference to the damping model. More...
 
const IsotropyModel< MPPICCloud< CloudType > > & isotropyModel () const
 Return condt access to the isotropy model. More...
 
IsotropyModel< MPPICCloud< CloudType > > & isotropyModel ()
 Return a reference to the isotropy model. 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 TrackData >
void motion (TrackData &td)
 Particle motion. More...
 
void info ()
 I-O. 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 refernce 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 refernce to the random object. More...
 
volScalarField::GeometricBoundaryFieldqBF ()
 Return non-const heat flux boundary field reference. More...
 
volVectorField::GeometricBoundaryFieldfDBF ()
 Return non-const force density at boundary field reference. More...
 
volScalarField::GeometricBoundaryFieldrhoNBF ()
 Return non-const number density boundary field reference. More...
 
volScalarField::GeometricBoundaryFieldrhoMBF ()
 Return non-const mass density boundary field reference. More...
 
volScalarField::GeometricBoundaryFieldlinearKEBF ()
 Return non-const linear kinetic energy density boundary. More...
 
volScalarField::GeometricBoundaryFieldinternalEBF ()
 Return non-const internal energy density boundary field. More...
 
volScalarField::GeometricBoundaryFieldiDofBF ()
 Return non-const internal degree of freedom density boundary. More...
 
volVectorField::GeometricBoundaryFieldmomentumBF ()
 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 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...
 
- Public Member Functions inherited from Cloud< ParcelType >
 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 polyMeshpMesh () 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 PackedBoolListcellHasWallFaces () 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...
 
- Public Member Functions inherited from DSMCBaseCloud
 TypeName ("DSMCBaseCloud")
 Runtime type information. More...
 
 DSMCBaseCloud ()
 Null constructor. More...
 
virtual ~DSMCBaseCloud ()
 Destructor. More...
 

Protected Member Functions

void setModels ()
 Set cloud sub-models. More...
 

Protected Attributes

autoPtr< PackingModel< MPPICCloud< CloudType > > > packingModel_
 Packing model. More...
 
autoPtr< DampingModel< MPPICCloud< CloudType > > > dampingModel_
 Damping model. More...
 
autoPtr< IsotropyModel< MPPICCloud< CloudType > > > isotropyModel_
 Exchange model. More...
 

Private Member Functions

 MPPICCloud (const MPPICCloud &)
 Disallow default bitwise copy construct. More...
 
void operator= (const MPPICCloud &)
 Disallow default bitwise assignment. More...
 

Private Attributes

autoPtr< MPPICCloud< CloudType > > cloudCopyPtr_
 Cloud copy pointer. More...
 

Additional Inherited Members

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

Detailed Description

template<class CloudType>
class Foam::MPPICCloud< CloudType >

Adds MPPIC modelling to kinematic clouds.

Source files

Definition at line 66 of file MPPICCloud.H.

Member Typedef Documentation

◆ cloudType

Type of cloud this cloud was instantiated for.

Definition at line 75 of file MPPICCloud.H.

◆ parcelType

Type of parcel the cloud was instantiated for.

Definition at line 78 of file MPPICCloud.H.

◆ MPPICCloudType

Convenience typedef for this cloud type.

Definition at line 81 of file MPPICCloud.H.

Constructor & Destructor Documentation

◆ MPPICCloud() [1/4]

MPPICCloud ( const MPPICCloud< CloudType > &  )
private

Disallow default bitwise copy construct.

Referenced by MPPICCloud< CloudType >::clone(), and MPPICCloud< CloudType >::cloneBare().

Here is the caller graph for this function:

◆ MPPICCloud() [2/4]

MPPICCloud ( 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 69 of file MPPICCloud.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and readFields().

Here is the call graph for this function:

◆ MPPICCloud() [3/4]

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

Copy constructor with new name.

Definition at line 104 of file MPPICCloud.C.

◆ MPPICCloud() [4/4]

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

Copy constructor with new name - creates bare cloud.

Definition at line 118 of file MPPICCloud.C.

◆ ~MPPICCloud()

~MPPICCloud
virtual

Destructor.

Definition at line 134 of file MPPICCloud.C.

Member Function Documentation

◆ operator=()

void operator= ( const MPPICCloud< CloudType > &  )
private

Disallow default bitwise assignment.

◆ setModels()

void setModels
protected

Set cloud sub-models.

Definition at line 36 of file MPPICCloud.C.

References Foam::compressible::New().

Here is the call graph for this function:

◆ clone()

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

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

Definition at line 156 of file MPPICCloud.H.

References MPPICCloud< CloudType >::MPPICCloud(), and Foam::name().

Here is the call graph for this function:

◆ 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 165 of file MPPICCloud.H.

References DSMCCloud< ParcelType >::mesh(), and MPPICCloud< CloudType >::MPPICCloud().

Here is the call graph for this function:

◆ cloudCopy()

const Foam::MPPICCloud< CloudType > & cloudCopy
inline

Return a reference to the cloud copy.

Definition at line 30 of file MPPICCloudI.H.

◆ packingModel() [1/2]

Foam::PackingModel< Foam::MPPICCloud< CloudType > > & packingModel
inline

Return const access to the packing model.

Definition at line 38 of file MPPICCloudI.H.

◆ packingModel() [2/2]

PackingModel<MPPICCloud<CloudType> >& packingModel ( )
inline

Return a reference to the packing model.

◆ dampingModel() [1/2]

Foam::DampingModel< Foam::MPPICCloud< CloudType > > & dampingModel
inline

Return condt access to the damping model.

Definition at line 54 of file MPPICCloudI.H.

◆ dampingModel() [2/2]

DampingModel<MPPICCloud<CloudType> >& dampingModel ( )
inline

Return a reference to the damping model.

◆ isotropyModel() [1/2]

Foam::IsotropyModel< Foam::MPPICCloud< CloudType > > & isotropyModel
inline

Return condt access to the isotropy model.

Definition at line 70 of file MPPICCloudI.H.

◆ isotropyModel() [2/2]

IsotropyModel<MPPICCloud<CloudType> >& isotropyModel ( )
inline

Return a reference to the isotropy model.

◆ storeState()

void storeState

Store the current cloud state.

Definition at line 141 of file MPPICCloud.C.

References Foam::name().

Here is the call graph for this function:

◆ restoreState()

void restoreState

Reset the current cloud to the previously stored state.

Definition at line 154 of file MPPICCloud.C.

◆ evolve()

void evolve

Evolve the cloud.

Definition at line 162 of file MPPICCloud.C.

References solve().

Here is the call graph for this function:

◆ motion()

void motion ( TrackData &  td)

Particle motion.

Definition at line 176 of file MPPICCloud.C.

◆ info()

void info

I-O.

Print cloud information

Definition at line 260 of file MPPICCloud.C.

References Foam::constant::atomic::alpha, alphaMax(), cellOccupancy, cells, Foam::endl(), forAll, Foam::gMax(), Foam::gMin(), Foam::Info, internalField(), mesh, n, and Foam::reduce().

Here is the call graph for this function:

Field Documentation

◆ cloudCopyPtr_

autoPtr<MPPICCloud<CloudType> > cloudCopyPtr_
private

Cloud copy pointer.

Definition at line 89 of file MPPICCloud.H.

◆ packingModel_

autoPtr<PackingModel<MPPICCloud<CloudType> > > packingModel_
protected

Packing model.

Definition at line 108 of file MPPICCloud.H.

◆ dampingModel_

autoPtr<DampingModel<MPPICCloud<CloudType> > > dampingModel_
protected

Damping model.

Definition at line 112 of file MPPICCloud.H.

◆ isotropyModel_

autoPtr<IsotropyModel<MPPICCloud<CloudType> > > isotropyModel_
protected

Exchange model.

Definition at line 116 of file MPPICCloud.H.


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