FreeFOAM The Cross-Platform CFD Toolkit
KinematicParcel< ParcelType > Class Template Reference

Kinematic parcel class with one/two-way coupling with the continuous phase. More...

#include <lagrangianIntermediate/KinematicParcel.H>


Detailed Description

template<class ParcelType>
class Foam::KinematicParcel< ParcelType >

Kinematic parcel class with one/two-way coupling with the continuous phase.

Sub-models include:

  • drag
  • turbulent dispersion
  • wall interactions
Source files

Definition at line 76 of file KinematicParcel.H.

+ Inheritance diagram for KinematicParcel< ParcelType >:
+ Collaboration diagram for KinematicParcel< ParcelType >:

List of all members.

Classes

class  constantProperties
 Class to hold kinematic particle constant properties. More...
class  trackData
 Class used to pass kinematic tracking data to the trackToFace function. More...

Public Member Functions

 TypeName ("KinematicParcel")
 Runtime type information.
 KinematicParcel (KinematicCloud< ParcelType > &owner, const vector &position, const label cellI)
 Construct from owner, position, and cloud owner.
 KinematicParcel (KinematicCloud< ParcelType > &owner, const vector &position, const label cellI, const label typeId, const scalar nParticle0, const scalar d0, const vector &U0, const constantProperties &constProps)
 Construct from components.
 KinematicParcel (const Cloud< ParcelType > &c, Istream &is, bool readFields=true)
 Construct from Istream.
 KinematicParcel (const KinematicParcel &p)
 Construct as a copy.
autoPtr< KinematicParcelclone () const
 Construct and return a clone.
bool active () const
 Return const access to active flag.
label typeId () const
 Return const access to type id.
scalar nParticle () const
 Return const access to number of particles.
scalar d () const
 Return const access to diameter.
const vectorU () const
 Return const access to velocity.
scalar rho () const
 Return const access to density.
scalar tTurb () const
 Return const access to time spent in turbulent eddy.
const vectorUTurb () const
 Return const access to turbulent velocity fluctuation.
bool & active ()
 Return const access to active flag.
label typeId ()
 Return access to type id.
scalar & nParticle ()
 Return access to number of particles.
scalar & d ()
 Return access to diameter.
vectorU ()
 Return access to velocity.
scalar & rho ()
 Return access to density.
scalar & tTurb ()
 Return access to time spent in turbulent eddy.
vectorUTurb ()
 Return access to turbulent velocity fluctuation.
scalar wallImpactDistance (const vector &n) const
 The nearest distance to a wall that.
label faceInterpolation () const
 Return the index of the face to be used in the interpolation.
scalar massCell (const label cellI) const
 Cell owner mass.
scalar mass () const
 Particle mass.
scalar volume () const
 Particle volume.
scalar volume (const scalar d) const
 Particle volume for a given diameter.
scalar areaP () const
 Particle projected area.
scalar areaP (const scalar d) const
 Projected area for given diameter.
scalar areaS () const
 Particle surface area.
scalar areaS (const scalar d) const
 Surface area for given diameter.
scalar Re (const vector &U, const scalar d, const scalar rhoc, const scalar muc) const
 Reynolds number.
template<class TrackData >
void setCellValues (TrackData &td, const scalar dt, const label cellI)
 Set cell values.
template<class TrackData >
void cellValueSourceCorrection (TrackData &td, const scalar dt, const label cellI)
 Correct cell values using latest transfer information.
template<class TrackData >
void calc (TrackData &td, const scalar dt, const label cellI)
 Update parcel properties over the time interval.
template<class TrackData >
bool move (TrackData &td)
 Move the parcel.
template<class TrackData >
bool hitPatch (const polyPatch &p, TrackData &td, const label patchI)
 Overridable function to handle the particle hitting a patch.
bool hitPatch (const polyPatch &p, int &td, const label patchI)
 Overridable function to handle the particle hitting a patch.
template<class TrackData >
void hitProcessorPatch (const processorPolyPatch &, TrackData &td)
 Overridable function to handle the particle hitting a.
void hitProcessorPatch (const processorPolyPatch &, int &)
 Overridable function to handle the particle hitting a.
template<class TrackData >
void hitWallPatch (const wallPolyPatch &, TrackData &td)
 Overridable function to handle the particle hitting a wallPatch.
void hitWallPatch (const wallPolyPatch &, int &)
 Overridable function to handle the particle hitting a wallPatch.
template<class TrackData >
void hitPatch (const polyPatch &, TrackData &td)
 Overridable function to handle the particle hitting a polyPatch.
void hitPatch (const polyPatch &, int &)
void transformProperties (const tensor &T)
 Transform the physical properties of the particle.
