17 R = 2.59820853437877e2,
18 Gamma = 5.46895508389297e-6,
24 static const double Aoxy[] = {
25 -4.26396872798684e-1, 3.48334938784107e1, -5.77516910418738e2,
26 2.40961751553325e4, -1.23332307855543e6, 3.73585286319658e-4,
27 -1.70178244046465e-1 ,-3.33226903068473e-4, 8.61334799901291e3,
28 -6.80394661057309e-7, 7.09583347162704e-4, -5.73905688255053e-2,
29 -1.92123080811409e-7, 3.11764722329504e-8, -8.09463854745591e-6,
30 -2.22562296356501e-11, 9.18401045361994e-15, 5.75758417511114e-12,
31 -2.10752269644774e-15, 3.62884761272184e3, -1.23317754317110e6,
32 -5.03800414800672e-2, 3.30686173177055e2, -5.26259633964252e-8 ,
33 5.53075442383100e-6, -2.71042853363688e-13, -1.65732450675251e-9 ,
34 -5.82711196409204e-20, 4.42953322148281e-17 ,-2.95529679136244e-25,
35 -1.92361786708846e-23, 9.43758410350413e-23
38 static const double Foxy[] = {
39 -5.581932039e2, -1.0966262185e2, -8.3456211630e-2,
40 2.6603644330e-3, 1.6875023830e-5, -2.1262477120e-7,
41 9.5741096780e-10, -1.6617640450e-12, 2.7545605710e1
44 static const double Doxy[] =
45 { 4.3615175e2, 7.5897189e2, -4.2576866e2, 2.3487106e3, -3.0474660e3, 1.4850169e3 };
47 static const double Goxy[] = {
48 -1.29442711174062e6, 5.98231747005341e4, -8.97850772730944e2,
49 6.55236176900400e2, -1.13131252131570e-2,
50 3.4981070244228e-6, 4.21065222886885e-9, 2.67997030050139e2
55 double oxygen::C(
int i,
double rt,
double rt2)
59 return Aoxy[0] * T + Aoxy[1] * sqrt(T) + Aoxy[2] + (Aoxy[3] + Aoxy[4] * rt) * rt;
61 return Aoxy[5] * T + Aoxy[6] + rt * (Aoxy[7] + Aoxy[8] * rt);
63 return Aoxy[9] * T + Aoxy[10] + Aoxy[11] * rt;
67 return rt*(Aoxy[13] + Aoxy[14]*rt);
71 return rt*(Aoxy[16] + Aoxy[17]*rt);
75 return rt2*(Aoxy[19] + Aoxy[20]*rt);
77 return rt2*(Aoxy[21] + Aoxy[22]*rt2);
79 return rt2*(Aoxy[23] + Aoxy[24]*rt);
81 return rt2*(Aoxy[25] + Aoxy[26]*rt2);
83 return rt2*(Aoxy[27] + Aoxy[28]*rt);
85 return rt2*(Aoxy[29] + Aoxy[30]*rt + Aoxy[31]*rt2);
91 double oxygen::Cprime(
int i,
double rt,
double rt2,
double rt3)
95 return Aoxy[0] + 0.5*Aoxy[1]/sqrt(T) - (Aoxy[3] + 2.0*Aoxy[4]*rt)*rt2;
97 return Aoxy[5] - rt2*(Aoxy[7] + 2.0*Aoxy[8]*rt);
99 return Aoxy[9] - Aoxy[11]*rt2;
103 return -rt2*(Aoxy[13] + 2.0*Aoxy[14]*rt);
105 return -Aoxy[15]*rt2;
107 return -rt2*(Aoxy[16] + 2.0*Aoxy[17]*rt);
109 return -2.0*Aoxy[18]*rt3;
111 return -rt3*(2.0*Aoxy[19] + 3.0*Aoxy[20]*rt);
113 return -rt3*(2.0*Aoxy[21] + 4.0*Aoxy[22]*rt2);
115 return -rt3*(2.0*Aoxy[23] + 3.0*Aoxy[24]*rt);
117 return -rt3*(2.0*Aoxy[25] + 4.0*Aoxy[26]*rt2);
119 return -rt3*(2.0*Aoxy[27] + 3.0*Aoxy[28]*rt);
121 return -rt3*(2.0*Aoxy[29] + 3.0*Aoxy[30]*rt + 4.0*Aoxy[31]*rt2);
127 double oxygen::W(
int n,
double egrho)
129 return (n == 0 ? (1.0 - egrho)/(2.0*Gamma) :
130 (n*W(n-1, egrho) - 0.5*pow(Rho,2*n)*egrho)/Gamma);
133 double oxygen::H(
int i,
double egrho)
135 return (i < 8 ? pow(Rho,i+2) : pow(Rho,2*i-13)*egrho);
138 double oxygen::I(
int i,
double egrho)
140 return (i < 8 ? pow(Rho,i+1)/
double(i+1) : W(i-8, egrho));
148 double egrho = exp(-Gamma*Rho*Rho);
151 for (
int i=0; i<14; i++) {
152 sum += (C(i,rt,rt2) - T*Cprime(i,rt,rt2,rt3))*I(i,egrho);
155 sum += (((0.25*Goxy[6]*T + Goxy[5]/3.0)*T + 0.5*Goxy[4])*T + Goxy[3])*T + Goxy[2]*log(T)
156 - (Goxy[1] + 0.5*Goxy[0]*rt)*rt + Goxy[7]*beta/(exp(beta*rt) - 1.0) + u0;
158 return sum + m_energy_offset;
166 double egrho = exp(-Gamma*Rho*Rho);
169 sum = s0 - R*log(Rho);
170 for (
int i=0; i<14; i++) {
171 sum -= Cprime(i,rt,rt2,rt3)*I(i,egrho);
174 sum += (((Goxy[6]/3.0)*T + 0.5*Goxy[5])*T + Goxy[4])*T + Goxy[3]*log(T)
175 -((Goxy[0]*rt/3.0 + 0.5*Goxy[1])*rt + Goxy[2])*rt
176 + Goxy[7]*(beta*rt + beta*rt/(exp(beta*rt) - 1.0)
177 - log(exp(beta*rt) - 1.0));
178 return sum + m_entropy_offset;
186 double egrho = exp(-Gamma*Rho*Rho);
189 for (
int i=0; i<14; i++) {
190 P += C(i,rt,rt2)*H(i,egrho);
196 double oxygen::Psat()
200 if ((T < Tmn) || (T > Tc)) {
203 for (i=0, lnp=0; i<=7; i++) {
205 lnp+=Foxy[i]*pow(Tc-T, alpha);
207 lnp+=Foxy[i]*pow(T,i-1);
215 double oxygen::ldens()
217 double xx=1-T/Tc, sum=0;
218 if ((T < Tmn) || (T > Tc)) {
221 for (
int i=0; i<=5; i++) {
222 sum+=Doxy[i]*pow(xx,
double(i)/3.0);
227 double oxygen::Tcrit()
231 double oxygen::Pcrit()
235 double oxygen::Vcrit()
239 double oxygen::Tmin()
243 double oxygen::Tmax()
249 return (
char*) m_name.c_str();
251 char* oxygen::formula()
253 return (
char*) m_formula.c_str();
255 double oxygen::MolWt()