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
Butenes.cpp
Go to the documentation of this file.
1 #include "CoolProp.h"
2 #include <vector>
3 #include "CPExceptions.h"
4 #include "FluidClass.h"
5 #include "Butenes.h"
6 
7 static double d_BUTENES[] =
8 {
9 0,
10 1.0, //[1]
11 1.0, //[2]
12 1.0, //[3]
13 2.0, //[4]
14 3.0, //[5]
15 7.0, //[6]
16 2.0, //[7]
17 5.0, //[8]
18 1.0, //[9]
19 4.0, //[10]
20 3.0, //[11]
21 4.0, //[12]
22 };
23 
24 static double t_BUTENES[] =
25 {
26 0,
27 0.12, //[1]
28 1.3, //[2]
29 1.74, //[3]
30 2.1, //[4]
31 0.28, //[5]
32 0.69, //[6]
33 0.75, //[7]
34 2.0, //[8]
35 4.4, //[9]
36 4.7, //[10]
37 15.0, //[11]
38 14.0, //[12]
39 };
40 
41 static double c_BUTENES[] =
42 {
43 0,
44 0.0, //[1]
45 0.0, //[2]
46 0.0, //[3]
47 0.0, //[4]
48 0.0, //[5]
49 0.0, //[6]
50 1.0, //[7]
51 1.0, //[8]
52 2.0, //[9]
53 2.0, //[10]
54 3.0, //[11]
55 3.0, //[12]
56 };
57 
58 static char EOSstr_BUTENES [] = "Eric W. Lemmon, E. Christian Ihmels, \"Thermodynamic properties of the butenes Part II. Short fundamental equations of state\", Fluid Phase Equilibria v. 228-229 (2005) 173-187";
59 
61 {
62  double n[] = {0.0, 0.78084, -2.8258, 0.99403, 0.017951, 0.088889, 0.00024673, 0.22846, -0.074009, -0.22913, -0.062334, -0.025385, 0.011040};
63 
64  //Critical parameters
65  crit.rho = 4.24*56.10632; //[kg/m^3]
66  crit.p = PressureUnit(4005.1, UNIT_KPA); //[kPa]
67  crit.T = 419.29; //[K]
68  crit.v = 1/crit.rho;
69 
70  // Other fluid parameters
71  params.molemass = 56.10632;
72  params.Ttriple = 87.8;
73  params.accentricfactor = 0.191860647355;
74  params.R_u = 8.314472;
75  params.ptriple = 5.94529945955e-10;
76 
77  // Limits of EOS
78  limits.Tmin = params.Ttriple;
79  limits.Tmax = 500.0;
80  limits.pmax = 100000.0;
81  limits.rhomax = 1000000.0*params.molemass;
82 
83  phirlist.push_back(new phir_power( n,d_BUTENES,t_BUTENES,c_BUTENES,1,12,13));
84 
85  const double a1 = -0.00101126, a2 = 2.3869174, c0 = 3.9197;
86  phi0list.push_back(new phi0_lead(a1,a2));
87  phi0list.push_back(new phi0_logtau(c0-1));
88 
89  const double u0[] = {0, 274/419.29, 951/419.29, 2127/419.29, 5752/419.29};
90  const double v0[] = {0, 2.9406, 6.5395, 14.535, 5.8971};
91  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
92  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
93 
94  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,4));
95 
96  EOSReference.assign(EOSstr_BUTENES);
97  TransportReference.assign("Using ECS in fully predictive mode");
98 
99  name.assign("1-Butene");
100  aliases.push_back(std::string("1Butene"));
101  aliases.push_back(std::string("1BUTENE"));
102  aliases.push_back(std::string("1-BUTENE"));
103  aliases.push_back(std::string("Butene"));
104  REFPROPname.assign("1BUTENE");
105 
106  ECSReferenceFluid = "Propane";
107 
108  BibTeXKeys.EOS = "Lemmon-FPE-2005";
109  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
110 }
111 
112 double OneButeneClass::psat(double T)
113 {
114  // Maximum absolute error is 0.162304 % between 87.800001 K and 419.289990 K
115  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3,9};
116  const double Ni[]={0,-7.1450182048398165, 2.2562618900495846, -2.36160856975917, 0.73673176213172731, -5.6018424878741815, 6.121828365893009, -4.2551550478203906 };
117  double summer=0,theta;
118  int i;
119  theta=1-T/reduce.T;
120  for (i=1;i<=7;i++)
121  {
122  summer += Ni[i]*pow(theta,ti[i]);
123  }
124  return reduce.p.Pa*exp(reduce.T/T*summer);
125 }
126 double OneButeneClass::rhosatL(double T)
127 {
128  // Maximum absolute error is 0.644715 % between 87.800001 K and 419.289990 K
129  const double ti[]={0,0.34250876414210879, 0.36355989633783242, 35.398692701297669, 3.5910129321917239, 7.3896726410407201};
130  const double Ni[]={0,5.3874235581501173, -4.1100854559360691, -1.3372589031304434, 0.094501262405661535, -0.01350642745145569};
131  double summer=0;
132  int i;
133  double theta;
134  theta=1-T/reduce.T;
135  for (i=1;i<=5;i++)
136  {
137  summer+=Ni[i]*pow(theta,ti[i]);
138  }
139  return reduce.rho*exp(summer);
140 }
141 double OneButeneClass::rhosatV(double T)
142 {
143  // Maximum absolute error is 0.161887 % between 87.800001 K and 419.289990 K
144  const double ti[]={0,0.38479607874880906, 0.82029186054153236, 23.635840599651146, 3.1770700106715823, 4.4973781676010844};
145  const double Ni[]={0,-2.4416835351244481, -2.5245469947685257, -4.2144539186977754, -1.7867328713084489, -2.7501625926745277};
146  double summer=0,theta;
147  int i;
148  theta=1.0-T/reduce.T;
149  for (i=1;i<=5;i++)
150  {
151  summer=summer+Ni[i]*pow(theta,ti[i]);
152  }
153  return reduce.rho*exp(crit.T/T*summer);
154 }
155 
157 {
158  double n[] = {0.0, 0.77111, -2.7971, 1.0118, 0.020730, 0.085086, 0.00021968, 0.20633, -0.078843, -0.23726, -0.080211, -0.027001, 0.013072};
159 
160  //Critical parameters
161  crit.rho = 4.17*56.10632; //[kg/m^3]
162  crit.p = PressureUnit(4009.8, UNIT_KPA); //[kPa]
163  crit.T = 418.09; //[K]
164  crit.v = 1/crit.rho;
165 
166  // Other fluid parameters
167  params.molemass = 56.10632;
168  params.Ttriple = 132.4;
169  params.accentricfactor = 0.1925934521621;
170  params.R_u = 8.314472;
171  params.ptriple = 0.000676189903044909;
172 
173  // Limits of EOS
174  limits.Tmin = params.Ttriple;
175  limits.Tmax = 500.0;
176  limits.pmax = 100000.0;
177  limits.rhomax = 1000000.0*params.molemass;
178 
179  phirlist.push_back(new phir_power( n,d_BUTENES,t_BUTENES,c_BUTENES,1,12,13));
180 
181  const double a1 = -0.12737888, a2 = 2.3125128, c0 = 4.0000;
182  phi0list.push_back(new phi0_lead(a1,a2));
183  phi0list.push_back(new phi0_logtau(c0-1));
184 
185  const double u0[] = {0,399/418.09,1270/418.09,2005/418.09,4017/418.09};
186  const double v0[] = {0, 4.8924, 7.8320, 7.2867, 8.7293};
187  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
188  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
189 
190  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,4));
191 
192  EOSReference.assign(EOSstr_BUTENES);
193  TransportReference.assign("Using ECS in fully predictive mode");
194 
195  name.assign("IsoButene");
196  aliases.push_back(std::string("Isobutene"));
197  aliases.push_back(std::string("ISOBUTENE"));
198  REFPROPname.assign("IBUTENE");
199 
200  ECSReferenceFluid = "Propane";
201 
202  BibTeXKeys.EOS = "Lemmon-FPE-2005";
203  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
204 }
205 
206 double IsoButeneClass::psat(double T)
207 {
208  // Maximum absolute error is 0.141011 % between 132.400001 K and 418.089990 K
209  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
210  const double Ni[]={0,-6.9116852201182075, 1.3539793916115146, -0.6053845232409808, -2.4488184963383248, -0.52147628515333433, -0.561826127052658 };
211  double summer=0,theta;
212  int i;
213  theta=1-T/reduce.T;
214  for (i=1;i<=6;i++)
215  {
216  summer=summer+Ni[i]*pow(theta,ti[i]);
217  }
218  return reduce.p.Pa*exp(reduce.T/T*summer);
219 }
220 double IsoButeneClass::rhosatL(double T)
221 {
222  // Maximum absolute error is 0.911818 % between 132.400001 K and 418.089990 K
223  const double ti[]={0,0.30342768948442322, 0.68061509707049073, 1.4525834599224288, 2.3785976948607295, 2.8237458291611888};
224  const double Ni[]={0,1.4523353540554691, -0.1572370124750222, -0.069052815100666839, 0.1081982691615444, 0.030812753121678148};
225  double summer=0;
226  int i;
227  double theta;
228  theta=1-T/reduce.T;
229  for (i=1;i<=5;i++)
230  {
231  summer+=Ni[i]*pow(theta,ti[i]);
232  }
233  return reduce.rho*exp(summer);
234 }
235 double IsoButeneClass::rhosatV(double T)
236 {
237  // Maximum absolute error is 0.218153 % between 132.400001 K and 418.089990 K
238  const double ti[]={0,0.40535252257257232, 1.0656571941879163, 1.3231477111666543, 2.4463428843919233, 4.4302956092284793};
239  const double Ni[]={0,-2.6824183183460883, -6.1489644495471669, 4.7663394841609668, -2.2153438450173208, -3.1991563607011462};
240  double summer=0,theta;
241  int i;
242  theta=1.0-T/reduce.T;
243  for (i=1;i<=5;i++)
244  {
245  summer=summer+Ni[i]*pow(theta,ti[i]);
246  }
247  return reduce.rho*exp(crit.T/T*summer);
248 }
249 
251 {
252  double n[] = {0.0, 0.77827, -2.8064, 1.0030, 0.013762, 0.085514, 0.00021268, 0.22962, -0.072442, -0.23722, -0.074071, -0.026547, 0.012032};
253 
254  //Critical parameters
255  crit.rho = 4.244*56.10632; //[kg/m^3]
256  crit.p = PressureUnit(4225.5, UNIT_KPA); //[kPa]
257  crit.T = 435.75; //[K]
258  crit.v = 1/crit.rho;
259 
260  // Other fluid parameters
261  params.molemass = 56.10632;
262  params.Ttriple = 134.3;
263  params.accentricfactor = 0.20235958587;
264  params.R_u = 8.314472;
265  params.ptriple = 0.0002636498688682175;
266 
267  // Limits of EOS
268  limits.Tmin = params.Ttriple;
269  limits.Tmax = 500.0;
270  limits.pmax = 100000.0;
271  limits.rhomax = 1000000.0*params.molemass;
272 
273  phirlist.push_back(new phir_power( n,d_BUTENES,t_BUTENES,c_BUTENES,1,12,13));
274 
275  const double a1 = 0.2591542, a2 = 2.4189888, c0 = 3.9687;
276  phi0list.push_back(new phi0_lead(a1,a2));
277  phi0list.push_back(new phi0_logtau(c0-1));
278 
279  const double u0[] = {0, 248/435.75, 1183/435.75, 2092/435.75, 4397/435.75};
280  const double v0[] = {0, 3.2375, 7.0437, 11.414, 7.3722};
281  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
282  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
283 
284  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,4));
285 
286  EOSReference.assign(EOSstr_BUTENES);
287  TransportReference.assign("Using ECS in fully predictive mode");
288 
289  name.assign("cis-2-Butene");
290  aliases.push_back(std::string("Cis-2-Butene"));
291  aliases.push_back(std::string("CIS-2-BUTENE"));
292  REFPROPname.assign("C2BUTENE");
293 
294  ECSReferenceFluid = "Propane";
295 
296  BibTeXKeys.EOS = "Lemmon-FPE-2005";
297 }
298 double Cis2ButeneClass::psat(double T)
299 {
300  // Maximum absolute error is 0.248652 % between 134.300001 K and 435.749990 K
301  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
302  const double Ni[]={0,-6.9258343900515573, 1.221853780238076, -0.31550093997536949, -3.1568049145274149, 0.23805014289458684, -1.279772722501435 };
303  double summer=0,theta;
304  int i;
305  theta=1-T/reduce.T;
306  for (i=1;i<=6;i++)
307  {
308  summer=summer+Ni[i]*pow(theta,ti[i]);
309  }
310  return reduce.p.Pa*exp(reduce.T/T*summer);
311 }
312 double Cis2ButeneClass::rhosatL(double T)
313 {
314  // Maximum absolute error is 0.450819 % between 134.300001 K and 435.749990 K
315  const double ti[]={0,0.44413848705698888, 0.65980763681444066, 0.64276060618274145, 0.64094401703342718, 2.5283005524045095};
316  const double Ni[]={0,11.567206951223904, -1109.7758269438145, 12460.578738205559, -11361.152072565803, 0.16407435859133529};
317  double summer=0;
318  int i;
319  double theta;
320  theta=1-T/reduce.T;
321  for (i=1;i<=5;i++)
322  {
323  summer+=Ni[i]*pow(theta,ti[i]);
324  }
325  return reduce.rho*exp(summer);
326 }
327 double Cis2ButeneClass::rhosatV(double T)
328 {
329  // Maximum absolute error is 0.382800 % between 134.300001 K and 435.749990 K
330  const double ti[]={0,0.44290471958214006, 0.9919707337807756, 0.031337536771287318, -4.4942695307610876, 4.0064150025287013};
331  const double Ni[]={0,-3.194141602461662, -1.9845364039394378, -0.025383887119914638, 6.1673175860603378e-37, -4.5162906962263722};
332  double summer=0,theta;
333  int i;
334  theta=1.0-T/reduce.T;
335  for (i=1;i<=5;i++)
336  {
337  summer=summer+Ni[i]*pow(theta,ti[i]);
338  }
339  return reduce.rho*exp(crit.T/T*summer);
340 }
341 
343 {
344  double n[] = {0.0, 0.81107, -2.8846, 1.0265, 0.016591, 0.086511, 0.00023256, 0.22654, -0.072182, -0.24849, -0.071374, -0.024737, 0.011843};
345 
346  //Critical parameters
347  crit.rho = 4.213*56.10632; //[kg/m^3]
348  crit.p = PressureUnit(4027.3, UNIT_KPA); //[kPa]
349  crit.T = 428.61; //[K]
350  crit.v = 1/crit.rho;
351 
352  // Other fluid parameters
353  params.molemass = 56.10632;
354  params.Ttriple = 167.6;
355  params.accentricfactor = 0.21007683443616;
356  params.R_u = 8.314472;
357  params.ptriple = 0.07481669961927020;
358 
359  // Limits of EOS
360  limits.Tmin = params.Ttriple;
361  limits.Tmax = 500.0;
362  limits.pmax = 100000.0;
363  limits.rhomax = 1000000.0*params.molemass;
364 
365  phirlist.push_back(new phir_power( n,d_BUTENES,t_BUTENES,c_BUTENES,1,12,13));
366 
367  const double a1 = 0.5917816, a2 = 2.1427758, c0 = 3.9988;
368  phi0list.push_back(new phi0_lead(a1,a2));
369  phi0list.push_back(new phi0_logtau(c0-1));
370 
371  const double u0[] = {0, 362/428.61, 1603/428.61, 3729/428.61, 4527/428.61};
372  const double v0[] = {0, 5.3276, 13.290, 9.6745, 0.40087};
373  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
374  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
375 
376  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,4));
377 
378  EOSReference.assign(EOSstr_BUTENES);
379  TransportReference.assign("Using ECS in fully predictive mode");
380 
381  name.assign("trans-2-Butene");
382  aliases.push_back(std::string("Trans-2-Butene"));
383  aliases.push_back(std::string("TRANS-2-BUTENE"));
384  REFPROPname.assign("T2BUTENE");
385 
386  ECSReferenceFluid = "Propane";
387 
388  BibTeXKeys.EOS = "Lemmon-FPE-2005";
389 }
390 double Trans2ButeneClass::psat(double T)
391 {
392  // Maximum absolute error is 0.205049 % between 167.600001 K and 428.609990 K
393  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
394  const double Ni[]={0,-7.417038031043373, 2.89238779867215, -3.4941759407935451, 2.3076971643105062, -6.477416610557051, 3.8758283450498365 };
395  double summer=0,theta;
396  int i;
397  theta=1-T/reduce.T;
398  for (i=1;i<=6;i++)
399  {
400  summer=summer+Ni[i]*pow(theta,ti[i]);
401  }
402  return reduce.p.Pa*exp(reduce.T/T*summer);
403 }
405 {
406  // Maximum absolute error is 0.702266 % between 167.600001 K and 428.609990 K
407  const double ti[]={0,0.36279985966962308, 0.35461690571642823, 3.2508260848176342, 3.3292336646129717, 3.2254735273475723};
408  const double Ni[]={0,-13.329703571695561, 14.617556102115302, 75.644376981618194, -18.667171640293407, -56.908406625616792};
409  double summer=0;
410  int i;
411  double theta;
412  theta=1-T/reduce.T;
413  for (i=1;i<=5;i++)
414  {
415  summer+=Ni[i]*pow(theta,ti[i]);
416  }
417  return reduce.rho*exp(summer);
418 }
420 {
421  // Maximum absolute error is 0.398092 % between 167.600001 K and 428.609990 K
422  const double ti[]={0,0.3547482282481132, 0.73232141326808986, 2.8067184296149144, 15.282642347756052, 4.6162704278588027};
423  const double Ni[]={0,-1.9653237149532947, -2.9314254366049646, -1.7095509890716998, 5.2783324320756684, -2.9407203414470202};
424  double summer=0,theta;
425  int i;
426  theta=1.0-T/reduce.T;
427  for (i=1;i<=5;i++)
428  {
429  summer=summer+Ni[i]*pow(theta,ti[i]);
430  }
431  return reduce.rho*exp(crit.T/T*summer);
432 }
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
double rhosatL(double)
Definition: Butenes.cpp:312
double psat(double)
Definition: Butenes.cpp:112
PressureUnit p
Definition: FluidClass.h:50
std::string ECSReferenceFluid
A list of aliases of names for the Fluid, each element is a std::string instance. ...
Definition: FluidClass.h:154
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
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 Tmax
Definition: FluidClass.h:54
double rhosatV(double)
Definition: Butenes.cpp:235
double rhosatL(double)
Definition: Butenes.cpp:404
double rhosatV(double)
Definition: Butenes.cpp:141
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
Definition: FluidClass.h:157
double rhosatL(double)
Definition: Butenes.cpp:220
std::string REFPROPname
The name of the fluid.
Definition: FluidClass.h:152
double rhosatV(double)
Definition: Butenes.cpp:419
std::string SURFACE_TENSION
Definition: FluidClass.h:126
double psat(double)
Definition: Butenes.cpp:390
double rhosatL(double)
Definition: Butenes.cpp:126
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double rhosatV(double)
Definition: Butenes.cpp:327
std::vector< phi_BC * > phi0list
A vector of instances of the phi_BC classes for the residual Helmholtz energy contribution.
Definition: FluidClass.h:179
double psat(double)
Definition: Butenes.cpp:206
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
double psat(double)
Definition: Butenes.cpp:298