MultiComponentPhaseModel< BasePhaseModel > Class Template Reference

Class which represents a phase with multiple species. Returns the species' mass fractions, and their governing equations. More...

Inheritance diagram for MultiComponentPhaseModel< BasePhaseModel >:
[legend]
Collaboration diagram for MultiComponentPhaseModel< BasePhaseModel >:
[legend]

Public Member Functions

 MultiComponentPhaseModel (const phaseSystem &fluid, const word &phaseName, const label index)
 
virtual ~MultiComponentPhaseModel ()
 Destructor. More...
 
virtual void correctThermo ()
 Correct the thermodynamics. More...
 
virtual bool pure () const
 Return whether the phase is pure (i.e., not multi-component) More...
 
virtual tmp< fvScalarMatrixYiEqn (volScalarField &Yi)
 Return the species fraction equation. More...
 
virtual const PtrList< volScalarField > & Y () const
 Return the species mass fractions. More...
 
virtual const volScalarFieldY (const word &name) const
 Return a species mass fraction by name. More...
 
virtual PtrList< volScalarField > & YRef ()
 Access the species mass fractions. More...
 
virtual const UPtrList< volScalarField > & YActive () const
 Return the active species mass fractions. More...
 
virtual UPtrList< volScalarField > & YActiveRef ()
 Access the active species mass fractions. More...
 
 MultiComponentPhaseModel (const phaseSystem &fluid, const word &phaseName)
 
virtual ~MultiComponentPhaseModel ()=default
 Destructor. More...
 
const hashedWordListspecies () const
 Species table. More...
 
virtual const phaseThermo & thermo () const
 Access to thermo. More...
 
virtual phaseThermo & thermo ()
 Access non-const thermo. More...
 
virtual void correct ()
 Correct phase thermo. More...
 
virtual void solveYi (PtrList< volScalarField::Internal > &, PtrList< volScalarField::Internal > &)
 Solve species fraction equation. More...
 
virtual const PtrList< volScalarField > & Y () const
 Constant access the species mass fractions. More...
 
virtual PtrList< volScalarField > & Y ()
 Access the species mass fractions. More...
 
label inertIndex () const
 Return inert species index. More...
 

Protected Member Functions

void calculateMassFractions ()
 Transfor volume fraction into mass fractions. More...
 
void calculateVolumeFractions ()
 Transfor mass fraction into volume fractions. More...
 

Protected Attributes

dimensionedScalar Sct_
 Turbulent Schmidt number. More...
 
dimensionedScalar residualAlpha_
 Residual phase fraction. More...
 
label inertIndex_
 Inert species index. More...
 
UPtrList< volScalarFieldYActive_
 Pointer list to active species. More...
 
hashedWordList species_
 Species table. More...
 
autoPtr< phaseThermo > thermoPtr_
 Thermophysical model. More...
 
PtrList< volScalarFieldX_
 Ptr list of volumetric fractions for species. More...
 

Detailed Description

template<class BasePhaseModel>
class Foam::MultiComponentPhaseModel< BasePhaseModel >

Class which represents a phase with multiple species. Returns the species' mass fractions, and their governing equations.

Source files

Source files

Definition at line 52 of file MultiComponentPhaseModel.H.

Constructor & Destructor Documentation

◆ MultiComponentPhaseModel() [1/2]

MultiComponentPhaseModel ( const phaseSystem fluid,
const word phaseName,
const label  index 
)

Definition at line 44 of file MultiComponentPhaseModel.C.

References forAll, inertSpecie(), and Y.

Here is the call graph for this function:

◆ ~MultiComponentPhaseModel() [1/2]

Destructor.

Definition at line 92 of file MultiComponentPhaseModel.C.

◆ MultiComponentPhaseModel() [2/2]

MultiComponentPhaseModel ( const phaseSystem fluid,
const word phaseName 
)

◆ ~MultiComponentPhaseModel() [2/2]

virtual ~MultiComponentPhaseModel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ correctThermo()

void correctThermo ( )
virtual

Correct the thermodynamics.

Definition at line 99 of file MultiComponentPhaseModel.C.

References correctThermo(), Foam::dimless, fluid, forAll, mesh, Foam::name(), timeName, and Yt().

