Loading...
Searching...
No Matches
MultiComponentPhaseModel< BasePhaseModel, phaseThermo > Class Template Reference

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

#include <MultiComponentPhaseModel.H>

Inheritance diagram for MultiComponentPhaseModel< BasePhaseModel, phaseThermo >:
Collaboration diagram for MultiComponentPhaseModel< BasePhaseModel, phaseThermo >:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

hashedWordList species_
 Species table.
label inertIndex_
 Inert species index.
autoPtr< phaseThermo > thermoPtr_
 Thermophysical model.
PtrList< volScalarFieldX_
 Ptr list of volumetric fractions for species.
bool addDiffusion_
 Add diffusion transport on Yi's Eq.
scalar Sct_
 Schmidt number.
dimensionedScalar Sct_
 Turbulent Schmidt number.
dimensionedScalar residualAlpha_
 Residual phase fraction.
UPtrList< volScalarFieldYActive_
 Pointer list to active species.

Detailed Description

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

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

Source files

Source files

Definition at line 51 of file MultiComponentPhaseModel.H.

Constructor & Destructor Documentation

◆ MultiComponentPhaseModel() [1/2]

template<class BasePhaseModel, class phaseThermo>
MultiComponentPhaseModel ( const multiphaseInterSystem & fluid,
const word & phaseName )

◆ ~MultiComponentPhaseModel() [1/2]

template<class BasePhaseModel>
~MultiComponentPhaseModel ( )
virtualdefault

Destructor.

Definition at line 86 of file MultiComponentPhaseModel.C.

◆ MultiComponentPhaseModel() [2/2]

template<class BasePhaseModel>
MultiComponentPhaseModel ( const phaseSystem & fluid,
const word & phaseName,
const label index )

Definition at line 37 of file MultiComponentPhaseModel.C.

References Foam::dimless, fluid, forAll, inertIndex_, inertSpecie(), mesh, residualAlpha_, Sct_, Y(), and YActive_.

Here is the call graph for this function:

◆ ~MultiComponentPhaseModel() [2/2]

template<class BasePhaseModel, class phaseThermo>
virtual ~MultiComponentPhaseModel ( )
virtual

Destructor.

Member Function Documentation

◆ calculateMassFractions()

template<class BasePhaseModel, class phaseThermo>
void calculateMassFractions ( )
protected

Transfor volume fraction into mass fractions.

Definition at line 154 of file MultiComponentPhaseModel.C.

References composition, psiReactionThermo::composition(), Foam::endl(), forAll, Foam::Info, Foam::max(), Foam::min(), species_, thermo, basicSpecieMixture::W(), X_, and Y.

Referenced by solveYi().

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

◆ calculateVolumeFractions()

template<class BasePhaseModel, class phaseThermo>
void calculateVolumeFractions ( )
protected

Transfor mass fraction into volume fractions.

Definition at line 110 of file MultiComponentPhaseModel.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), composition, Foam::dimMass, Foam::dimMoles, fvPatchFieldBase::fixesValue(), forAll, inertIndex_, thermo, dimensioned< Type >::value(), X_, and Y.

Referenced by MultiComponentPhaseModel().

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

◆ species()

template<class BasePhaseModel, class phaseThermo>
const hashedWordList & species ( ) const
inline

Species table.

Definition at line 127 of file MultiComponentPhaseModel.H.

References species_.

◆ thermo() [1/2]

template<class BasePhaseModel, class phaseThermo>
const phaseThermo & thermo ( ) const
virtual

Access to thermo.

Definition at line 177 of file MultiComponentPhaseModel.C.

References thermoPtr_.

◆ thermo() [2/2]

template<class BasePhaseModel, class phaseThermo>
phaseThermo & thermo ( )
virtual

Access non-const thermo.

Definition at line 185 of file MultiComponentPhaseModel.C.

References thermoPtr_.

◆ correct()

template<class BasePhaseModel, class phaseThermo>
void correct ( )
virtual

◆ solveYi()

◆ Y() [1/4]

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

Constant access the species mass fractions.

Definition at line 432 of file MultiComponentPhaseModel.C.

References thermoPtr_.

Referenced by MultiComponentPhaseModel(), and MultiComponentPhaseModel().

Here is the caller graph for this function:

◆ Y() [2/4]

template<class BasePhaseModel, class phaseThermo>
Foam::PtrList< Foam::volScalarField > & Y ( )
virtual

Access the species mass fractions.

Definition at line 440 of file MultiComponentPhaseModel.C.

References thermoPtr_.

◆ inertIndex()

