TransFlow
0.1.0
A transient pipeline flow simulation library
|
The IdealGas class implements the equation of state for an ideal gas. More...
#include <idealgas.hpp>
Public Member Functions | |
IdealGas (const Composition &) | |
IdealGas constructor. Composition is only used to determine molar mass (and density) of the gas. | |
virtual arma::vec | evaluate (const double, const double) const override |
Override. Independent of pressure and temperature. More... | |
virtual double | calculateCompressibility (const double, const double) const override |
Override. Independent of pressure and temperature. More... | |
![]() | |
virtual | ~EquationOfStateBase () |
EquationOfStateBase (const arma::vec &composition=Composition::defaultComposition) | |
EquationOfStateBase constructor. More... | |
virtual arma::vec | evaluate (const double pressure, const double temperature, const arma::vec &composition) |
Virtual function for evaluating the EOS at a new composition. More... | |
virtual double | calculateStandardDensity () const |
virtual bool | setComposition (const arma::vec &composition, const bool force=true) |
Set a new composition for the equation of state. More... | |
double | getMolarMassOfMixture () const |
Get the molar mass of the gas. | |
const arma::vec & | getComposition () const |
Get the current composition stored in the EOS instance. | |
Additional Inherited Members | |
![]() | |
arma::vec | m_molarMass = { 16.04, 30.07, 44.1, 58.12, 58.12, 72.15, 72.15, 86.18, 28.13, 44.01} |
The molar mass [g/mol] of the different gas components, in order C1, C2, C3, iC4, nC4, iC5, nC5, C6, N2, CO2. | |
arma::vec::fixed< 10 > | m_composition = arma::vec(10) |
The composition of the gas as fractions, in order C1, C2, C3, iC4, nC4, iC5, nC5, C6, N2, CO2. | |
double | m_molarMassOfMixture |
The molar mass of the gas mixture [g/mol]. | |
double | m_density = 0 |
Cache density for optimization [kg/m3]. | |
The IdealGas class implements the equation of state for an ideal gas.
|
inlineoverridevirtual |
Override. Independent of pressure and temperature.
Implements EquationOfStateBase.
|
inlineoverridevirtual |
Override. Independent of pressure and temperature.
The compressibility is 1, derivatives are zero, and the heat capacities are the heat capacities of an ideal monoatomic gas.
Implements EquationOfStateBase.