Here is the call graph for this function:

◆ pure()

bool pure ( ) const
virtual

Return whether the phase is pure (i.e., not multi-component)

Definition at line 142 of file MultiComponentPhaseModel.C.

◆ YiEqn()

Foam::tmp< Foam::fvScalarMatrix > YiEqn ( volScalarField Yi)
virtual

Return the species fraction equation.

Definition at line 150 of file MultiComponentPhaseModel.C.

References Foam::constant::atomic::alpha, Foam::fac::ddt(), Foam::fac::div(), Foam::fac::interpolate(), Foam::fac::laplacian(), R, rho, and thermo.

Here is the call graph for this function:

◆ Y() [1/4]

const Foam::PtrList< Foam::volScalarField > & Y ( ) const
virtual

Return the species mass fractions.

Definition at line 178 of file MultiComponentPhaseModel.C.

◆ Y() [2/4]

const Foam::volScalarField & Y ( const word name) const
virtual

Return a species mass fraction by name.

Definition at line 186 of file MultiComponentPhaseModel.C.

References Foam::name().

Here is the call graph for this function:

◆ YRef()

Foam::PtrList< Foam::volScalarField > & YRef ( )
virtual

Access the species mass fractions.

Definition at line 194 of file MultiComponentPhaseModel.C.

◆ YActive()

const Foam::UPtrList< Foam::volScalarField > & YActive ( ) const
virtual

Return the active species mass fractions.

Definition at line 202 of file MultiComponentPhaseModel.C.

◆ YActiveRef()

Foam::UPtrList< Foam::volScalarField > & YActiveRef ( )
virtual

Access the active species mass fractions.

Definition at line 210 of file MultiComponentPhaseModel.C.

◆ calculateMassFractions()

void calculateMassFractions ( )
protected

Transfor volume fraction into mass fractions.

◆ calculateVolumeFractions()

void calculateVolumeFractions ( )
protected

Transfor mass fraction into volume fractions.

◆ species()

const hashedWordList& species ( ) const
inline

Species table.

Definition at line 105 of file MultiComponentPhaseModel.H.

References MultiComponentPhaseModel< BasePhaseModel >::species_.

◆ thermo() [1/2]

virtual const phaseThermo& thermo ( ) const
virtual

Access to thermo.

◆ thermo() [2/2]

virtual phaseThermo& thermo ( )
virtual

Access non-const thermo.

◆ correct()

virtual void correct ( )
virtual

Correct phase thermo.

◆ solveYi()

virtual void solveYi ( PtrList< volScalarField::Internal > &  ,
PtrList< volScalarField::Internal > &   
)
virtual

Solve species fraction equation.

◆ Y() [3/4]

virtual const PtrList<volScalarField>& Y ( ) const
virtual

Constant access the species mass fractions.

◆ Y() [4/4]

virtual PtrList<volScalarField>& Y ( )
virtual

Access the species mass fractions.

◆ inertIndex()

label inertIndex ( ) const

Return inert species index.

Member Data Documentation

◆ Sct_

dimensionedScalar Sct_
protected

Turbulent Schmidt number.

Definition at line 61 of file MultiComponentPhaseModel.H.

◆ residualAlpha_

dimensionedScalar residualAlpha_
protected

Residual phase fraction.

Definition at line 64 of file MultiComponentPhaseModel.H.

◆ inertIndex_

label inertIndex_
protected

Inert species index.

Definition at line 67 of file MultiComponentPhaseModel.H.

◆ YActive_

UPtrList<volScalarField> YActive_
protected

Pointer list to active species.

Definition at line 70 of file MultiComponentPhaseModel.H.

◆ species_

hashedWordList species_
protected

Species table.

Definition at line 64 of file MultiComponentPhaseModel.H.

Referenced by MultiComponentPhaseModel< BasePhaseModel >::species().

◆ thermoPtr_

autoPtr<phaseThermo> thermoPtr_
protected

Thermophysical model.

Definition at line 70 of file MultiComponentPhaseModel.H.

◆ X_

PtrList<volScalarField> X_
protected

Ptr list of volumetric fractions for species.

Definition at line 73 of file MultiComponentPhaseModel.H.


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