MomentumParcel< ParcelType > Class Template Reference

Momentum parcel class with rotational motion (as spherical particles only) and one/two-way coupling with the continuous phase. More...

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

Classes

class  constantProperties
 Class to hold momentum parcel constant properties. More...
 
class  trackingData
 

Public Member Functions

 AddToPropertyList (ParcelType, " moving"+" typeId"+" nParticle"+" d"+" dTarget "+" (Ux Uy Uz)"+" rho"+" age"+" tTurb"+" (UTurbx UTurby UTurbz)")
 String representation of properties. More...
 
 MomentumParcel (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label facei)
 Construct from mesh, coordinates and topology. More...
 
 MomentumParcel (const polyMesh &mesh, const vector &position, const label celli, label &nLocateBoundaryHits)
 Construct from a position and a cell, searching for the rest of the. More...
 
 MomentumParcel (Istream &is, bool readFields=true)
 Construct from Istream. More...
 
 MomentumParcel (const MomentumParcel &p)
 Construct as a copy. More...
 
virtual autoPtr< particleclone () const
 Construct and return a clone. More...
 
bool moving () const
 Return const access to moving flag. More...
 
label typeId () const
 Return const access to type id. More...
 
scalar nParticle () const
 Return const access to number of particles. More...
 
scalar d () const
 Return const access to diameter. More...
 
scalar dTarget () const
 Return const access to target diameter. More...
 
const vectorU () const
 Return const access to velocity. More...
 
scalar rho () const
 Return const access to density. More...
 
scalar age () const
 Return const access to the age. More...
 
scalar tTurb () const
 Return const access to time spent in turbulent eddy. More...
 
const vectorUTurb () const
 Return const access to turbulent velocity fluctuation. More...
 
bool & moving ()
 Return const access to moving flag. More...
 
labeltypeId ()
 Return access to type id. More...
 
scalar & nParticle ()
 Return access to number of particles. More...
 
scalar & d ()
 Return access to diameter. More...
 
scalar & dTarget ()
 Return access to target diameter. More...
 
vectorU ()
 Return access to velocity. More...
 
scalar & rho ()
 Return access to density. More...
 
scalar & age ()
 Return access to the age. More...
 
scalar & tTurb ()
 Return access to time spent in turbulent eddy. More...
 
vectorUTurb ()
 Return access to turbulent velocity fluctuation. More...
 
scalar massCell (const trackingData &td) const
 Cell owner mass. More...
 
scalar mass () const
 Particle mass. More...
 
scalar momentOfInertia () const
 Particle moment of inertia around diameter axis. More...
 
scalar volume () const
 Particle volume. More...
 
scalar areaP () const
 Particle projected area. More...
 
scalar areaS () const
 Particle surface area. More...
 
scalar Re (const trackingData &td) const
 Reynolds number. More...
 
scalar We (const trackingData &td, const scalar sigma) const
 Weber number. More...
 
scalar Eo (const trackingData &td, const scalar sigma) const
 Eotvos number. More...
 
template<class TrackCloudType >
bool move (TrackCloudType &cloud, trackingData &td)
 Move the parcel. More...
 
virtual void transformProperties (const transformer &)
 Transform the physical properties of the particle. More...
 
template<class TrackCloudType >
void correctAfterParallelTransfer (TrackCloudType &, trackingData &)
 Make changes following a parallel transfer. More...
 
template<class TrackCloudType >
bool hitPatch (TrackCloudType &cloud, trackingData &td)
 Overridable function to handle the particle hitting a patch. More...
 
template<class TrackCloudType >
void hitWedgePatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a wedgePatch. More...
 
template<class TrackCloudType >
void hitSymmetryPlanePatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a. More...
 
template<class TrackCloudType >
void hitSymmetryPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a. More...
 
template<class TrackCloudType >
void hitCyclicPatch (TrackCloudType &, trackingData &)
 Overridable function to handle the particle hitting a. More...
 
template<class TrackCloudType >
bool hitNonConformalCyclicPatch (const vector &displacement, const scalar fraction, const label patchi, TrackCloudType &cloud, trackingData &td)
 Overridable function to handle the particle hitting an. More...
 
template<class TrackCloudType >
void hitWallPatch (TrackCloudType &cloud, trackingData &td)
 Overridable function to handle the particle hitting a wallPatch. More...
 
template<class TrackCloudType >
void hitBasicPatch (TrackCloudType &cloud, trackingData &td)
 Overridable function to handle the particle hitting a basic. More...
 
