FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

DsmcCloud< ParcelType > Class Template Reference

Templated base class for dsmc cloud. More...

#include <dsmc/DsmcCloud_.H>


Detailed Description

template<class ParcelType>
class Foam::DsmcCloud< ParcelType >

Templated base class for dsmc cloud.

Source files

Definition at line 69 of file DsmcCloud_.H.

Inheritance diagram for DsmcCloud< ParcelType >:
Collaboration diagram for DsmcCloud< ParcelType >:

List of all members.

Public Member Functions

 DsmcCloud (const word &cloudName, const fvMesh &mesh, bool readFields=true)
 Construct given name and mesh, will read Parcels and fields from.
 DsmcCloud (const word &cloudName, const fvMesh &mesh, const IOdictionary &dsmcInitialiseDict)
 Construct given name, mesh and initialisation dictionary.
virtual  ~DsmcCloud ()
 Destructor.
const word &  cloudName () const
 Return the cloud type.
const fvMesh &  mesh () const
 Return refernce to the mesh.
const IOdictionary &  particleProperties () const
 Return particle properties dictionary.
const List< word > &  typeIdList () const
 Return the idList.
scalar  nParticle () const
 Return the number of real particles represented by one.
const List< DynamicList
< ParcelType * > > &  
cellOccupancy () const
 Return the cell occupancy addressing.
volScalarField &  sigmaTcRMax ()
 Return the sigmaTcRMax field. non-const access to allow.
scalarField &  collisionSelectionRemainder ()
 Return the collision selection remainder field. non-const.
const List< typename
ParcelType::constantProperties > &  
constProps () const
 Return all of the constant properties.
const
ParcelType::constantProperties &  
constProps (label typeId) const
 Return the constant properties of the given typeId.
Random &  rndGen ()
 Return refernce to the random object.
volScalarField::GeometricBoundaryField &  qBF ()
 Return non-const heat flux boundary field reference.
volVectorField::GeometricBoundaryField &  fDBF ()
 Return non-const force density at boundary field reference.
volScalarField::GeometricBoundaryField &  rhoNBF ()
 Return non-const number density boundary field reference.
volScalarField::GeometricBoundaryField &  rhoMBF ()
 Return non-const mass density boundary field reference.
volScalarField::GeometricBoundaryField &  linearKEBF ()
 Return non-const linear kinetic energy density boundary.
volScalarField::GeometricBoundaryField &  internalEBF ()
 Return non-const internal energy density boundary field.
volScalarField::GeometricBoundaryField &  iDofBF ()
 Return non-const internal degree of freedom density boundary.
volVectorField::GeometricBoundaryField &  momentumBF ()
 Return non-const momentum density boundary field reference.
const volScalarField &  boundaryT () const
 Return macroscopic temperature.
const volVectorField &  boundaryU () const
 Return macroscopic velocity.
const volScalarField &  q () const
 Return heat flux at surface field.
const volVectorField &  fD () const
 Return force density at surface field.
const volScalarField &  rhoN () const
 Return the real particle number density field.
const volScalarField &  rhoM () const
 Return the particle mass density field.
const volScalarField &  dsmcRhoN () const
 Return the field of number of DSMC particles.
