12 static double b[2][4] = {{0.1181193, 0.265728, 0.154790, 0.030323},
13 {0.2026579, 0.331511, 0.027655, 0.203488}
15 static double c[2][4] = {{0.0236744, 0.0186984, 0.0, 0.042724},
16 {0.0313385, 0.0503618, 0.016901, 0.041577}
18 static double d[2][2] = {{1.55488e-5, 6.23689e-5},{4.8736e-5, 0.740336e-5}};
19 static double beta[2] = {0.65392, 1.226};
20 static double gamma[2] = {0.060167, 0.03754};
24 double leekesler::W(
int n,
double egrho,
double Gamma)
26 return (n == 0 ? (1.0 - egrho)/(2.0*Gamma) :
27 (n*W(n-1, egrho, Gamma) - 0.5*pow(Rho,2*n)*egrho)/Gamma);
32 return -(8314.3/Mw)*T*(1.0 + T*I()/Tcr);
35 double leekesler::hdep()
38 return tr*tr*I() + (1.0 - z())*tr;
41 double leekesler::sdep()
44 return tr*I() + J() - log(z());
49 const double Pref = 101325.0;
50 double rgas = 8314.3/Mw;
51 return rgas*(log(Pref/(Rho*rgas*T)) - (T/Tcr)*I() - J());
58 double rtr2 = rtr*rtr;
59 double rvr = 8314.3*Tcr*Rho/(Pcr*Mw);
60 double rvr2 = rvr*rvr;
63 egrho = exp(-gamma[Isr]*rvr2);
64 Bp = rtr2*b[Isr][1] + 2.0*rtr*rtr2*b[Isr][2] + 3.0*rtr2*rtr2*b[Isr][3];
65 Cp = rtr2*c[Isr][1] - 3.0*c[Isr][2]*rtr2*rtr2;
67 double r = Bp*rvr + 0.5*rvr2*Cp + 0.2*pow(rvr,5)*Dp
68 - 3.0*c[Isr][3]*rtr2*rtr2*(beta[Isr]*W(0,egrho,gamma[Isr])
69 + gamma[Isr]*W(1,egrho,gamma[Isr]));
77 double rtr2 = rtr*rtr;
78 double rvr = 8314.3*Tcr*Rho/(Pcr*Mw);
79 double rvr2 = rvr*rvr;
82 egrho = exp(-gamma[Isr]*rvr2);
83 BB = b[Isr][0] - rtr*(b[Isr][1]
84 + rtr*(b[Isr][2] + rtr*b[Isr][3]));
85 CC = c[Isr][0] - rtr*(c[Isr][1] - c[Isr][2]*rtr*rtr);
86 DD = d[Isr][0] + d[Isr][1]*rtr;
87 double r = BB*rvr + 0.5*rvr2*CC + 0.2*pow(rvr,5)*DD
88 + c[Isr][3]*rtr2*rtr*(beta[Isr]*W(0,egrho,gamma[Isr])
89 + gamma[Isr]*W(1,egrho,gamma[Isr]));
95 double zz, rvr2, BB, CC, DD, EE;
97 double rvr = Rho*8314.3*Tcr/(Pcr*Mw);
99 BB = b[Isr][0] - rtr*(b[Isr][1]
100 + rtr*(b[Isr][2] + rtr*b[Isr][3]));
101 CC = c[Isr][0] - rtr*(c[Isr][1] - c[Isr][2]*rtr*rtr);
102 DD = d[Isr][0] + d[Isr][1]*rtr;
103 EE = exp(-gamma[Isr]*rvr2);
105 zz = 1.0 + BB*rvr + CC*rvr2 + DD*pow(rvr,5)
106 + c[Isr][3]*pow(rtr,3)*rvr2*
107 (beta[Isr] + gamma[Isr]*rvr2)*EE;
111 double leekesler::Pp()
113 return 8314.3*z()*Rho*T/Mw;
118 double tr = 1.0 - Tcr/T;
122 lpr = 5.395743797*tr + 0.05524287*tr*tr + 0.06853005*tr*tr*tr;
124 lpr = 7.259961465*tr - 0.549206092*tr*tr + 0.177581752*tr*tr*tr;
129 double leekesler::ldens()
131 double x = 1.0 - T/Tcr;
136 rho_r = 5.2307 + 15.16*
x - 21.9778*
x*
x + 18.767*
x*
x*
x;
138 rho_r = 6.166930606 + 17.42866964*
x - 18.62589833*
x*
x 142 return Pcr*rho_r*Mw/(8314.3*Tcr);
155 return 0.2901*8314.3*Tcr/(Pcr*Mw);
double x()
Vapor mass fraction.
double Vcrit()
Critical specific volume [m^3/kg].
double Pcrit()
Critical pressure [Pa].
double up()
Internal energy of a single-phase state.
double MolWt()
Molecular weight [kg/kmol].
double Tcrit()
Critical temperature [K].
double Psat()
Saturation pressure, Pa.
double Tmax()
Maximum temperature for which the equation of state is valid.
double sp()
Entropy of a single-phase state.
double Tmin()
Minimum temperature for which the equation of state is valid.
Lee-Kesler equation of state.