Public Member Functions | Private Member Functions | Private Attributes
moleculeCloud Class Reference
Inheritance diagram for moleculeCloud:
Inheritance graph
[legend]
Collaboration diagram for moleculeCloud:
Collaboration graph
[legend]

Public Member Functions

 moleculeCloud (const polyMesh &mesh, const potential &pot, bool readFields=true)
 Construct given mesh and potential references. More...
 
 moleculeCloud (const polyMesh &mesh, const potential &pot, const IOdictionary &mdInitialiseDict, bool readFields=true)
 Construct given mesh, potential and mdInitialiseDict. More...
 
void evolve ()
 Evolve the molecules (move, calculate forces, control state etc) More...
 
void calculateForce ()
 
void applyConstraintsAndThermostats (const scalar targetTemperature, const scalar measuredTemperature)
 
const polyMeshmesh () const
 
const potentialpot () const
 
const List< DynamicList< molecule * > > & cellOccupancy () const
 
const InteractionLists< molecule > & il () const
 
const List< molecule::constantPropertiesconstProps () const
 
const molecule::constantPropertiesconstProps (label id) const
 
RandomrndGen ()
 
void writeXYZ (const fileName &fName) const
 Write molecule sites in XYZ format. More...
 
- Public Member Functions inherited from Cloud
 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
 
const const_iterator cbegin () const
 
const const_iterator end () const
 
const const_iterator cend () const
 
iterator begin ()
 
iterator end ()
 
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...
 
template<class TrackData >
void move (TrackData &td, const scalar trackTime)
 Move the particles. More...
 
template<class TrackData >
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...
 
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...
 
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...
 

Private Member Functions

void buildConstProps ()
 
void setSiteSizesAndPositions ()
 
void buildCellOccupancy ()
 Determine which molecules are in which cells. More...
 
void calculatePairForce ()
 
void evaluatePair (molecule &molI, molecule &molJ)
 
bool evaluatePotentialLimit (molecule &molI, molecule &molJ) const
 
void calculateTetherForce ()
 
void calculateExternalForce ()
 
void removeHighEnergyOverlaps ()
 
void initialiseMolecules (const IOdictionary &mdInitialiseDict)
 
void createMolecule (const point &position, label cell, label tetFace, label tetPt, label id, bool tethered, scalar temperature, const vector &bulkVelocity)
 
label nSites () const
 
vector equipartitionLinearVelocity (scalar temperature, scalar mass)
 
vector equipartitionAngularMomentum (scalar temperature, const molecule::constantProperties &cP)
 
 moleculeCloud (const moleculeCloud &)
 Disallow default bitwise copy construct. More...
 
