ReactingParcel< ParcelType > Class Template Reference

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

Inheritance diagram for ReactingParcel< ParcelType >:
[legend]
Collaboration diagram for ReactingParcel< ParcelType >:
[legend]

Classes

class  constantProperties
 Class to hold reacting parcel constant properties. More...
 
class  iNew
 Factory class to read-construct particles used for. More...
 
class  trackingData
 

Public Member Functions

 TypeName ("ReactingParcel")
 Runtime type information. More...
 
 AddToPropertyList (ParcelType, " mass0"+" nPhases(Y1..YN)")
 String representation of properties. More...
 
 ReactingParcel (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
 Construct from mesh, coordinates and topology. More...
 
 ReactingParcel (const polyMesh &mesh, const vector &position, const label celli)
 Construct from a position and a cell, searching for the rest of the. More...
 
 ReactingParcel (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label typeId, const scalar nParticle0, const scalar d0, const scalar dTarget0, const vector &U0, const vector &f0, const vector &angularMomentum0, const vector &torque0, const scalarField &Y0, const constantProperties &constProps)
 Construct from components. More...
 
 ReactingParcel (const polyMesh &mesh, Istream &is, bool readFields=true, bool newFormat=true)
 Construct from Istream. More...
 
 ReactingParcel (const ReactingParcel &p, const polyMesh &mesh)
 Construct as a copy. More...
 
 ReactingParcel (const ReactingParcel &p)
 Construct as a copy. More...
 
virtual autoPtr< particleclone () const
 Construct and return a (basic particle) clone. More...
 
virtual autoPtr< particleclone (const polyMesh &mesh) const
 Construct and return a (basic particle) clone. More...
 
scalar mass0 () const
 Return const access to initial mass [kg]. More...
 
const scalarFieldY () const
 Return const access to mass fractions of mixture []. More...
 
const scalarFieldYGas () const
 Return const access to mass fractions of gases. More...
 
const scalarFieldYLiquid () const
 Return const access to mass fractions of liquids. More...
 
const scalarFieldYSolid () const
 Return const access to mass fractions of solids. More...
 
scalar & mass0 ()
 Return access to initial mass [kg]. More...
 
scalarFieldY ()
 Return access to mass fractions of mixture []. More...
 
template<class TrackCloudType >
void setCellValues (TrackCloudType &cloud, trackingData &td)
 Set cell values. 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 correctSurfaceValues (TrackCloudType &cloud, trackingData &td, const scalar T, const scalarField &Cs, scalar &rhos, scalar &mus, scalar &Prs, scalar &kappas)
 Correct surface values due to emitted species. More...
 
template<class TrackCloudType >
void calc (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Update parcel properties over the time interval. More...
 
void writeProperties (Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
 Write individual parcel properties to stream. More...
 
template<class TrackCloudType >
Foam::scalar updatedDeltaVolume (TrackCloudType &cloud, const scalarField &dMass, const scalar p, const scalar T)
 

Static Public Member Functions

template<class CloudType , class CompositionType >
static void readFields (CloudType &c, const CompositionType &compModel)
 Read - composition supplied. More...
 
template<class CloudType >
static void readFields (CloudType &c)
 Read - no composition. More...
 
template<class CloudType , class CompositionType >
static void writeFields (const CloudType &c, const CompositionType &compModel)
 Write - composition supplied. More...
 
template<class CloudType >
static void writeFields (const CloudType &c)
 Write - no composition. More...
 
template<class CloudType >
static void readObjects (CloudType &c, const objectRegistry &obr)
 Read particle fields as objects from the obr registry. More...
 
template<class CloudType , class CompositionType >
static void readObjects (CloudType &c, const CompositionType &compModel, const objectRegistry &obr)
 Read particle fields as objects from the obr registry. More...
 
template<class CloudType >
static void writeObjects (const CloudType &c, objectRegistry &obr)
 Write particle fields as objects into the obr registry. More...
 
template<class CloudType , class CompositionType >
static void writeObjects (const CloudType &c, const CompositionType &compModel, objectRegistry &obr)
 Write particle fields as objects into the obr registry. More...
 

Static Public Attributes

static const std::size_t sizeofFields
 Size in bytes of the fields. More...
 

Protected Member Functions

template<class TrackCloudType >
scalar updatedDeltaVolume (TrackCloudType &cloud, const scalarField &dMass, const scalar p, const scalar T)
 Return change of volume due to mass exchange. More...
 
template<class TrackCloudType >
void calcPhaseChange (TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Re, const scalar Pr, const scalar Ts, const scalar nus, const scalar d, const scalar T, const scalar mass, const scalar rho, const label idPhase, const scalar YPhase, const scalarField &YLiq, const scalarField &YSol, scalarField &dMassPC, scalar &Sh, scalar &N, scalar &NCpW, scalarField &Cs)
 Calculate Phase change. More...
 
scalar updateMassFraction (const scalar mass0, const scalarField &dMass, scalarField &Y) const
 Update mass fraction. More...
 

Protected Attributes

scalar mass0_
 Initial mass [kg]. More...
 
scalarField Y_
 Mass fractions of mixture []. More...
 

Friends

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

Detailed Description

template<class ParcelType>
class Foam::ReactingParcel< ParcelType >

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

Source files

Definition at line 71 of file ReactingParcel.H.

Constructor & Destructor Documentation

◆ ReactingParcel() [1/6]

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

Construct from mesh, coordinates and topology.

Other properties initialised as null

Definition at line 107 of file ReactingParcelI.H.

◆ ReactingParcel() [2/6]

ReactingParcel ( const polyMesh mesh,
const vector position,
const label  celli 
)
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 123 of file ReactingParcelI.H.

◆ ReactingParcel() [3/6]

ReactingParcel ( const polyMesh mesh,
const barycentric coordinates,
const label  celli,
const label  tetFacei,
const label  tetPti,
const label  typeId,
const scalar  nParticle0,
const scalar  d0,
const scalar  dTarget0,
const vector U0,
const vector f0,
const vector angularMomentum0,
const vector torque0,
const scalarField Y0,
const constantProperties constProps 
)
inline

Construct from components.

Definition at line 137 of file ReactingParcelI.H.

References ReactingParcel< ParcelType >::mass0_.

◆ ReactingParcel() [4/6]

ReactingParcel ( const polyMesh mesh,
Istream is,
bool  readFields = true,
bool  newFormat = true 
)

◆ ReactingParcel() [5/6]

ReactingParcel ( const ReactingParcel< ParcelType > &  p,
const polyMesh mesh 
)

Construct as a copy.

◆ ReactingParcel() [6/6]

ReactingParcel ( const ReactingParcel< ParcelType > &  p)

Construct as a copy.

Member Function Documentation

◆ updatedDeltaVolume() [1/2]

scalar updatedDeltaVolume ( TrackCloudType &  cloud,
const scalarField dMass,
const scalar  p,
const scalar  T 
)
protected

Return change of volume due to mass exchange.

◆ calcPhaseChange()

void calcPhaseChange ( TrackCloudType &  cloud,
trackingData td,
const scalar  dt,
const scalar  Re,
const scalar  Pr,
const scalar  Ts,
const scalar  nus,
const scalar  d,
const scalar  T,
const scalar  mass,
const scalar  rho,
const label  idPhase,
const scalar  YPhase,
const scalarField YLiq,
const scalarField YSol,
scalarField dMassPC,
scalar &  Sh,
scalar &  N,
scalar &  NCpW,
scalarField Cs 
)
protected

Calculate Phase change.

Definition at line 64 of file ReactingParcel.C.

References composition, Cp, Cs, forAll, Foam::min(), N(), ReactingParcel< ParcelType >::trackingData::pc(), Pr(), Foam::Re(), rho, Foam::constant::thermodynamic::RR, Foam::sum(), T, and Y.

Here is the call graph for this function:

◆ updateMassFraction()

Foam::scalar updateMassFraction ( const scalar  mass0,
const scalarField dMass,
scalarField Y 
) const
protected

Update mass fraction.

Definition at line 185 of file ReactingParcel.C.

References forAll, Foam::sum(), and Y.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "ReactingParcel< ParcelType >"  )

Runtime type information.

◆ AddToPropertyList()

AddToPropertyList ( ParcelType  ,
" mass0"+" nPhases(Y1..YN)"   
)

String representation of properties.

◆ clone() [1/2]

virtual autoPtr< particle > clone ( ) const
inlinevirtual

Construct and return a (basic particle) clone.

Definition at line 330 of file ReactingParcel.H.

◆ clone() [2/2]

virtual autoPtr< particle > clone ( const polyMesh mesh) const
inlinevirtual

Construct and return a (basic particle) clone.

Definition at line 336 of file ReactingParcel.H.

References mesh.

◆ mass0() [1/2]

Foam::scalar mass0
inline

Return const access to initial mass [kg].

Definition at line 210 of file ReactingParcelI.H.

◆ Y() [1/2]

const Foam::scalarField & Y
inline

Return const access to mass fractions of mixture [].

Definition at line 217 of file ReactingParcelI.H.

◆ YGas()

const Foam::scalarField & YGas
inline

Return const access to mass fractions of gases.

Note: for compatibilty only - returns Y()

Definition at line 224 of file ReactingParcelI.H.

◆ YLiquid()

const Foam::scalarField & YLiquid
inline

Return const access to mass fractions of liquids.

Note: for compatibilty only - returns Y()

Definition at line 232 of file ReactingParcelI.H.

◆ YSolid()

const Foam::scalarField & YSolid
inline

Return const access to mass fractions of solids.

Note: for compatibilty only - returns Y()

Definition at line 240 of file ReactingParcelI.H.

◆ mass0() [2/2]

Foam::scalar & mass0
inline

Return access to initial mass [kg].

Definition at line 247 of file ReactingParcelI.H.

◆ Y() [2/2]

Foam::scalarField & Y
inline

Return access to mass fractions of mixture [].

Definition at line 254 of file ReactingParcelI.H.

◆ setCellValues()

void setCellValues ( TrackCloudType &  cloud,
trackingData td 
)

Set cell values.

Definition at line 238 of file ReactingParcel.C.

References coordinates(), Foam::endl(), interpolation< Type >::interpolate(), Foam::nl, ReactingParcel< ParcelType >::trackingData::pc(), ReactingParcel< ParcelType >::trackingData::pInterp(), KinematicParcel< ParcelType >::setCellValues(), and WarningInFunction.

Here is the call graph for this function:

◆ cellValueSourceCorrection()

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

Correct cell values using latest transfer information.

Definition at line 268 of file ReactingParcel.C.

References Foam::endl(), forAll, Foam::mag(), Foam::max(), Foam::nl, ReactingParcel< ParcelType >::trackingData::pc(), WarningInFunction, and Y.

Here is the call graph for this function:

◆ correctSurfaceValues()

void correctSurfaceValues ( TrackCloudType &  cloud,
trackingData td,
const scalar  T,
const scalarField Cs,
scalar &  rhos,
scalar &  mus,
scalar &  Prs,
scalar &  kappas 
)

Correct surface values due to emitted species.

Definition at line 324 of file ReactingParcel.C.

References Foam::cbrt(), Cs, forAll, Foam::max(), Foam::min(), ReactingParcel< ParcelType >::trackingData::pc(), Foam::constant::thermodynamic::RR, UList< T >::size(), Foam::sqrt(), Foam::sum(), and T.

Here is the call graph for this function:

◆ calc()

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

Update parcel properties over the time interval.

Definition at line 416 of file ReactingParcel.C.

References Foam::cbrt(), composition, basicSpecieMixture::Cp(), Cs, forAll, basicSpecieMixture::Hs(), ReactingParcel< ParcelType >::trackingData::pc(), Foam::constant::mathematical::pi(), Foam::pow4(), Foam::Re(), rho0, UList< T >::size(), basicMultiComponentMixture::species(), Su, T0, and Foam::Zero.

Here is the call graph for this function:

◆ readFields() [1/2]

void readFields ( CloudType c,
const CompositionType &  compModel 
)
static

Read - composition supplied.

Definition at line 103 of file ReactingParcelIO.C.

References forAll, IOobject::MUST_READ, p, List< T >::setSize(), UList< T >::size(), and Y.

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

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

◆ readFields() [2/2]

void readFields ( CloudType c)
static

Read - no composition.

Definition at line 95 of file ReactingParcelIO.C.

◆ writeFields() [1/2]

void writeFields ( const CloudType c,
const CompositionType &  compModel 
)
static

Write - composition supplied.

Definition at line 178 of file ReactingParcelIO.C.

References forAll, IOobject::NO_READ, p, UList< T >::size(), regIOobject::write(), fieldAverage::writeFields(), and Y.

Here is the call graph for this function:

◆ writeFields() [2/2]

void writeFields ( const CloudType c)
static

Write - no composition.

Definition at line 170 of file ReactingParcelIO.C.

References fieldAverage::writeFields().

Here is the call graph for this function:

◆ writeProperties()

void writeProperties ( Ostream os,
const wordRes filters,
const word delim,
const bool  namesOnly = false 
) const

Write individual parcel properties to stream.

Definition at line 235 of file ReactingParcelIO.C.

References os(), writeProp, and injectedParticle::writeProperties().

Here is the call graph for this function:

◆ readObjects() [1/2]

void readObjects ( CloudType c,
const objectRegistry obr 
)
static

Read particle fields as objects from the obr registry.

  • no composition

Definition at line 258 of file ReactingParcelIO.C.

References injectedParticle::readObjects().

Here is the call graph for this function:

◆ readObjects() [2/2]

void readObjects ( CloudType c,
const CompositionType &  compModel,
const objectRegistry obr 
)
static

Read particle fields as objects from the obr registry.

Definition at line 282 of file ReactingParcelIO.C.

References forAll, p, injectedParticle::readObjects(), UList< T >::size(), and Y.

Here is the call graph for this function:

◆ writeObjects() [1/2]

void writeObjects ( const CloudType c,
objectRegistry obr 
)
static

Write particle fields as objects into the obr registry.

  • no composition

Definition at line 270 of file ReactingParcelIO.C.

◆ writeObjects() [2/2]

void writeObjects ( const CloudType c,
const CompositionType &  compModel,
objectRegistry obr 
)
static

Write particle fields as objects into the obr registry.

Definition at line 330 of file ReactingParcelIO.C.

References forAll, p, UList< T >::size(), and Y.

Here is the call graph for this function:

◆ updatedDeltaVolume() [2/2]

Foam::scalar updatedDeltaVolume ( TrackCloudType &  cloud,
const scalarField dMass,
const scalar  p,
const scalar  T 
)

Definition at line 41 of file ReactingParcel.C.

References composition, forAll, p, UList< T >::size(), Foam::sum(), and T.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator

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

Member Data Documentation

◆ sizeofFields

const std::size_t sizeofFields
static

Size in bytes of the fields.

Definition at line 78 of file ReactingParcel.H.

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

◆ mass0_

scalar mass0_
protected

Initial mass [kg].

Definition at line 198 of file ReactingParcel.H.

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

◆ Y_

scalarField Y_
protected

Mass fractions of mixture [].

Definition at line 201 of file ReactingParcel.H.

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


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