12 #define _CRTDBG_MAP_ALLOC
13 #define _CRT_SECURE_NO_WARNINGS
14 #define _USE_MATH_DEFINES
32 static double alpha[40],beta[43],GAMMA[40],epsilon[40],a[43],b[43],A[43],B[43],C[43],D[43],a0[9],theta0[9];
121 static double t[]={0.00,
162 static double c[]={0,0,0,0,0,0,0,0,
259 std::vector<double> a_v(a,a+
sizeof(a)/
sizeof(
double));
260 std::vector<double> b_v(b,b+
sizeof(b)/
sizeof(
double));
261 std::vector<double> A_v(A,A+
sizeof(A)/
sizeof(
double));
262 std::vector<double> B_v(B,B+
sizeof(B)/
sizeof(
double));
263 std::vector<double> C_v(C,C+
sizeof(C)/
sizeof(
double));
264 std::vector<double> D_v(D,D+
sizeof(D)/
sizeof(
double));
268 phirlist.push_back(
new phir_critical(n,d,t,a,b,beta,A,B,C,D,40,42,43));
270 std::vector<double> a0_v(a0,a0+
sizeof(a0)/
sizeof(
double));
271 std::vector<double> theta0_v(theta0,theta0+
sizeof(theta0)/
sizeof(
double));
284 params.molemass = 44.0098;
286 params.ptriple = 517.996380545;
288 params.accentricfactor = 0.22394;
296 EOSReference.assign(
"\"A New Equation of State for Carbon Dioxide Covering the Fluid Region from the "
297 "Triple Point Temperature to 1100 K at Pressures up to 800 MPa\", "
298 "R. Span and W. Wagner, J. Phys. Chem. Ref. Data, v. 25, 1996");
301 " V. Vesovic and W.A. Wakeham and G.A. Olchowy and "
302 "J.V. Sengers and J.T.R. Watson and J. Millat"
303 "J. Phys. Chem. Ref. Data, v. 19, 1990");
305 name.assign(
"CarbonDioxide");
309 aliases.push_back(
"carbondioxide");
310 aliases.push_back(std::string(
"CARBONDIOXIDE"));
314 params.HSReferenceState =
"IIR";
323 double e_k=251.196,Tstar;
325 double b[]={0.4226159,0.6280115,-0.5387661,0.6735941,0,0,-0.4362677,0.2255388};
326 double c[]={0,2.387869e-2,4.350794,-10.33404,7.981590,-1.940558};
327 double d[]={0,2.447164e-2,8.705605e-5,-6.547950e-8,6.594919e-11};
332 for (
int i=1; i<=5; i++)
333 summer += c[i]*pow(T/100.0, 2-i);
334 double cint_k = 1.0 + exp(-183.5/T)*summer;
337 double r = sqrt(2.0/5.0*cint_k);
342 for (
int i=0; i<=7; i++)
343 summer += b[i]/pow(Tstar, i);
344 double Gstar_lambda = summer;
347 double lambda_0 = 0.475598*sqrt(T)*(1+r*r)/Gstar_lambda;
351 for (
int i=1; i<=4; i++)
352 summer += d[i]*pow(rho, i);
353 double delta_lambda = summer;
358 return (lambda_0+delta_lambda+delta_c)/1e3;
363 double e_k=251.196,Tstar,sumGstar=0.0,Gstar,eta0;
364 double a[]={0.235156,-0.491266,5.211155e-2,5.347906e-2,-1.537102e-2};
365 double e[]={0,3.635074e-3,7.209997e-5, 0,0,0,0,3.00306e-20};
372 sumGstar += a[i]*pow(log(Tstar),(
int)i);
375 eta0=1.00697*sqrt(T)/Gstar;
379 summer += e[i]*pow(rho,(
int)i);
380 double delta_eta_g = summer;
389 return (eta0+delta_eta_g)/1e6;
393 const double ti[]={0,1.0,1.5,2.0,4.0};
394 const double ai[]={0,-7.0602087,1.9391218,-1.6463597,-3.2995634};
399 summer=summer+ai[i]*pow(1-T/
crit.
T,ti[i]);
405 const double ti[]={0,0.340,1.0/2.0,10.0/6.0,11.0/6.0};
406 const double ai[]={0,1.9245108,-0.62385555,-0.32731127,0.39245142};
411 summer=summer+ai[i]*pow(1.0-T/
crit.
T,ti[i]);
417 const double ti[]={0,0.340,1.0/2.0,1.0,7.0/3.0,14.0/3.0};
418 const double ai[]={0,-1.7074879,-0.82274670,-4.6008549,-10.111178,-29.742252};
423 summer=summer+ai[i]*pow(1.0-T/
crit.
T,ti[i]);
double conductivity_Trho(double, double)
double viscosity_Trho(double, double)
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.
double conductivity_critical(double T, double rho, double qd=2e9, double GAMMA=0.0496, double zeta0=1.94e-10)
std::vector< std::string > aliases
The REFPROP-compliant name if REFPROP-"name" is not a compatible fluid name. If not included...
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
std::string REFPROPname
The name of the fluid.
std::string SURFACE_TENSION
struct CriticalStruct crit
BibTeXKeysStruct BibTeXKeys
std::vector< phi_BC * > phi0list
A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.