OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
Implementation of the ideal gas law for mixtures. More...
#include <ideal_gas.h>
Public Member Functions | |
IdealGasMixture () | |
Constructor. | |
~IdealGasMixture () | |
Destructor. | |
void | set_pT_xi_and_gases (const double p, const double T, const std::vector< double > xv, std::vector< FuelCellShop::Material::PureGas * > gases) |
Function to set the temperature in K, pressure in Pa of the gas and the molar fractions. | |
void | set_cT_xi_and_gases (const double c, const double T, const std::vector< double > xv, std::vector< FuelCellShop::Material::PureGas * > gases) |
Function to modify the temperature in K and concentration in mol/m3 of the gas. | |
void | set_pv_T_and_gases (const std::vector< double > pv, const double T, std::vector< FuelCellShop::Material::PureGas * > gases) |
Function to set the temperature in K, pressure in Pa of the gas and the molar fractions. | |
void | set_cv_T_and_gases (const std::vector< double > cv, const double T, std::vector< FuelCellShop::Material::PureGas * > gases) |
Function to modify the temperature in K and concentration in mol/m3 of the gas. | |
double | get_T () |
Member function used to return the temperature of the gas in Kelvin. | |
double | get_p () |
Member function used to return the total pressure of the gas mixture in Pascal. | |
std::vector< double > | get_pi () |
Member function used to return the partial pressure of the components in the gas in Pascal. | |
double | get_p_atm () |
Member function used to return the pressure of the gas mixture in atm. | |
double | get_c () |
Member function used to return the concentration of the gas in mol/m3. | |
std::vector< double > | get_ci () |
Member function used to return the concentration of the components in the gas in mol/m3. | |
double | get_density () |
Member function used to return the density of the gas in kg/m3. | |
std::vector< double > | get_densityi () |
Member function used to return the partial density of the gas in kg/m3. | |
std::vector< double > | get_xi () |
Member function used to return the mole fraction of the components in the gas mixture. | |
dealii::SmartPointer < FuelCellShop::Material::PureGas > | get_gas (const unsigned int index) |
Member function used to return a pointer to the gas type stored in position index. | |
void | print_properties_to_screen () |
Member function that prints to screen p, T and c. | |
void | test () |
Member function used to test class is working NOTE: The test is not complete at this point since it does not test all set_* options. | |
Private Attributes | |
bool | initialized |
Bool element that let's me know if the class has been initialized. | |
double | temp |
Temperature of the gas, [K]. | |
double | press |
Pressure of the gas, [Pa]. | |
double | conc |
Concentration of the gas, [mol/m3]. | |
double | density |
Density of the gas, [kg/m3]. | |
double | M_mix |
Molar mass of the mixture [g/mol mix]. | |
std::vector< double > | pressv |
Pressure of the gas, [Pa]. | |
std::vector< double > | concv |
Concentration of the gas, [mol/m3]. | |
std::vector< double > | densityv |
Density of the gas, [kg/m3]. | |
std::vector< SmartPointer < FuelCellShop::Material::PureGas > > | gas_types |
Vector containing pointers to all gas species. | |
Implementation of the ideal gas law for mixtures.
This class once initialized using several of the set_xx options will return partial pressures, concentrations for each species and mole fractions.
In order to use this class, you first need to use one of the set_* options in order to initialize all the variables that define an ideal gas. In the set_* member function all properties are computed. If you would like to change, temperature, type of gas, etc. you will need to call this routine again. Once the set routine has been called, then you can request any gas property using get_* routines.
|
inline |
Constructor.
|
inline |
Destructor.
|
inline |
Member function used to return the concentration of the gas in mol/m3.
References conc, and initialized.
Referenced by test().
|
inline |
Member function used to return the concentration of the components in the gas in mol/m3.
References concv, and initialized.
Referenced by test().
|
inline |
Member function used to return the density of the gas in kg/m3.
References density, and initialized.
Referenced by test().
|
inline |
Member function used to return the partial density of the gas in kg/m3.
References densityv, and initialized.
|
inline |
Member function used to return a pointer to the gas type stored in position index.
References gas_types, and initialized.
Referenced by test().
|
inline |
Member function used to return the total pressure of the gas mixture in Pascal.
References initialized, and press.
Referenced by test().
|
inline |
Member function used to return the pressure of the gas mixture in atm.
References initialized, and press.
|
inline |
Member function used to return the partial pressure of the components in the gas in Pascal.
References initialized, and pressv.
|
inline |
Member function used to return the temperature of the gas in Kelvin.
References initialized, and temp.
Referenced by test().
|
inline |
Member function used to return the mole fraction of the components in the gas mixture.
References initialized, press, and pressv.
|
inline |
|
inline |
|
inline |
Function to modify the temperature in K and concentration in mol/m3 of the gas.
References conc, concv, density, densityv, gas_types, initialized, M_mix, press, pressv, Constants::R(), and temp.
Referenced by test().
|
inline |
|
inline |
|
inline |
Member function used to test class is working NOTE: The test is not complete at this point since it does not test all set_* options.
References get_c(), get_ci(), get_density(), get_gas(), get_p(), get_T(), and set_cv_T_and_gases().
|
private |
Concentration of the gas, [mol/m3].
Referenced by get_c(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Concentration of the gas, [mol/m3].
Referenced by get_ci(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Density of the gas, [kg/m3].
Referenced by get_density(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Density of the gas, [kg/m3].
Referenced by get_densityi(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Vector containing pointers to all gas species.
Referenced by get_gas(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Bool element that let's me know if the class has been initialized.
Referenced by get_c(), get_ci(), get_density(), get_densityi(), get_gas(), get_p(), get_p_atm(), get_pi(), get_T(), get_xi(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Molar mass of the mixture [g/mol mix].
Referenced by set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Pressure of the gas, [Pa].
Referenced by get_p(), get_p_atm(), get_xi(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Pressure of the gas, [Pa].
Referenced by get_pi(), get_xi(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().
|
private |
Temperature of the gas, [K].
Referenced by get_T(), print_properties_to_screen(), set_cT_xi_and_gases(), set_cv_T_and_gases(), set_pT_xi_and_gases(), and set_pv_T_and_gases().