25 #define _CRTDBG_MAP_ALLOC
26 #define _CRT_SECURE_NO_WARNINGS
44 static const double n[]={0,
88 static const double d[]={0,
131 static const double t[]={0.00,
174 static const double cv[]={0,
210 static const double N0[]={0.0,
230 params.molemass = 31.9988;
232 params.ptriple = 0.146323903868;
233 params.accentricfactor = 0.0222;
238 R_ = 8.31434/
params.molemass,
252 c=-S0/R_u-1+log(tau0/delta0);
257 std::vector<double> N0_v(N0,N0+
sizeof(N0)/
sizeof(
double));
279 phi0list.push_back(phi0_cp0_poly_1);
280 phi0list.push_back(phi0_cp0_constant_);
281 phi0list.push_back(phi0_cp0_poly_2);
283 phi0list.push_back(phi0_Planck_Einstein_);
284 phi0list.push_back(phi0_Planck_Einstein2_);
292 EOSReference.assign(
"\"Thermodynamic Properties of Oxygen from the Triple point to 300 K with pressures to 80 MPa\", "
293 "Richard B. Stewart, Richard T. Jacobsen, and W. Wagner, "
294 "J. Phys. Chem. Ref. Data, v. 20, n. 5, 1991");
295 TransportReference.assign(
"Viscosity and Thermal Conductivity: \"Viscosity and Thermal Conductivity Equations for"
296 "Nitrogen, Oxygen, Argon, and Air\""
297 "E. W. Lemmon and R. T Jacobsen"
298 "International Journal of Thermophysics, Vol. 25, No. 1, January 2004");
300 name.assign(
"Oxygen");
302 aliases.push_back(std::string(
"OXYGEN"));
315 double drho_dp,R_Oxygen;
329 double eta0,OMEGA,delta,tau,Tstar,lambda0,lambdar,num,
330 cp,cv,OMEGA_tilde,OMEGA_tilde0,zeta,nu,gamma,R0,lambdac,k,
332 double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
334 double N[]={0,1.036,6.283,-4.262,15.31,8.898,-0.7336,6.728,-4.374,-0.4747};
335 double t[]={0,0,-0.9,-0.6,0.0,0.0,0.3,4.3,0.5,1.8};
336 double d[]={0,0,0,0,1,3,4,5,7,10};
337 double l[]={0,0,0,0,0,0,0,2,2,2};
338 double g[]={0,0,0,0,0,0,0,1,1,1};
344 OMEGA=exp(b[0]*
powInt(log(Tstar),0)
345 +b[1]*
powInt(log(Tstar),1)
346 +b[2]*
powInt(log(Tstar),2)
347 +b[3]*
powInt(log(Tstar),3)
348 +b[4]*
powInt(log(Tstar),4));
350 eta0=0.0266958*sqrt(
params.molemass*T)/(sigma*sigma*OMEGA);
351 lambda0=N[1]*eta0+N[2]*pow(tau,t[2])+N[3]*pow(tau,t[3]);
353 lambdar=N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
354 +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]))
355 +N[6]*pow(tau,t[6])*pow(delta,d[6])*exp(-g[6]*pow(delta,l[6]))
356 +N[7]*pow(tau,t[7])*pow(delta,d[7])*exp(-g[7]*pow(delta,l[7]))
357 +N[8]*pow(tau,t[8])*pow(delta,d[8])*exp(-g[8]*pow(delta,l[8]))
358 +N[9]*pow(tau,t[9])*pow(delta,d[9])*exp(-g[9]*pow(delta,l[9]));
369 return (lambda0+lambdar)/1e3;
375 zeta=zeta0*pow(num/LAMBDA,nu/gamma);
376 OMEGA_tilde=2.0/pi*((cp-cv)/cp*atan(zeta/q_D)+cv/cp*(zeta/q_D));
377 OMEGA_tilde0=2.0/pi*(1.-exp(-1./(q_D/zeta+1.0/3.0*(zeta/q_D)*(zeta/q_D)/delta/delta)));
378 lambdac=rho*cp*k*R0*T/(6*pi*zeta*mu)*(OMEGA_tilde-OMEGA_tilde0)*1e18;
380 return (lambda0+lambdar+lambdac)/1e3;
386 double eta0,etar,OMEGA,delta,tau,Tstar;
387 double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
389 double N[]={0,17.67,0.4042,0.0001077,0.3510,-13.67};
390 double t[]={0,0.05,0.0,2.10,0.0,0.5};
391 double d[]={0,1,5,12,8,1};
392 double l[]={0,0,0,0,1,2};
393 double g[]={0,0,0,0,1,1};
398 OMEGA=exp(b[0]*
powInt(log(Tstar),0)
399 +b[1]*
powInt(log(Tstar),1)
400 +b[2]*
powInt(log(Tstar),2)
401 +b[3]*
powInt(log(Tstar),3)
402 +b[4]*
powInt(log(Tstar),4));
404 eta0=0.0266958*sqrt(
params.molemass*T)/(sigma*sigma*OMEGA);
405 etar=N[1]*pow(tau,t[1])*pow(delta,d[1])*exp(-g[1]*pow(delta,l[1]))
406 +N[2]*pow(tau,t[2])*pow(delta,d[2])*exp(-g[2]*pow(delta,l[2]))
407 +N[3]*pow(tau,t[3])*pow(delta,d[3])*exp(-g[3]*pow(delta,l[3]))
408 +N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
409 +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]));
411 return (eta0+etar)/1e6;
415 const double ti[]={0,1.0,3.0/2.0,3.0,7.0,9.0};
416 const double Ni[]={0,-6.043938,1.175627,-0.994086,-3.456781,3.361499};
421 summer=summer+Ni[i]*pow(1-T/
reduce.
T,ti[i]);
428 const double ti[]={0,1.0/3.0,2.0/3.0,1.0,5.0/3.0,4.0,9.0};
429 const double Ni[]={0,-1.498431,-2.116826,-0.905713,-5.659990,-18.90964,-53.780774};
434 summer=summer+Ni[i]*pow(1.0-T/
reduce.
T,ti[i]);
441 const double ti[]={0,1.0/3.0,2.0/3.0,3.0};
442 const double Ni[]={0,1.507678,0.85810805,0.19035504};
447 summer += Ni[i]*pow(1.0-T/
reduce.
T,ti[i]);
455 return 0.03843*pow(1-T/
reduce.
T,1.225);
std::vector< phi_BC * > phirlist
struct FluidLimits limits
std::string name
A container to hold the cache for residual Helmholtz derivatives.
std::string TransportReference
A std::string that contains a reference for thermo properties for the fluid.
std::vector< std::string > aliases
The REFPROP-compliant name if REFPROP-"name" is not a compatible fluid name. If not included...
struct CriticalStruct reduce
A pointer to the point that is used to reduce the T and rho for EOS.
virtual double viscosity_Trho(double, double)
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
std::string SURFACE_TENSION
double specific_heat_v_Trho(double T, double rho)
double X_tilde(double T, double tau, double delta)
virtual double d2phir_dDelta2(double tau, double delta)
virtual double conductivity_Trho(double, double)
double surface_tension_T(double T)
struct CriticalStruct crit
BibTeXKeysStruct BibTeXKeys
Term in the ideal-gas specific heat equation that is polynomial term.
std::vector< phi_BC * > phi0list
A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.
double specific_heat_p_Trho(double T, double rho)
This is the abstract base class upon which each residual Helmholtz energy class is built...
Term in the ideal-gas specific heat equation that is constant.
virtual double dphir_dDelta(double tau, double delta)