CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Span_Short.cpp
Go to the documentation of this file.
1 
2 
3 
4 #include "CoolProp.h"
5 #include <vector>
6 #include "CPExceptions.h"
7 #include "FluidClass.h"
8 #include "Span_Short.h"
9 
10 static double d_nonpolar_SpanShort[] =
11 {
12 0,
13 1.0, //[1]
14 1.0, //[2]
15 1.0, //[3]
16 2.0, //[4]
17 3.0, //[5]
18 7.0, //[6]
19 2.0, //[7]
20 5.0, //[8]
21 1.0, //[9]
22 4.0, //[10]
23 3.0, //[11]
24 4.0, //[12]
25 };
26 
27 static double t_nonpolar_SpanShort[] =
28 {
29 0,
30 0.25, //[1]
31 1.125, //[2]
32 1.5, //[3]
33 1.375, //[4]
34 0.25, //[5]
35 0.875, //[6]
36 0.625, //[7]
37 1.75, //[8]
38 3.625, //[9]
39 3.625, //[10]
40 14.5, //[11]
41 12.0, //[12]
42 };
43 
44 static double c_nonpolar_SpanShort[] =
45 {
46 0,
47 0.0, //[1]
48 0.0, //[2]
49 0.0, //[3]
50 0.0, //[4]
51 0.0, //[5]
52 0.0, //[6]
53 1.0, //[7]
54 1.0, //[8]
55 2.0, //[9]
56 2.0, //[10]
57 3.0, //[11]
58 3.0, //[12]
59 };
60 
61 static double d_polar_SpanShort[] =
62 {
63 0,
64 1.0, //[1]
65 1.0, //[2]
66 1.0, //[3]
67 3.0, //[4]
68 7.0, //[5]
69 1.0, //[6]
70 2.0, //[7]
71 5.0, //[8]
72 1.0, //[9]
73 1.0, //[10]
74 4.0, //[11]
75 2.0, //[12]
76 };
77 
78 static double t_polar_SpanShort[] =
79 {
80 0,
81 0.25, //[1]
82 1.25, //[2]
83 1.5, //[3]
84 0.25, //[4]
85 0.875, //[5]
86 2.375, //[6]
87 2.0, //[7]
88 2.125, //[8]
89 3.5, //[9]
90 6.5, //[10]
91 4.75, //[11]
92 12.5, //[12]
93 };
94 
95 static double c_polar_SpanShort[] =
96 {
97 0,
98 0.0, //[1]
99 0.0, //[2]
100 0.0, //[3]
101 0.0, //[4]
102 0.0, //[5]
103 1.0, //[6]
104 1.0, //[7]
105 1.0, //[8]
106 2.0, //[9]
107 2.0, //[10]
108 2.0, //[11]
109 3.0, //[12]
110 };
111 
113 {
114 const double n[] = {0.0, 1.0968643, -2.9988888, 0.99516887, -0.16170709, 0.1133446, 0.00026760595, 0.40979882, -0.040876423, -0.38169482, -0.10931957, -0.032073223, 0.016877016};
115 std::vector<double> n_v(n,n+sizeof(n)/sizeof(double));
116 std::vector<double> t_v(t_nonpolar_SpanShort,t_nonpolar_SpanShort+sizeof(t_nonpolar_SpanShort)/sizeof(double));
117 std::vector<double> d_v(d_nonpolar_SpanShort,d_nonpolar_SpanShort+sizeof(d_nonpolar_SpanShort)/sizeof(double));
118 std::vector<double> l_v(c_nonpolar_SpanShort,c_nonpolar_SpanShort+sizeof(c_nonpolar_SpanShort)/sizeof(double));
119 
120 //Critical parameters
121 crit.rho = 232; //[kg/m^3]
122 crit.p = PressureUnit(3370, UNIT_KPA); //[kPa]
123 crit.T = 469.7; //[K]
124 crit.v = 1/crit.rho;
125 
126 // Other fluid parameters
127 params.molemass = 72.14878;
128 params.Ttriple = 143.47;
129 params.accentricfactor = 0.251;
130 params.R_u = 8.314510;
131 params.ptriple = 7.63221842256e-05;
132 
133 // Limits of EOS
134 limits.Tmin = params.Ttriple;
135 limits.Tmax = 500.0;
136 limits.pmax = 100000.0;
137 limits.rhomax = 1000000.0*params.molemass;
138 
139 phirlist.push_back(new phir_power( n_v,d_v,t_v,l_v,1,12));
140 
141 double T0 = 309.213623675,
142 R_ = 8.314510/params.molemass,
143 rho0 = 609.710850486,
144 m,
145 c,
146 H0 = 0.0, // kJ/kmol
147 S0 = 0.0,
148 tau0=crit.T/T0,
149 delta0=rho0/crit.rho;
150 
151 // log(delta)+c+m*tau
152 
154 c=-S0/R_-1+log(tau0/delta0);/*<< from the leading term*/
155 
157 m=H0/(R_*crit.T); /*<< from the leading term */
158 
159 phi0list.push_back(new phi0_lead(c,m));
160 phi0list.push_back(new phi0_logtau(-1.0));
161 
162 const double a0[] = {0,4*params.R_u,8.95043*params.R_u,178.67, 21.836*params.R_u, 840.538};
163 std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
164 const double a1[] = {0,0,33.4032*params.R_u, 1774.25, 0, 0};
165 std::vector<double> a1_v(a1,a1+sizeof(a1)/sizeof(double));
166 
167 phi0list.push_back(new phi0_cp0_AlyLee(a0_v,crit.T,T0,params.R_u));
168 phi0list.push_back(new phi0_cp0_AlyLee(a1_v,crit.T,T0,params.R_u));
169 
170 EOSReference.assign("Span, R. and W. Wagner, \"Equations of State for Technical Applications. II. Results for Nonpolar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: Jaeschke, M. and P. Schley,\"Ideal-Gas Thermodynamic Properties for Natural-Gas Applications\", Int. J. Thermophys. v 16, n6 1995");
171 TransportReference.assign("Using ECS in fully predictive mode");
172 
173 name.assign("n-Pentane");
174 aliases.push_back(std::string("nPentane"));
175 aliases.push_back(std::string("Pentane"));
176 aliases.push_back(std::string("PENTANE"));
177 aliases.push_back(std::string("N-PENTANE"));
178 aliases.push_back(std::string("R601"));
179 REFPROPname.assign("PENTANE");
180 
181 BibTeXKeys.EOS = "Span-IJT-2003B";
182 BibTeXKeys.CP0 = "Jaeschke-IJT-1995";
183 BibTeXKeys.ECS_LENNARD_JONES = "Poling-BOOK-2001";
184 BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
185 
186 }
187 
188 double nPentaneClass::psat(double T)
189 {
190  // Maximum absolute error is 0.214979 % between 143.470001 K and 469.699990 K
191  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
192  const double Ni[]={0,-7.3186030873160792, 1.8296494289307599, -1.5622713200315748, -1.6154955648222435, -1.5250180952272199, -0.17887604235363186 };
193  double summer=0,theta;
194  int i;
195  theta=1-T/reduce.T;
196  for (i=1;i<=6;i++)
197  {
198  summer=summer+Ni[i]*pow(theta,ti[i]);
199  }
200  return reduce.p.Pa*exp(reduce.T/T*summer);
201 }
202 double nPentaneClass::rhosatL(double T)
203 {
204  // Maximum absolute error is 0.735195 % between 143.470001 K and 469.699990 K
205  const double ti[]={0,0.29637004389880028, 1.5209547193578159, 1.8091465611070348, 5.2452029430809954};
206  const double Ni[]={0,1.3756520855776841, -0.56869128829842586, 0.5342216133477542, 0.035012032864392216};
207  double summer=0;
208  int i;
209  double theta;
210  theta=1-T/reduce.T;
211  for (i=1;i<=4;i++)
212  {
213  summer+=Ni[i]*pow(theta,ti[i]);
214  }
215  return reduce.rho*exp(summer);
216 }
217 double nPentaneClass::rhosatV(double T)
218 {
219  // Maximum absolute error is 0.595193 % between 143.470001 K and 469.699990 K
220  const double ti[]={0,0.4021494191330745, 0.91494671969127384, 38.233907328347136, 3.8604517063013857};
221  const double Ni[]={0,-2.8582545419999192, -2.5045842450420941, -2713.0646430695333, -4.7011651958462872};
222  double summer=0,theta;
223  int i;
224  theta=1.0-T/reduce.T;
225  for (i=1;i<=4;i++)
226  {
227  summer=summer+Ni[i]*pow(theta,ti[i]);
228  }
229  return reduce.rho*exp(crit.T/T*summer);
230 }
231 
233 {
234 const double n[] = {0.0, 1.0553238, -2.6120616, 0.76613883, -0.29770321, 0.11879908, 0.00027922861, 0.4634759, 0.011433197, -0.48256969, -0.093750559, -0.0067273247, -0.0051141584};
235 std::vector<double> n_v(n,n+sizeof(n)/sizeof(double));
236 std::vector<double> t_v(t_nonpolar_SpanShort,t_nonpolar_SpanShort+sizeof(t_nonpolar_SpanShort)/sizeof(double));
237 std::vector<double> d_v(d_nonpolar_SpanShort,d_nonpolar_SpanShort+sizeof(d_nonpolar_SpanShort)/sizeof(double));
238 std::vector<double> l_v(c_nonpolar_SpanShort,c_nonpolar_SpanShort+sizeof(c_nonpolar_SpanShort)/sizeof(double));
239 
240 //Critical parameters
241 crit.rho = 233.18; //[kg/m^3]
242 crit.p = PressureUnit(3034, UNIT_KPA); //[kPa]
243 crit.T = 507.82; //[K]
244 crit.v = 1/crit.rho;
245 
246 // Other fluid parameters
247 params.molemass = 86.17536;
248 params.Ttriple = 177.83;
249 params.accentricfactor = 0.299;
250 params.R_u = 8.314510;
251 params.ptriple = 0.00127714043311;
252 
253 // Limits of EOS
254 limits.Tmin = params.Ttriple;
255 limits.Tmax = 500.0;
256 limits.pmax = 100000.0;
257 limits.rhomax = 1000000.0*params.molemass;
258 
259 phirlist.push_back(new phir_power( n_v,d_v,t_v,l_v,1,12));
260 
261 double T0 = 341.864512243,
262 R_ = 8.314510/params.molemass,
263 rho0 = 613.01116119,
264 m,
265 c,
266 H0 = 0.0, // kJ/kmol
267 S0 = 0.0,
268 tau0=crit.T/T0,
269 delta0=rho0/crit.rho;
270 
271 // log(delta)+c+m*tau
272 
274 c=-S0/R_-1+log(tau0/delta0);/*<< from the leading term*/
275 
277 m=H0/(R_*crit.T); /*<< from the leading term */
278 
279 phi0list.push_back(new phi0_lead(c,m));
280 phi0list.push_back(new phi0_logtau(-1.0));
281 
282 const double a0[] = {0,4*params.R_u,11.6977*params.R_u,182.326, 26.8142*params.R_u, 859.207};
283 std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
284 const double a1[] = {0,0,38.6164*params.R_u, 1826.59, 0, 0};
285 std::vector<double> a1_v(a1,a1+sizeof(a1)/sizeof(double));
286 
287 phi0list.push_back(new phi0_cp0_AlyLee(a0_v,crit.T,T0,params.R_u));
288 phi0list.push_back(new phi0_cp0_AlyLee(a1_v,crit.T,T0,params.R_u));
289 
290 EOSReference.assign("Span, R. and W. Wagner, \"Equations of State for Technical Applications. II. Results for Nonpolar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: Jaeschke, M. and P. Schley,\"Ideal-Gas Thermodynamic Properties for Natural-Gas Applications\", Int. J. Thermophys. v 16, n6 1995");
291 TransportReference.assign("Using ECS in fully predictive mode");
292 
293 name.assign("n-Hexane");
294 aliases.push_back("nHexane");
295 aliases.push_back("Hexane");
296 aliases.push_back(std::string("HEXANE"));
297 aliases.push_back(std::string("N-HEXANE"));
298 REFPROPname.assign("HEXANE");
299 
300 BibTeXKeys.EOS = "Span-IJT-2003B";
301 BibTeXKeys.CP0 = "Jaeschke-IJT-1995";
302 BibTeXKeys.ECS_LENNARD_JONES = "Poling-BOOK-2001";
303 BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
304 BibTeXKeys.VISCOSITY = "Michailidou-JPCRD-2013";
305 BibTeXKeys.CONDUCTIVITY = "Assael-JPCRD-2013B";
306 
307 }
308 double nHexaneClass::psat(double T)
309 {
310  // Max error is 0.105432451163 % between 177.83 and 507.819999 K
311  const double t[]={0, 0.051000000000000004, 1.0, 1.3333333333333333, 3.1666666666666665, 8.5, 9.666666666666666};
312  const double N[]={0, 0.0052535021674954144, -7.8062705612610275, 1.6043453368140383, -3.550385816986847, -7.245501435072093, 7.4818124089530356};
313  double summer=0,theta;
314  theta=1-T/reduce.T;
315  for (int i=1; i<=6; i++)
316  {
317  summer += N[i]*pow(theta,t[i]);
318  }
319  return reduce.p.Pa*exp(reduce.T/T*summer);
320 }
321 
322 double nHexaneClass::rhosatL(double T)
323 {
324  // Maximum absolute error is 0.266613 % between 177.830000 K and 507.820000 K
325  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667, 1.8333333333333333, 2.0, 2.3333333333333335, 2.6666666666666665, 3.0, 3.3333333333333335, 4.0, 4.333333333333333};
326  const double N[] = {0, -0.36042485296131643, 43.664803867359119, -1804.2336876177826, 36769.690581511182, -434905.12293345085, 3273782.0693872692, -16583157.118874608, 58286580.722277559, -143415988.18061239, 243088854.89131206, -267312869.47766161, 156613144.04323533, -51245576.753353722, 26550511.264813472, -11851772.552882895, 3248032.5556567763, -331324.18203971104, 79683.643452126213};
327  double summer=0,theta;
328  theta=1-T/reduce.T;
329  for (int i=1; i<=18; i++)
330  {
331  summer += N[i]*pow(theta,t[i]);
332  }
333  return reduce.rho*(summer+1);
334 }
335 
336 double nHexaneClass::rhosatV(double T)
337 {
338  // Maximum absolute error is 0.369573 % between 177.830000 K and 507.820000 K
339  const double t[] = {0, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667, 1.8333333333333333, 2.0, 2.3333333333333335, 2.6666666666666665, 3.0, 3.3333333333333335, 4.0, 4.333333333333333, 5.0, 5.5};
340  const double N[] = {0, -13.32656487738959, 1246.0726749247744, -42990.264799784949, 757508.7800032777, -7876385.2128088353, 52425760.036635056, -234043333.88894936, 714747253.67619896, -1480735989.3985567, 1970815159.663389, -1389664970.180351, 655235798.12866044, -492889866.23758823, 326547190.99802482, -137859585.07323754, 41116916.874772295, -20862745.129438739, 2767339.869803539, -438323.38014475687};
341  double summer=0,theta;
342  theta=1-T/reduce.T;
343  for (int i=1; i<=19; i++)
344  {
345  summer += N[i]*pow(theta,t[i]);
346  }
347  return reduce.rho*exp(reduce.T/T*summer);
348 }
349 
350 double nHexaneClass::viscosity_Trho(double T, double rho)
351 {
352  double e_k, sigma;
353  this->ECSParams(&e_k,&sigma);
354  double Tstar = T/e_k, rhor = rho/233.182, Tr = T/reduce.T;
355 
356  double log_Tstar = log(Tstar);
357 
358  // Dilute gas
359  double eta_0 = 0.021357*sqrt(params.molemass*T)/(sigma*sigma*exp(0.18760-0.48430*log_Tstar+0.04477*log_Tstar*log_Tstar)); // uPa-s
360 
361  // Initial density dependence from Rainwater-Friend
362  double b[] = {-19.572881, 219.73999, -1015.3226, 2471.01251, -3375.1717, 2491.6597, -787.26086, 14.085455, -0.34664158};
363  double Bstar = b[0]*pow(Tstar,-0.25*0)+b[1]*pow(Tstar,-0.25*1)+b[2]*pow(Tstar,-0.25*2)+b[3]*pow(Tstar,-0.25*3)+b[4]*pow(Tstar,-0.25*4)+b[5]*pow(Tstar,-0.25*5)+b[6]*pow(Tstar,-0.25*6)+b[7]*pow(Tstar,-2.5)+b[8]*pow(Tstar,-5.5);
364  double B = Bstar*0.60221415*sigma*sigma*sigma; // L/mol
365 
366  double c[] = {2.53402335, -9.724061002, 0.469437316, 158.5571631, 72.42916856, 10.60751253, 8.628373915, -6.61346441, -2.212724566};
367  double eta_r = pow(rhor,2.0/3.0)*sqrt(Tr)*(c[0]/Tr+c[1]/(c[2]+Tr+c[3]*rhor*rhor)+c[4]*(1+rhor)/(c[5]+c[6]*Tr+c[7]*rhor+rhor*rhor+c[8]*rhor*Tr));
368 
369  double rhobar = rho/params.molemass; // [mol/L]
370  return (eta_0*(1+B*rhobar) + eta_r)/1e6;
371 }
372 double nHexaneClass::conductivity_Trho(double T, double rho)
373 {
374  double Tr = T/reduce.T;
375  double lambda_0 = (6.6742-23.7619*Tr+72.0155*Tr*Tr-18.3714*Tr*Tr*Tr)/1000; // W/m/K
376 
377  double sumresid = 0;
378  double B1[] = {0, -3.01408e-2, 1.67975e-1, -1.29739e-1, 3.82833e-2, -3.70294e-3};
379  double B2[] = {0, 2.18208e-2, -1.00833e-1, 7.74180e-2, -2.15945e-2, 2.12487e-3};
380 
381  for (int i = 1; i<= 5; i++){
382  sumresid += (B1[i]+B2[i]*(T/reduce.T))*pow(rho/reduce.rho,i);
383  }
384 
385  double lambda_r = sumresid; // [W/m/K]
386 
387  double lambda_c = this->conductivity_critical(T,rho,1.0/(7.37e-10)); // [W/m/K]
388 
389  return lambda_0+lambda_r+lambda_c;
390 }
391 
392 
394 {
395 const double n[] = {0.0, 1.0543748, -2.6500682, 0.81730048, -0.30451391, 0.12253869, 0.00027266473, 0.49865826, -0.00071432815, -0.54236896, -0.13801822, -0.0061595287, 0.0004860251};
396 std::vector<double> n_v(n,n+sizeof(n)/sizeof(double));
397 std::vector<double> t_v(t_nonpolar_SpanShort,t_nonpolar_SpanShort+sizeof(t_nonpolar_SpanShort)/sizeof(double));
398 std::vector<double> d_v(d_nonpolar_SpanShort,d_nonpolar_SpanShort+sizeof(d_nonpolar_SpanShort)/sizeof(double));
399 std::vector<double> l_v(c_nonpolar_SpanShort,c_nonpolar_SpanShort+sizeof(c_nonpolar_SpanShort)/sizeof(double));
400 
401 //Critical parameters
402 crit.rho = 232; //[kg/m^3]
403 crit.p = PressureUnit(2736, UNIT_KPA); //[kPa]
404 crit.T = 540.13; //[K]
405 crit.v = 1/crit.rho;
406 
407 // Other fluid parameters
408 params.molemass = 100.202;
409 params.Ttriple = 182.55;
410 params.accentricfactor = 0.349;
411 params.R_u = 8.314510;
412 params.ptriple = 0.00017548675253297369;
413 
414 // Limits of EOS
415 limits.Tmin = params.Ttriple;
416 limits.Tmax = 500.0;
417 limits.pmax = 100000.0;
418 limits.rhomax = 1000000.0*params.molemass;
419 
420 phirlist.push_back(new phir_power( n_v,d_v,t_v,l_v,1,12));
421 
422 double T0 = 371.533277446,
423 R_ = 8.314510/params.molemass,
424 rho0 = 614.215551363,
425 m,
426 c,
427 H0 = 0.0, // kJ/kmol
428 S0 = 0.0,
429 tau0=crit.T/T0,
430 delta0=rho0/crit.rho;
431 
432 // log(delta)+c+m*tau
433 
435 c=-S0/R_-1+log(tau0/delta0);/*<< from the leading term*/
436 
438 m=H0/(R_*crit.T); /*<< from the leading term */
439 
440 phi0list.push_back(new phi0_lead(c,m));
441 phi0list.push_back(new phi0_logtau(-1.0));
442 
443 const double a0[] = {0,4*params.R_u,13.7266*params.R_u,169.789, 30.4707*params.R_u, 836.195};
444 std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
445 const double a1[] = {0,0,43.5561*params.R_u, 1760.46, 0, 0};
446 std::vector<double> a1_v(a1,a1+sizeof(a1)/sizeof(double));
447 
448 phi0list.push_back(new phi0_cp0_AlyLee(a0_v,crit.T,T0,params.R_u));
449 phi0list.push_back(new phi0_cp0_AlyLee(a1_v,crit.T,T0,params.R_u));
450 
451 EOSReference.assign("Span, R. and W. Wagner, \"Equations of State for Technical Applications. II. Results for Nonpolar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: Jaeschke, M. and P. Schley,\"Ideal-Gas Thermodynamic Properties for Natural-Gas Applications\", Int. J. Thermophys. v 16, n6 1995");
452 TransportReference.assign("Using ECS in fully predictive mode");
453 
454 name.assign("n-Heptane");
455 aliases.push_back("nHeptane");
456 aliases.push_back("Heptane");
457 aliases.push_back(std::string("HEPTANE"));
458 aliases.push_back(std::string("N-HEPTANE"));
459 REFPROPname.assign("HEPTANE");
460 
461 BibTeXKeys.EOS = "Span-IJT-2003B";
462 BibTeXKeys.CP0 = "Jaeschke-IJT-1995";
463 BibTeXKeys.ECS_LENNARD_JONES = "Chichester-NIST-2008";
464 BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
465 BibTeXKeys.CONDUCTIVITY = "Assael-JPCRD-2013C";
466 }
467 double nHeptaneClass::psat(double T)
468 {
469  // Maximum absolute error is 0.083195 % between 182.550001 K and 540.129990 K
470  const double t[]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 22, 24, 26, 29};
471  const double N[]={0, -3.04368483534491, 221.51326813318423, -7529.6367436332157, 143537.33433041952, -1782600.4037331331, 15351794.790984498, -95064479.531315014, 431824604.4413681, -1449020571.7368731, 3568070938.3565359, -6279101701.5130682, 7384006525.7245655, -4740322108.6224594, 1972249451.6581755, -1368254214.5357554, 801108370.43087959, -468263339.91664481, 327751566.67380428, -109115983.60517003, 10435955.348631999};
472  double summer=0,theta;
473  int i;
474  theta=1-T/reduce.T;
475  for (i=1;i<=20;i++)
476  {
477  summer += N[i]*pow(theta,t[i]/2);
478  }
479  return reduce.p.Pa*exp(reduce.T/T*summer);
480 }
481 
482 double nHeptaneClass::rhosatL(double T)
483 {
484  // Maximum absolute error is 0.033330 % between 182.550001 K and 540.129990 K
485  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.6666666666666667, 2.0, 2.3333333333333335};
486  const double N[] = {0, 8.521366797649824, -186.43238448180225, 1821.3194470035153, -9681.71039328181, 30640.757127668767, -59194.633606025527, 67519.411370724614, -37969.577087502075, 9354.1453367821832, -2755.5351214591965, 446.92980043327628};
487  double summer=0,theta;
488  int i;
489  theta=1-T/reduce.T;
490  for (i=1; i<=11; i++)
491  {
492  summer += N[i]*pow(theta,t[i]);
493  }
494  return reduce.rho*(summer+1);
495 }
496 
497 double nHeptaneClass::rhosatV(double T)
498 {
499  // Maximum absolute error is 0.169613 % between 182.550001 K and 540.129990 K
500  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.6666666666666667, 2.0, 2.3333333333333335};
501  const double N[] = {0, -7.9622143721199228, 113.40353424908179, -848.80926796934193, 3848.254633388874, -11203.055218321815, 21063.716927422713, -24590.440523030087, 14797.521198915152, -4622.1556877203093, 1870.6514096531255, -432.72469128767966};
502  double summer=0,theta;
503  int i;
504  theta=1-T/reduce.T;
505 
506  for (i=1; i<=11; i++)
507  {
508  summer += N[i]*pow(theta,t[i]);
509  }
510  return reduce.rho*exp(reduce.T/T*summer);
511 }
512 double nHeptaneClass::conductivity_Trho(double T, double rho)
513 {
514  double Tr = T/reduce.T;
515  double lambda_0 = ((-1.83367 + 16.2572*Tr - 39.0996*Tr*Tr + 47.8594*Tr*Tr*Tr + 15.1925*Tr*Tr*Tr*Tr - 3.39115*Tr*Tr*Tr*Tr*Tr)/(0.250611 - 0.320871*Tr + Tr*Tr))/1000; // W/m/K
516 
517  double sumresid = 0;
518  double B1[] = {0, 5.17785e-2, -9.24052e-2, 5.11484e-2, -7.76896e-3, 1.21637e-4};
519  double B2[] = {0, -7.72433e-3, 2.18899e-2, 1.71725e-3, -7.91642e-3, 1.83379e-3};
520 
521  for (int i = 1; i<= 5; i++){
522  sumresid += (B1[i]+B2[i]*(T/reduce.T))*pow(rho/reduce.rho,i);
523  }
524 
525  double lambda_r = sumresid; // [W/m/K]
526 
527  double lambda_c = this->conductivity_critical(T,rho,1.0/(8.0e-10),0.0586,2.45e-10); // [W/m/K]
528 
529  return lambda_0+lambda_r+lambda_c;
530 }
531 
533 {
534  const double n[] = {0.0, 1.0722545, -2.4632951, 0.65386674, -0.36324974, 0.1271327, 0.00030713573, 0.52656857, 0.019362863, -0.58939427, -0.14069964, -0.0078966331, 0.0033036598};
535  std::vector<double> n_v(n,n+sizeof(n)/sizeof(double));
536  std::vector<double> t_v(t_nonpolar_SpanShort,t_nonpolar_SpanShort+sizeof(t_nonpolar_SpanShort)/sizeof(double));
537  std::vector<double> d_v(d_nonpolar_SpanShort,d_nonpolar_SpanShort+sizeof(d_nonpolar_SpanShort)/sizeof(double));
538  std::vector<double> l_v(c_nonpolar_SpanShort,c_nonpolar_SpanShort+sizeof(c_nonpolar_SpanShort)/sizeof(double));
539 
540  //Critical parameters
541  crit.rho = 2.0564*114.2285; //[kg/m^3]
542  crit.p = PressureUnit(2497, UNIT_KPA); //[kPa]
543  crit.T = 569.32; //[K]
544  crit.v = 1/crit.rho;
545 
546  // Other fluid parameters
547  params.molemass = 114.2285;
548  params.Ttriple = 216.37;
549  params.accentricfactor = 0.395;
550  params.R_u = 8.314510;
551  params.ptriple = 0.0019888768508328075;
552 
553  // Limits of EOS
554  limits.Tmin = params.Ttriple;
555  limits.Tmax = 500.0;
556  limits.pmax = 100000.0;
557  limits.rhomax = 1000000.0*params.molemass;
558 
559  phirlist.push_back(new phir_power( n_v,d_v,t_v,l_v,1,12));
560 
561  double T0 = 398.773831136,
562  R_ = 8.314510/params.molemass,
563  rho0 = 612.212813966,
564  m,
565  c,
566  H0 = 0.0, // kJ/kmol
567  S0 = 0.0,
568  tau0=crit.T/T0,
569  delta0=rho0/crit.rho;
570 
571  // log(delta)+c+m*tau
572 
574  c=-S0/R_-1+log(tau0/delta0);/*<< from the leading term*/
575 
577  m=H0/(R_*crit.T); /*<< from the leading term */
578 
579  phi0list.push_back(new phi0_lead(c,m));
580  phi0list.push_back(new phi0_logtau(-1.0));
581 
582  const double a0[] = {0,4*params.R_u,15.6865*params.R_u,158.922, 33.8029*params.R_u, 815.064};
583  std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
584  const double a1[] = {0,0,48.1731*params.R_u, 1693.07, 0, 0};
585  std::vector<double> a1_v(a1,a1+sizeof(a1)/sizeof(double));
586 
587  phi0list.push_back(new phi0_cp0_AlyLee(a0_v,crit.T,T0,params.R_u));
588  phi0list.push_back(new phi0_cp0_AlyLee(a1_v,crit.T,T0,params.R_u));
589 
590  EOSReference.assign("Span, R. and W. Wagner, \"Equations of State for Technical Applications. II. Results for Nonpolar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: Jaeschke, M. and P. Schley,\"Ideal-Gas Thermodynamic Properties for Natural-Gas Applications\", Int. J. Thermophys. v 16, n6 1995");
591  TransportReference.assign("Using ECS in fully predictive mode");
592 
593  name.assign("n-Octane");
594  aliases.push_back("nOctane");
595  aliases.push_back("Octane");
596  aliases.push_back(std::string("OCTANE"));
597  aliases.push_back(std::string("N-OCTANE"));
598  REFPROPname.assign("OCTANE");
599 
600  BibTeXKeys.EOS = "Span-IJT-2003B";
601  BibTeXKeys.CP0 = "Jaeschke-IJT-1995";
602  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
603  BibTeXKeys.ECS_LENNARD_JONES = "Huber-FPE-2004";
604  BibTeXKeys.VISCOSITY = "Huber-FPE-2004";
605  BibTeXKeys.CONDUCTIVITY = "Huber-FPE-2005";
606 }
607 double nOctaneClass::psat(double T)
608 {
609  // Maximum absolute error is 0.067304 % between 216.370001 K and 569.319990 K
610  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
611  const double Ni[]={0,-7.9979900735822733, 2.010892438708793, -2.3118225183879315, -2.2598069384110318, -2.3011711505356049, 0.17255761105191239 };
612  double summer=0,theta;
613  int i;
614  theta=1-T/reduce.T;
615  for (i=1;i<=6;i++)
616  {
617  summer=summer+Ni[i]*pow(theta,ti[i]);
618  }
619  return reduce.p.Pa*exp(reduce.T/T*summer);
620 }
621 double nOctaneClass::rhosatL(double T)
622 {
623  // Maximum absolute error is 5.019225 % between 216.370001 K and 569.319990 K
624  const double ti[]={0,0.67051537540156969, 1.0506718257585101, 1.3129180160656528, 1.2031682152602974, 17.405127168362831, 1.4687877516582304};
625  const double Ni[]={0,17.541685698531406, -224.22847046797935, -507.63069606678488, 603.46463891664382, 1.0428855382259361, 112.266623754866};
626  double summer=0;
627  int i;
628  double theta;
629  theta=1-T/reduce.T;
630  for (i=1;i<=6;i++)
631  {
632  summer+=Ni[i]*pow(theta,ti[i]);
633  }
634  return reduce.rho*exp(summer);
635 }
636 double nOctaneClass::rhosatV(double T)
637 {
638  // Max error is 0.491603353952 % between 216.37 and 569.319999 K
639  const double ti[]={0, 0.060000000000000005, 0.375, 0.3755, 0.3765, 2.5, 5.833333333333333};
640  const double Ni[]={0,-0.42445663008165679, 56405.688240783682, -83966.630380619084, 27556.548441399842, -4.6668441379799557, -4.130640999355661};
641  double summer=0,theta;
642  int i;
643  theta=1.0-T/reduce.T;
644  for (i=1;i<=6;i++)
645  {
646  summer=summer+Ni[i]*pow(theta,ti[i]);
647  }
648  return reduce.rho*exp(reduce.T/T*summer);
649 }
650 void nOctaneClass::ECSParams(double *e_k, double *sigma)
651 {
652  // From Huber 2004
653  *e_k = 452.090;
654  *sigma = 0.63617;
655 }
656 double nOctaneClass::viscosity_Trho(double T, double rho)
657 {
658  // Rainwater-Friend for initial density dependence
659  double e_k, sigma;
660  this->ECSParams(&e_k,&sigma);
661  double Tstar = T/e_k;
662 
663  // Dilute gas
664  double eta_0 = 0.021357*sqrt(params.molemass*T)/(sigma*sigma*exp(0.335103-0.467898*log(Tstar))); // uPa-s
665 
666  // Initial density dependence from Rainwater-Friend
667  double b[] = {-19.572881, 219.73999, -1015.3226, 2471.01251, -3375.1717, 2491.6597, -787.26086, 14.085455, -0.34664158};
668  double Bstar = b[0]*pow(Tstar,-0.25*0)+b[1]*pow(Tstar,-0.25*1)+b[2]*pow(Tstar,-0.25*2)+b[3]*pow(Tstar,-0.25*3)+b[4]*pow(Tstar,-0.25*4)+b[5]*pow(Tstar,-0.25*5)+b[6]*pow(Tstar,-0.25*6)+b[7]*pow(Tstar,-2.5)+b[8]*pow(Tstar,-5.5);
669  double B = Bstar*0.60221415*sigma*sigma*sigma; // L/mol
670 
671  double e[4][3]; // init with zeros
672  e[2][1] = -0.103924;
673  e[2][2] = 9.92302e-2;
674  e[3][1] = 1.13327e-2;
675  e[3][2] = -3.22455e-2;
676 
677  double c[] = {0, 0.606122, 2.0651, 3.07843, -0.879088};
678 
679  double sumresid = 0;
680  double tau = T/crit.T, delta = rho/crit.rho;
681  for (int j = 2; j <= 3; j++)
682  {
683  for (int k = 1; k <= 2; k++)
684  {
685  sumresid += e[j][k]*pow(delta,j)/pow(tau,k);
686  }
687  }
688  double delta_0 = c[2] + c[3]*sqrt(tau) + c[4]*tau;
689  double eta_r = (sumresid + c[1]*(delta/(delta_0-delta)-delta/delta_0))*1000; // uPa-s
690 
691  double rhobar = rho/params.molemass; // [mol/L]
692  return (eta_0*(1+B*rhobar) + eta_r)/1e6;
693 }
694 double nOctaneClass::conductivity_Trho(double T, double rho)
695 {
696  double lambda_0 = 7.7293e-3-3.7114e-2*(T/crit.T) + 9.7758e-2*pow(T/crit.T,2) - 2.8871e-2*pow(T/crit.T,3); // W/m/K
697 
698  double sumresid = 0;
699  double B1[] = {0, 0.285553e-1, -0.171398e-1, 0.659971e-2, 0};
700  double B2[] = {0, -0.926155e-2, 0, 0.153496e-2, 0};
701 
702  for (int i = 1; i<= 4; i++){
703  sumresid += (B1[i]+B2[i]*(T/reduce.T))*pow(rho/reduce.rho,i);
704  }
705 
706  double lambda_r = sumresid; // [W/m/K]
707 
708  double lambda_c = this->conductivity_critical(T,rho,0.145713e10); // [W/m/K]
709 
710  return lambda_0+lambda_r+lambda_c;
711 }
712 
714 {
715  double n[] = {0.0, 1.38031, -2.85352, 0.288897, -0.165993, 0.0923993, 0.000282772, 0.956627, 0.0353076, -0.445008, -0.118911, -0.0366475, 0.0184223};
716  double t[] = {0,0.32,1.23,1.5,1.4,0.07,0.8,2.16,1.1,4.1,5.6,14.5,12.0};
717  double c[] = {0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3};
718  double d[] = {0, 1, 1, 1, 2, 3, 7, 2, 5, 1, 4, 3, 4};
719 
720  //Critical parameters
721  crit.rho = 1.33*170.33484; //[kg/m^3]
722  crit.p = PressureUnit(1817, UNIT_KPA); //[kPa]
723  crit.T = 658.1; //[K]
724  crit.v = 1/crit.rho;
725 
726  // Other fluid parameters
727  params.molemass = 170.33484;
728  params.Ttriple = 263.60;
729  params.accentricfactor = 0.574182221240689;
730  params.R_u = 8.314472;
731  params.ptriple = 0.00062621099412445;
732 
733  // Limits of EOS
734  limits.Tmin = params.Ttriple;
735  limits.Tmax = 500.0;
736  limits.pmax = 100000.0;
737  limits.rhomax = 1000000.0*params.molemass;
738 
739  phirlist.push_back(new phir_power(n, d, t, c, 1, 12, 13));
740 
741  phi0list.push_back(new phi0_lead(0,0));
742  phi0list.push_back(new phi0_logtau(23.085-1.0));
743 
744  const double a0[] = {0, 37.776, 29.369, 12.461, 7.7733};
745  std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
746  const double a1[] = {0, 1280/crit.T, 2399/crit.T, 5700/crit.T, 13869/crit.T};
747  std::vector<double> a1_v(a1,a1+sizeof(a1)/sizeof(double));
748 
749  phi0list.push_back(new phi0_Planck_Einstein(a0_v,a1_v,1,4));
750 
751  EOSReference.assign("Eric W. Lemmon and Marcia L. Huber, \"Thermodynamic Properties of n-Dodecane\" Energy & Fuels 2004, 18, 960-967");
752  TransportReference.assign("Using ECS in fully predictive mode");
753 
754  name.assign("n-Dodecane");
755  aliases.push_back("nDodecane");
756  aliases.push_back("Dodecane");
757  aliases.push_back(std::string("DODECANE"));
758  aliases.push_back(std::string("N-DODECANE"));
759  REFPROPname.assign("C12");
760 
761  BibTeXKeys.EOS = "Lemmon-EF-2004";
762  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
763  BibTeXKeys.VISCOSITY = "Huber-EF-2004";
764  BibTeXKeys.CONDUCTIVITY = "Huber-EF-2004";
765  BibTeXKeys.ECS_LENNARD_JONES = "Huber-EF-2004";
766 }
767 double nDodecaneClass::psat(double T)
768 {
769  // Maximum absolute error is 0.138846 % between 263.600001 K and 658.099990 K
770  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
771  const double Ni[]={0,-8.9866724724738951, 2.5493588271985472, -3.4360168519160204, -2.8106764008676923, -4.2863137232691715, 2.0061541458847785 };
772  double summer=0,theta;
773  int i;
774  theta=1-T/reduce.T;
775  for (i=1;i<=6;i++)
776  {
777  summer=summer+Ni[i]*pow(theta,ti[i]);
778  }
779  return reduce.p.Pa*exp(reduce.T/T*summer);
780 }
781 double nDodecaneClass::rhosatL(double T)
782 {
783  // Maximum absolute error is 2.000452 % between 263.600001 K and 658.099990 K
784  const double ti[]={0,0.18641474693916188, 1.1243571862574657, 12.893082664340085, 1.0855027883831063, 1.0077286384840609};
785  const double Ni[]={0,0.79443715883454757, 113.11123644121949, 0.67935350544099971, -172.20630557113711, 59.770329506604732};
786  double summer=0;
787  int i;
788  double theta;
789  theta=1-T/reduce.T;
790  for (i=1;i<=5;i++)
791  {
792  summer+=Ni[i]*pow(theta,ti[i]);
793  }
794  return reduce.rho*exp(summer);
795 }
796 double nDodecaneClass::rhosatV(double T)
797 {
798  // Maximum absolute error is 0.594552 % between 263.600001 K and 658.099990 K
799  const double ti[]={0,0.26387014250856733, 1.159849371473102, 0.98182373858336336, 1.1708598109208148, 3.5424277704241764};
800  const double Ni[]={0,-1.3944420975391763, 445.78839795908664, -36.255938474032995, -414.80248500375251, -8.5883385816933817};
801  double summer=0,theta;
802  int i;
803  theta=1.0-T/reduce.T;
804  for (i=1;i<=5;i++)
805  {
806  summer=summer+Ni[i]*pow(theta,ti[i]);
807  }
808  return reduce.rho*exp(crit.T/T*summer);
809 }
810 void nDodecaneClass::ECSParams(double *e_k, double *sigma)
811 {
812  // Huber 2004
813  *e_k = 522.592;
814  *sigma = 0.735639;
815 }
816 
818 {
819  double sigma, e_k;
820  // Dilute gas
821  this->ECSParams(&e_k, &sigma);
822  double Tstar = T/e_k;
823  double a[] = {0.382987, -0.561050, 0.313962e-1};
824  double S_star = exp(a[0]+a[1]*log(Tstar)+a[2]*log(Tstar)*log(Tstar));
825  double eta_0 = 0.021357*sqrt(params.molemass*T)/(sigma*sigma*S_star); //[uPa-s]
826  return eta_0/1e6;
827 }
828 double nDodecaneClass::viscosity_background(double T, double rho)
829 {
830  double sigma, e_k;
831  // Dilute gas
832  this->ECSParams(&e_k, &sigma);
833  double Tstar = T/e_k;
834  double delta = rho/crit.rho;
835 
836  // Dilute viscosity
837  double eta_0 = this->viscosity_dilute(T); //[Pa-s]
838 
839  // Initial-density
840  double b[] = {-19.572881, 219.73999, -1015.3226, 2471.0125, -3375.1717, 2491.6597, -787.26086, 14.085455, -0.34664158};
841  double t[] = {0, -0.25, -0.50, -0.75, -1.00, -1.25, -1.50, -2.50, -5.50};
842  double sumBstar = 0;
843  for (int i = 0; i<= 8; i++){ sumBstar += b[i]*pow(Tstar,t[i]); }
844  double Bstar = sumBstar;
845  double N_A = 6.02214129e23;
846  double B = N_A*pow(sigma/1e9,3)*Bstar;
847 
848  // Residual
849  double a21 = -0.471703e-1, a31 = 0.827816e-2, a22 = 0.298429e-1, a32 = -0.134156e-1;
850  double c[] = {0, 0.503109, 2.32661, 2.23089};
851  double tau = T/crit.T;
852  double delta_0 = c[2]+c[3]*sqrt(tau);
853  double eta_r = 1000*(a21*pow(delta,2)/tau+a31*pow(delta,3)/tau+a22*pow(delta,2)/pow(tau,2)+a32*pow(delta,3)/pow(tau,2)+c[1]*delta*(1/(delta_0-delta)-1/delta_0));
854 
855  double rhobar = rho/params.molemass*1000;
856  return eta_0*B*rhobar+eta_r/1e6; //[Pa-s]
857 }
858 
859 double nDodecaneClass::viscosity_Trho(double T, double rho)
860 {
861  return this->viscosity_dilute(T) + this->viscosity_background(T,rho);
862 }
863 
864 double nDodecaneClass::conductivity_background(double T, double rho)
865 {
866  double sumresid = 0;
867  double B1[] = {0, 0.693347e-1, -0.331695e-1, 0.676165e-2};
868  double B2[] = {0, -0.280792e-1, 0.173922e-2, 0.309558e-2};
869  for (int i = 1; i <= 3; i++)
870  {
871  sumresid += (B1[i]+B2[i]*T/crit.T)*pow(rho/crit.rho,i);
872  }
873  double lambda_r = sumresid; // W/m/K
874  return lambda_r;
875 }
876 double nDodecaneClass::conductivity_Trho(double T, double rho)
877 {
878  double lambda_0 = 0.436343e-2-0.264054e-1*T/crit.T+0.922394e-1*pow(T/crit.T,2)-0.291756e-1*pow(T/crit.T,3); //W/m/K
879  double lambda_r = this->conductivity_background(T,rho); //[W/m/K]
880  double lambda_c = this->conductivity_critical(T,rho,1/(1.52e-9)); //[W/m/K]
881 
882  return (lambda_0 + lambda_r + lambda_c); //[W/m/K]
883 }
884 
886 {
887  double n[] = {0, 0.0548405, 1.60777, -2.376, -0.51375, 0.18584, -0.90075, -0.5629, 0.2903, -0.3279, -0.03178, 0.8669, -0.1963, -0.1426, 0.004198, 0.1777, -0.04434, -0.03861, 0.0740, 0.02036, 0.0027278};
888  double t[] = {0, 1, 0.37, 0.79, 1.075, 0.37, 2.4, 2.5, 0.5, 3, 1.06, 1.6, 0.37, 1.33, 2.5, 0.9, 0.5, 0.73, 0.2, 1.5, 1.5};
889  double d[] = {0, 4, 1, 1, 2, 3, 1, 3, 2, 2, 7, 1, 1, 3, 3, 2, 2, 3, 2, 3, 2};
890  double l[] = {0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
891  // In REFPROP order
892  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.99, 1.43, 0.97, 1.93, 0.92, 1.27, 0.87, 0.82, 1.4, 3};
893  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38, 4.2, 1.2, 0.9, 1.2, 2.6, 5.3, 4.4, 4.2, 25};
894  double gamma[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.65, 0.63, 1.14, 0.09, 0.56, 0.4, 1.01, 0.45, 0.85, 0.86};
895  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.73, 0.75, 0.48, 2.32, 0.2, 1.33, 0.68, 1.11, 1.47, 0.99};
896 
897  //Critical parameters
898  crit.rho = 3.224*84.15948; //[kg/m^3]
899  crit.p = PressureUnit(4082.4, UNIT_KPA); //[kPa]
900  crit.T = 553.6; //[K]
901  crit.v = 1/crit.rho;
902 
903  // Other fluid parameters
904  params.molemass = 84.15948;
905  params.Ttriple = 279.47;
906  params.accentricfactor = 0.20926;
907  params.R_u = 8.3144621;
908  params.ptriple = 5.2388581733699020;
909 
910  // Limits of EOS
911  limits.Tmin = params.Ttriple;
912  limits.Tmax = 500.0;
913  limits.pmax = 100000.0;
914  limits.rhomax = 1000000.0*params.molemass;
915 
916  phirlist.push_back(new phir_power( n, d, t, l, 1, 10, 21));
917  phirlist.push_back(new phir_gaussian(n, d, t, eta, epsilon, beta, gamma, 11, 20, 21));
918 
919  phi0list.push_back(new phi0_lead(0.991141, 1.63455));
920  phi0list.push_back(new phi0_logtau(4-1));
921 
922  double a0[] = {0, 0.83775, 16.036, 24.636, 7.1715};
923  double t0[] = {0, 773/crit.T, 941/crit.T, 2185/crit.T, 4495/crit.T};
924  phi0list.push_back(new phi0_Planck_Einstein(a0, t0, 1, 4, 5));
925 
926  name.assign("CycloHexane");
927  aliases.push_back("Cyclohexane");
928  aliases.push_back(std::string("CYCLOHEXANE"));
929  REFPROPname.assign("CYCLOHEX");
930 
931  BibTeXKeys.EOS = "Zhou-PREPRINT-2014";
932  BibTeXKeys.ECS_LENNARD_JONES = "Chichester-NIST-2008";
933  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
934 }
935 double CyclohexaneClass::psat(double T)
936 {
937  // Max error is 0.233590271792 % between 279.47 and 553.639999 K
938  const double t[]={0, 0.10300000000000001, 0.38049999999999995, 0.6666666666666666, 1.3333333333333333, 2.5, 5.833333333333333};
939  const double N[]={0, -0.17233802121779696, 1.2533304819707884, -4.1248342131116029, -3.4866469454507585, -0.72673516850438313, -5.2420350342080013};
940  double summer=0,theta;
941  theta=1-T/reduce.T;
942  for (int i=1; i<=6; i++)
943  {
944  summer += N[i]*pow(theta,t[i]);
945  }
946  return reduce.p.Pa*exp(reduce.T/T*summer);
947 }
948 
950 {
951  // Maximum absolute error is 0.198166 % between 279.470000 K and 553.600000 K
952  const double t[] = {0, 0.5, 0.6666666666666666, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667};
953  const double N[] = {0, 2.0875917314370747, 22.130466870877569, -385.19349831131763, 1207.8352601443141, -1646.6470917840184, 1082.9143691231232, -280.39909465932834};
954  double summer=0,theta;
955  theta=1-T/reduce.T;
956  for (int i=1; i<=7; i++)
957  {
958  summer += N[i]*pow(theta,t[i]);
959  }
960  return reduce.rho*(summer+1);
961 }
962 
964 {
965  // Max error is 0.146651285796 % between 279.47 and 553.639999 K
966  const double t[] = {0, 0.39149999999999996, 0.367, 0.3765, 0.38249999999999995, 0.38599999999999995, 4.0};
967  const double N[] = {0, -4200293.8657020703, -1003425.4737526291, 8818731.06305697, -25089440.984318022, 21474423.99292187, -4.8624843691761548};
968  double summer=0,theta;
969  theta=1-T/reduce.T;
970  for (int i=1; i<=6; i++)
971  {
972  summer += N[i]*pow(theta,t[i]);
973  }
974  return reduce.rho*exp(reduce.T/T*summer);
975 }
976 
977 //#ifndef DISABLE_CATCH
978 //class validator_element
979 //{
980 //public:
981 // std::string in1, in3, in5;
982 // double in2, in4, in6;
983 // validator_element(std::string in1, double in2, std::string in3, double in4, std::string in5, double in6) : in1(in1), in2(in2), in3(in3), in4(in4), in5(in5), in6(in6) {};
984 //};
985 //TEST_CASE( "Cyclohexane", "[cyclohexane],[validation]" )
986 //{
987 // Fluid *CHEX = get_fluid(get_Fluid_index("Cyclohexane"));
988 // double mm = CHEX->params.molemass;
989 // validator_element data[] = {
990 // validator_element("T",300.0,"D",9.4*mm,"P",24.173705*1e6),
991 // validator_element("T",300.0,"D",9.4*mm,"O",115.28612/mm*1000),
992 // validator_element("T",300.0,"D",9.4*mm,"C",154.76968/mm*1000),
993 // validator_element("T",300.0,"D",9.4*mm,"A",1383.3876),
994 // validator_element("T",500.0,"D",6.5*mm,"P",3.9246630*1e6),
995 // validator_element("T",500.0,"D",6.5*mm,"O",192.52079/mm*1000),
996 // validator_element("T",500.0,"D",6.5*mm,"C",255.57110/mm*1000),
997 // validator_element("T",500.0,"D",6.5*mm,"A",434.13058),
998 // validator_element("T",500.0,"D",0.7*mm,"P",1.9981172*1e6),
999 // validator_element("T",500.0,"D",0.7*mm,"O",191.96468/mm*1000),
1000 // validator_element("T",500.0,"D",0.7*mm,"C",235.52304/mm*1000),
1001 // validator_element("T",500.0,"D",0.7*mm,"A",155.34798),
1002 // validator_element("T",600.0,"D",3.5*mm,"P",6.8225506*1e6),
1003 // validator_element("T",600.0,"D",3.5*mm,"O",232.79249/mm*1000),
1004 // validator_element("T",600.0,"D",3.5*mm,"C",388.55212/mm*1000),
1005 // validator_element("T",600.0,"D",3.5*mm,"A",150.53314),
1006 // validator_element("T",553.6,"D",3.3*mm,"P",4.0805433*1e6),
1007 // validator_element("T",553.6,"D",3.3*mm,"O",224.19580/mm*1000),
1008 // validator_element("T",553.6,"D",3.3*mm,"C",199224.62/mm*1000),
1009 // validator_element("T",553.6,"D",3.3*mm,"A",87.913862)
1010 // };
1011 //
1012 // //Now actually construct the vector
1013 // std::vector<validator_element> elements(data, data + sizeof(data) / sizeof(validator_element));
1014 //
1015 // for (std::vector<validator_element>::iterator it = elements.begin(); it != elements.end(); it++)
1016 // {
1017 // validator_element &el = *it;
1018 // double eos = PropsSI( el.in5.c_str(), el.in1.c_str(), el.in2, el.in3.c_str(), el.in4, "Cyclohexane");
1019 // double valid = el.in6;
1020 // CAPTURE(eos);
1021 // CAPTURE(valid);
1022 // CAPTURE(el.in1);
1023 // CAPTURE(el.in3);
1024 // CAPTURE(el.in5);
1025 // CHECK(fabs(valid/eos-1) < 1e-8);
1026 // }
1027 //}
1028 //
1029 //#endif
1030 
1031 
1033 {
1034  double n[] = {0.0, 0.95702326, -2.3707196, 0.18748463, 0.063800843, 0.00016625977, 0.082208165, 0.57243518, 0.0039476701, -0.23848654, -0.080711618, -0.073103558, -0.015538724};
1035 
1036  double a0[] = {0,-20.78887,-0.6539092,0.03342831};
1037  double n0[] = {0,-1.0/4.0,-2,-4};
1038  //Critical parameters
1039  crit.rho = 368.0; //[kg/m^3]
1040  crit.p = PressureUnit(4520, UNIT_KPA); //[kPa]
1041  crit.T = 386.411; //[K]
1042  crit.v = 1/crit.rho;
1043 
1044  // Other fluid parameters
1045  params.molemass = 66.051;
1046  params.Ttriple = 154.56;
1047  params.accentricfactor = 0.27521711453209896;
1048  params.R_u = 8.314510;
1049  params.ptriple = 0.064089867936946279;
1050 
1051  // Limits of EOS
1052  limits.Tmin = params.Ttriple;
1053  limits.Tmax = 500.0;
1054  limits.pmax = 100000.0;
1055  limits.rhomax = 1000000.0*params.molemass;
1056 
1057  phirlist.push_back(new phir_power( n,d_polar_SpanShort,t_polar_SpanShort,c_polar_SpanShort,1,12,13));
1058 
1059  phi0list.push_back(new phi0_lead(10.87227,6.839515));
1060  phi0list.push_back(new phi0_logtau(-1.0));
1061  phi0list.push_back(new phi0_power(a0,n0,1,3,4));
1062 
1063  static char EOSstr [] = "Span, R. and W. Wagner, \"Equations of State for Technical Applications. III. Results for Polar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: R. Tillner-Roth \"A Fundamental Equation of State for 1,1-Difluoroethane (HFC-152a)\" International Journal of Thermophysics. vol. 16. No. 1 1995\n\nNote: REFPROP 9.0 uses the MWBR formulation";
1064  EOSReference.assign(EOSstr);
1065  TransportReference.assign("Using ECS in fully predictive mode. ");
1066 
1067  name.assign("R152A");
1068  aliases.push_back("R152a");
1069  REFPROPname.assign("R152A");
1070 
1071  BibTeXKeys.EOS = "Span-IJT-2003C";
1072  BibTeXKeys.CP0 = "TillnerRoth-IJT-1995";
1073  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
1074  BibTeXKeys.VISCOSITY = "Krauss-IJT-1996";
1075  BibTeXKeys.CONDUCTIVITY = "Krauss-IJT-1996";
1076 }
1077 double R152AClass::psat(double T)
1078 {
1079  // Maximum absolute error is 0.040697 % between 154.560001 K and 386.410990 K
1080  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3,9};
1081  const double Ni[]={0,-7.5183210509323537, 2.2667633168445649, -2.9745826359338392, 2.3313114019766128, -9.5143559559629267, 12.699734081556912, -9.5537989669345524 };
1082  double summer=0,theta;
1083  int i;
1084  theta=1-T/reduce.T;
1085  for (i=1;i<=7;i++)
1086  {
1087  summer=summer+Ni[i]*pow(theta,ti[i]);
1088  }
1089  return reduce.p.Pa*exp(reduce.T/T*summer);
1090 }
1091 double R152AClass::rhosatL(double T)
1092 {
1093  // Maximum absolute error is 0.396356 % between 154.560001 K and 386.410990 K
1094  const double ti[]={0,0.36433465612787069, 1.3395245009162089, 1.1775553689273002, 1.2736011086820553, 1.39293878426836, 1.5006057434930407};
1095  const double Ni[]={0,2.2629063243095731, -8137.3963531047102, -739.48710570556011, 4453.3069484532643, 4994.763056241005, -572.05896753939112};
1096  double summer=0;
1097  int i;
1098  double theta;
1099  theta=1-T/reduce.T;
1100  for (i=1;i<=6;i++)
1101  {
1102  summer+=Ni[i]*pow(theta,ti[i]);
1103  }
1104  return reduce.rho*exp(summer);
1105 }
1106 double R152AClass::rhosatV(double T)
1107 {
1108  // Max error is 0.180395311787 % between 154.56 and 386.410999 K
1109 
1110  const double ti[]={0, 0.098, 0.365, 0.378, 0.38, 0.38749999999999996, 3.6666666666666665};
1111  const double Ni[]={0, -2.1665803273891777, 33129.223069368025, -600164.85585399868, 661053.48772902705, -94021.00606766867, -4.6394042521818628};
1112  double summer=0,theta;
1113  int i;
1114  theta=1.0-T/reduce.T;
1115  for (i=1;i<=6;i++)
1116  {
1117  summer=summer+Ni[i]*pow(theta,ti[i]);
1118  }
1119  return reduce.rho*exp(crit.T/T*summer);
1120 }
1121 void R152AClass::ECSParams(double *e_k, double *sigma)
1122 {
1123  // Krauss 1996
1124  *e_k = 354.84; *sigma = 0.46115;
1125 }
1126 double R152AClass::viscosity_Trho(double T, double rho)
1127 {
1128  // Krauss 1996
1129  double sigma, e_k;
1130 
1131  // Dilute gas
1132  this->ECSParams(&e_k, &sigma);
1133  double Tstar = T/e_k;
1134  double a[] = {0.4425728, -0.5138403,0.1547566,-0.02821844,0.001578286};
1135  double logTstar = log(Tstar);
1136  double S_star = exp(a[0]+a[1]*logTstar+a[2]*pow(logTstar,2)+a[3]*pow(logTstar,3)+a[4]*pow(logTstar,4));
1137  double eta_0 = 0.2169614*sqrt(T)/(sigma*sigma*S_star); //[uPa-s]
1138 
1139  // Initial-density
1140  double E[] = {0, -0.0737927,0.517924,-0.308875,0.108049,-0.408387,2.91733};
1141  double eta_r = 0;
1142  for (int i = 1; i<= 4; i++){ eta_r += E[i]*pow(rho/reduce.rho,i); }
1143  double Hc = 51.12;
1144  eta_r = Hc*(eta_r+E[5]/(rho/reduce.rho-E[6])+E[5]/E[6]); // [uPa-s]
1145 
1146  return (eta_0+eta_r)/1e6;
1147 }
1148 double R152AClass::conductivity_Trho(double T, double rho)
1149 {
1150  // Krauss 1996
1151  double L[] = {0,9.18090,11.8577,-5.44730,1.71379};
1152  double lambda_0 = -14.9420+0.0973283*T; // [mW/m/K]
1153 
1154  // Residual part
1155  double summer = 0;
1156  for (int i = 1; i<= 4; i++){ summer += L[i]*pow(rho/reduce.rho,i); }
1157  double lambda_r = 1.155*summer; // [mW/m/K]
1158 
1159  double lambda_c = this->conductivity_critical(T,rho,1/(4.37e-10))*1e3; //[mW/m/K]
1160 
1161  return (lambda_0+lambda_r+lambda_c)/1e3; // [W/m/K]
1162 }
1163 
1165 {
1166  double n[] = {0.0, 1.116973, -3.074593, 0.51063873, 0.094478812, 0.00029532752, 0.66974438, 0.96438575, -0.014865424, -0.49221959, -0.022831038, -0.1407486, -0.025117301};
1167 
1168  double a0[] = {0,2.046009,22.231991/456.82,-11.658491/456.82/456.82,2.691665/456.82/456.82/456.82}; // Fit is in terms of Tr = T/Tc
1169  double n0[] = {0,0,1,2,3};
1170  std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
1171  std::vector<double> n0_v(n0,n0+sizeof(n0)/sizeof(double));
1172 
1173  //Critical parameters
1174  crit.rho = 553.0; //[kg/m^3]
1175  crit.p = PressureUnit(3672, UNIT_KPA); //[kPa]
1176  crit.T = 456.82; //[K]
1177  crit.v = 1/crit.rho;
1178 
1179  // Other fluid parameters
1180  params.molemass = 152.931;
1181  params.Ttriple = 166;
1182  params.accentricfactor = 0.28192249703635186;
1183  params.R_u = 8.314510;
1184  params.ptriple = 0.0041534426564210506;
1185 
1186  // Limits of EOS
1187  limits.Tmin = params.Ttriple;
1188  limits.Tmax = 500.0;
1189  limits.pmax = 100000.0;
1190  limits.rhomax = 1000000.0*params.molemass;
1191 
1192  phirlist.push_back(new phir_power( n,d_polar_SpanShort,t_polar_SpanShort,c_polar_SpanShort,1,12,13));
1193 
1194  phi0list.push_back(new phi0_lead(0,0));
1195  phi0list.push_back(new phi0_logtau(-1.0));
1196  phi0list.push_back(new phi0_cp0_constant(a0[1],crit.T,298));
1197  phi0list.push_back(new phi0_cp0_poly(a0_v,n0_v,crit.T,298,2,4));
1198 
1199  static char EOSstr [] = "Span, R. and W. Wagner, \"Equations of State for Technical Applications. III. Results for Polar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: Ben A. Younglove \"An International Standard Equation of State for the Thermodynamic Properties of Refrigerant 123 (2,2-Dichloro-1,1,1-Trifluoroethane)\" J. Phys. Chem Ref. Data Vol 23, no 5, 1994\n\nNote: REFPROP 9.0 uses the less accurate MWBR formulation";
1200  EOSReference.assign(EOSstr);
1201  TransportReference.assign("Using ECS in fully predictive mode. ");
1202 
1203  name.assign("R123");
1204  REFPROPname.assign("R123");
1205 
1206  BibTeXKeys.EOS = "Span-IJT-2003C";
1207  BibTeXKeys.CP0 = "Younglove-JPCRD-1994";
1208  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
1209  BibTeXKeys.CONDUCTIVITY = "Laesecke-IJR-1996";
1210  BibTeXKeys.VISCOSITY = "Tanaka-IJT-1996";
1211  BibTeXKeys.ECS_LENNARD_JONES = "Tanaka-IJT-1996";
1212 }
1213 double R123Class::psat(double T)
1214 {
1215  // Maximum absolute error is 0.014209 % between 166.000001 K and 456.830990 K
1216  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3,9};
1217  const double Ni[]={0,-7.4849207348463391, 2.1531543385109324, -2.82304801818721, 1.4302672539730645, -9.5217923675635188, 14.152141293153656, -11.358606061743817 };
1218  double summer=0,theta;
1219  int i;
1220  theta=1-T/reduce.T;
1221  for (i=1;i<=7;i++)
1222  {
1223  summer=summer+Ni[i]*pow(theta,ti[i]);
1224  }
1225  return reduce.p.Pa*exp(reduce.T/T*summer);
1226 }
1227 double R123Class::rhosatL(double T)
1228 {
1229  // Maximum absolute error is 0.654849 % between 166.000001 K and 456.830990 K
1230  const double ti[]={0,0.30743229169537528, 0.87399412478482197, 1.9671212656736285, 3.0665054723952703, 3.2018449236245567, 12.488775734339216};
1231  const double Ni[]={0,1.4776907822440624, -0.29754626202706141, 0.27387548048866328, -0.049678358639705204, -0.084295473834870918, 0.94874134293977097};
1232  double summer=0;
1233  int i;
1234  double theta;
1235  theta=1-T/reduce.T;
1236  for (i=1;i<=6;i++)
1237  {
1238  summer+=Ni[i]*pow(theta,ti[i]);
1239  }
1240  return reduce.rho*exp(summer);
1241 }
1242 double R123Class::rhosatV(double T)
1243 {
1244  // Max error is 0.0199273635887 % between 166.0 and 456.8199 K
1245  const double ti[]={0, 0.11800000000000001, 0.12100000000000001, 0.131, 0.066, 0.351, 0.361, 0.3695, 0.381, 2.5, 4.5};
1246  const double Ni[]={0, 429808.91452099587, -565461.07822199445, 139089.70648760325, -1555.8578707113704, -670815.34308265569, 1956365.6938359118, -1678623.2858405211, 391186.25477907102, -1.9994703100835092, -4.2275468110525605};
1247  double summer=0,theta;
1248  int i;
1249  theta=1.0-T/reduce.T;
1250  for (i = 1; i <= 10; i++)
1251  {
1252  summer += Ni[i]*pow(theta,ti[i]);
1253  }
1254  return reduce.rho*exp(crit.T/T*summer);
1255 }
1256 void R123Class::ECSParams(double *e_k, double *sigma)
1257 {
1258  // From Tanaka 1996
1259  *e_k = 340;
1260  *sigma = 0.56;
1261 }
1262 double R123Class::viscosity_Trho(double T, double rho)
1263 {
1264  // From Tanaka 1996
1265  double eta_0 = -2.273638 + 5.099859e-2*T - 2.402786e-5*T*T;
1266 
1267  double eta_1 = -2.226486e-2 + 5.550623e-5*T;
1268 
1269  double rho0 = 1.828263e3, a0 = -3.222951e5, a1 = -1.009812e-1, a2 = 6.161902e-5, a3 = -8.84048e-8;
1270 
1271  double eta_r = a0/(rho-rho0)+a0/rho0+a1*rho+a2*rho*rho+a3*rho*rho*rho;
1272 
1273  return (eta_0 + eta_1*rho + eta_r)/1e6;
1274 
1275 }
1276 double R123Class::conductivity_Trho(double T, double rho)
1277 {
1278  double tau = 456.831/T, delta = rho/550;
1279 
1280  double lambda_0 = 5.695e-5*T-0.00778; // [W/m/K]
1281 
1282  double d[] = {0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4};
1283  double t[] = {0, 1.5, 2, 6, 0, 0.5, 1.5, 0, 0.5, 1.5, 0, 0.5, 1.5};
1284  double a[] = {0, 0.642894e-1, -0.530474e-1, 0.453522e-4, -0.139928, 0.166540, -0.162656e-1, 0.136819, -0.183291, 0.357146e-1, -0.231210e-1, 0.341945e-1, -0.757341e-2};
1285  double a13 = 0.486742e-2, a14 = -100, a15 = -7.08535;
1286 
1287  double sumresid = 0;
1288 
1289  for (int i = 1; i <= 12; i++)
1290  {
1291  sumresid += a[i]*pow(delta,d[i])*pow(tau,t[i]);
1292  }
1293  double lambda_r = sumresid; // W/m/K
1294 
1295  double lambda_c = a13*exp(a14*pow(tau-1,4)+a15*pow(delta-1,2));
1296 
1297  return lambda_0 + lambda_r + lambda_c; // W/m/K
1298 }
1299 
1300 
1301 
1303 {
1304  const double n[] = {0.0, 1.0656383, -3.2495206, 0.87823894, 0.087611569, 0.00029950049, 0.42896949, 0.70828452, -0.017391823, -0.37626522, 0.011605284, -0.089550567, -0.030063991};
1305 
1306  //Critical parameters
1307  crit.rho = 565; //[kg/m^3]
1308  crit.p = PressureUnit(4394, UNIT_KPA); //[kPa]
1309  crit.T = 471.06; //[K]
1310  crit.v = 1/crit.rho;
1311 
1312  // Other fluid parameters
1313  params.molemass = 137.368;
1314  params.Ttriple = 162.68;
1315  params.accentricfactor = 0.18875064825280830;
1316  params.R_u = 8.314510;
1317  params.ptriple = 0.0066915477602794626;
1318 
1319  // Limits of EOS
1320  limits.Tmin = params.Ttriple;
1321  limits.Tmax = 500.0;
1322  limits.pmax = 100000.0;
1323  limits.rhomax = 1000000.0*params.molemass;
1324 
1325  phirlist.push_back(new phir_power( n,d_polar_SpanShort,t_polar_SpanShort,c_polar_SpanShort,1,12,13));
1326 
1327  phi0list.push_back(new phi0_lead(0,0));
1328  phi0list.push_back(new phi0_logtau(-1.0));
1329  phi0list.push_back(new phi0_cp0_constant(4.0+0.0469706/(params.R_u),471.11,298));
1330  phi0list.push_back(new phi0_cp0_poly(0.0018532/(params.R_u),1,471.11,298));
1331 
1332  double a[] = {0,1,2,1,2,1,2};
1333  double A[] = {0,1085,847,535.2,398,349.5,241};
1334  for (int i = 1; i<=6; i++) {A[i] *= 1.43878/471.11; };
1335  std::vector<double> A_v(A,A+sizeof(A)/sizeof(double));
1336  std::vector<double> a_v(a,a+sizeof(a)/sizeof(double));
1337 
1338  phi0list.push_back(new phi0_Planck_Einstein(a_v,A_v,1,6));
1339 
1340  static char EOSstr [] = "Span, R. and W. Wagner, \"Equations of State for Technical Applications. III. Results for Polar Fluids\", International Journal of Thermophysics, Vol. 24, No. 1, January 2003. \n\nCp0: Jacobsen et al. \"A Fundamental Equation for Trichlorofluoromethane (R-11) Fluid Phase Equilibria, 1992\"";
1341  EOSReference.assign(EOSstr);
1342  TransportReference.assign("Using ECS in fully predictive mode. ");
1343 
1344  name.assign("R11");
1345  REFPROPname.assign("R11");
1346 
1347  BibTeXKeys.EOS = "Span-IJT-2003C";
1348  BibTeXKeys.CP0 = "Jacobsen-FPE-1992";
1349  BibTeXKeys.ECS_LENNARD_JONES = "McLinden-IJR-2000";
1350  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
1351 }
1352 double R11Class::psat(double T)
1353 {
1354  // Max error is 0.101004895012 % between 162.68 and 471.059999 K
1355  const double ti[]={0, 0.07, 0.3755, 1.0, 2.0, 3.0, 6.166666666666667};
1356  const double Ni[]={0, 0.015192240512549519, -0.073596807283158483, -6.4214975426915206, 1.4226706834098106, -3.0447362413765453, -1.7705707854921364};
1357  double summer=0,theta;
1358  int i;
1359  theta=1-T/reduce.T;
1360  for (i=1; i<=6; i++)
1361  {
1362  summer += Ni[i]*pow(theta,ti[i]);
1363  }
1364  return reduce.p.Pa*exp(reduce.T/T*summer);
1365 }
1366 double R11Class::rhosatL(double T)
1367 {
1368  // Max error is 2.4331028261 % between 162.68 and 471.06 K
1369  const double ti[]={0, 0.07, 0.07300000000000001, 0.07400000000000001, 0.07600000000000001, 0.082, 0.085, 0.093, 0.12000000000000001};
1370  const double Ni[]={0, 248395134649.64792, -4147174258833.4897, 6205839573055.1846, -2666372960037.8979, 623915721315.88281, -277014946706.59399, 12442556940.240545, -30820380.285890266};
1371  double summer=0;
1372  int i;
1373  double theta;
1374  theta=1-T/reduce.T;
1375  for (i=1; i<=8; i++)
1376  {
1377  summer += Ni[i]*pow(theta,ti[i]);
1378  }
1379  return reduce.rho*(summer+1);
1380 }
1381 double R11Class::rhosatV(double T)
1382 {
1383  // Max error is 0.716817629755 % between 162.68 and 471.0599 K
1384 
1385  const double ti[]={0, 0.062, 0.066, 0.07300000000000001, 0.12100000000000001, 0.357, 0.3595, 0.3615, 0.3625, 0.3695, 5.833333333333333};
1386  const double Ni[]={0, -39932620.310829446, 73762127.862868786, -36143788.042476922, 2832253.8625494828, -297296943057.29657, 1497747443415.0725, -3063566982511.5029, 1892454073153.1245, -29338108979.462494, -3.5661612181452496};
1387  double summer=0,theta;
1388  int i;
1389  theta=1.0-T/reduce.T;
1390  for (i=1;i<=10;i++)
1391  {
1392  summer += Ni[i]*pow(theta,ti[i]);
1393  }
1394  return reduce.rho*exp(crit.T/T*summer);
1395 }
double rhosatV(double)
Definition: Span_Short.cpp:636
double viscosity_dilute(double T)
Definition: Span_Short.cpp:817
double conductivity_Trho(double, double)
Definition: Span_Short.cpp:694
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
double rhosatV(double)
Definition: Span_Short.cpp:497
double rhosatL(double)
Definition: Span_Short.cpp:202
void ECSParams(double *e_k, double *sigma)
Definition: Span_Short.cpp:650
double rhosatV(double)
Definition: Span_Short.cpp:796
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
std::string VISCOSITY
Definition: FluidClass.h:122
double psat(double)
Definition: Span_Short.cpp:188
double rhosatL(double)
Definition: Span_Short.cpp:949
PressureUnit p
Definition: FluidClass.h:50
double rhosatV(double)
std::string name
A container to hold the cache for residual Helmholtz derivatives.
Definition: FluidClass.h:151
double conductivity_background(double T, double rho)
Definition: Span_Short.cpp:864
double rhosatL(double)
Definition: Span_Short.cpp:781
double psat(double)
void ECSParams(double *e_k, double *sigma)
Definition: Span_Short.h:30
std::string TransportReference
A std::string that contains a reference for thermo properties for the fluid.
Definition: FluidClass.h:158
double viscosity_Trho(double T, double rho)
double Pa
Definition: Units.h:22
std::string CP0
Definition: FluidClass.h:121
double psat(double)
Definition: Span_Short.cpp:767
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...
Definition: FluidClass.h:153
double psat(double)
double conductivity_Trho(double, double)
double viscosity_Trho(double, double)
double conductivity_Trho(double T, double rho)
Definition: Span_Short.cpp:876
struct CriticalStruct reduce
A pointer to the point that is used to reduce the T and rho for EOS.
Definition: FluidClass.h:222
double viscosity_background(double T, double rho)
Definition: Span_Short.cpp:828
double Tmax
Definition: FluidClass.h:54
double psat(double)
Definition: Span_Short.cpp:467
double rhosatL(double)
double rhosatV(double)
Definition: Span_Short.cpp:217
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
Definition: FluidClass.h:157
double viscosity_Trho(double T, double rho)
Definition: Span_Short.cpp:859
double psat(double)
double rhosatL(double)
double rhosatV(double)
Definition: Span_Short.cpp:963
std::string REFPROPname
The name of the fluid.
Definition: FluidClass.h:152
std::string ECS_LENNARD_JONES
Definition: FluidClass.h:124
double conductivity_Trho(double, double)
Definition: Span_Short.cpp:512
double conductivity_Trho(double T, double rho)
std::string SURFACE_TENSION
Definition: FluidClass.h:126
double rhosatL(double)
Definition: Span_Short.cpp:322
double rhosatV(double)
void ECSParams(double *e_k, double *sigma)
double pmax
Definition: FluidClass.h:54
double viscosity_Trho(double, double)
Definition: Span_Short.cpp:350
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double psat(double)
Definition: Span_Short.cpp:607
Term in the ideal-gas specific heat equation that is polynomial term.
Definition: Helmholtz.h:881
double rhosatV(double)
Definition: Span_Short.cpp:336
double conductivity_Trho(double, double)
Definition: Span_Short.cpp:372
std::vector< phi_BC * > phi0list
A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.
Definition: FluidClass.h:179
void ECSParams(double *e_k, double *sigma)
Term in the ideal-gas specific heat equation that is constant.
Definition: Helmholtz.h:792
double rhosatL(double)
Definition: Span_Short.cpp:482
double rhosatL(double)
Definition: Span_Short.cpp:621
double viscosity_Trho(double, double)
Definition: Span_Short.cpp:656
double rhosatV(double)
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
double psat(double)
Definition: Span_Short.cpp:308
double psat(double)
Definition: Span_Short.cpp:935
double rhosatL(double)
std::string CONDUCTIVITY
Definition: FluidClass.h:123
void ECSParams(double *e_k, double *sigma)
Definition: Span_Short.cpp:810