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
Hydrogen.cpp
Go to the documentation of this file.
1 /*
2 Properties of Normal hydrogen
3 by Ian Bell
4 */
5 
6 #define _CRT_SECURE_NO_WARNINGS
7 #include <stdlib.h>
8 #include "math.h"
9 #include "stdio.h"
10 #include <string.h>
11 #include "CoolProp.h"
12 #include "FluidClass.h"
13 #include "Hydrogen.h"
14 
16 {
17  static const double n[]={0,
18  -6.93643,
19  0.01,
20  2.1101,
21  4.52059,
22  0.732564,
23  -1.34086,
24  0.130985,
25  -0.777414,
26  0.351944,
27  -0.0211716,
28  0.0226312,
29  0.032187,
30  -0.0231752,
31  0.0557346
32  };
33 
34  static const double d[]={0,
35  1, //[ 1]
36  4, //[ 2]
37  1, //[ 3]
38  1, //[ 4]
39  2, //[ 5]
40  2, //[ 6]
41  3, //[ 7]
42  1, //[ 8]
43  3, //[ 9]
44  2, //[10]
45  1, //[11]
46  3, //[12]
47  1, //[13]
48  1, //[14]
49  };
50 
51  static const double t[]={0.00, //offset for natural indices
52  0.6844,
53  1.0,
54  0.989,
55  0.489,
56  0.803,
57  1.1444,
58  1.409,
59  1.754,
60  1.311,
61  4.187,
62  5.646,
63  0.791,
64  7.249,
65  2.986
66  };
67 
68  static const double c[]={
69  0,0,0,0,0,0,0,0, // indices [0-7]
70  1,
71  1
72  };
73 
74  // alpha instead of eta is used here for consistency with the definitions in R744.c upon which R290.c is based
75  static const double alpha[]={ // phi from paper
76  0,0,0,0,0,0,0,0,0,0, // indices [0-9]
77  1.685,
78  0.489,
79  0.103,
80  2.506,
81  1.607
82  };
83 
84  static const double beta[]={
85  0,0,0,0,0,0,0,0,0,0, // indices [0-9]
86  0.171,
87  0.2245,
88  0.1304,
89  0.2785,
90  0.3967
91  };
92 
93  static const double GAMMA[]={
94  0,0,0,0,0,0,0,0,0,0, // indices [0-9]
95  0.7164,
96  1.3444,
97  1.4517,
98  0.7204,
99  1.5445
100  };
101 
102  static const double epsilon[]={ // D from paper
103  0,0,0,0,0,0,0,0,0,0, // indices [0-9]
104  1.506,
105  0.156,
106  1.736,
107  0.67,
108  1.662
109  };
110 
111  //Constants for ideal gas expression
112  static const double a0[]={0.0,
113  -1.4579856475,
114  1.888076782,
115  1.616,
116  -0.4117,
117  -0.792,
118  0.758,
119  1.217
120  };
121 
122  static const double b0[]={0.0,
123  0,0, //[1 and 2 are not used]
124  16.0205159149,
125  22.6580178006,
126  60.0090511389,
127  74.9434303817,
128  206.9392065168
129  };
130 
131  phirlist.push_back(new phir_power(n,d,t,c,1,9,10));
132  phirlist.push_back(new phir_gaussian(n,d,t,alpha,epsilon,beta,GAMMA,10,14,15));
133 
134  /* phi0=log(delta)+1.5*log(tau)+a0[1]+a0[2]*tau
135  +a0[3]*log(1-exp(-b0[3]*tau))
136  +a0[4]*log(1-exp(-b0[4]*tau))
137  +a0[5]*log(1-exp(-b0[5]*tau))
138  +a0[6]*log(1-exp(-b0[6]*tau))
139  +a0[7]*log(1-exp(-b0[7]*tau));
140  */
141 
142  //lead term of the form log(delta)+a1+a2*tau
143  phi0list.push_back(new phi0_lead(a0[1],a0[2]));
144  phi0list.push_back(new phi0_logtau(1.5));
145  phi0list.push_back(new phi0_Planck_Einstein(a0,b0,3,7,8));
146 
147  // Critical parameters
148  crit.rho = 15.508*2.01588;
149  crit.p = PressureUnit(1296.4, UNIT_KPA);
150  crit.T = 33.145;
151  crit.v = 1.0/crit.rho;
152 
153  // Other fluid parameters
154  params.molemass = 2.01588;
155  params.Ttriple = 13.957;
156  params.ptriple = 7.36205784168;
157  params.accentricfactor = -0.219;
158  params.R_u = 8.314472;
159 
160  // Limits of EOS
161  limits.Tmin = 13.957;
162  limits.Tmax = 1000.0;
163  limits.pmax = 2000000.0;
164  limits.rhomax = 102.0*params.molemass;
165 
166  EOSReference.assign("\"Fundamental Equations of State for Parahydrogen, Normal Hydrogen, and Orthohydrogen\""
167  "by J.W. Leachman and R.T. Jacobsen and S.G. Penoncello and E.W. Lemmon"
168  ", J. Phys. Chem. Ref. Data, Vol. 38, No. 3, 2009, pp 721-748");
169  TransportReference.assign("Conductivity: Assael, JPCRD, 2011");
170 
171  name.assign("Hydrogen");
172  aliases.push_back("hydrogen");
173  aliases.push_back("HYDROGEN");
174  aliases.push_back("H2");
175  aliases.push_back("R702");
176  REFPROPname.assign("hydrogen");
177 
178  BibTeXKeys.EOS = "Leachman-JPCRD-2009";
179  BibTeXKeys.VISCOSITY = "Muzny-JCED-2013";
180  BibTeXKeys.CONDUCTIVITY = "Assael-JPCRD-2011";
181  BibTeXKeys.ECS_LENNARD_JONES = "Poling-BOOK-2001";
182  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
183 }
184 
185 double HydrogenClass::psat(double T)
186 {
187  const double ti[]={0,1.0,1.5,2.0,2.85};
188  const double Ni[]={0,-4.89789,0.988558,0.349689,0.499356};
189  double summer=0,theta;
190  int i;
191  theta=1-T/reduce.T;
192  for (i=1;i<=4;i++)
193  {
194  summer=summer+Ni[i]*pow(theta,ti[i]);
195  }
196  return reduce.p.Pa*exp(reduce.T/T*summer);
197 }
198 double HydrogenClass::rhosatL(double T)
199 {
200  double theta = 1-T/reduce.T;
201  double RHS,rho;
202  // Max error is 1.585900 %
203  RHS = +1.093049*pow(theta,0.3)
204  +0.260558*pow(theta,0.9)
205  -0.543586*pow(theta,1.5)
206  +0.333107*pow(theta,3.2);
207  rho = exp(RHS)*reduce.rho;
208  return rho;
209 
210 }
211 double HydrogenClass::rhosatV(double T)
212 {
213  // Max error is 0.213338271447 % between 13.957 and 33.144999 K
214  const double t[] = {0, 0.3525, 0.3565, 0.367, 0.3765, 0.39249999999999996, 1.3333333333333333};
215  const double N[] = {0, -426795.37901103671, 810857.2657358282, -721220.63750821573, 392092.37071915239, -54938.300252502217, 1.9072707235406241};
216  double summer=0,theta;
217  theta=1-T/reduce.T;
218  for (int i=1; i<=6; i++)
219  {
220  summer += N[i]*pow(theta,t[i]);
221  }
222  return reduce.rho*exp(reduce.T/T*summer);
223 }
224 
225 double HydrogenClass::conductivity_Trho(double T, double rho)
226 {
227  double sumnum = 0, sumden = 0, sumresid = 0;
228  double A1[] = {-3.40976e-1, 4.58820e0, -1.45080e0, 3.26394e-1, 3.16939e-3, 1.90592e-4, -1.13900e-6};
229  double A2[] = {1.38497e2, -2.21878e1, 4.57151e0, 1.00000e0};
230  double B1[] = {0, 3.63081e-2, -2.07629e-2, 3.14810e-2, -1.43097e-2, 1.74980e-3};
231  double B2[] = {0, 1.83370e-3, -8.86716e-3, 1.58260e-2, -1.06283e-2, 2.80673e-3};
232 
233  for (int i = 0; i<= 6; i++){
234  sumnum += A1[i]*pow(T/reduce.T,i);
235  }
236  for (int i = 0; i<= 3; i++){
237  sumden += A2[i]*pow(T/reduce.T,i);
238  }
239 
240  double lambda_0 = sumnum/sumden; // [W/m/K]
241 
242  for (int i = 1; i<= 5; i++){
243  sumresid += (B1[i]+B2[i]*(T/reduce.T))*pow(rho/reduce.rho,i);
244  }
245 
246  double lambda_r = sumresid; // [W/m/K]
247 
248  double lambda_c = this->conductivity_critical(T,rho,1.0/(4.0e-10)); // [W/m/K]
249 
250  return lambda_0+lambda_r+lambda_c;
251 }
252 double HydrogenClass::viscosity_Trho(double T, double rho)
253 {
254  // Note, ECS L-J constants do not agree with Poling, 2001
255  double sigma = 0.297, e_k = 30.41;
256 
257  // Dilute gas
258  this->ECSParams(&e_k, &sigma);
259  double Tstar = T/e_k;
260  double a[] = {2.09630e-1, -4.55274e-1, 1.43602e-1, -3.35325e-2, 2.76981e-3};
261  double S_star = exp(a[0]+a[1]*log(Tstar)+a[2]*log(Tstar)*log(Tstar)+a[3]*pow(log(Tstar),3)+a[4]*pow(log(Tstar),4));
262  double lambda_0 = 0.021357*sqrt(params.molemass*T)/(sigma*sigma*S_star); //[uPa-s]
263 
264  // Initial-density
265  double b[] = {-0.1870, 2.4871, 3.7151, -11.0972, 9.0965, -3.8292, 0.5166};
266  double sumBstar = 0;
267  for (int i = 0; i<= 6; i++){ sumBstar += b[i]/Tstar; }
268  double Bstar = sumBstar;
269  double N_A = 6.02214129e23;
270  double B = N_A*pow(sigma/1e9,3)*Bstar;
271 
272  // Residual
273  double c[] = {0, 6.43449673, 4.56334068e-2, 2.32797868e-1, 9.58326120e-1, 1.27941189e-1, 3.63576595e-1};
274  double Tr = T/crit.T;
275  double rhor = rho/90.5;
276  double lambda_r = c[1]*rhor*rhor*exp(c[2]*Tr+c[3]/Tr+(c[4]*rhor*rhor)/(c[5]+Tr)+c[6]*pow(rhor,6));
277 
278  double rhobar = rho/params.molemass*1000;
279  return (lambda_0*(1+B*rhobar)+lambda_r)/1e6;
280 
281 }
282 
284 {
285  return -1.4165*pow(1-T/reduce.T,0.63882)+0.746383*pow(1-T/reduce.T,0.659804)+0.675625*pow(1-T/reduce.T,0.619149);
286 }
287 
289 {
290  double n [] = {0, -7.33375, 0.01, 2.60375, 4.66279, 0.68239, -1.47078, 0.135801, -1.05327, 0.328239, -0.0577833, 0.0449743, 0.0703464, -0.0401766, 0.11951};
291  double t [] = {0, 0.6855, 1, 1, 0.489, 0.774, 1.133, 1.386, 1.619, 1.162, 3.96, 5.276, 0.99, 6.791, 3.19};
292  double d [] = {0, 1, 4, 1, 1, 2, 2, 3, 1, 3, 2, 1, 3, 1, 1};
293  double c [] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0};
294  double a0 [] = {0, -1.4485891134, 1.884521239, 4.30256, 13.0289, -47.7365, 50.0013, -18.6261, 0.993973, 0.536078};
295  double b0 [] = {0, 0, 0, 15.14967511472, 25.0925982148, 29.4735563787, 35.4059141417, 40.724998482, 163.7925799988, 309.2173173842};
296  double alpha[] = {0,0,0,0,0,0,0,0,0,0,1.7437, 0.5516, 0.0634, 2.1341, 1.777}; // phi from paper
297  double beta[] = {0,0,0,0,0,0,0,0,0,0,0.194, 0.2019, 0.0301, 0.2383, 0.3253};
298  double GAMMA[] = {0,0,0,0,0,0,0,0,0,0,0.8048, 1.5248, 0.6648, 0.6832, 1.493};
299  double epsilon[] = {0,0,0,0,0,0,0,0,0,0,1.5487, 0.1785, 1.28, 0.6319, 1.7104}; // D from paper
300 
301  phirlist.push_back(new phir_power(n,d,t,c,1,9,10));
302  phirlist.push_back(new phir_gaussian(n,d,t,alpha,epsilon,beta,GAMMA,10,14,15));
303 
304  /* phi0=log(delta)+1.5*log(tau)+a0[1]+a0[2]*tau
305  +a0[3]*log(1-exp(-b0[3]*tau))
306  +a0[4]*log(1-exp(-b0[4]*tau))
307  +a0[5]*log(1-exp(-b0[5]*tau))
308  +a0[6]*log(1-exp(-b0[6]*tau))
309  +a0[7]*log(1-exp(-b0[7]*tau));
310  */
311 
312  //lead term of the form log(delta)+a1+a2*tau
313  phi_BC * phi0_lead_ = new phi0_lead(a0[1],a0[2]);
314  phi_BC * phi0_logtau_ = new phi0_logtau(1.5);
315  phi_BC * phi0_Planck_Einstein_ = new phi0_Planck_Einstein(a0,b0,3,9,10);
316 
317  phi0list.push_back(phi0_lead_);
318  phi0list.push_back(phi0_logtau_);
319  phi0list.push_back(phi0_Planck_Einstein_);
320 
321  // Critical parameters
322  crit.rho = 15.538*2.01588;
323  crit.p = PressureUnit(1285.8, UNIT_KPA);
324  crit.T = 32.938;
325  crit.v = 1.0/crit.rho;
326 
327  // Other fluid parameters
328  params.molemass = 2.01588;
329  params.Ttriple = 13.8033;
330  params.ptriple = 7.041;
331  params.accentricfactor = -0.219;
332  params.R_u = 8.314472;
333 
334  // Limits of EOS
335  limits.Tmin = params.Ttriple;
336  limits.Tmax = 1000.0;
337  limits.pmax = 2000000.0;
338  limits.rhomax = 102.0*params.molemass;
339 
340  EOSReference.assign("\"Fundamental Equations of State for Parahydrogen, Normal Hydrogen, and Orthohydrogen\""
341  "by J.W. Leachman and R.T. Jacobsen and S.G. Penoncello and E.W. Lemmon"
342  ", J. Phys. Chem. Ref. Data, Vol. 38, No. 3, 2009, pp 721-748");
343  TransportReference.assign("Viscosity & Surface Tension: McCarty, R.D. and Weber, L.A., "
344  "\"Thermophysical properties of parahydrogen from the freezing liquid line to "
345  "5000 R for pressures to 10,000 psia,\" "
346  "Natl. Bur. Stand., Tech. Note 617, 1972.");
347 
348  name.assign("ParaHydrogen");
349  aliases.push_back("Parahydrogen");
350  aliases.push_back("parahydrogen");
351  aliases.push_back("PARAHYDROGEN");
352  REFPROPname.assign("PARAHYD");
353 
354  BibTeXKeys.EOS = "Leachman-JPCRD-2009";
355  BibTeXKeys.CONDUCTIVITY = "Assael-JPCRD-2011";
356  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
357 }
358 
359 double ParaHydrogenClass::psat(double T)
360 {
361  // Max error is 0.0524435114644 % between 13.8033 and 32.937999 K
362 
363  const double t[]={0, 0.132, 0.3605, 1.0, 1.5, 3.3333333333333335, 7.0};
364  const double N[]={0, -0.0031611083814973629, 0.01606103512717301, -5.0101011461385303, 1.3458439473996564, 0.82353198183584131, -0.57502774437436288};
365  double summer=0,theta;
366  theta=1-T/reduce.T;
367  for (int i=1;i<=6;i++)
368  {
369  summer += N[i]*pow(theta,t[i]);
370  }
371  return reduce.p.Pa*exp(reduce.T/T*summer);
372 }
373 
375 {
376  // Maximum absolute error is 0.112227 % between 13.803301 K and 32.937990 K
377  const double t[] = {0, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333};
378  const double N[] = {0, 32.575128830119098, -105.60522773310021, 145.38945707541046, -93.098356183908166, 22.448904889155894};
379  double summer=0,theta;
380  theta=1-T/reduce.T;
381  for (int i=1; i<=5; i++)
382  {
383  summer += N[i]*pow(theta,t[i]);
384  }
385  return reduce.rho*(summer+1);
386 }
387 
389 {
390  // Max error is 0.213338271447 % between 13.957 and 33.144999 K
391  const double t[] = {0, 0.3525, 0.3565, 0.367, 0.3765, 0.39249999999999996, 1.3333333333333333};
392  const double N[] = {0, -426795.37901103671, 810857.2657358282, -721220.63750821573, 392092.37071915239, -54938.300252502217, 1.9072707235406241};
393  double summer=0,theta;
394  theta=1-T/reduce.T;
395  for (int i=1; i<=6; i++)
396  {
397  summer += N[i]*pow(theta,t[i]);
398  }
399  return reduce.rho*exp(reduce.T/T*summer);
400 }
401 
402 double ParaHydrogenClass::conductivity_Trho(double T, double rho)
403 {
404  double sumnum = 0, sumden = 0, sumresid = 0;
405  double A1[] = {-1.24500e0, 3.10212e2, -3.31004e2, 2.46016e2, -6.57810e1, 1.08260e1, -5.19659e-1, 1.43979e-2};
406  double A2[] = {1.42304e4, -1.93922e4, 1.58379e4, -4.81812e3, 7.28639e2, -3.57365e1, 1.00000e0};
407  double B1[] = {0, 2.65975e-2, -1.33826e-3, 1.30219e-2, -5.67678e-3, -9.23380e-5};
408  double B2[] = {0, -1.21727e-3, 3.66663e-3, 3.88715e-3, -9.21055e-3, 4.00723e-3};
409 
410  for (int i = 0; i<= 7; i++){
411  sumnum += A1[i]*pow(T/reduce.T,i);
412  }
413  for (int i = 0; i<= 6; i++){
414  sumden += A2[i]*pow(T/reduce.T,i);
415  }
416 
417  double lambda_0 = sumnum/sumden; // [W/m/K]
418 
419  for (int i = 1; i<= 5; i++){
420  sumresid += (B1[i]+B2[i]*(T/reduce.T))*pow(rho/reduce.rho,i);
421  }
422 
423  double lambda_r = sumresid; // [W/m/K]
424 
425  double lambda_c = this->conductivity_critical(T,rho,1.0/(5.0e-10)); // [W/m/K]
426 
427  return lambda_0+lambda_r+lambda_c;
428 
429 }
430 double ParaHydrogenClass::viscosity_Trho(double T, double rho)
431 {
432  double A,B,eta_0,eta_E,e_k,sigma;
433 
434  if (T < 100){
435  // Dilute gas contribution
436  eta_0 = 8.5558 * (pow(T,1.5)/(T+19.55)) * ((T+650.39)/(T+1175.9));
437 
438  //For the excess part, density is in units of g/cm3, so need to divide by 1000
439  rho /= 1000;
440 
441  A = (306.4636*rho - 3350.628*rho*rho+3868.092*rho*rho*rho)/(1.0-18.47830*rho+110.915*rho*rho+25.3542*rho*rho*rho);
442 
443  B = 10.0 + 7.2*(pow(rho/0.07,6)-pow(rho/0.07,1.5))-17.63/exp(58.75*pow(rho/0.07,3));
444 
445  // Excess viscosity
446  eta_E = A * exp(B/T);
447 
448  // Correlation in units of g/cm-s x 10e-6, so to get Pa-s, need to divide by 10 and divide by 1e6
449 
450  return (eta_0 + eta_E) / 1e7;
451  }
452  else{
453  // Use dilute gas properties
454  e_k = 59.7;
455  sigma = 0.2827;
456  return viscosity_dilute(T,e_k,sigma);
457  }
458 }
460 {
461  // Mulero, JPCRD 2012
462  return 0.005314*pow(1-T/reduce.T,1.06);
463 }
464 
466 {
467  double n [] = {0, -6.83148, 0.01, 2.11505, 4.38353, 0.211292, -1.00939, 0.142086, -0.87696, 0.804927, -0.710775, 0.0639688, 0.0710858, -0.087654, 0.647088};
468  double t [] = {0, 0.7333, 1, 1.1372, 0.5136, 0.5638, 1.6248, 1.829, 2.404, 2.105, 4.1, 7.658, 1.259, 7.589, 3.946};
469  double d [] = {0, 1, 4, 1, 1, 2, 2, 3, 1, 3, 2, 1, 3, 1, 1};
470  double l [] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0};
471 
472  double alpha[] = {0,0,0,0,0,0,0,0,0,0,1.169, 0.894, 0.04, 2.072, 1.306}; // Originally phi in the paper
473  double beta[] = {0,0,0,0,0,0,0,0,0,0,0.4555, 0.4046, 0.0869, 0.4415, 0.5743};
474  double gamma[] = {0,0,0,0,0,0,0,0,0,0,1.5444, 0.6627, 0.763, 0.6587, 1.4327};
475  double epsilon[] = {0,0,0,0,0,0,0,0,0,0,0.6366, 0.3876, 0.9437, 0.3976, 0.9626}; // Originally D in the paper
476 
477  phirlist.push_back(new phir_power(n,d,t,l,1,9,15));
478  phirlist.push_back(new phir_gaussian(n,d,t,alpha,epsilon,beta,gamma,10,14,15));
479 
480  /* phi0=log(delta)+1.5*log(tau)+a0[1]+a0[2]*tau
481  +a0[3]*log(1-exp(-b0[3]*tau))
482  +a0[4]*log(1-exp(-b0[4]*tau))
483  +a0[5]*log(1-exp(-b0[5]*tau))
484  +a0[6]*log(1-exp(-b0[6]*tau))
485  +a0[7]*log(1-exp(-b0[7]*tau));
486  */
487 
488  double a0 [] = {0, -1.4675442336, 1.8845068862, 2.54151, -2.3661, 1.00365, 1.22447};
489  double b0 [] = {0, 0, 0, 25.7676098736, 43.4677904877, 66.0445514750, 209.7531607465};
490 
491  //lead term of the form log(delta)+a1+a2*tau
492  phi0list.push_back(new phi0_lead(a0[1],a0[2]));
493  phi0list.push_back(new phi0_logtau(1.5));
494  phi0list.push_back(new phi0_Planck_Einstein(a0,b0,3,6,7));
495 
496  // Critical parameters
497  crit.rho = 15.445*2.01588;
498  crit.p = PressureUnit(1310.65, UNIT_KPA);
499  crit.T = 33.22;
500  crit.v = 1.0/crit.rho;
501 
502  // Other fluid parameters
503  params.molemass = 2.01594;
504  params.Ttriple = 14.008;
505  params.ptriple = 7.5598823410394012;
506  params.accentricfactor = -0.219;
507  params.R_u = 8.314472;
508 
509  // Limits of EOS
510  limits.Tmin = params.Ttriple;
511  limits.Tmax = 1000.0;
512  limits.pmax = 2000000.0;
513  limits.rhomax = 102.0*params.molemass;
514 
515  EOSReference.assign("\"Fundamental Equations of State for Parahydrogen, Normal Hydrogen, and Orthohydrogen\""
516  "by J.W. Leachman and R.T. Jacobsen and S.G. Penoncello and E.W. Lemmon"
517  ", J. Phys. Chem. Ref. Data, Vol. 38, No. 3, 2009, pp 721-748");
518  TransportReference.assign("Viscosity & Surface Tension: McCarty, R.D. and Weber, L.A., "
519  "\"Thermophysical properties of parahydrogen from the freezing liquid line to "
520  "5000 R for pressures to 10,000 psia,\" "
521  "Natl. Bur. Stand., Tech. Note 617, 1972.");
522 
523  name.assign("OrthoHydrogen");
524  aliases.push_back("Orthohydrogen");
525  aliases.push_back("orthohydrogen");
526  aliases.push_back("ORTHOHYDROGEN");
527  REFPROPname.assign("ORTHOHYD");
528 
529  BibTeXKeys.EOS = "Leachman-JPCRD-2009";
530 }
531 
532 double OrthoHydrogenClass::psat(double T)
533 {
534  // Max error is 0.053161754126 % between 14.008 and 33.219999 K
535  const double ti[]={0, 0.3565, 0.381, 0.6666666666666666, 0.8333333333333334, 3.3333333333333335, 3.5};
536  const double Ni[]={0, 0.23308544489395641, -0.44331497371946116, 2.596446168645369, -6.3537033133836278, 6.8116055471042287, -5.9839832788614595};
537  double summer=0,theta;
538  int i;
539  theta=1-T/reduce.T;
540  for (i=1;i<=6;i++)
541  {
542  summer=summer+Ni[i]*pow(theta,ti[i]);
543  }
544  return reduce.p.Pa*exp(reduce.T/T*summer);
545 }
547 {
548  // Maximum absolute error is 0.898525 % between 14.008001 K and 33.219990 K
549  const double ti[]={0,0.44474280444194492, 0.75146340805936485, 1.4887993676087643, 2.5830154027036798, 2.6777147409416382, 3.7537296061337075};
550  const double Ni[]={0,2.5493992312992853, -2.168729482271587, 1.1414905046089598, -0.45527343384150787, -0.48960090300149495, 0.4904521362247205};
551  double summer=0;
552  int i;
553  double theta;
554  theta=1-T/reduce.T;
555  for (i=1;i<=6;i++)
556  {
557  summer+=Ni[i]*pow(theta,ti[i]);
558  }
559  return reduce.rho*exp(summer);
560 }
562 {
563  // Maximum absolute error is 0.558198 % between 14.008001 K and 33.219990 K
564  const double ti[]={0,0.47329684677466771, 1.1913159863668648, 1.8991992477616062, 2.494090628975616, 3.6361782580222841, 24.83499518232826};
565  const double Ni[]={0,-2.8790193675821163, -0.32069213937243635, -1.6289408828391703, 3.4288996368340423, -1.5495479021680494, -303.61663521542357};
566  double summer=0,theta;
567  int i;
568  theta=1.0-T/reduce.T;
569  for (i=1;i<=6;i++)
570  {
571  summer=summer+Ni[i]*pow(theta,ti[i]);
572  }
573  return reduce.rho*exp(crit.T/T*summer);
574 }
double rhosatV(double)
Definition: Hydrogen.cpp:388
void ECSParams(double *e_k, double *sigma)
Definition: Hydrogen.h:14
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
double rhosatL(double)
Definition: Hydrogen.cpp:198
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
std::string VISCOSITY
Definition: FluidClass.h:122
double rhosatV(double)
Definition: Hydrogen.cpp:211
PressureUnit p
Definition: FluidClass.h:50
double psat(double)
Definition: Hydrogen.cpp:359
std::string name
A container to hold the cache for residual Helmholtz derivatives.
Definition: FluidClass.h:151
std::string TransportReference
A std::string that contains a reference for thermo properties for the fluid.
Definition: FluidClass.h:158
double Pa
Definition: Units.h:22
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
struct CriticalStruct reduce
A pointer to the point that is used to reduce the T and rho for EOS.
Definition: FluidClass.h:222
double surface_tension_T(double)
Definition: Hydrogen.cpp:283
virtual double viscosity_Trho(double, double)
Definition: Hydrogen.cpp:252
double Tmax
Definition: FluidClass.h:54
double surface_tension_T(double)
Definition: Hydrogen.cpp:459
virtual double conductivity_Trho(double, double)
Definition: Hydrogen.cpp:402
virtual double viscosity_dilute(double T, double e_k, double sigma)
double rhosatL(double)
Definition: Hydrogen.cpp:546
double rhosatV(double)
Definition: Hydrogen.cpp:561
virtual double viscosity_Trho(double, double)
Definition: Hydrogen.cpp:430
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
Definition: FluidClass.h:157
std::string REFPROPname
The name of the fluid.
Definition: FluidClass.h:152
std::string ECS_LENNARD_JONES
Definition: FluidClass.h:124
std::string SURFACE_TENSION
Definition: FluidClass.h:126
virtual double conductivity_Trho(double, double)
Definition: Hydrogen.cpp:225
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double psat(double)
Definition: Hydrogen.cpp:185
double psat(double)
Definition: Hydrogen.cpp:532
std::vector< phi_BC * > phi0list
A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.
Definition: FluidClass.h:179
This is the abstract base class upon which each residual Helmholtz energy class is built...
Definition: Helmholtz.h:24
double rhosatL(double)
Definition: Hydrogen.cpp:374
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
std::string CONDUCTIVITY
Definition: FluidClass.h:123