|
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 EquationOfStateBase is an abstract class, the base class for different equations of state.
The equation of state is used to determine the compressibility factor Z, partial derivatives of Z ( \(Z\), \(\frac{\partial Z}{\partial T}|_p\), \(\frac{\partial Z}{\partial p}|_T\), and \(\frac{\partial Z}{\partial T}|_\rho\) ), as well as the heat capacity at constant pressure ( \(c_p\)) and the heat capacity at constant volume ( \(c_v\)), from the gas composition, pressure and temperature.
virtual arma::vec EquationOfStateBase::evaluate |
( |
const double |
pressure, |
|
|
const double |
temperature |
|
) |
| const |
|
pure virtual |
Pure virtual function for evaluation the EOS at constant composition.
This function is a stencil for a method for calculating the compressibility factor Z, three partial derivatives, and the heat capacity at constant pressure and constant volume.
- Parameters
-
pressure | Gas pressure [Pa]. |
temperature | Gas temperature [K]. |
- Returns
- arma::vec containing \(Z\), \(\frac{\partial Z}{\partial T}|_p\), \(\frac{\partial Z}{\partial p}|_T\), \(\frac{\partial Z}{\partial T}|_\rho\), \(c_p\) and \(c_v\)
Implemented in DummyGas, IdealGas, BWRS, and GERG04.
virtual arma::vec EquationOfStateBase::evaluate |
( |
const double |
pressure, |
|
|
const double |
temperature, |
|
|
const arma::vec & |
composition |
|
) |
| |
|
virtual |
Virtual function for evaluating the EOS at a new composition.
This function is a stencil for the method that calculates the compressibility factor Z, three partial derivatives, and the heat capacity at constant pressure and constant volume.
This function only calls setComposition() before calling EquationOfStateBase::evaluate(), so it can be overriden if more efficient ways of evaluating the equation of state at a new composition is known.
- Parameters
-
pressure | Gas pressure [Pa]. |
temperature | Gas temperature [K]. |
composition | Gas composition fractions [-]. |
- Returns
- arma::vec containing \(Z\), \(\frac{\partial Z}{\partial T}|_p\), \(\frac{\partial Z}{\partial p}|_T\), \(\frac{\partial Z}{\partial T}|_\rho\), \(c_p\) and \(c_v\)