void transformProperties (const vector &separation)
 Transform the physical properties of the particle.
- Public Member Functions inherited from Particle< ParcelType >
 TypeName ("Particle")
 Runtime type information.
 Particle (const Cloud< ParcelType > &, const vector &position, const label celli)
 Construct from components.
 Particle (const Cloud< ParcelType > &, Istream &, bool readFields=true)
 Construct from Istream.
 Particle (const Particle &p)
 Construct as a copy.
virtual ~Particle ()
 Destructor.
bool inCell () const
 Return true if particle is in cell.
bool inCell (const vector &position, const label celli, const scalar stepFraction) const
 Return true if position is in cell i.
const vectorposition () const
 Return current particle position.
vectorposition ()
 Return current particle position.
label & cell ()
 Return current cell particle is in.
label cell () const
 Return current cell particle is in.
label face () const
 Return current face particle is on otherwise -1.
const Cloud< ParcelType > & cloud () const
 Return reference to the particle cloud.
bool softImpact () const
 Return the impact model to be used, soft or hard (default).
scalar currentTime () const
 Return the particle current time.
bool onBoundary () const
 Is the particle on the boundary/(or outside the domain)?
label patch (const label facei) const
 Which patch is particle on.
label patchFace (const label patchi, const label facei) const
 Which face of this patch is this particle on.
scalar & stepFraction ()
 Return the fraction of time-step completed.
scalar stepFraction () const
 Return the fraction of time-step completed.
label origProc () const
 Return the originating processor id.
label origId () const
 Return the particle id on originating processor.
label track (const vector &endPosition, TrackData &td)
 Track particle to end of trajectory.
label track (const vector &endPosition)
 Calls the templated track with dummy TrackData.
scalar trackToFace (const vector &endPosition, TrackData &td)
 Track particle to a given position and returns 1.0 if the.
scalar trackToFace (const vector &endPosition)
 Calls the templated trackToFace with dummy TrackData.
void write (Ostream &os, bool writeFields) const
 Write the particle data.

Static Public Member Functions

static void readFields (Cloud< ParcelType > &c)
 Read.
static void writeFields (const Cloud< ParcelType > &c)
 Write.

Static Public Attributes

static string propHeader = " (UTurbx UTurby UTurbz)"
 String representation of properties.
- Static Public Attributes inherited from Particle< ParcelType >

Protected Member Functions

template<class TrackData >
const vector calcVelocity (TrackData &td, const scalar dt, const label cellI, const scalar Re, const scalar mu, const scalar d, const vector &U, const scalar rho, const scalar mass, const vector &Su, vector &dUTrans) const
 Calculate new particle velocity.
- Protected Member Functions inherited from Particle< ParcelType >
scalar lambda (const vector &from, const vector &to, const label facei, const scalar stepFraction) const
 Return the 'lambda' value for the position, p, on the face,.
scalar lambda (const vector &from, const vector &to, const label facei) const
 Return the 'lambda' value for the position, p, on the face,.
void findFaces (const vector &position, DynamicList< label > &faceList) const
 Find the faces between position and cell centre.
void findFaces (const vector &position, const label celli, const scalar stepFraction, DynamicList< label > &faceList) const
 Find the faces between position and cell centre.
void hitWedgePatch (const wedgePolyPatch &, TrackData &td)
 Overridable function to handle the particle hitting a wedgePatch.
void hitSymmetryPatch (const symmetryPolyPatch &, TrackData &td)
 Overridable function to handle the particle hitting a.
void hitCyclicPatch (const cyclicPolyPatch &, TrackData &td)
 Overridable function to handle the particle hitting a cyclicPatch.
virtual void transformPosition (const tensor &T)
 Transform the position the particle.
void prepareForParallelTransfer (const label patchi, TrackData &td)
 Convert global addressing to the processor patch.
void correctAfterParallelTransfer (const label patchi, TrackData &td)
 Convert processor patch addressing to the global equivalents.

Protected Attributes

bool active_
 Active flag - tracking inactive when active = false.
label typeId_
 Parcel type id.
scalar nParticle_
 Number of particles in Parcel.
scalar d_
 Diameter [m].
vector U_
 Velocity of Parcel [m/s].
scalar rho_
 Density [kg/m3].
scalar tTurb_
 Time spent in turbulent eddy [s].
vector UTurb_
 Turbulent velocity fluctuation [m/s].
scalar rhoc_
 Density [kg/m3].
vector Uc_
 Velocity [m/s].
scalar muc_
 Viscosity [Pa.s].
- Protected Attributes inherited from Particle< ParcelType >
const Cloud< ParcelType > & cloud_
 Reference to the particle cloud.
vector position_
 Position of particle.