const volScalarField &  linearKE () const
 Return the total linear kinetic energy (translational and.
const volScalarField &  internalE () const
 Return the internal energy density field.
const volScalarField &  iDof () const
 Return the average internal degrees of freedom field.
const volVectorField &  momentum () const
 Return the momentum density field.
vector  equipartitionLinearVelocity (scalar temperature, scalar mass)
 Generate a random velocity sampled from the Maxwellian speed.
scalar  equipartitionInternalEnergy (scalar temperature, scalar internalDegreesOfFreedom)
 Generate a random internal energy, sampled from the.
scalar  maxwellianAverageSpeed (scalar temperature, scalar mass) const
 Average particle speed.
scalarField  maxwellianAverageSpeed (scalarField temperature, scalar mass) const
scalar  maxwellianRMSSpeed (scalar temperature, scalar mass) const
 RMS particle speed.
scalarField  maxwellianRMSSpeed (scalarField temperature, scalar mass) const
scalar  maxwellianMostProbableSpeed (scalar temperature, scalar mass) const
 Most probable speed.
scalarField  maxwellianMostProbableSpeed (scalarField temperature, scalar mass) const
const BinaryCollisionModel
< DsmcCloud< ParcelType > > &  
binaryCollision () const
 Return reference to binary elastic collision model.
BinaryCollisionModel
< DsmcCloud< ParcelType > > &  
binaryCollision ()
 Return non-const reference to binary elastic collision model.
const WallInteractionModel
< DsmcCloud< ParcelType > > &  
wallInteraction () const
 Return reference to wall interaction model.
WallInteractionModel
< DsmcCloud< ParcelType > > &  
wallInteraction ()
 Return non-const reference to wall interaction model.
const InflowBoundaryModel
< DsmcCloud< ParcelType > > &  
inflowBoundary () const
 Return reference to wall interaction model.
InflowBoundaryModel< DsmcCloud
< ParcelType > > &  
inflowBoundary ()
 Return non-const reference to wall interaction model.
scalar  massInjected () const
 Total mass injected.
scalar  massInSystem () const
 Total mass in system.
vector  linearMomentumOfSystem () const
 Total linear momentum of the system.
scalar  linearKineticEnergyOfSystem () const
 Total linear kinetic energy in the system.
scalar  internalEnergyOfSystem () const
 Total internal energy in the system.
void  info () const
 Print cloud information.
void  dumpParticlePositions () const
 Dump particle positions to .obj file.
void  addNewParcel (const vector &position, const vector &U, const scalar Ei, const label cellId, const label typeId)
 Add new parcel.
void  evolve ()
 Evolve the cloud (move, collide)
void  clear ()
 Clear the Cloud.

Static Public Attributes

static scalar  kb = 1.380650277e-23
 Boltzmann constant.

Constructor & Destructor Documentation

DsmcCloud ( const word &   cloudName,
const fvMesh &   mesh,
bool   readFields = true  
)

Construct given name and mesh, will read Parcels and fields from.

file

Definition at line 601 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 823 of file DsmcCloud_.C.

References clear().

~DsmcCloud (  ) [virtual]

Destructor.

Definition at line 1043 of file DsmcCloud_.C.


Member Function Documentation

const Foam::word & cloudName (  ) const [inline]

Return the cloud type.

Definition at line 29 of file DsmcCloudI_.H.

const Foam::fvMesh & mesh (  ) const [inline]

Return refernce to the mesh.

Definition at line 36 of file DsmcCloudI_.H.

const Foam::IOdictionary & particleProperties (  ) const [inline]

Return particle properties dictionary.

Definition at line 44 of file DsmcCloudI_.H.

const Foam::List< Foam::word > & typeIdList (  ) const [inline]

Return the idList.

Definition at line 52 of file DsmcCloudI_.H.

Foam::scalar nParticle (  ) const [inline]

Return the number of real particles represented by one.

parcel

Definition at line 59 of file DsmcCloudI_.H.

const Foam::List< Foam::DynamicList< ParcelType * > > & cellOccupancy (  ) const [inline]

Return the cell occupancy addressing.

Definition at line 67 of file DsmcCloudI_.H.

Foam::volScalarField & sigmaTcRMax (  ) [inline]

Return the sigmaTcRMax field. non-const access to allow.

updating.

Definition at line 74 of file DsmcCloudI_.H.

Foam::scalarField & collisionSelectionRemainder (  ) [inline]

Return the collision selection remainder field. non-const.

access to allow updating.

Definition at line 82 of file DsmcCloudI_.H.

const Foam::List< typename ParcelType::constantProperties > & constProps (  ) const [inline]

Return all of the constant properties.

Definition at line 90 of file DsmcCloudI_.H.

const ParcelType::constantProperties & constProps ( label   typeId  ) const [inline]

Return the constant properties of the given typeId.

Definition at line 99 of file DsmcCloudI_.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::nl.

Foam::Random & rndGen (  ) [inline]

Return refernce to the random object.

Definition at line 116 of file DsmcCloudI_.H.

Foam::volScalarField::GeometricBoundaryField & qBF (  ) [inline]

Return non-const heat flux boundary field reference.

Definition at line 124 of file DsmcCloudI_.H.

Foam::volVectorField::GeometricBoundaryField & fDBF (  ) [inline]

Return non-const force density at boundary field reference.

Definition at line 132 of file DsmcCloudI_.H.

Foam::volScalarField::GeometricBoundaryField & rhoNBF (  ) [inline]

Return non-const number density boundary field reference.

Definition at line 140 of file DsmcCloudI_.H.

Foam::volScalarField::GeometricBoundaryField & rhoMBF (  ) [inline]

Return non-const mass density boundary field reference.

Definition at line 148 of file DsmcCloudI_.H.

Foam::volScalarField::GeometricBoundaryField & linearKEBF (  ) [inline]

Return non-const linear kinetic energy density boundary.

field reference

Definition at line 156 of file DsmcCloudI_.H.

Foam::volScalarField::GeometricBoundaryField & internalEBF (  ) [inline]

Return non-const internal energy density boundary field.

reference

Definition at line 164 of file DsmcCloudI_.H.

Foam::volScalarField::GeometricBoundaryField & iDofBF (  ) [inline]

Return non-const internal degree of freedom density boundary.

field reference

Definition at line 172 of file DsmcCloudI_.H.

Foam::volVectorField::GeometricBoundaryField & momentumBF (  ) [inline]

Return non-const momentum density boundary field reference.

Definition at line 180 of file DsmcCloudI_.H.

const Foam::volScalarField & boundaryT (  ) const [inline]

Return macroscopic temperature.

Definition at line 188 of file DsmcCloudI_.H.

const Foam::volVectorField & boundaryU (  ) const [inline]

Return macroscopic velocity.

Definition at line 196 of file DsmcCloudI_.H.

const Foam::volScalarField & q (  ) const [inline]

Return heat flux at surface field.

Definition at line 402 of file DsmcCloudI_.H.

const Foam::volVectorField & fD (  ) const [inline]

Return force density at surface field.

Definition at line 409 of file DsmcCloudI_.H.

const Foam::volScalarField & rhoN (  ) const [inline]

Return the real particle number density field.

Definition at line 417 of file DsmcCloudI_.H.

const Foam::volScalarField & rhoM (  ) const [inline]

Return the particle mass density field.

Definition at line 424 of file DsmcCloudI_.H.

const Foam::volScalarField & dsmcRhoN (  ) const [inline]

Return the field of number of DSMC particles.

Definition at line 432 of file DsmcCloudI_.H.

const Foam::volScalarField & linearKE (  ) const [inline]

Return the total linear kinetic energy (translational and.

thermal density field

Definition at line 440 of file DsmcCloudI_.H.

const Foam::volScalarField & internalE (  ) const [inline]

Return the internal energy density field.

Definition at line 448 of file DsmcCloudI_.H.

const Foam::volScalarField & iDof (  ) const [inline]

Return the average internal degrees of freedom field.

Definition at line 456 of file DsmcCloudI_.H.

const Foam::volVectorField & momentum (  ) const [inline]

Return the momentum density field.

Definition at line 463 of file DsmcCloudI_.H.

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

Generate a random velocity sampled from the Maxwellian speed.

distribution

Definition at line 1121 of file DsmcCloud_.C.

References Foam::sqrt().

Foam::scalar equipartitionInternalEnergy ( scalar   temperature,
scalar   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 1139 of file DsmcCloud_.C.

References Foam::exp(), Foam::log(), and Foam::pow().

Foam::scalar maxwellianAverageSpeed ( scalar   temperature,
scalar   mass  
) const [inline]

Average particle speed.

Definition at line 333 of file DsmcCloudI_.H.

References Foam::mathematicalConstant::pi(), and Foam::sqrt().

Foam::scalarField maxwellianAverageSpeed ( scalarField   temperature,
scalar   mass  
) const [inline]

Definition at line 345 of file DsmcCloudI_.H.

References Foam::mathematicalConstant::pi(), and Foam::sqrt().

Foam::scalar maxwellianRMSSpeed ( scalar   temperature,
scalar   mass  
) const [inline]

RMS particle speed.

Definition at line 357 of file DsmcCloudI_.H.

References Foam::sqrt().

Foam::scalarField maxwellianRMSSpeed ( scalarField   temperature,
scalar   mass  
) const [inline]

Definition at line 368 of file DsmcCloudI_.H.

References Foam::sqrt().

Foam::scalar maxwellianMostProbableSpeed ( scalar   temperature,
scalar   mass  
) const [inline]

Most probable speed.

Definition at line 380 of file DsmcCloudI_.H.

References Foam::sqrt().

Foam::scalarField maxwellianMostProbableSpeed ( scalarField   temperature,
scalar   mass  
) const [inline]

Definition at line 392 of file DsmcCloudI_.H.

References Foam::sqrt().

const Foam::BinaryCollisionModel< Foam::DsmcCloud< ParcelType > > & binaryCollision (  ) const [inline]

Return reference to binary elastic collision model.

Definition at line 204 of file DsmcCloudI_.H.

Foam::BinaryCollisionModel< Foam::DsmcCloud< ParcelType > > & binaryCollision (  ) [inline]

Return non-const reference to binary elastic collision model.

Definition at line 212 of file DsmcCloudI_.H.

const Foam::WallInteractionModel< Foam::DsmcCloud< ParcelType > > & wallInteraction (  ) const [inline]

Return reference to wall interaction model.

Definition at line 220 of file DsmcCloudI_.H.

Foam::WallInteractionModel< Foam::DsmcCloud< ParcelType > > & wallInteraction (  ) [inline]

Return non-const reference to wall interaction model.

Definition at line 228 of file DsmcCloudI_.H.

const Foam::InflowBoundaryModel< Foam::DsmcCloud< ParcelType > > & inflowBoundary (  ) const [inline]

Return reference to wall interaction model.

Definition at line 236 of file DsmcCloudI_.H.

Foam::InflowBoundaryModel< Foam::DsmcCloud< ParcelType > > & inflowBoundary (  ) [inline]

Return non-const reference to wall interaction model.

Definition at line 244 of file DsmcCloudI_.H.

scalar massInjected (  ) const [inline]

Total mass injected.

Foam::scalar massInSystem (  ) const [inline]

Total mass in system.

Definition at line 251 of file DsmcCloudI_.H.

References forAllConstIter, and p.

Foam::vector linearMomentumOfSystem (  ) const [inline]

Total linear momentum of the system.

Definition at line 272 of file DsmcCloudI_.H.

References forAllConstIter, and p.

Foam::scalar linearKineticEnergyOfSystem (  ) const [inline]

Total linear kinetic energy in the system.

Definition at line 294 of file DsmcCloudI_.H.

References forAllConstIter, and p.

Foam::scalar internalEnergyOfSystem (  ) const [inline]

Total internal energy in the system.

Definition at line 316 of file DsmcCloudI_.H.

References forAllConstIter, and p.

void info (  ) const

Print cloud information.

Reimplemented from IOobject.

Definition at line 1077 of file DsmcCloud_.C.

References Foam::endl(), Foam::Info, Foam::mag(), name(), Foam::nl, reduce(), and Foam::returnReduce().

void dumpParticlePositions (  ) const

Dump particle positions to .obj file.

Definition at line 1179 of file DsmcCloud_.C.

References OSstream::flush(), forAllConstIter, name(), Foam::nl, and timeName.

void addNewParcel ( const vector &   position,
const vector &   U,
const scalar   Ei,
const label   cellId,
const label   typeId  
)

Add new parcel.

Definition at line 575 of file DsmcCloud_.C.

void evolve (  )

Evolve the cloud (move, collide)

Definition at line 1050 of file DsmcCloud_.C.

void clear (  ) [inline]

Clear the Cloud.

Reimplemented from Cloud< ParcelType >.

Definition at line 470 of file DsmcCloudI_.H.

References clear().


Member Data Documentation

Foam::scalar kb = 1.380650277e-23 [static]

Boltzmann constant.

Definition at line 196 of file DsmcCloud_.H.

Referenced by dsmcFields::write().


The documentation for this class was generated from the following files:
  • src/lagrangian/dsmc/clouds/Templates/DsmcCloud_/DsmcCloud_.H
  • src/lagrangian/dsmc/clouds/Templates/DsmcCloud_/DsmcCloud_.C
  • src/lagrangian/dsmc/clouds/Templates/DsmcCloud_/DsmcCloudI_.H