18 TV = 12, HP = 34, SP = 54, PV = 42, TP = 14, UV = 62, ST = 51,
19 SV = 52, UP = 64, VH = 23, TH = 13, SH = 53, PX = 47, TX = 17,
20 VT = -12, PH = -34, PS = -54, VP = -42, PT = -14, VU = -62, TS = -51,
21 VS = -52, PU = -64, HV = -23, HT = -13, HS = -53, XP = -47, XT = -17
25const int Pgiven = 0, Tgiven = 1;
29enum type { H, S, U, V, P, T };
32const double Undef = 999.1234;
44 void setStdState(
double h0 = 0.0,
double s0 = 0.0,
45 double t0 = 298.15,
double p0 = 1.01325e5);
70 return m_name.c_str();
75 return m_formula.c_str();
95 return prop(propertyFlag::V);
100 return prop(propertyFlag::U);
105 return prop(propertyFlag::H);
110 return prop(propertyFlag::S);
129 virtual double thermalExpansionCoeff();
131 virtual double isothermalCompressibility();
140 virtual double dPsdT();
143 double Tsat(
double p);
155 virtual double Pp()=0;
159 return up() + Pp()/Rho;
164 return hp() - T*
sp();
167 double prop(propertyFlag::type ijob);
170 void set_TPp(
double t0,
double p0);
175 void Set(PropertyPair::type XY,
double x0,
double y0);
179 double Tslast, Rhf, Rhv;
181 double m_energy_offset;
182 double m_entropy_offset;
184 std::string m_formula;
186 virtual double ldens()=0;
192 virtual double up()=0;
195 virtual double sp()=0;
197 virtual int ideal() {
207 int Lever(
int itp,
double sat,
double val, propertyFlag::type ifunc);
213 void set_Rho(
double r0);
214 void set_T(
double t0);
215 void set_v(
double v0);
216 void BracketSlope(
double p);
217 double vprop(propertyFlag::type ijob);
218 void set_xy(propertyFlag::type if1, propertyFlag::type if2,
220 double atx,
double aty,
double rtx,
double rty);
226 double v_here, P_here;
virtual double up()=0
Internal energy of a single-phase state.
const char * formula()
Chemical formula for the substance.
virtual double Vcrit()=0
Critical specific volume [m^3/kg].
double hp()
Enthaply of a single-phase state.
int TwoPhase(bool strict=false)
Returns 1 if the current state is a liquid/vapor mixture, 0 otherwise.
virtual double cp()
Specific heat at constant pressure [J/kg/K].
double gp()
Gibbs function of a single-phase state.
double x()
Vapor mass fraction.
virtual double Tmax()=0
Maximum temperature for which the equation of state is valid.
double u()
Internal energy [J/kg].
virtual double MolWt()=0
Molecular weight [kg/kmol].
double h()
Enthalpy [J/kg].
virtual double cv()
Specific heat at constant volume [J/kg/K].
double Temp()
Temperature [K].
virtual double Tmin()=0
Minimum temperature for which the equation of state is valid.
int Lever(int itp, double sat, double val, propertyFlag::type ifunc)
Uses the lever rule to set state in the dome.
double g()
Gibbs function [J/kg].
const char * name()
Name of the substance.
virtual double sp()=0
Entropy of a single-phase state.
virtual double Psat()=0
Saturation pressure, Pa.
double f()
Helmholtz function [J/kg].
double v()
Specific volume [m^3/kg].
virtual double Tcrit()=0
Critical temperature [K].
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 an...
virtual double Pcrit()=0
Critical pressure [Pa].
virtual double dPsdT()
The derivative of the saturation pressure with respect to temperature.
double Tsat(double p)
Saturation temperature at pressure p.
void update_sat()
Update saturated liquid and vapor densities and saturation pressure.
void set_TPp(double t0, double p0)
set T and P
double s()
Entropy [J/kg/K].
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
const double Undef
Fairly random number to be used to initialize variables against to see if they are subsequently defin...