phaseProperties Class Reference

Helper class to manage multi-specie phase properties. More...

Collaboration diagram for phaseProperties:
[legend]

Public Types

enum  phaseType { GAS, LIQUID, SOLID, UNKNOWN }
 Phase type enumeration. More...
 

Public Member Functions

 phaseProperties ()
 Null constructor. More...
 
 phaseProperties (Istream &is)
 Construct from Istream. More...
 
 phaseProperties (const phaseProperties &pp)
 Construct as copy. More...
 
 ~phaseProperties ()=default
 Destructor. More...
 
void reorder (const wordList &gasNames, const wordList &liquidNames, const wordList &solidNames)
 Reorder species to be consistent with the corresponding. More...
 
phaseType phase () const
 Return const access to the phase type. More...
 
const wordstateLabel () const
 Return const access to the phase state label. More...
 
word phaseTypeName () const
 Return word representation of the phase type. More...
 
const List< word > & names () const
 Return the list of specie names. More...
 
const wordname (const label speciei) const
 Return const access to a specie name. More...
 
const scalarFieldY () const
 Return const access to all specie mass fractions. More...
 
scalar & Y (const label speciei)
 Return non-const access to a specie mass fraction. More...
 
const labelListcarrierIds () const
 Return const access to the map to the carrier ids. More...
 
label id (const word &specieName) const
 Return the id of a specie in the local list by name. More...
 

Static Public Attributes

static const Enum< phaseTypephaseTypeNames
 Corresponding word representations for phase type enumerations. More...
 

Friends

Istreamoperator>> (Istream &, phaseProperties &)
 
Ostreamoperator<< (Ostream &, const phaseProperties &)
 

Detailed Description

Helper class to manage multi-specie phase properties.

Source files

Definition at line 62 of file phaseProperties.H.

Member Enumeration Documentation

◆ phaseType

enum phaseType

Phase type enumeration.

Enumerator
GAS 
LIQUID 
SOLID 
UNKNOWN 

Definition at line 69 of file phaseProperties.H.

Constructor & Destructor Documentation

◆ phaseProperties() [1/3]

Null constructor.

Definition at line 181 of file phaseProperties.C.

◆ phaseProperties() [2/3]

Construct from Istream.

Definition at line 33 of file phasePropertiesIO.C.

◆ phaseProperties() [3/3]

Construct as copy.

Definition at line 191 of file phaseProperties.C.

◆ ~phaseProperties()

~phaseProperties ( )
default

Destructor.

Member Function Documentation

◆ reorder()

void reorder ( const wordList gasNames,
const wordList liquidNames,
const wordList solidNames 
)

Reorder species to be consistent with the corresponding.

phase specie name list

Definition at line 204 of file phaseProperties.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, Foam::reorder(), and solidNames().

Here is the call graph for this function:

◆ phase()

◆ stateLabel()

const Foam::word & stateLabel ( ) const

Return const access to the phase state label.

Definition at line 257 of file phaseProperties.C.

◆ phaseTypeName()

Foam::word phaseTypeName ( ) const

Return word representation of the phase type.

Definition at line 263 of file phaseProperties.C.

◆ names()

const Foam::List< Foam::word > & names ( ) const

Return the list of specie names.

Definition at line 269 of file phaseProperties.C.

◆ name()

const Foam::word & name ( const label  speciei) const

Return const access to a specie name.

Definition at line 275 of file phaseProperties.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ Y() [1/2]

const Foam::scalarField & Y ( ) const

Return const access to all specie mass fractions.

Definition at line 289 of file phaseProperties.C.

◆ Y() [2/2]

Foam::scalar & Y ( const label  speciei)

Return non-const access to a specie mass fraction.

Definition at line 295 of file phaseProperties.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ carrierIds()

const Foam::labelList & carrierIds ( ) const

Return const access to the map to the carrier ids.

Definition at line 309 of file phaseProperties.C.

Referenced by CompositionModel< Foam::ReactingCloud< Foam::DSMCCloud > >::Cp(), CompositionModel< Foam::ReactingCloud< Foam::DSMCCloud > >::H(), CompositionModel< Foam::ReactingCloud< Foam::DSMCCloud > >::Hc(), CompositionModel< Foam::ReactingCloud< Foam::DSMCCloud > >::Hs(), and CompositionModel< Foam::ReactingCloud< Foam::DSMCCloud > >::X().

Here is the caller graph for this function:

◆ id()

Foam::label id ( const word specieName) const

Return the id of a specie in the local list by name.

Returns -1 if not found

Definition at line 315 of file phaseProperties.C.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
phaseProperties  
)
friend

◆ operator<<

Ostream& operator<< ( Ostream ,
const phaseProperties  
)
friend

Member Data Documentation

◆ phaseTypeNames

const Foam::Enum< Foam::phaseProperties::phaseType > phaseTypeNames
static

Corresponding word representations for phase type enumerations.

Definition at line 78 of file phaseProperties.H.

Referenced by Foam::operator<<(), and Foam::operator>>().


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