label celli_
 Index of the cell it is in.
label facei_
 Face index if the particle is on a face otherwise -1.
scalar stepFraction_
 Fraction of time-step completed.
label origProc_
 Originating processor id.
label origId_
 Local particle id on originating processor.

Friends

class Cloud< ParcelType >
Ostreamoperator (Ostream &, const KinematicParcel< ParcelType > &)

Constructor & Destructor Documentation

KinematicParcel ( KinematicCloud< ParcelType > &  owner,
const vector position,
const label  cellI 
)
inline

Construct from owner, position, and cloud owner.

Other properties initialised as null

Definition at line 69 of file KinematicParcelI.H.

Referenced by KinematicParcel< BasicReactingParcel< ThermoType > >::clone().

KinematicParcel ( KinematicCloud< ParcelType > &  owner,
const vector position,
const label  cellI,
const label  typeId,
const scalar  nParticle0,
const scalar  d0,
const vector U0,
const constantProperties constProps 
)
inline

Construct from components.

Definition at line 92 of file KinematicParcelI.H.

KinematicParcel ( const Cloud< ParcelType > &  c,
Istream is,
bool  readFields = true 
)

Construct from Istream.

Definition at line 50 of file KinematicParcelIO.C.

References Foam::readBool(), and readScalar.

KinematicParcel ( const KinematicParcel< ParcelType > &  p)

Construct as a copy.


Member Function Documentation

const Foam::vector calcVelocity ( TrackData &  td,
const scalar  dt,
const label  cellI,
const scalar  Re,
const scalar  mu,
const scalar  d,
const vector U,
const scalar  rho,
const scalar  mass,
const vector Su,
vector dUTrans 
) const
protected
TypeName ( "KinematicParcel< ParcelType >"  )

Runtime type information.

bool active ( ) const
inline

Return const access to active flag.

Definition at line 205 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::active_.

Referenced by KinematicParcel< ParcelType >::writeFields().

Foam::label typeId ( ) const
inline

Return const access to type id.

Definition at line 212 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::typeId_.

Referenced by KinematicParcel< ParcelType >::writeFields().

Foam::scalar nParticle ( ) const
inline

Return const access to number of particles.

Definition at line 219 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::nParticle_.

Referenced by KinematicParcel< ParcelType >::writeFields().

Foam::scalar d ( ) const
inline

Return const access to diameter.

Definition at line 226 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d_.

Referenced by KinematicParcel< ParcelType >::areaS(), and KinematicParcel< ParcelType >::writeFields().

const Foam::vector & U ( ) const
inline

Return const access to velocity.

Definition at line 233 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::U_.

Referenced by KinematicParcel< ParcelType >::writeFields().

Foam::scalar rho ( ) const
inline

Return const access to density.

Definition at line 240 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::rho_.

Referenced by KinematicParcel< ParcelType >::writeFields().

Foam::scalar tTurb ( ) const
inline

Return const access to time spent in turbulent eddy.

Definition at line 247 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::tTurb_.

Referenced by KinematicParcel< ParcelType >::writeFields().

const Foam::vector & UTurb ( ) const
inline

Return const access to turbulent velocity fluctuation.

Definition at line 254 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::UTurb_.

Referenced by KinematicParcel< ParcelType >::writeFields().

bool & active ( )
inline

Return const access to active flag.

Definition at line 261 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::active_.

Foam::label typeId ( )
inline

Return access to type id.

Definition at line 268 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::typeId_.

Foam::scalar & nParticle ( )
inline

Return access to number of particles.

Definition at line 275 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::nParticle_.

Foam::scalar & d ( )
inline

Return access to diameter.

Definition at line 282 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d_.

Foam::vector & U ( )
inline

Return access to velocity.

Definition at line 289 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::U_.

Foam::scalar & rho ( )
inline

Return access to density.

Definition at line 296 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::rho_.

Foam::scalar & tTurb ( )
inline

Return access to time spent in turbulent eddy.

Definition at line 303 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::tTurb_.

Foam::vector & UTurb ( )
inline

Return access to turbulent velocity fluctuation.

Definition at line 310 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::UTurb_.

Foam::scalar wallImpactDistance ( const vector n) const
inline

The nearest distance to a wall that.

the particle can be in the n direction

Reimplemented from Particle< ParcelType >.

Definition at line 318 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d_.

Foam::label faceInterpolation ( ) const
inline

Return the index of the face to be used in the interpolation.

routine

Reimplemented from Particle< ParcelType >.

Definition at line 327 of file KinematicParcelI.H.

References Particle< ParcelType >::cloud(), and Particle< ParcelType >::face().

