TransFlow
0.1.0
A transient pipeline flow simulation library
|
The EquationOfState class is a wrapper around EquationOfStateBase that has one equation of state instance per grid point, and wraps the EquationOfStateBase::evaluate() function. More...
#include <equationofstate.hpp>
Public Member Functions | |
~EquationOfState () | |
Declared to avoid the inline compiler-generated default destructor. | |
EquationOfState (const Pipeline &pipeline, const std::string &type) | |
Construct from pipeline and string to determine the type of equation of state. More... | |
arma::mat | evaluate (const Pipeline &state) |
This is a wrapper around EquationOfStateBase::evaluate() that calls that function for each grid point. More... | |
const EquationOfStateBase & | at (std::size_t pos) const |
std::vector-like at(i) getter | |
auto | size () const |
std::vector-like size() operator | |
Private Attributes | |
std::unique_ptr< std::vector< std::unique_ptr< EquationOfStateBase > > > | m_eos |
Vector of EquationOfStateBase instances, one for each grid point. | |
The EquationOfState class is a wrapper around EquationOfStateBase that has one equation of state instance per grid point, and wraps the EquationOfStateBase::evaluate() function.
EquationOfState::EquationOfState | ( | const Pipeline & | pipeline, |
const std::string & | type | ||
) |
Construct from pipeline and string to determine the type of equation of state.
pipeline | Pipeline instance |
type | Type of equation of state ("BWRS", "GERG04" or "IdealGas") |
arma::mat EquationOfState::evaluate | ( | const Pipeline & | state | ) |
This is a wrapper around EquationOfStateBase::evaluate() that calls that function for each grid point.
state | Pipeline instance |