My Project
|
Module for the modular fluid state which stores the phase compositions explicitly in terms of mole fractions. More...
#include <FluidStateCompositionModules.hpp>
Public Member Functions | |
const Scalar & | moleFraction (unsigned phaseIdx, unsigned compIdx) const |
The mole fraction of a component in a phase []. | |
Scalar | massFraction (unsigned phaseIdx, unsigned compIdx) const |
The mass fraction of a component in a phase []. | |
const Scalar & | averageMolarMass (unsigned phaseIdx) const |
The mean molar mass of a fluid phase [kg/mol]. | |
Scalar | molarity (unsigned phaseIdx, unsigned compIdx) const |
The concentration of a component in a phase [mol/m^3]. | |
void | setMoleFraction (unsigned phaseIdx, unsigned compIdx, const Scalar &value) |
Set the mole fraction of a component in a phase [] and update the average molar mass [kg/mol] according to the current composition of the phase. | |
void | setCompressFactor (unsigned phaseIdx, const Scalar &value) |
Scalar | compressFactor (unsigned phaseIdx) const |
template<class FluidState > | |
void | assign (const FluidState &fs) |
Retrieve all parameters from an arbitrary fluid state. | |
void | checkDefined () const |
Make sure that all attributes are defined. | |
const Scalar & | K (unsigned compIdx) const |
void | setKvalue (unsigned compIdx, const Scalar &value) |
Set the K value of a component [-]. | |
const Scalar & | L () const |
The L value of a composition [-]. | |
void | setLvalue (const Scalar &value) |
Set the L value [-]. | |
Scalar | wilsonK_ (unsigned compIdx) const |
Wilson formula to calculate K. | |
Protected Member Functions | |
const Implementation & | asImp_ () const |
Module for the modular fluid state which stores the phase compositions explicitly in terms of mole fractions.
|
inline |
The mean molar mass of a fluid phase [kg/mol].
The average molar mass is the mean mass of one mole of the fluid at current composition. It is defined as the sum of the component's molar masses weighted by the current mole fraction:
|
inline |
Make sure that all attributes are defined.
This method does not do anything if the program is not run under valgrind. If it is, then valgrind will print an error message if some attributes of the object have not been properly defined.
|
inline |
The concentration of a component in a phase [mol/m^3].
This quantity is often called "molar concentration" or just "concentration", but there are many other (though less common) measures for concentration.