template<class TrackCloudType >
const Foam::vector calcVelocity (TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Re, const scalar mu, const scalar mass, const vector &Su, vector &dUTrans, scalar &Spu) const
 
template<class CloudType >
void readFields (CloudType &c)
 
template<class CloudType >
void writeFields (const CloudType &c)
 

Static Public Member Functions

static autoPtr< MomentumParcelNew (Istream &is)
 Construct from Istream and return. More...
 
static scalar volume (const scalar d)
 Particle volume for a given diameter. More...
 
static scalar areaP (const scalar d)
 Projected area for given diameter. More...
 
static scalar areaS (const scalar d)
 Surface area for given diameter. More...
 
static scalar Re (const scalar rhoc, const vector &U, const vector &Uc, const scalar d, const scalar muc)
 Reynolds number for given conditions. More...
 
static scalar We (const scalar rhoc, const vector &U, const vector &Uc, const scalar d, const scalar sigma)
 Weber number for given conditions. More...
 
static scalar Eo (const vector &g, const scalar rho, const scalar rhoc, const vector &U, const scalar d, const scalar sigma)
 Eotvos number for given conditions. More...
 
template<class TrackCloudType >
static void readFields (TrackCloudType &c)
 Read. More...
 
template<class TrackCloudType >
static void writeFields (const TrackCloudType &c)
 Write. More...
 

Protected Member Functions

template<class TrackCloudType >
void setCellValues (TrackCloudType &cloud, trackingData &td)
 Set cell values. More...
 
