9 static double b[2][4] = {{0.1181193, 0.265728, 0.154790, 0.030323},
10 {0.2026579, 0.331511, 0.027655, 0.203488}
12 static double c[2][4] = {{0.0236744, 0.0186984, 0.0, 0.042724},
13 {0.0313385, 0.0503618, 0.016901, 0.041577}
15 static double d[2][2] = {{1.55488e-5, 6.23689e-5},{4.8736e-5, 0.740336e-5}};
16 static double beta[2] = {0.65392, 1.226};
17 static double gamma[2] = {0.060167, 0.03754};
21 double leekesler::W(
int n,
double egrho,
double Gamma)
23 return (n == 0 ? (1.0 - egrho)/(2.0*Gamma) :
24 (n*W(n-1, egrho, Gamma) - 0.5*pow(Rho,2*n)*egrho)/Gamma);
27 double leekesler::up()
29 return -(8314.3/Mw)*T*(1.0 + T*I()/Tcr);
32 double leekesler::hdep()
35 return tr*tr*I() + (1.0 - z())*tr;
38 double leekesler::sdep()
41 return tr*I() + J() - log(z());
44 double leekesler::sp()
46 const double Pref = 101325.0;
47 double rgas = 8314.3/Mw;
48 return rgas*(log(Pref/(Rho*rgas*T)) - (T/Tcr)*I() - J());
55 double rtr2 = rtr*rtr;
56 double rvr = 8314.3*Tcr*Rho/(Pcr*Mw);
57 double rvr2 = rvr*rvr;
60 egrho = exp(-gamma[Isr]*rvr2);
61 Bp = rtr2*b[Isr][1] + 2.0*rtr*rtr2*b[Isr][2] + 3.0*rtr2*rtr2*b[Isr][3];
62 Cp = rtr2*c[Isr][1] - 3.0*c[Isr][2]*rtr2*rtr2;
64 double r = Bp*rvr + 0.5*rvr2*Cp + 0.2*pow(rvr,5)*Dp
65 - 3.0*c[Isr][3]*rtr2*rtr2*(beta[Isr]*W(0,egrho,gamma[Isr])
66 + gamma[Isr]*W(1,egrho,gamma[Isr]));
74 double rtr2 = rtr*rtr;
75 double rvr = 8314.3*Tcr*Rho/(Pcr*Mw);
76 double rvr2 = rvr*rvr;
79 egrho = exp(-gamma[Isr]*rvr2);
80 BB = b[Isr][0] - rtr*(b[Isr][1]
81 + rtr*(b[Isr][2] + rtr*b[Isr][3]));
82 CC = c[Isr][0] - rtr*(c[Isr][1] - c[Isr][2]*rtr*rtr);
83 DD = d[Isr][0] + d[Isr][1]*rtr;
84 double r = BB*rvr + 0.5*rvr2*CC + 0.2*pow(rvr,5)*DD
85 + c[Isr][3]*rtr2*rtr*(beta[Isr]*W(0,egrho,gamma[Isr])
86 + gamma[Isr]*W(1,egrho,gamma[Isr]));
92 double zz, rvr2, BB, CC, DD, EE;
94 double rvr = Rho*8314.3*Tcr/(Pcr*Mw);
96 BB = b[Isr][0] - rtr*(b[Isr][1]
97 + rtr*(b[Isr][2] + rtr*b[Isr][3]));
98 CC = c[Isr][0] - rtr*(c[Isr][1] - c[Isr][2]*rtr*rtr);
99 DD = d[Isr][0] + d[Isr][1]*rtr;
100 EE = exp(-gamma[Isr]*rvr2);
102 zz = 1.0 + BB*rvr + CC*rvr2 + DD*pow(rvr,5)
103 + c[Isr][3]*pow(rtr,3)*rvr2*
104 (beta[Isr] + gamma[Isr]*rvr2)*EE;
109 double leekesler::Pp()
111 return 8314.3*z()*Rho*T/Mw;
114 double leekesler::Psat()
116 double tr = 1.0 - Tcr/T;
120 lpr = 5.395743797*tr + 0.05524287*tr*tr + 0.06853005*tr*tr*tr;
122 lpr = 7.259961465*tr - 0.549206092*tr*tr + 0.177581752*tr*tr*tr;
127 double leekesler::ldens()
129 double x = 1.0 - T/Tcr;
134 rho_r = 5.2307 + 15.16*x - 21.9778*x*x + 18.767*x*x*x;
136 rho_r = 6.166930606 + 17.42866964*x - 18.62589833*x*x
140 return Pcr*rho_r*Mw/(8314.3*Tcr);
143 double leekesler::Tcrit()
147 double leekesler::Pcrit()
151 double leekesler::Vcrit()
153 return 0.2901*8314.3*Tcr/(Pcr*Mw);
155 double leekesler::Tmin()
159 double leekesler::Tmax()
163 double leekesler::MolWt()
Lee-Kesler equation of state.