Loading...
Searching...
No Matches
ReactingParcel< ParcelType > Class Template Reference

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

#include <ReactingParcel.H>

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

Classes

class  constantProperties
 Class to hold reacting parcel constant properties. More...
class  trackingData
class  iNew
 Factory class to read-construct particles (for parallel transfer). More...

Public Member Functions

 TypeName ("ReactingParcel")
 Runtime type information.
 AddToPropertyList (ParcelType, " mass0"+" nPhases(Y1..YN)")
 String representation of properties.
 ReactingParcel (const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
 Construct from mesh, coordinates and topology.
 ReactingParcel (const polyMesh &mesh, const vector &position, const label celli)
 Construct from a position and a cell, searching for the rest of the.
 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.
 ReactingParcel (const polyMesh &mesh, Istream &is, bool readFields=true, bool newFormat=true)
 Construct from Istream.
 ReactingParcel (const ReactingParcel &p, const polyMesh &mesh)
 Construct as a copy.
 ReactingParcel (const ReactingParcel &p)
 Construct as a copy.
virtual autoPtr< particleclone () const
 Return a (basic particle) clone.
virtual autoPtr< particleclone (const polyMesh &mesh) const
 Return a (basic particle) clone.
scalar mass0 () const
 Return const access to initial mass [kg].
const scalarFieldY () const
 Return const access to mass fractions of mixture [].
const scalarFieldYGas () const
 Return const access to mass fractions of gases.
const scalarFieldYLiquid () const
 Return const access to mass fractions of liquids.
const scalarFieldYSolid () const
 Return const access to mass fractions of solids.
scalar & mass0 ()
 Return access to initial mass [kg].
scalarFieldY ()
 Return access to mass fractions of mixture [].
template<class TrackCloudType>
void setCellValues (TrackCloudType &cloud, trackingData &td)
 Set cell values.
template<class TrackCloudType>
void cellValueSourceCorrection (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Correct cell values using latest transfer information.
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.
template<class TrackCloudType>
void calc (TrackCloudType &cloud, trackingData &td, const scalar dt)
 Update parcel properties over the time interval.
void writeProperties (Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
 Write individual parcel properties to stream.
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.
template<class CloudType>
static void readFields (CloudType &c)
 Read - no composition.
template<class CloudType, class CompositionType>
static void writeFields (const CloudType &c, const CompositionType &compModel)
 Write - composition supplied.
template<class CloudType>
static void writeFields (const CloudType &c)
 Write - no composition.
template<class CloudType>
static void readObjects (CloudType &c, const objectRegistry &obr)
 Read particle fields as objects from the obr registry.
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.
template<class CloudType>
static void writeObjects (const CloudType &c, objectRegistry &obr)
 Write particle fields as objects into the obr registry.
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.

Static Public Attributes

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

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.
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.
scalar updateMassFraction (const scalar mass0, const scalarField &dMass, scalarField &Y) const
 Update mass fraction.

Protected Attributes

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

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 67 of file ReactingParcel.H.

Constructor & Destructor Documentation

◆ ReactingParcel() [1/6]

template<class ParcelType>
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 100 of file ReactingParcelI.H.

References coordinates(), mass0_, mesh, and Y_.

Referenced by ReactingParcel< ParcelType >::iNew::operator()(), readFields(), readObjects(), writeFields(), and writeObjects().

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

◆ ReactingParcel() [2/6]

template<class ParcelType>
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 116 of file ReactingParcelI.H.

References mass0_, mesh, and Y_.

◆ ReactingParcel() [3/6]

template<class ParcelType>
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 130 of file ReactingParcelI.H.

◆ ReactingParcel() [4/6]

template<class ParcelType>
ReactingParcel ( const polyMesh & mesh,
Istream & is,
bool readFields = true,
bool newFormat = true )

Construct from Istream.

Definition at line 42 of file ReactingParcelIO.C.

References IOstreamOption::ASCII, IOstream::check(), IOstream::fatalCheckNativeSizes(), IOstreamOption::format(), FUNCTION_NAME, mass0_, mesh, Istream::read(), readFields(), sizeofFields, and Y_.

Here is the call graph for this function:

◆ ReactingParcel() [5/6]

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

Construct as a copy.

◆ ReactingParcel() [6/6]

template<class ParcelType>
ReactingParcel ( const ReactingParcel< ParcelType > & p)

Construct as a copy.

Member Function Documentation

◆ updatedDeltaVolume() [1/2]

template<class ParcelType>
template<class TrackCloudType>
scalar updatedDeltaVolume ( TrackCloudType & cloud,
const scalarField & dMass,
const scalar p,
const scalar T )
protected

Return change of volume due to mass exchange.

Referenced by calc().

Here is the caller graph for this function:

◆ calcPhaseChange()

template<class ParcelType>
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 )
protected

Calculate Phase change.

Definition at line 57 of file ReactingParcel.C.

References composition, Cp, Cs, forAll, Foam::min(), N(), Pr(), Foam::Re(), rho, Foam::constant::thermodynamic::RR, Foam::sum(), Foam::T(), td(), and Y().

Referenced by calc().

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

◆ updateMassFraction()

template<class ParcelType>
Foam::scalar updateMassFraction ( const scalar mass0,
const scalarField & dMass,
scalarField & Y ) const
protected

Update mass fraction.

Definition at line 178 of file ReactingParcel.C.

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

Referenced by calc().

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

◆ TypeName()

template<class ParcelType>
TypeName ( "ReactingParcel< ParcelType >" )

Runtime type information.

◆ AddToPropertyList()

template<class ParcelType>
AddToPropertyList ( ParcelType ,
" mass0"+" nPhases(Y1..YN)"  )

String representation of properties.

◆ clone() [1/2]

◆ clone() [2/2]

◆ mass0() [1/2]

template<class ParcelType>
Foam::scalar mass0 ( ) const
inline

Return const access to initial mass [kg].

Definition at line 203 of file ReactingParcelI.H.

References mass0_.

Referenced by calc(), readFields(), readObjects(), updateMassFraction(), writeFields(), and writeObjects().

Here is the caller graph for this function:

◆ Y() [1/2]

template<class ParcelType>
const Foam::scalarField & Y ( ) const
inline

Return const access to mass fractions of mixture [].

Definition at line 210 of file ReactingParcelI.H.

References Y_.

Referenced by calcPhaseChange(), cellValueSourceCorrection(), readFields(), readObjects(), updateMassFraction(), writeFields(), and writeObjects().

Here is the caller graph for this function:

◆ YGas()

template<class ParcelType>
const Foam::scalarField & YGas ( ) const
inline

Return const access to mass fractions of gases.

Note: for compatibilty only - returns Y()

Definition at line 217 of file ReactingParcelI.H.

References Y_.

◆ YLiquid()

template<class ParcelType>
const Foam::scalarField & YLiquid ( ) const
inline

Return const access to mass fractions of liquids.

Note: for compatibilty only - returns Y()

Definition at line 225 of file ReactingParcelI.H.

References Y_.

◆ YSolid()

template<class ParcelType>
const Foam::scalarField & YSolid ( ) const
inline

Return const access to mass fractions of solids.

Note: for compatibilty only - returns Y()

Definition at line 233 of file ReactingParcelI.H.

References Y_.

◆ mass0() [2/2]

template<class ParcelType>
Foam::scalar & mass0 ( )
inline

Return access to initial mass [kg].

Definition at line 240 of file ReactingParcelI.H.

References mass0_.

◆ Y() [2/2]

template<class ParcelType>
Foam::scalarField & Y ( )
inline

Return access to mass fractions of mixture [].

Definition at line 247 of file ReactingParcelI.H.

References Y_.

◆ setCellValues()

template<class ParcelType>
template<class TrackCloudType>
void setCellValues ( TrackCloudType & cloud,
trackingData & td )

Set cell values.

Definition at line 231 of file ReactingParcel.C.

References coordinates(), Foam::endl(), Foam::nl, td(), and WarningInFunction.

Here is the call graph for this function:

◆ cellValueSourceCorrection()

template<class ParcelType>
template<class TrackCloudType>
void cellValueSourceCorrection ( TrackCloudType & cloud,
trackingData & td,
const scalar dt )

Correct cell values using latest transfer information.

Definition at line 261 of file ReactingParcel.C.

References Foam::endl(), forAll, Foam::mag(), Foam::max(), Foam::nl, td(), WarningInFunction, and Y().

Here is the call graph for this function:

◆ correctSurfaceValues()

template<class ParcelType>
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.

Definition at line 317 of file ReactingParcel.C.

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

Referenced by calc().

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

◆ calc()

◆ readFields() [1/2]

template<class ParcelType>
template<class CloudType, class CompositionType>
void readFields ( CloudType & c,
const CompositionType & compModel )
static

Read - composition supplied.

Definition at line 89 of file ReactingParcelIO.C.

References forAll, mass0(), IOobjectOption::MUST_READ, p, ReactingParcel(), UList< T >::size(), Y(), and Y.

Referenced by ReactingParcel().

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

◆ readFields() [2/2]

template<class ParcelType>
template<class CloudType>
void readFields ( CloudType & c)
static

Read - no composition.

Definition at line 81 of file ReactingParcelIO.C.

◆ writeFields() [1/2]

template<class ParcelType>
template<class CloudType, class CompositionType>
void writeFields ( const CloudType & c,
const CompositionType & compModel )
static

Write - composition supplied.

Definition at line 164 of file ReactingParcelIO.C.

References forAll, mass0(), IOobjectOption::NO_READ, p, ReactingParcel(), UList< T >::size(), Y(), and Y.

Here is the call graph for this function:

◆ writeFields() [2/2]

template<class ParcelType>
template<class CloudType>
void writeFields ( const CloudType & c)
static

Write - no composition.

Definition at line 156 of file ReactingParcelIO.C.

◆ writeProperties()

template<class ParcelType>
void writeProperties ( Ostream & os,
const wordRes & filters,
const word & delim,
const bool namesOnly = false ) const

Write individual parcel properties to stream.

Definition at line 222 of file ReactingParcelIO.C.

References mass0_, os(), writeProp, and Y_.

Here is the call graph for this function:

◆ readObjects() [1/2]

template<class ParcelType>
template<class CloudType>
void readObjects ( CloudType & c,
const objectRegistry & obr )
static

Read particle fields as objects from the obr registry.

  • no composition

Definition at line 245 of file ReactingParcelIO.C.

◆ readObjects() [2/2]

template<class ParcelType>
template<class CloudType, class CompositionType>
void readObjects ( CloudType & c,
const CompositionType & compModel,
const objectRegistry & obr )
static

Read particle fields as objects from the obr registry.

Definition at line 269 of file ReactingParcelIO.C.

References forAll, cloud::lookupIOField(), mass0(), p, ReactingParcel(), UList< T >::size(), and Y().

Here is the call graph for this function:

◆ writeObjects() [1/2]

template<class ParcelType>
template<class CloudType>
void writeObjects ( const CloudType & c,
objectRegistry & obr )
static

Write particle fields as objects into the obr registry.

  • no composition

Definition at line 257 of file ReactingParcelIO.C.

◆ writeObjects() [2/2]

template<class ParcelType>
template<class CloudType, class CompositionType>
void writeObjects ( const CloudType & c,
const CompositionType & compModel,
objectRegistry & obr )
static

Write particle fields as objects into the obr registry.

Definition at line 317 of file ReactingParcelIO.C.

References cloud::createIOField(), forAll, mass0(), p, ReactingParcel(), UList< T >::size(), and Y().

Here is the call graph for this function:

◆ updatedDeltaVolume() [2/2]

template<class ParcelType>
template<class TrackCloudType>
Foam::scalar updatedDeltaVolume ( TrackCloudType & cloud,
const scalarField & dMass,
const scalar p,
const scalar T )

Definition at line 34 of file ReactingParcel.C.

◆ operator<<

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

Member Data Documentation

◆ sizeofFields

template<class ParcelType>
const std::size_t sizeofFields
static

Size in bytes of the fields.

Definition at line 76 of file ReactingParcel.H.

Referenced by ReactingParcel().

◆ mass0_

template<class ParcelType>
scalar mass0_
protected

Initial mass [kg].

Definition at line 233 of file ReactingParcel.H.

Referenced by mass0(), mass0(), ReactingParcel(), ReactingParcel(), ReactingParcel(), and writeProperties().

◆ Y_

template<class ParcelType>
scalarField Y_
protected

Mass fractions of mixture [].

Definition at line 238 of file ReactingParcel.H.

Referenced by calc(), ReactingParcel(), ReactingParcel(), ReactingParcel(), writeProperties(), Y(), Y(), YGas(), YLiquid(), and YSolid().


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