void operator= (const moleculeCloud &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const polyMeshmesh_
 
const potentialpot_
 
List< DynamicList< molecule * > > cellOccupancy_
 
InteractionLists< moleculeil_
 
List< molecule::constantPropertiesconstPropList_
 
Random rndGen_
 

Additional Inherited Members

- Public Types inherited from Cloud
typedef ParticleType particleType
 
typedef IDLList< ParticleType >::iterator iterator
 
typedef IDLList< ParticleType >::const_iterator const_iterator
 
- Static Public Attributes inherited from Cloud
static word cloudPropertiesName
 Name of cloud properties dictionary. More...
 

Detailed Description

Source files

Definition at line 56 of file moleculeCloud.H.

Constructor & Destructor Documentation

◆ moleculeCloud() [1/3]

moleculeCloud ( const moleculeCloud )
private

Disallow default bitwise copy construct.

◆ moleculeCloud() [2/3]

moleculeCloud ( const polyMesh mesh,
const potential pot,
bool  readFields = true 
)

Construct given mesh and potential references.

Definition at line 1103 of file moleculeCloud.C.

References molecule::readFields().

Here is the call graph for this function:

◆ moleculeCloud() [3/3]

moleculeCloud ( const polyMesh mesh,
const potential pot,
const IOdictionary mdInitialiseDict,
bool  readFields = true 
)

Construct given mesh, potential and mdInitialiseDict.

Definition at line 1133 of file moleculeCloud.C.

References clear(), and molecule::readFields().

Here is the call graph for this function:

Member Function Documentation

◆ buildConstProps()

void buildConstProps ( )
private

◆ setSiteSizesAndPositions()

void setSiteSizesAndPositions ( )
private

Definition at line 96 of file moleculeCloud.C.

References forAllIter, and molecule::constantProperties::nSites().

Here is the call graph for this function:

◆ buildCellOccupancy()

void buildCellOccupancy ( )
private

Determine which molecules are in which cells.

Definition at line 109 of file moleculeCloud.C.

References forAll, and forAllIter.

◆ calculatePairForce()

void calculatePairForce ( )
private

Definition at line 128 of file moleculeCloud.C.

References cellOccupancy, forAll, forAllIter, UPstream::nonBlocking, and UPstream::nRequests().

Here is the call graph for this function:

◆ evaluatePair()

void evaluatePair ( molecule molI,
molecule molJ 
)
inlineprivate

◆ evaluatePotentialLimit()

bool evaluatePotentialLimit ( molecule molI,
molecule molJ 
) const
inlineprivate

◆ calculateTetherForce()

void calculateTetherForce ( )
private

Definition at line 216 of file moleculeCloud.C.

References tetherPotentialList::energy(), forAllIter, and tetherPotentialList::force().

Here is the call graph for this function:

◆ calculateExternalForce()

void calculateExternalForce ( )
private

Definition at line 243 of file moleculeCloud.C.

References forAllIter.

◆ removeHighEnergyOverlaps()

void removeHighEnergyOverlaps ( )
private

◆ initialiseMolecules()

void initialiseMolecules ( const IOdictionary mdInitialiseDict)
private

◆ createMolecule()

void createMolecule ( const point position,
label  cell,
label  tetFace,
label  tetPt,
label  id,
bool  tethered,
scalar  temperature,
const vector bulkVelocity 
)
private

◆ nSites()

Foam::label nSites ( ) const
private

Definition at line 1087 of file moleculeCloud.C.

References forAllConstIter(), and n.

Here is the call graph for this function:

◆ equipartitionLinearVelocity()

Foam::vector equipartitionLinearVelocity ( scalar  temperature,
scalar  mass 
)
inlineprivate

Definition at line 299 of file moleculeCloudI.H.

References Foam::constant::physicoChemical::k, and Foam::sqrt().

Here is the call graph for this function:

◆ equipartitionAngularMomentum()

Foam::vector equipartitionAngularMomentum ( scalar  temperature,
const molecule::constantProperties cP 
)
inlineprivate

◆ operator=()

void operator= ( const moleculeCloud )
private

Disallow default bitwise assignment.

◆ evolve()

void evolve ( )

Evolve the molecules (move, calculate forces, control state etc)

Definition at line 1162 of file moleculeCloud.C.

References Cloud::move().

Here is the call graph for this function:

◆ calculateForce()

void calculateForce ( )

Definition at line 1180 of file moleculeCloud.C.

References forAllIter, Tensor::zero, and Vector< scalar >::zero.

◆ applyConstraintsAndThermostats()

void applyConstraintsAndThermostats ( const scalar  targetTemperature,
const scalar  measuredTemperature 
)

Definition at line 1203 of file moleculeCloud.C.

References Foam::endl(), forAllIter, Foam::Info, Foam::max(), Foam::nl, and Foam::sqrt().

Here is the call graph for this function:

◆ mesh()

const Foam::polyMesh & mesh ( ) const
inline

Definition at line 344 of file moleculeCloudI.H.

Referenced by molecule::writeFields().

Here is the caller graph for this function:

◆ pot()

const Foam::potential & pot ( ) const
inline

Definition at line 350 of file moleculeCloudI.H.

◆ cellOccupancy()

const Foam::List< Foam::DynamicList< Foam::molecule * > > & cellOccupancy ( ) const
inline

Definition at line 357 of file moleculeCloudI.H.

◆ il()

const Foam::InteractionLists< Foam::molecule > & il ( ) const
inline

Definition at line 364 of file moleculeCloudI.H.

◆ constProps() [1/2]

const Foam::List< Foam::molecule::constantProperties > constProps ( ) const
inline

Definition at line 371 of file moleculeCloudI.H.

Referenced by molecule::move().

Here is the caller graph for this function:

◆ constProps() [2/2]

const Foam::molecule::constantProperties & constProps ( label  id) const
inline

Definition at line 378 of file moleculeCloudI.H.

◆ rndGen()

Foam::Random & rndGen ( )
inline

Definition at line 384 of file moleculeCloudI.H.

◆ writeXYZ()

void writeXYZ ( const fileName fName) const

Write molecule sites in XYZ format.

Definition at line 1231 of file moleculeCloud.C.

References forAll, forAllConstIter(), Foam::nl, molecule::constantProperties::siteIds(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Referenced by molecule::writeFields().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Definition at line 65 of file moleculeCloud.H.

◆ pot_

const potential& pot_
private

Definition at line 67 of file moleculeCloud.H.

◆ cellOccupancy_

List<DynamicList<molecule*> > cellOccupancy_
private

Definition at line 69 of file moleculeCloud.H.

◆ il_

InteractionLists<molecule> il_
private

Definition at line 71 of file moleculeCloud.H.

◆ constPropList_

List<molecule::constantProperties> constPropList_
private

Definition at line 73 of file moleculeCloud.H.

◆ rndGen_

Random rndGen_
private

Definition at line 75 of file moleculeCloud.H.


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