template<class BasePhaseModel, class phaseThermo>
Foam::label inertIndex ( ) const

Return inert species index.

Definition at line 448 of file MultiComponentPhaseModel.C.

References inertIndex_.

◆ correctThermo()

◆ pure()

template<class BasePhaseModel>
bool pure ( ) const
virtual

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

Definition at line 136 of file MultiComponentPhaseModel.C.

◆ YiEqn()

template<class BasePhaseModel>
Foam::tmp< Foam::fvScalarMatrix > YiEqn ( volScalarField & Yi)
virtual

Return the species fraction equation.

Definition at line 144 of file MultiComponentPhaseModel.C.

References alpha, Foam::fvc::ddt(), Foam::fvm::ddt(), Foam::fvm::div(), Foam::fvc::interpolate(), Foam::fvm::laplacian(), IOobject::name(), residualAlpha_, rho, Sct_, thermo, and trho.

Referenced by solveYi().

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

◆ Y() [3/4]

template<class BasePhaseModel, class phaseThermo>
virtual const PtrList< volScalarField > & Y ( ) const
virtual

Return the species mass fractions.

References Foam::name().

Here is the call graph for this function:

◆ Y() [4/4]

template<class BasePhaseModel>
const Foam::volScalarField & Y ( const word & name) const
virtual

Return a species mass fraction by name.

Definition at line 181 of file MultiComponentPhaseModel.C.

References Foam::name().

Here is the call graph for this function:

◆ YRef()

template<class BasePhaseModel>
Foam::PtrList< Foam::volScalarField > & YRef ( )
virtual

Access the species mass fractions.

Definition at line 189 of file MultiComponentPhaseModel.C.

Referenced by correctThermo().

Here is the caller graph for this function:

◆ YActive()

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

Return the active species mass fractions.

Definition at line 197 of file MultiComponentPhaseModel.C.

References YActive_.

◆ YActiveRef()

template<class BasePhaseModel>
Foam::UPtrList< Foam::volScalarField > & YActiveRef ( )
virtual

Access the active species mass fractions.

Definition at line 205 of file MultiComponentPhaseModel.C.

References YActive_.

Member Data Documentation

◆ species_

template<class BasePhaseModel, class phaseThermo>
hashedWordList species_
protected

Species table.

Definition at line 62 of file MultiComponentPhaseModel.H.

Referenced by calculateMassFractions(), MultiComponentPhaseModel(), solveYi(), and species().

◆ inertIndex_

template<class BasePhaseModel, class phaseThermo>
label inertIndex_
protected

◆ thermoPtr_

template<class BasePhaseModel, class phaseThermo>
autoPtr<phaseThermo> thermoPtr_
protected

Thermophysical model.

Definition at line 72 of file MultiComponentPhaseModel.H.

Referenced by MultiComponentPhaseModel(), thermo(), thermo(), Y(), and Y().

◆ X_

template<class BasePhaseModel, class phaseThermo>
PtrList<volScalarField> X_
protected

Ptr list of volumetric fractions for species.

Definition at line 77 of file MultiComponentPhaseModel.H.

Referenced by calculateMassFractions(), calculateVolumeFractions(), MultiComponentPhaseModel(), and solveYi().

◆ addDiffusion_

template<class BasePhaseModel, class phaseThermo>
bool addDiffusion_
protected

Add diffusion transport on Yi's Eq.

Definition at line 82 of file MultiComponentPhaseModel.H.

Referenced by MultiComponentPhaseModel(), and solveYi().

◆ Sct_ [1/2]

template<class BasePhaseModel, class phaseThermo>
scalar Sct_
protected

Schmidt number.

Definition at line 87 of file MultiComponentPhaseModel.H.

Referenced by MultiComponentPhaseModel(), MultiComponentPhaseModel(), solveYi(), and YiEqn().

◆ Sct_ [2/2]

template<class BasePhaseModel, class phaseThermo>
dimensionedScalar Sct_
protected

Turbulent Schmidt number.

Definition at line 59 of file MultiComponentPhaseModel.H.

◆ residualAlpha_

template<class BasePhaseModel, class phaseThermo>
dimensionedScalar residualAlpha_
protected

Residual phase fraction.

Definition at line 64 of file MultiComponentPhaseModel.H.

Referenced by MultiComponentPhaseModel(), and YiEqn().

◆ YActive_

template<class BasePhaseModel, class phaseThermo>
UPtrList<volScalarField> YActive_
protected

Pointer list to active species.

Definition at line 74 of file MultiComponentPhaseModel.H.

Referenced by MultiComponentPhaseModel(), YActive(), and YActiveRef().


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