6 #define _CRTDBG_MAP_ALLOC
7 #define _CRT_SECURE_NO_WARNINGS
23 static const double N[]={0,
45 static const double d[]={0,
67 static const double t[]={0.00,
89 static const double l[]={
90 0,0,0,0,0,0,0,0,0,0,0,
103 static const double N0[]={0.0,
134 std::vector<double> N0_v(N0,N0+
sizeof(N0)/
sizeof(
double));
135 std::vector<double> theta0_v(N0,N0+
sizeof(N0)/
sizeof(
double));
143 theta0_v[8]=N0_v[11];
144 theta0_v[9]=N0_v[12];
145 theta0_v[10]=N0_v[13];
166 params.molemass = 28.96546;
168 params.ptriple = 2.44582352329;
169 params.accentricfactor = 0.0816749632704;
180 EOSReference.assign(
"Lemmon, E.W., Jacobsen, R.T, Penoncello, S.G., and Friend, D.G.,"
181 "\"Thermodynamic Properties of Air and Mixtures of Nitrogen, Argon, and"
182 " Oxygen from 60 to 2000 K at Pressures to 2000 MPa,"
183 " J. Phys. Chem. Ref. Data, 29(3):331-385, 2000.");
184 TransportReference.assign(
"E.W. Lemmon and R. T. Jacobsen, \"Viscosity and Thermal Conductivity Equations for "
185 "Nitrogen, Oxygen, Argon, and Air\", "
186 "International Journal of Thermophysics, Vol. 25, No. 1, January 2004");
190 aliases.push_back(std::string(
"AIR"));
200 const double ti[]={0,0.65,0.85,0.95,1.1};
201 const double Ni[]={0,44.3413,-240.073,285.139,-88.3366,-0.892181};
202 double summer=0;
int k;
205 summer=summer+Ni[k]*pow(1.0-T/
reduce.
T,ti[k]);
212 const double ti[]={0,0.41,1.0,2.8,6.5};
213 const double Ni[]={0,-2.0466,-4.7520,-13.259,-47.652};
214 double summer=0;
int k;
217 summer=summer+Ni[k]*pow(1.0-T/
reduce.
T,ti[k]);
224 const double Ni[]={0,0.2260724,-7.080499,5.700283,-12.44017,17.81926,-10.81364};
225 double summer=0;
int k;
228 summer=summer+Ni[k]*pow(1-T/
reduce.
T,((
double)k)/2.0);
236 const double Ni[]={0,-0.1567266,-5.539635,0,0,0.7567212,0,0,-3.514322};
237 double summer=0;
int k;
240 summer=summer+Ni[k]*pow(1-T/
reduce.
T,((
double)k)/2.0);
255 double eta0,etar,OMEGA,delta,tau,Tstar;
256 double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
260 OMEGA=exp(b[0]*
powInt(log(Tstar),0)
261 +b[1]*
powInt(log(Tstar),1)
262 +b[2]*
powInt(log(Tstar),2)
263 +b[3]*
powInt(log(Tstar),3)
264 +b[4]*
powInt(log(Tstar),4));
266 eta0=0.0266958*sqrt(28.9586*T)/(sigma*sigma*OMEGA);
269 double N[]={0,10.72,1.122,0.002019,-8.876,-0.02916};
270 double t[]={0,0.2,0.05,2.4,0.6,3.6};
271 double d[]={0,1,4,9,1,8};
272 double l[]={0,0,0,0,1,1};
273 double g[]={0,0,0,0,1,1};
274 delta = rho/(10.4477*28.9586);
276 etar=N[1]*pow(tau,t[1])*pow(delta,d[1])*exp(-g[1]*pow(delta,l[1]))
277 +N[2]*pow(tau,t[2])*pow(delta,d[2])*exp(-g[2]*pow(delta,l[2]))
278 +N[3]*pow(tau,t[3])*pow(delta,d[3])*exp(-g[3]*pow(delta,l[3]))
279 +N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
280 +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]));
282 return (eta0+etar)/1e6;
289 double drho_dp,R_Air;
307 double eta0,OMEGA,delta,tau,Tstar,lambda0,lambdar,num,
308 cp,cv,OMEGA_tilde,OMEGA_tilde0,zeta,nu,gamma,R0,lambdac,k,
310 double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
312 double N[]={0,1.308,1.405,-1.036,8.743,14.76,-16.62,3.793,-6.142,-0.3778};
313 double t[]={0,0,-1.1,-0.3,0.1,0.0,0.5,2.7,0.3,1.3};
314 double d[]={0,0,0,0,1,2,3,7,7,11};
315 double l[]={0,0,0,0,0,0,2,2,2,2};
316 double g[]={0,0,0,0,0,0,1,1,1,1};
318 delta=rho/(10.4477*28.9586);
322 OMEGA=exp(b[0]*
powInt(log(Tstar),0)
323 +b[1]*
powInt(log(Tstar),1)
324 +b[2]*
powInt(log(Tstar),2)
325 +b[3]*
powInt(log(Tstar),3)
326 +b[4]*
powInt(log(Tstar),4));
328 eta0=0.0266958*sqrt(28.9586*T)/(sigma*sigma*OMEGA);
329 lambda0=N[1]*eta0+N[2]*pow(tau,t[2])+N[3]*pow(tau,t[3]);
331 lambdar=N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
332 +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]))
333 +N[6]*pow(tau,t[6])*pow(delta,d[6])*exp(-g[6]*pow(delta,l[6]))
334 +N[7]*pow(tau,t[7])*pow(delta,d[7])*exp(-g[7]*pow(delta,l[7]))
335 +N[8]*pow(tau,t[8])*pow(delta,d[8])*exp(-g[8]*pow(delta,l[8]))
336 +N[9]*pow(tau,t[9])*pow(delta,d[9])*exp(-g[9]*pow(delta,l[9]));
347 return (lambda0+lambdar)/1e3;
353 zeta=zeta0*pow(num/LAMBDA,nu/gamma);
354 OMEGA_tilde=2.0/pi*((cp-cv)/cp*atan(zeta/q_D)+cv/cp*(zeta/q_D));
355 OMEGA_tilde0=2.0/pi*(1.-exp(-1./(q_D/zeta+1.0/3.0*(zeta/q_D)*(zeta/q_D)/delta/delta)));
356 lambdac=rho*cp*k*R0*T/(6*pi*zeta*mu)*(OMEGA_tilde-OMEGA_tilde0)*1e18;
358 return (lambda0+lambdar+lambdac)/1e3;
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.
struct CriticalStruct * preduce
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
virtual double conductivity_Trho(double, double)
double X_tilde(double T, double tau, double delta)
bool isPure
A std::string that contains a reference for the transport properties of the fluid.
std::string SURFACE_TENSION
double specific_heat_v_Trho(double T, double rho)
virtual double d2phir_dDelta2(double tau, double delta)
struct CriticalStruct crit
virtual double viscosity_Trho(double, double)
BibTeXKeysStruct BibTeXKeys
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)
virtual double dphir_dDelta(double tau, double delta)
struct CriticalStruct maxcondT