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
R236EA.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 "R236EA.h"
6 
8 {
9  double n[] = {0.0, 0.051074, 2.5584, -2.9180, -0.71485, 0.15534, -1.5894, -0.784, 0.85767, -0.67235, -0.017953, 1.3165, -0.42023, -0.28053, -1.4134, -0.0000062617};
10  double t[] = {0, 1.0, 0.264, 0.5638, 1.306, 0.2062, 2.207, 2.283, 1.373, 2.33, 0.6376, 1.08, 1.67, 3.502, 4.357, 0.6945};
11  double d[] = {0, 4, 1, 1, 2, 3, 1, 3, 2, 2, 7, 1, 1, 3, 3, 2};
12  double c[] = {0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 1, 0, 0, 0, 0, 0};
13  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.019, 1.341, 1.034, 5.264, 24.44};
14  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.30, 2.479, 1.068, 79.850, 49.06};
15  double gamma[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.13, 0.6691, 0.465, 1.280, 0.8781};
16  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.7119, 0.9102, 0.678, 0.7091, 1.727};
17 
18  //Critical parameters
19  crit.rho = 3.716*152.0384; //[kg/m^3]
20  crit.p = PressureUnit(3420, UNIT_KPA); //[kPa]
21  crit.T = 412.44; //[K]
22  crit.v = 1/crit.rho;
23 
24  // Other fluid parameters
25  params.molemass = 152.0384;
26  params.Ttriple = 170;
27  params.accentricfactor = 0.36878238039914035;
28  params.R_u = 8.314472;
29  params.ptriple = 17.525807103151166; // At Tmin of 243
30 
31  // Limits of EOS
32  limits.Tmin = 243;
33  limits.Tmax = 500.0;
34  limits.pmax = 100000.0;
35  limits.rhomax = 1000000.0*params.molemass;
36 
37  phirlist.push_back(new phir_power( n,d,t,c,1,10,16));
38  phirlist.push_back(new phir_gaussian( n,d,t, eta, epsilon, beta, gamma, 11,15,16));
39 
40  const double n5 = -14.1214241350, n6 = 10.2355589225, n0 = 3.762;
41  phi0list.push_back(new phi0_lead(n5,n6));
42  phi0list.push_back(new phi0_logtau(n0-1));
43 
44  const double u0[] = {0, 144/crit.T, 385/crit.T, 1536/crit.T, 7121/crit.T};
45  const double v0[] = {0, 0.7762, 10.41, 12.18, 3.332};
46  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
47  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
48 
49  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,4));
50 
51  EOSReference.assign("Xinfang Rui and Jiang Pan and Yugang Wang, \"An equation of state for the thermodynamic properties of 1,1,1,2,3,3-hexafluoropropane (R236ea)\", Fluid Phase Equilibria 341 (2013) 78-85\n\nNote: Erratum in paper: a1 should be -17.5983849 and a2 should be 8.87150449\n\nNote: REFPROP 9.0 does not use this EOS, they use thermodynamic corresponding states");
52  TransportReference.assign("Using ECS in fully predictive mode.");
53 
54  name.assign("R236EA");
55  aliases.push_back(std::string("R236ea"));
56  REFPROPname.assign("R236EA");
57 
58  BibTeXKeys.EOS = "Rui-FPE-2013";
59  BibTeXKeys.ECS_FITS = "Huber-IECR-2003";
60  BibTeXKeys.ECS_LENNARD_JONES = "Huber-IECR-2003";
61  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
62 }
63 
64 double R236EAClass::psat(double T)
65 {
66  // Max error is 0.0529123403505 % between 243.0 and 412.439999 K
67  const double t[]={0, 0.3525, 0.364, 0.38999999999999996, 1.0, 3.5, 8.5};
68  const double N[]={0, -40.377867678370912, 62.473820408057939, -22.503110890281281, -6.5543045908240307, -4.1160029346162421, -19.382010565649018};
69  double summer=0,theta;
70  theta=1-T/reduce.T;
71  for (int i=1; i<=6; i++)
72  {
73  summer += N[i]*pow(theta,t[i]);
74  }
75  return reduce.p.Pa*exp(reduce.T/T*summer);
76 }
77 
78 double R236EAClass::rhosatL(double T)
79 {
80  // Maximum absolute error is 0.248712 % between 240.000000 K and 412.440000 K
81  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.1666666666666665, 2.5, 2.8333333333333335, 3.3333333333333335, 3.6666666666666665, 4.166666666666667, 4.666666666666667, 5.333333333333333};
82  const double N[] = {0, -0.11265901539856658, 22.489063881386389, -1400.5354055892612, 39725.059739358134, -610848.71399103873, 5635725.3222955344, -33191999.940851696, 128885646.12191778, -330211446.70392752, 532015597.2670126, -446394365.84050828, 285861007.14091557, -276457308.02201492, 210222673.6578109, -161503261.17770496, 116030875.22871566, -40055688.151083663, 10870242.794050815, -1136826.2201711037};
83  double summer=0,theta;
84  theta=1-T/reduce.T;
85 
86 for (int i=1; i<=19; i++)
87 {
88  summer += N[i]*pow(theta,t[i]);
89 }
90 return reduce.rho*(summer+1);
91 
92 }
93 
94 double R236EAClass::rhosatV(double T)
95 {
96  // Maximum absolute error is 0.372083 % between 240.000000 K and 412.440000 K
97  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.1666666666666665, 2.5, 2.8333333333333335, 3.3333333333333335};
98  const double N[] = {0, -0.44429053123604484, 47.74080392708337, -1685.097406350224, 28198.126487234345, -263633.51442363445, 1516482.7144380445, -5690546.1347721191, 14296761.827532202, -23912142.681091785, 25228142.657964848, -13830872.815913403, 3680297.3135379627, -1373672.8249656181, 351025.56021906296, -28436.490307792792};
99  double summer=0,theta;
100  theta=1-T/reduce.T;
101 
102 for (int i=1; i<=15; i++)
103 {
104  summer += N[i]*pow(theta,t[i]);
105 }
106 return reduce.rho*exp(reduce.T/T*summer);
107 
108 }
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
double psat(double)
Definition: R236EA.cpp:64
PressureUnit p
Definition: FluidClass.h:50
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 rhosatV(double)
Definition: R236EA.cpp:94
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
std::string ECS_FITS
Definition: FluidClass.h:125
R236EAClass()
Definition: R236EA.cpp:7
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
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
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 rhosatL(double)
Definition: R236EA.cpp:78
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54