Data Structures | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends
ReactingParcel Class Reference

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

Collaboration diagram for ReactingParcel:
Collaboration graph
[legend]

Data Structures

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 vector &position, const label cellI, const label tetFaceI, const label tetPtI)
 Construct from owner, position, and cloud owner. More...
 
 ReactingParcel (const polyMesh &mesh, const vector &position, 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)
 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...
 
scalar pc () const
 Return the owner cell pressure [Pa]. More...
 
scalar & pc ()
 Return reference to the owner cell pressure [Pa]. More...
 
scalar & mass0 ()
 Return access to initial mass [kg]. More...
 
scalarFieldY ()
 Return access to mass fractions of mixture []. More...
 
template<class TrackData >
void setCellValues (TrackData &td, const scalar dt, const label cellI)
 Set cell values. More...
 
template<class TrackData >
void cellValueSourceCorrection (TrackData &td, const scalar dt, const label cellI)
 Correct cell values using latest transfer information. More...
 
template<class TrackData >
void correctSurfaceValues (TrackData &td, const label cellI, const scalar T, const scalarField &Cs, scalar &rhos, scalar &mus, scalar &Prs, scalar &kappas)
 Correct surface values due to emitted species. More...
 
template<class TrackData >
void calc (TrackData &td, const scalar dt, const label cellI)
 Update parcel properties over the time interval. More...
 

Static Public Member Functions

template<class CloudType , class CompositionType >
static void readFields (CloudType &c, const CompositionType &compModel)
 Read. 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. More...
 
template<class CloudType >
static void writeFields (const CloudType &c)
 Write - composition supplied. More...
 

Protected Member Functions