template<class TrackCloudType >
void calcDispersion (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Apply dispersion to the carrier phase velocity and update. More...
 
template<class TrackCloudType >
void cellValueSourceCorrection (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Correct cell values using latest transfer information. More...
 
template<class TrackCloudType >
void calc (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Update parcel properties over the time interval. More...
 
template<class TrackCloudType >
const vector calcVelocity (TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Re, const scalar mu, const scalar mass, const vector &Su, vector &dUTrans, scalar &Spu) const
 Calculate new particle velocity. More...
 

Protected Attributes

bool moving_
 Moving flag - tracking stopped when moving = false. More...
 
label typeId_
 Parcel type id. More...
 
scalar nParticle_
 Number of particles in Parcel. More...
 
scalar d_
 Diameter [m]. More...
 
scalar dTarget_
 Target diameter [m]. More...
 
vector U_
 Velocity of Parcel [m/s]. More...
 
scalar rho_
 Density [kg/m^3]. More...
 
scalar age_
 Age [s]. More...
 
scalar tTurb_
 Time spent in turbulent eddy [s]. More...
 
vector UTurb_
 Turbulent velocity fluctuation [m/s]. More...
 

Friends

Ostreamoperator (Ostream &, const MomentumParcel< ParcelType > &)
 

Detailed Description

template<class ParcelType>
class Foam::MomentumParcel< ParcelType >

Momentum parcel class with rotational motion (as spherical particles only) and one/two-way coupling with the continuous phase.

Sub-models include:

  • drag
  • turbulent dispersion
  • wall interactions
Source files

Definition at line 79 of file MomentumParcel.H.

Constructor & Destructor Documentation

◆ MomentumParcel() [1/4]

MomentumParcel ( const polyMesh mesh,
const barycentric coordinates,
const label  celli,
const label  tetFacei,
const label  tetPti,
const label  facei 
)
inline

Construct from mesh, coordinates and topology.

Other properties initialised as null

Definition at line 74 of file MomentumParcelI.H.

Referenced by MomentumParcel< ParcelType >::clone(), and MomentumParcel< ParcelType >::New().

Here is the caller graph for this function:

◆ MomentumParcel() [2/4]

MomentumParcel ( const polyMesh mesh,
const vector position,
const label  celli,
label nLocateBoundaryHits 
)
inline

Construct from a position and a cell, searching for the rest of the.

required topology. Other properties are initialised as null.

Definition at line 99 of file MomentumParcelI.H.

◆ MomentumParcel() [3/4]

◆ MomentumParcel() [4/4]

MomentumParcel ( const MomentumParcel< ParcelType > &  p)

Construct as a copy.

Member Function Documentation

◆ setCellValues()

◆ calcDispersion()

void calcDispersion ( TrackCloudType &  cloud,
trackingData td,
const scalar  dt 
)
protected

Apply dispersion to the carrier phase velocity and update.

parcel turbulence parameters

Definition at line 71 of file MomentumParcel.C.

References MomentumParcel< ParcelType >::trackingData::Uc().

Here is the call graph for this function:

◆ cellValueSourceCorrection()

void cellValueSourceCorrection ( TrackCloudType &  cloud,
trackingData td,
const scalar  dt 
)
protected

Correct cell values using latest transfer information.

Definition at line 92 of file MomentumParcel.C.

References MomentumParcel< ParcelType >::trackingData::Uc().

Here is the call graph for this function:

◆ calc()

void calc ( TrackCloudType &  cloud,
trackingData td,
const scalar  dt 
)
protected

Update parcel properties over the time interval.

Definition at line 105 of file MomentumParcel.C.

References MomentumParcel< ParcelType >::trackingData::muc(), Foam::Re(), Foam::fvc::Su(), and Foam::Zero.

Here is the call graph for this function:

◆ calcVelocity() [1/2]

const vector calcVelocity ( TrackCloudType &  cloud,
trackingData td,
const scalar  dt,
const scalar  Re,
const scalar  mu,
const scalar  mass,
const vector Su,
vector dUTrans,
scalar &  Spu 
) const
protected

Calculate new particle velocity.

◆ AddToPropertyList()

AddToPropertyList ( ParcelType  ,
" moving"+" typeId"+" nParticle"+" d"+" dTarget "+" (Ux Uy Uz)"+" rho"+" age"+" tTurb"+" (UTurbx UTurby UTurbz)"   
)

String representation of properties.

◆ clone()

virtual autoPtr<particle> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 400 of file MomentumParcel.H.

References MomentumParcel< ParcelType >::MomentumParcel().

Here is the call graph for this function:

◆ New()

static autoPtr<MomentumParcel> New ( Istream is)
inlinestatic

Construct from Istream and return.

Definition at line 406 of file MomentumParcel.H.

References MomentumParcel< ParcelType >::MomentumParcel().

Here is the call graph for this function:

◆ moving() [1/2]

bool moving
inline

Return const access to moving flag.

Definition at line 166 of file MomentumParcelI.H.

◆ typeId() [1/2]

Foam::label typeId
inline

Return const access to type id.

Definition at line 173 of file MomentumParcelI.H.

◆ nParticle() [1/2]

Foam::scalar nParticle
inline

Return const access to number of particles.

Definition at line 180 of file MomentumParcelI.H.

◆ d() [1/2]

Foam::scalar d
inline

Return const access to diameter.

Definition at line 187 of file MomentumParcelI.H.

◆ dTarget() [1/2]

Foam::scalar dTarget
inline

Return const access to target diameter.

Definition at line 194 of file MomentumParcelI.H.

◆ U() [1/2]

const Foam::vector & U
inline

Return const access to velocity.

Definition at line 201 of file MomentumParcelI.H.

◆ rho() [1/2]

Foam::scalar rho
inline

Return const access to density.

Definition at line 208 of file MomentumParcelI.H.

◆ age() [1/2]

Foam::scalar age
inline

Return const access to the age.

Definition at line 215 of file MomentumParcelI.H.

◆ tTurb() [1/2]

Foam::scalar tTurb
inline

Return const access to time spent in turbulent eddy.

Definition at line 222 of file MomentumParcelI.H.

◆ UTurb() [1/2]

const Foam::vector & UTurb
inline

Return const access to turbulent velocity fluctuation.

Definition at line 229 of file MomentumParcelI.H.

◆ moving() [2/2]

bool & moving
inline

Return const access to moving flag.

Definition at line 236 of file MomentumParcelI.H.

◆ typeId() [2/2]

Foam::label & typeId
inline

Return access to type id.

Definition at line 243 of file MomentumParcelI.H.

◆ nParticle() [2/2]

Foam::scalar & nParticle
inline

Return access to number of particles.

Definition at line 250 of file MomentumParcelI.H.

◆ d() [2/2]

Foam::scalar & d
inline

Return access to diameter.

Definition at line 257 of file MomentumParcelI.H.

◆ dTarget() [2/2]

Foam::scalar & dTarget
inline

Return access to target diameter.

Definition at line 264 of file MomentumParcelI.H.

◆ U() [2/2]

Foam::vector & U
inline

Return access to velocity.

Definition at line 271 of file MomentumParcelI.H.

◆ rho() [2/2]

Foam::scalar & rho
inline

Return access to density.

Definition at line 278 of file MomentumParcelI.H.

◆ age() [2/2]

Foam::scalar & age
inline

Return access to the age.

Definition at line 285 of file MomentumParcelI.H.

◆ tTurb() [2/2]

Foam::scalar & tTurb
inline

Return access to time spent in turbulent eddy.

Definition at line 292 of file MomentumParcelI.H.

◆ UTurb() [2/2]

Foam::vector & UTurb
inline

Return access to turbulent velocity fluctuation.

Definition at line 299 of file MomentumParcelI.H.

◆ massCell()

Foam::scalar massCell ( const trackingData td) const
inline

Cell owner mass.

Definition at line 306 of file MomentumParcelI.H.

References MomentumParcel< ParcelType >::trackingData::rhoc().

Here is the call graph for this function:

◆ mass()

Foam::scalar mass
inline

Particle mass.

Definition at line 316 of file MomentumParcelI.H.

◆ momentOfInertia()

Foam::scalar momentOfInertia
inline

Particle moment of inertia around diameter axis.

Definition at line 323 of file MomentumParcelI.H.

References Foam::sqr().

Here is the call graph for this function:

◆ volume() [1/2]

Foam::scalar volume
inline

Particle volume.

Definition at line 330 of file MomentumParcelI.H.

◆ volume() [2/2]

Foam::scalar volume ( const scalar  d)
inlinestatic

Particle volume for a given diameter.

Definition at line 337 of file MomentumParcelI.H.

References Foam::constant::mathematical::pi(), and Foam::pow3().

Here is the call graph for this function:

◆ areaP() [1/2]

Foam::scalar areaP
inline

Particle projected area.

Definition at line 344 of file MomentumParcelI.H.

◆ areaP() [2/2]

Foam::scalar areaP ( const scalar  d)
inlinestatic

Projected area for given diameter.

Definition at line 351 of file MomentumParcelI.H.

◆ areaS() [1/2]

Foam::scalar areaS
inline

Particle surface area.

Definition at line 358 of file MomentumParcelI.H.

◆ areaS() [2/2]

Foam::scalar areaS ( const scalar  d)
inlinestatic

Surface area for given diameter.

Definition at line 365 of file MomentumParcelI.H.

References Foam::constant::mathematical::pi().

Here is the call graph for this function:

◆ Re() [1/2]

Foam::scalar Re ( const trackingData td) const
inline

◆ Re() [2/2]

Foam::scalar Re ( const scalar  rhoc,
const vector U,
const vector Uc,
const scalar  d,
const scalar  muc 
)
inlinestatic

Reynolds number for given conditions.

Definition at line 382 of file MomentumParcelI.H.

References Foam::mag(), Foam::max(), and U.

Here is the call graph for this function:

◆ We() [1/2]

Foam::scalar We ( const trackingData td,
const scalar  sigma 
) const
inline

Weber number.

Definition at line 396 of file MomentumParcelI.H.

References MomentumParcel< ParcelType >::trackingData::rhoc(), Foam::constant::physicoChemical::sigma, and MomentumParcel< ParcelType >::trackingData::Uc().

Here is the call graph for this function:

◆ We() [2/2]

Foam::scalar We ( const scalar  rhoc,
const vector U,
const vector Uc,
const scalar  d,
const scalar  sigma 
)
inlinestatic

Weber number for given conditions.

Definition at line 407 of file MomentumParcelI.H.

References Foam::magSqr(), Foam::max(), Foam::constant::physicoChemical::sigma, and U.

Here is the call graph for this function:

◆ Eo() [1/2]

Foam::scalar Eo ( const trackingData td,
const scalar  sigma 
) const
inline

Eotvos number.

Definition at line 421 of file MomentumParcelI.H.

References MomentumParcel< ParcelType >::trackingData::g(), MomentumParcel< ParcelType >::trackingData::rhoc(), and Foam::constant::physicoChemical::sigma.

Here is the call graph for this function:

◆ Eo() [2/2]

Foam::scalar Eo ( const vector g,
const scalar  rho,
const scalar  rhoc,
const vector U,
const scalar  d,
const scalar  sigma 
)
inlinestatic

Eotvos number for given conditions.

Definition at line 432 of file MomentumParcelI.H.

References Foam::mag(), Foam::max(), rho, Foam::constant::physicoChemical::sigma, Foam::sqr(), and U.

Here is the call graph for this function:

◆ move()

bool move ( TrackCloudType &  cloud,
trackingData td 
)

Move the parcel.

Definition at line 257 of file MomentumParcel.C.

References f(), Foam::mag(), Foam::max(), maxCo, Foam::min(), p, and s().

Here is the call graph for this function:

◆ transformProperties()

void transformProperties ( const transformer transform)
virtual

Transform the physical properties of the particle.

according to the given transformation

Definition at line 355 of file MomentumParcel.C.

References Foam::transform(), and dimensionSet::transform.

Here is the call graph for this function:

◆ correctAfterParallelTransfer()

void correctAfterParallelTransfer ( TrackCloudType &  cloud,
trackingData td 
)

Make changes following a parallel transfer.

Definition at line 368 of file MomentumParcel.C.

References p.

◆ hitPatch()

bool hitPatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a patch.

Executed before other patch-hitting functions

Definition at line 387 of file MomentumParcel.C.

References p.

◆ hitWedgePatch()

void hitWedgePatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a wedgePatch.

Definition at line 418 of file MomentumParcel.C.

References p.

◆ hitSymmetryPlanePatch()

void hitSymmetryPlanePatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a.

symmetryPlanePatch

Definition at line 437 of file MomentumParcel.C.

References p.

◆ hitSymmetryPatch()

void hitSymmetryPatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a.

symmetryPatch

Definition at line 456 of file MomentumParcel.C.

References p.

◆ hitCyclicPatch()

void hitCyclicPatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a.

cyclicPatch

Definition at line 475 of file MomentumParcel.C.

References p.

◆ hitNonConformalCyclicPatch()

bool hitNonConformalCyclicPatch ( const vector displacement,
const scalar  fraction,
const label  patchi,
TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting an.

nonConformalCyclicPolyPatch

Definition at line 494 of file MomentumParcel.C.

References p, and patchi.

◆ hitWallPatch()

void hitWallPatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a wallPatch.

Definition at line 529 of file MomentumParcel.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and patchIdentifier::name().

Here is the call graph for this function:

◆ hitBasicPatch()

void hitBasicPatch ( TrackCloudType &  cloud,
trackingData td 
)

Overridable function to handle the particle hitting a basic.

patch. Fall-through for the above.

Definition at line 547 of file MomentumParcel.C.

References p.

◆ readFields() [1/2]

static void readFields ( TrackCloudType &  c)
static

Read.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

Here is the caller graph for this function:

◆ writeFields() [1/2]

static void writeFields ( const TrackCloudType &  c)
static

Write.

◆ calcVelocity() [2/2]

const Foam::vector calcVelocity ( TrackCloudType &  cloud,
trackingData td,
const scalar  dt,
const scalar  Re,
const scalar  mu,
const scalar  mass,
const vector Su,
vector dUTrans,
scalar &  Spu 
) const

◆ readFields() [2/2]

void readFields ( CloudType c)

Definition at line 94 of file MomentumParcelIO.C.

References Foam::constant::universal::c, forAllIter, IOobject::MUST_READ, p, Foam::readFields(), rho, U, and Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ writeFields() [2/2]

void writeFields ( const CloudType c)

Definition at line 194 of file MomentumParcelIO.C.

References Foam::constant::universal::c, forAllConstIter, IOobject::NO_READ, p, rho, U, regIOobject::write(), and Foam::vtkWriteOps::write().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const MomentumParcel< ParcelType > &   
)
friend

Member Data Documentation

◆ moving_

bool moving_
protected

Moving flag - tracking stopped when moving = false.

Definition at line 268 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ typeId_

label typeId_
protected

Parcel type id.

Definition at line 271 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ nParticle_

scalar nParticle_
protected

Number of particles in Parcel.

Definition at line 274 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ d_

scalar d_
protected

Diameter [m].

Definition at line 277 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ dTarget_

scalar dTarget_
protected

Target diameter [m].

Definition at line 280 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ U_

vector U_
protected

Velocity of Parcel [m/s].

Definition at line 283 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ rho_

scalar rho_
protected

Density [kg/m^3].

Definition at line 286 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ age_

scalar age_
protected

Age [s].

Definition at line 289 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ tTurb_

scalar tTurb_
protected

Time spent in turbulent eddy [s].

Definition at line 292 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().

◆ UTurb_

vector UTurb_
protected

Turbulent velocity fluctuation [m/s].

Definition at line 295 of file MomentumParcel.H.

Referenced by MomentumParcel< ParcelType >::MomentumParcel().


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