Cantera
2.1.2
|
#include <Sub.h>
Public Member Functions | |
void | setStdState (double h0=0.0, double s0=0.0, double t0=298.15, double p0=1.01325e5) |
virtual double | Pp ()=0 |
double | hp () |
Enthaply of a single-phase state. More... | |
double | gp () |
Gibbs function of a single-phase state. More... | |
double | prop (propertyFlag::type ijob) |
void | set_TPp (double t0, double p0) |
set T and P More... | |
void | Set (PropertyPair::type XY, double x0, double y0) |
Function to set or change the state for a property pair XY where x0 is the value of first property and y0 is the value of the second property. More... | |
Information about a substance | |
virtual double | MolWt ()=0 |
Molecular weight [kg/kmol]. More... | |
virtual double | Tcrit ()=0 |
Critical temperature [K]. More... | |
virtual double | Pcrit ()=0 |
Critical pressure [Pa]. More... | |
virtual double | Vcrit ()=0 |
Critical specific volume [m^3/kg]. More... | |
virtual double | Tmin ()=0 |
Minimum temperature for which the equation of state is valid. More... | |
virtual double | Tmax ()=0 |
Maximum temperature for which the equation of state is valid. More... | |
virtual char * | name ()=0 |
Name of the substance. More... | |
virtual char * | formula ()=0 |
Chemical formula for the substance. More... | |
Properties | |
double | P () |
Pressure [Pa]. More... | |
double | Temp () |
Temperature [K]. More... | |
double | v () |
Specific volume [m^3/kg]. More... | |
double | u () |
Internal energy [J/kg]. More... | |
double | h () |
Enthalpy [J/kg]. More... | |
double | s () |
Entropy [J/kg/K]. More... | |
double | f () |
Helmholtz function [J/kg]. More... | |
double | g () |
Gibbs function [J/kg]. More... | |
virtual double | cv () |
Specific heat at constant volume [J/kg/K]. More... | |
virtual double | cp () |
Specific heat at constant pressure [J/kg/K]. More... | |
virtual double | thermalExpansionCoeff () |
virtual double | isothermalCompressibility () |
Saturation Properties | |
double | Ps () |
virtual double | dPsdT () |
The derivative of the saturation pressure with respect to temperature. More... | |
double | Tsat (double p) |
Saturation temperature at pressure p. More... | |
double | x () |
Vapor mass fraction. More... | |
int | TwoPhase () |
Returns 1 if the current state is a liquid/vapor mixture, 0 otherwise. More... | |
Protected Member Functions | |
virtual double | ldens ()=0 |
virtual double | Psat ()=0 |
Saturation pressure, Pa. More... | |
virtual double | up ()=0 |
Internal energy of a single-phase state. More... | |
virtual double | sp ()=0 |
Entropy of a single-phase state. More... | |
virtual int | ideal () |
double | vp () |
int | Lever (int itp, double sat, double val, propertyFlag::type ifunc) |
Uses the lever rule to set state in the dome. More... | |
void | update_sat () |
Update saturated liquid and vapor densities and saturation pressure. More... | |
Protected Attributes | |
double | T |
double | Rho |
double | Tslast |
double | Rhf |
double | Rhv |
double | Pst |
double | m_energy_offset |
double | m_entropy_offset |
std::string | m_name |
std::string | m_formula |
Private Attributes | |
int | kbr |
double | Vmin |
double | Vmax |
double | Pmin |
double | Pmax |
double | dvbf |
double | dv |
double | v_here |
double | P_here |
|
pure virtual |
Molecular weight [kg/kmol].
Implemented in HFC134a, CarbonDioxide, hydrogen, methane, nitrogen, Heptane, oxygen, and water.
Referenced by PureFluidPhase::initThermo().
|
pure virtual |
Critical temperature [K].
Implemented in HFC134a, CarbonDioxide, hydrogen, methane, nitrogen, Heptane, oxygen, and water.
Referenced by PureFluidPhase::critTemperature().
|
pure virtual |
Critical pressure [Pa].
Implemented in HFC134a, CarbonDioxide, hydrogen, methane, nitrogen, Heptane, oxygen, and water.
Referenced by PureFluidPhase::critPressure(), and PureFluidPhase::initThermo().
|
pure virtual |
Critical specific volume [m^3/kg].
Implemented in HFC134a, CarbonDioxide, hydrogen, methane, nitrogen, Heptane, oxygen, and water.
Referenced by PureFluidPhase::critDensity().
|
pure virtual |
Minimum temperature for which the equation of state is valid.
Implemented in HFC134a, CarbonDioxide, hydrogen, methane, nitrogen, Heptane, oxygen, and water.
Referenced by Substance::cp(), and Substance::cv().
|
pure virtual |
Maximum temperature for which the equation of state is valid.
Implemented in HFC134a, CarbonDioxide, hydrogen, methane, nitrogen, Heptane, oxygen, and water.
Referenced by Substance::cp(), and Substance::cv().
|
pure virtual |
|
pure virtual |
double P | ( | ) |
Pressure [Pa].
If two phases are present, return the saturation pressure; otherwise return the pressure computed directly from the underlying eos.
Definition at line 28 of file Sub.cpp.
Referenced by Substance::cp(), PureFluidPhase::initThermo(), and PureFluidPhase::pressure().
|
inline |
Temperature [K].
Definition at line 95 of file Sub.h.
Referenced by PureFluidPhase::setState_HP(), PureFluidPhase::setState_Psat(), PureFluidPhase::setState_SP(), PureFluidPhase::setState_SV(), and PureFluidPhase::setState_UV().
|
inline |
Specific volume [m^3/kg].
Definition at line 100 of file Sub.h.
Referenced by PureFluidPhase::satPressure(), PureFluidPhase::setPressure(), PureFluidPhase::setState_HP(), PureFluidPhase::setState_Psat(), PureFluidPhase::setState_SP(), PureFluidPhase::setState_SV(), PureFluidPhase::setState_Tsat(), and PureFluidPhase::setState_UV().
|
inline |
Internal energy [J/kg].
Definition at line 105 of file Sub.h.
Referenced by Substance::f(), and PureFluidPhase::intEnergy_mole().
|
inline |
Enthalpy [J/kg].
Definition at line 110 of file Sub.h.
Referenced by PureFluidPhase::enthalpy_mole(), and Substance::g().
|
inline |
Entropy [J/kg/K].
Definition at line 115 of file Sub.h.
Referenced by Substance::cp(), Substance::cv(), PureFluidPhase::entropy_mole(), Substance::f(), and Substance::g().
|
inline |
Helmholtz function [J/kg].
Definition at line 120 of file Sub.h.
References Substance::s(), and Substance::u().
|
inline |
Gibbs function [J/kg].
Definition at line 125 of file Sub.h.
References Substance::h(), and Substance::s().
Referenced by PureFluidPhase::gibbs_mole().
|
inlinevirtual |
Specific heat at constant volume [J/kg/K].
Definition at line 130 of file Sub.h.
References Substance::s(), Substance::Tmax(), and Substance::Tmin().
Referenced by PureFluidPhase::cv_mole().
|
inlinevirtual |
Specific heat at constant pressure [J/kg/K].
Definition at line 143 of file Sub.h.
References Substance::P(), Substance::s(), Substance::Set(), Substance::Tmax(), and Substance::Tmin().
Referenced by PureFluidPhase::cp_mole().
|
virtual |
double Tsat | ( | double | p | ) |
Saturation temperature at pressure p.
Definition at line 72 of file Sub.cpp.
Referenced by PureFluidPhase::satTemperature().
double x | ( | ) |
Vapor mass fraction.
If T >= Tcrit, 0 is returned for v < Vcrit, and 1 is returned if v > Vcrit.
Definition at line 54 of file Sub.cpp.
Referenced by PureFluidPhase::vaporFraction().
int TwoPhase | ( | ) |
|
inline |
Enthaply of a single-phase state.
Definition at line 202 of file Sub.h.
References Substance::up().
Referenced by Substance::gp().
|
inline |
Gibbs function of a single-phase state.
Definition at line 207 of file Sub.h.
References Substance::hp(), and Substance::sp().
void set_TPp | ( | double | t0, |
double | p0 | ||
) |
void Set | ( | PropertyPair::type | XY, |
double | x0, | ||
double | y0 | ||
) |
Function to set or change the state for a property pair XY where x0 is the value of first property and y0 is the value of the second property.
Definition at line 122 of file Sub.cpp.
References Cantera::fp2str().
Referenced by Substance::cp(), PureFluidPhase::initThermo(), and PureFluidPhase::Set().
|
protectedpure virtual |
|
protectedpure virtual |
Internal energy of a single-phase state.
Implemented in CarbonDioxide, Heptane, HFC134a, hydrogen, methane, nitrogen, oxygen, and water.
Referenced by Substance::hp().
|
protectedpure virtual |
Entropy of a single-phase state.
Implemented in CarbonDioxide, Heptane, HFC134a, hydrogen, methane, nitrogen, oxygen, and water.
Referenced by Substance::gp().
|
protected |
|
protected |
Update saturated liquid and vapor densities and saturation pressure.
Definition at line 292 of file Sub.cpp.
References Cantera::fp2str().