template<class TrackData >
void calcPhaseChange (TrackData &td, const scalar dt, const label cellI, const scalar Re, const scalar Pr, const scalar Ts, const scalar nus, const scalar d, const scalar T, const scalar mass, const label idPhase, const scalar YPhase, const scalarField &YComponents, 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...
 
scalar pc_
 Pressure [Pa]. More...
 

Static Private Attributes

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

Friends

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

Detailed Description

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

Source files

Definition at line 50 of file ReactingParcel.H.

Constructor & Destructor Documentation

◆ ReactingParcel() [1/5]

ReactingParcel ( const polyMesh mesh,
const vector position,
const label  cellI,
const label  tetFaceI,
const label  tetPtI 
)
inline

Construct from owner, position, and cloud owner.

Other properties initialised as null

Definition at line 64 of file ReactingParcelI.H.

◆ ReactingParcel() [2/5]

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

References ReactingParcel::mass0_.

◆ ReactingParcel() [3/5]

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

Construct from Istream.

◆ ReactingParcel() [4/5]

ReactingParcel ( const ReactingParcel p,
const polyMesh mesh 
)

Construct as a copy.

◆ ReactingParcel() [5/5]

Construct as a copy.

Member Function Documentation

◆ calcPhaseChange()

void calcPhaseChange ( TrackData &  td,
const scalar  dt,
const label  cellI,
const scalar  Re,
const scalar  Pr,
const scalar  Ts,
const scalar  nus,
const scalar  d,
const scalar  T,
const scalar  mass,
const label  idPhase,
const scalar  YPhase,
const scalarField YComponents,
scalarField dMassPC,
scalar &  Sh,
scalar &  N,
scalar &  NCpW,
scalarField Cs 
)
protected

◆ updateMassFraction()

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

Update mass fraction.

Definition at line 149 of file ReactingParcel.C.

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

Here is the call graph for this function:

◆ TypeName()

TypeName ( "ReactingParcel"  )

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

References mesh.

◆ mass0() [1/2]

Foam::scalar mass0 ( ) const
inline

Return const access to initial mass [kg].

Definition at line 146 of file ReactingParcelI.H.

References ReactingParcel::mass0_.

◆ Y() [1/2]

const Foam::scalarField & Y ( ) const
inline

Return const access to mass fractions of mixture [].

Definition at line 153 of file ReactingParcelI.H.

References ReactingParcel::Y_.

◆ pc() [1/2]

Foam::scalar pc ( ) const
inline

Return the owner cell pressure [Pa].

Definition at line 160 of file ReactingParcelI.H.

References ReactingParcel::pc_.

◆ pc() [2/2]

Foam::scalar & pc ( )
inline

Return reference to the owner cell pressure [Pa].

Definition at line 167 of file ReactingParcelI.H.

References ReactingParcel::pc_.

◆ mass0() [2/2]

Foam::scalar & mass0 ( )
inline

Return access to initial mass [kg].

Definition at line 174 of file ReactingParcelI.H.

References ReactingParcel::mass0_.

◆ Y() [2/2]

Foam::scalarField & Y ( )
inline

Return access to mass fractions of mixture [].

Definition at line 181 of file ReactingParcelI.H.

References ReactingParcel::Y_.

◆ setCellValues()

void setCellValues ( TrackData &  td,
const scalar  dt,
const label  cellI 
)

Set cell values.

Definition at line 204 of file ReactingParcel.C.

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

Here is the call graph for this function:

◆ cellValueSourceCorrection()

void cellValueSourceCorrection ( TrackData &  td,
const scalar  dt,
const label  cellI 
)

Correct cell values using latest transfer information.

Definition at line 235 of file ReactingParcel.C.

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

Here is the call graph for this function:

◆ correctSurfaceValues()

void correctSurfaceValues ( TrackData &  td,
const label  cellI,
const scalar  T,
const scalarField Cs,
scalar &  rhos,
scalar &  mus,
scalar &  Prs,
scalar &  kappas 
)

Correct surface values due to emitted species.

Definition at line 296 of file ReactingParcel.C.

References Foam::cbrt(), forAll, Foam::max(), Foam::min(), Foam::constant::thermodynamic::RR, Foam::sqrt(), Foam::sum(), and Foam::T().

Here is the call graph for this function:

◆ calc()

void calc ( TrackData &  td,
const scalar  dt,
const label  cellI 
)

Update parcel properties over the time interval.

Definition at line 388 of file ReactingParcel.C.

References Foam::cbrt(), composition, forAll, Foam::constant::mathematical::pi(), Foam::pow4(), Foam::Re(), Sh, List::size(), basicMultiComponentMixture::species(), Foam::fvc::Su(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ readFields() [1/2]

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

Read.

Definition at line 103 of file ReactingParcelIO.C.

References Foam::constant::universal::c, forAll, forAllIter, IOobject::MUST_READ, p, readFields(), List::size(), and Y.

Here is the call graph for this function:

◆ readFields() [2/2]

void readFields ( CloudType c)
static

Read - no composition.

Definition at line 89 of file ReactingParcelIO.C.

References Foam::constant::universal::c, and readFields().

Here is the call graph for this function:

◆ writeFields() [1/2]

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

Write.

Definition at line 175 of file ReactingParcelIO.C.

References Foam::constant::universal::c, forAll, forAllConstIter(), IOobject::NO_READ, p, List::size(), regIOobject::write(), and Y.

Here is the call graph for this function:

◆ writeFields() [2/2]

void writeFields ( const CloudType c)
static

Write - composition supplied.

Definition at line 166 of file ReactingParcelIO.C.

References Foam::constant::universal::c.

Friends And Related Function Documentation

◆ operator

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

Field Documentation

◆ sizeofFields_

const std::size_t sizeofFields_
staticprivate

Size in bytes of the fields.

Definition at line 72 of file ReactingParcel.H.

◆ mass0_

scalar mass0_
protected

Initial mass [kg].

Definition at line 161 of file ReactingParcel.H.

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

◆ Y_

scalarField Y_
protected

Mass fractions of mixture [].

Definition at line 164 of file ReactingParcel.H.

Referenced by ReactingParcel::Y().

◆ pc_

scalar pc_
protected

Pressure [Pa].

Definition at line 170 of file ReactingParcel.H.

Referenced by ReactingParcel::pc().


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