Helper class to manage multi-specie phase properties. More...
Public Types | |
enum | phaseType { GAS, LIQUID, SOLID, UNKNOWN } |
Phase type enumeration. More... | |
Public Member Functions | |
phaseProperties () | |
Null constructor. More... | |
phaseProperties (Istream &) | |
Construct from Istream. More... | |
phaseProperties (const phaseProperties &) | |
Construct as copy. More... | |
~phaseProperties () | |
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 word & | stateLabel () 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 word & | name (const label speciei) const |
Return const access to a specie name. More... | |
const scalarField & | Y () 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 labelList & | carrierIds () 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 NamedEnum< phaseType, 4 > | phaseTypeNames |
Corresponding word representations for phase type enumerations. More... | |
Friends | |
Istream & | operator>> (Istream &, phaseProperties &) |
Ostream & | operator<< (Ostream &, const phaseProperties &) |
Helper class to manage multi-specie phase properties.
Definition at line 52 of file phaseProperties.H.
enum phaseType |
Phase type enumeration.
Enumerator | |
---|---|
GAS | |
LIQUID | |
SOLID | |
UNKNOWN |
Definition at line 59 of file phaseProperties.H.
phaseProperties | ( | ) |
Null constructor.
Definition at line 195 of file phaseProperties.C.
phaseProperties | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 31 of file phasePropertiesIO.C.
References token::BEGIN_BLOCK, IOstream::check(), Foam::decrIndent(), token::END_BLOCK, token::END_STATEMENT, forAll, forAllConstIter(), Foam::incrIndent(), entry::keyword(), dictionary::lookup(), Foam::nl, dictionary::null, Foam::operator<<(), Foam::operator>>(), phaseProperties::phaseTypeNames, Foam::readScalar(), List< T >::setSize(), DLListBase::size(), and Ostream::writeKeyword().
phaseProperties | ( | const phaseProperties & | pp | ) |
Construct as copy.
Definition at line 205 of file phaseProperties.C.
~phaseProperties | ( | ) |
Destructor.
Definition at line 217 of file phaseProperties.C.
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 224 of file phaseProperties.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, phaseProperties::GAS, phaseProperties::LIQUID, Foam::nl, phaseProperties::phaseTypeNames, and phaseProperties::SOLID.
Foam::phaseProperties::phaseType phase | ( | ) | const |
Return const access to the phase type.
Definition at line 277 of file phaseProperties.C.
Referenced by CompositionModel< CloudType >::Cp(), CompositionModel< CloudType >::H(), CompositionModel< CloudType >::Hc(), CompositionModel< CloudType >::Hs(), CompositionModel< CloudType >::L(), and CompositionModel< CloudType >::X().
const Foam::word & stateLabel | ( | ) | const |
Return const access to the phase state label.
Definition at line 283 of file phaseProperties.C.
Foam::word phaseTypeName | ( | ) | const |
Return word representation of the phase type.
Definition at line 289 of file phaseProperties.C.
References phaseProperties::phaseTypeNames.
const Foam::List< Foam::word > & names | ( | ) | const |
Return the list of specie names.
Definition at line 295 of file phaseProperties.C.
const Foam::word & name | ( | const label | speciei | ) | const |
Return const access to a specie name.
Definition at line 301 of file phaseProperties.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::nl, and List< T >::size().
const Foam::scalarField & Y | ( | ) | const |
Return const access to all specie mass fractions.
Definition at line 317 of file phaseProperties.C.
Foam::scalar & Y | ( | const label | speciei | ) |
Return non-const access to a specie mass fraction.
Definition at line 323 of file phaseProperties.C.
References Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::nl, and List< T >::size().
const Foam::labelList & carrierIds | ( | ) | const |
Return const access to the map to the carrier ids.
Definition at line 339 of file phaseProperties.C.
Referenced by CompositionModel< CloudType >::Cp(), CompositionModel< CloudType >::H(), CompositionModel< CloudType >::Hc(), CompositionModel< CloudType >::Hs(), and CompositionModel< CloudType >::X().
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 345 of file phaseProperties.C.
References forAll.
|
friend |
|
friend |
|
static |
Corresponding word representations for phase type enumerations.
Definition at line 68 of file phaseProperties.H.
Referenced by NamedEnum< Enum, nEnum >::names(), phaseProperties::phaseProperties(), phaseProperties::phaseTypeName(), and phaseProperties::reorder().