24 #define _CRTDBG_MAP_ALLOC
25 #define _CRT_SECURE_NO_WARNINGS
45 static const double n[]={0,
85 static const double d[]={0,
125 static const double t[]={0.00,
165 static const double c[]={0,
206 static const double alpha[]={
207 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
214 static const double beta[]={
215 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
224 static const double epsilon[]={
225 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
234 static const double GAMMA[]={
235 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
243 static const double a0[]={0.0,
259 std::vector<double> a0_v(a0,a0+
sizeof(a0)/
sizeof(
double));
260 std::vector<double> n0_v(
sizeof(a0)/
sizeof(
double),0);
273 phi0list.push_back(phi0_Planck_Einstein_);
282 params.molemass = 28.01348;
284 params.ptriple = 12.5220865181;
285 params.accentricfactor = 0.0372 ;
294 EOSReference.assign(
"\"A Reference Equation of State for the Thermodynamic Properties"
295 "of Nitrogen for Temperatures from 63.151 to 1000 K "
296 "and Pressures to 2200 MPa\", "
297 "R. Span and E.W. Lemmon and R.T. Jacobsen and W. Wagner and A. Yokozeki, "
298 "J. Phys. Chem. Ref. Data, v. 29, n. 6, 2000");
300 "Nitrogen, Oxygen, Argon, and Air\""
301 "E. W. Lemmon and R. T Jacobsen"
302 "International Journal of Thermophysics, Vol. 25, No. 1, January 2004");
304 name.assign(
"Nitrogen");
306 aliases.push_back(std::string(
"NITROGEN"));
320 double drho_dp,R_Nitrogen;
330 Tstar, OMEGA, eta0, lambda0, tau;
332 double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
334 double N[]={0,1.511,2.117,-3.332,8.862,31.11,-73.13,20.03,-0.7096,0.2672};
335 double t[]={0,0,-1.0,-0.7,0.0,0.03,0.2,0.8,0.6,1.9};
340 OMEGA=exp(b[0]*
powInt(log(Tstar),0)
341 +b[1]*
powInt(log(Tstar),1)
342 +b[2]*
powInt(log(Tstar),2)
343 +b[3]*
powInt(log(Tstar),3)
344 +b[4]*
powInt(log(Tstar),4));
346 eta0=0.0266958*sqrt(
params.molemass*T)/(sigma*sigma*OMEGA);
347 lambda0=N[1]*eta0+N[2]*pow(tau,t[2])+N[3]*pow(tau,t[3]);
352 double tau, delta, lambdar;
353 double N[]={0,1.511,2.117,-3.332,8.862,31.11,-73.13,20.03,-0.7096,0.2672};
354 double t[]={0,0,-1.0,-0.7,0.0,0.03,0.2,0.8,0.6,1.9};
355 double d[]={0,0,0,0,1,2,3,4,8,10};
356 double l[]={0,0,0,0,0,0,1,2,2,2};
357 double g[]={0,0,0,0,0,0,1,1,1,1};
362 lambdar=N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
363 +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]))
364 +N[6]*pow(tau,t[6])*pow(delta,d[6])*exp(-g[6]*pow(delta,l[6]))
365 +N[7]*pow(tau,t[7])*pow(delta,d[7])*exp(-g[7]*pow(delta,l[7]))
366 +N[8]*pow(tau,t[8])*pow(delta,d[8])*exp(-g[8]*pow(delta,l[8]))
367 +N[9]*pow(tau,t[9])*pow(delta,d[9])*exp(-g[9]*pow(delta,l[9]));
374 cp,cv,OMEGA_tilde,OMEGA_tilde0,zeta,nu,gamma,R0,lambdac,k,
398 zeta = zeta0*pow(num/LAMBDA,nu/gamma);
399 OMEGA_tilde = 2.0/pi*((cp-cv)/cp*atan(zeta/q_D)+cv/cp*(zeta/q_D));
400 OMEGA_tilde0 = 2.0/pi*(1.-exp(-1./(q_D/zeta+1.0/3.0*(zeta/q_D)*(zeta/q_D)/delta/delta)));
401 lambdac = rho*cp*k*R0*T/(6*pi*zeta*mu)*(OMEGA_tilde-OMEGA_tilde0)*1e18;
414 double eta0,OMEGA,Tstar;
415 double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
418 OMEGA=exp(b[0]*
powInt(log(Tstar),0)
419 +b[1]*
powInt(log(Tstar),1)
420 +b[2]*
powInt(log(Tstar),2)
421 +b[3]*
powInt(log(Tstar),3)
422 +b[4]*
powInt(log(Tstar),4));
424 eta0=0.0266958*sqrt(
params.molemass*T)/(sigma*sigma*OMEGA);
433 double etar, tau, delta;
436 double N[]={0,10.72,0.03989,0.001208,-7.402,4.620};
437 double g[]={0,0,1,1,1,1};
438 double t[]={0,0.1,0.25,3.2,0.9,0.3};
439 double d[]={0,2,10,12,2,1};
440 double l[]={0,0,1,1,2,3};
442 etar=N[1]*pow(tau,t[1])*pow(delta,d[1])*exp(-g[1]*pow(delta,l[1]))
443 +N[2]*pow(tau,t[2])*pow(delta,d[2])*exp(-g[2]*pow(delta,l[2]))
444 +N[3]*pow(tau,t[3])*pow(delta,d[3])*exp(-g[3]*pow(delta,l[3]))
445 +N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
446 +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]));
456 const double ti[]={0,1.0,1.5,2.5,5.0};
457 const double Ni[]={0,-6.12445284,1.26327220,-0.765910082,-1.77570564};
462 summer=summer+Ni[i]*pow(1-T/
reduce.
T,ti[i]);
468 const double ti[]={0,0.3294,2.0/3.0,8.0/3.0,35.0/6.0};
469 const double Ni[]={0,1.48654237,-0.280476066,0.0894143085,-0.119879866};
474 summer=summer+Ni[i]*pow(1.0-T/
reduce.
T,ti[i]);
480 const double ti[]={0,0.34,5.0/6.0,7.0/6.0,13.0/6.0,14.0/3.0};
481 const double Ni[]={0,-1.70127164,-3.70402649,1.29859383,-0.561424977,-2.68505381};
486 summer=summer+Ni[i]*pow(1.0-T/
reduce.
T,ti[i]);
493 return 0.02898*pow(1-T/
reduce.
T,1.246);
double surface_tension_T(double T)
std::vector< phi_BC * > phirlist
virtual double viscosity_Trho(double, double)
struct FluidLimits limits
double X_tilde(double T, double tau, double delta)
double conductivity_critical(double T, double rho)
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.
double viscosity_dilute(double T)
double viscosity_background(double T, double rho)
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 conductivity_Trho(double, double)
double conductivity_dilute(double T)
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
std::string ECS_LENNARD_JONES
std::string SURFACE_TENSION
double conductivity_background(double T, double rho)
double specific_heat_v_Trho(double T, double rho)
virtual double d2phir_dDelta2(double tau, double delta)
struct CriticalStruct crit
BibTeXKeysStruct BibTeXKeys
double viscosity_residual(double T, double rho)
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...
virtual double dphir_dDelta(double tau, double delta)