Foam::scalar massCell ( const label  cellI) const
inline
Foam::scalar mass ( ) const
inline
Foam::scalar volume ( ) const
inline

Particle volume.

Definition at line 359 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d_.

Referenced by KinematicParcel< ParcelType >::mass().

Foam::scalar volume ( const scalar  d) const
inline

Particle volume for a given diameter.

Definition at line 367 of file KinematicParcelI.H.

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

Foam::scalar areaP ( ) const
inline

Particle projected area.

Definition at line 374 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d_.

Foam::scalar areaP ( const scalar  d) const
inline

Projected area for given diameter.

Definition at line 382 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::areaS().

Foam::scalar areaS ( ) const
inline

Particle surface area.

Definition at line 389 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d_.

Referenced by KinematicParcel< ParcelType >::areaP().

Foam::scalar areaS ( const scalar  d) const
inline

Surface area for given diameter.

Definition at line 397 of file KinematicParcelI.H.

References KinematicParcel< ParcelType >::d(), and Foam::mathematicalConstant::pi().

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

Reynolds number.

Definition at line 406 of file KinematicParcelI.H.

References Foam::mag(), and KinematicParcel< ParcelType >::Uc_.

bool move ( TrackData &  td)
bool hitPatch ( const polyPatch p,
TrackData &  td,
const label  patchI 
)

Overridable function to handle the particle hitting a patch.

Executed before other patch-hitting functions

Reimplemented from Particle< ParcelType >.

Definition at line 282 of file KinematicParcel.C.

References p.

bool hitPatch ( const polyPatch p,
int &  td,
const label  patchI 
)

Overridable function to handle the particle hitting a patch.

Executed before other patch-hitting functions without trackData

Definition at line 304 of file KinematicParcel.C.

void hitProcessorPatch ( const processorPolyPatch ,
TrackData &  td 
)

Overridable function to handle the particle hitting a.

processorPatch

Reimplemented from Particle< ParcelType >.

Definition at line 317 of file KinematicParcel.C.

void hitProcessorPatch ( const processorPolyPatch ,
int &   
)

Overridable function to handle the particle hitting a.

processorPatch without trackData

Definition at line 328 of file KinematicParcel.C.

void hitWallPatch ( const wallPolyPatch wpp,
TrackData &  td 
)

Overridable function to handle the particle hitting a wallPatch.

Reimplemented from Particle< ParcelType >.

Definition at line 338 of file KinematicParcel.C.

void hitWallPatch ( const wallPolyPatch ,
int &   
)

Overridable function to handle the particle hitting a wallPatch.

without trackData

Definition at line 349 of file KinematicParcel.C.

void hitPatch ( const polyPatch ,
TrackData &  td 
)

Overridable function to handle the particle hitting a polyPatch.

Reimplemented from Particle< ParcelType >.

Definition at line 359 of file KinematicParcel.C.

void hitPatch ( const polyPatch ,
int &   
)

Overridable function to handle the particle hitting a polyPatch without trackData

Definition at line 369 of file KinematicParcel.C.

void transformProperties ( const tensor T)
virtual

Transform the physical properties of the particle.

according to the given transformation tensor

Reimplemented from Particle< ParcelType >.

Definition at line 374 of file KinematicParcel.C.

References Foam::transform(), and Particle< ParticleType >::transformProperties().

void transformProperties ( const vector separation)
virtual

Transform the physical properties of the particle.

according to the given separation vector

Reimplemented from Particle< ParcelType >.

Definition at line 383 of file KinematicParcel.C.

References Particle< ParticleType >::transformProperties().


Friends And Related Function Documentation

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

Member Data Documentation

bool active_
protected

Active flag - tracking inactive when active = false.

Definition at line 198 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::active().

label typeId_
protected

Parcel type id.

Definition at line 201 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::typeId().

scalar nParticle_
protected

Number of particles in Parcel.

Definition at line 204 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::nParticle().

vector U_
protected

Velocity of Parcel [m/s].

Definition at line 210 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::U().

scalar rho_
protected

Density [kg/m3].

Definition at line 213 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::mass(), and KinematicParcel< ParcelType >::rho().

scalar tTurb_
protected

Time spent in turbulent eddy [s].

Definition at line 216 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::tTurb().

vector UTurb_
protected

Turbulent velocity fluctuation [m/s].

Definition at line 219 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::UTurb().

scalar rhoc_
protected

Density [kg/m3].

Definition at line 225 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::massCell().

vector Uc_
protected

Velocity [m/s].

Definition at line 228 of file KinematicParcel.H.

Referenced by KinematicParcel< ParcelType >::Re().

scalar muc_
protected

Viscosity [Pa.s].

Definition at line 231 of file KinematicParcel.H.


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