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
R227EA_R365MFC.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 "R227EA_R365MFC.h"
6 
8 {
9  double n[] = {0.0, 2.024341, -2.60593, 0.4957216, -0.824082, 0.06543703, -1.02461, 0.6247065, 0.2997521, -0.353917, -1.232043, -0.8824483, 0.1349661, -0.2662928, 0.1764733, 0.01536163, -0.004667185, -11.70854, 0.9114512};
10  double t[] = {0, 0.34, 0.77, 0.36, 0.9, 1, 2.82, 2.1, 0.9, 1.13, 3.8, 2.75, 1.5, 2.5, 2.5, 5.4, 4, 1, 3.5};
11  double d[] = {0, 1, 1, 2, 2, 4, 1, 3, 6, 6, 2, 3, 1, 2, 1, 1, 4, 2, 1};
12  double c[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0};
13  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.83, 2.19, 2.44, 3.65, 8.88, 8.23, 2.01};
14  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.72, 5.2, 2.31, 1.02, 5.63, 50.9, 1.56};
15  double gamma[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.414, 1.051, 1.226, 1.7, 0.904, 1.42, 0.926};
16  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.13, 0.71, 1.2, 1.7, 0.546, 0.896, 0.747};
17 
18  //Critical parameters
19  crit.rho = 3.495*170.02886; //[kg/m^3]
20  crit.p = PressureUnit(2925, UNIT_KPA); //[kPa]
21  crit.T = 374.9; //[K]
22  crit.v = 1/crit.rho;
23 
24  // Other fluid parameters
25  params.molemass = 170.02886;
26  params.Ttriple = 146.35;
27  params.accentricfactor = 0.35760476022557541;
28  params.R_u = 8.314472;
29  params.ptriple = 0.0073315669242655281;
30 
31  // Limits of EOS
32  limits.Tmin = params.Ttriple;
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,11,19));
38  phirlist.push_back(new phir_gaussian( n,d,t, eta, epsilon, beta, gamma, 12,18,19));
39 
40  const double n5 = 0, n6 = 0, n0 = 4;
41  phi0list.push_back(new phi0_lead(n5,n6));
42  phi0list.push_back(new phi0_logtau(n0-1));
43 
44  const double u0[] = {0, 403/crit.T, 1428/crit.T};
45  const double v0[] = {0, 11.43, 12.83};
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,2));
50 
51  EOSReference.assign("Mark O. McLinden, Eric W. Lemmon, \" Thermodynamic Properties of R-227ea, R-365mfc, R-115, and R-13I1\" Preprint provided by Eric Lemmon");
52  TransportReference.assign("Using ECS in fully predictive mode. Lennard-Jones parameters from NISTIR 6650");
53 
54  name.assign("R227EA");
55  aliases.push_back(std::string("R227ea"));
56  REFPROPname.assign("R227EA");
57 
58  ECSReferenceFluid = "Propane";
59 
60  BibTeXKeys.EOS = "McLinden-PREPRINT-2013";
61  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
62  BibTeXKeys.ECS_LENNARD_JONES = "Huber-IECR-2003";
63  BibTeXKeys.ECS_FITS = "Huber-IECR-2003";
64 }
65 double R227EAClass::psat(double T)
66 {
67  // Maximum absolute error is 0.014171 % between 146.350001 K and 374.899990 K
68  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3,9};
69  const double Ni[]={0,-7.7770183479122093, 1.9824076406295947, -2.6976862481795081, 0.098776424041554359, -7.4866660112540497, 9.792603493935939, -7.0950087986607366 };
70  double summer=0,theta;
71  int i;
72  theta=1-T/reduce.T;
73  for (i=1;i<=7;i++)
74  {
75  summer=summer+Ni[i]*pow(theta,ti[i]);
76  }
77  return reduce.p.Pa*exp(reduce.T/T*summer);
78 }
79 double R227EAClass::rhosatL(double T)
80 {
81  // Maximum absolute error is 0.038984 % between 146.350001 K and 374.899990 K
82  const double ti[]={0,0.33544749034418803, 0.99174918615685026, 2.1225866113354703, 2.2466438788850227, 2.4007651871441014, 2.5972300309334733, 2.7495964162340281, 5.1398348232050957};
83  const double Ni[]={0,1.7639870592586082, -2.522453612659636, 1361.681410638186, -4122.6816874822398, 4805.8231801381262, -2982.2919993398209, 940.03615642523266, -0.46004659700788408};
84  double summer=0;
85  int i;
86  double theta;
87  theta=1-T/reduce.T;
88  for (i=1;i<=8;i++)
89  {
90  summer+=Ni[i]*pow(theta,ti[i]);
91  }
92  return reduce.rho*exp(summer);
93 }
94 double R227EAClass::rhosatV(double T)
95 {
96  // Maximum absolute error is 0.252796 % between 146.350001 K and 374.899990 K
97  const double ti[]={0,0.32727803601304156, 1.0663072855856532, 2.9689056156126843, 3.3281256431886144, 3.5152372361461248, 3.8121392440843458, 3.9132576223837896, 7.0803926901081651};
98  const double Ni[]={0,-2.2028077488865478, -6.3911248425297638, 1542.6058303947407, -14554.384298585259, 25213.639486441465, -29654.132851429142, 17459.351007805486, -11.070145511065862};
99  double summer=0,theta;
100  int i;
101  theta=1.0-T/reduce.T;
102  for (i=1;i<=8;i++)
103  {
104  summer=summer+Ni[i]*pow(theta,ti[i]);
105  }
106  return reduce.rho*exp(crit.T/T*summer);
107 }
108 
109 
111 {
112  double n[] = {0.0, 2.20027, -2.8624, 0.384559, -0.621227, 0.0665967, -1.19383, 0.635935, 0.461728, -0.533472, -1.07101, 0.13929, -0.385506, 0.885653, 0.226303, -0.166116};
113  double t[] = {0, 0.24, 0.67, 0.5, 1.25, 1, 3.35, 2.5, 0.96, 1.07, 5.6, 6.9, 3, 3.6, 5, 1.25};
114  double d[] = {0, 1, 1, 2, 2, 4, 1, 3, 6, 6, 2, 3, 1, 1, 1, 2};
115  double c[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0};
116  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.97, 0.94, 2.15, 2.66};
117  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.07, 1.08, 10.9, 22.6};
118  double gamma[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.48, 1.49, 1.01, 1.16};
119  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.02, 0.62, 0.53, 0.48};
120 
121  //Critical parameters
122  crit.rho = 3.2*148.07452 ; //[kg/m^3]
123  crit.p = PressureUnit(3266, UNIT_KPA); //[kPa]
124  crit.T = 460.0; //[K]
125  crit.v = 1/crit.rho;
126 
127  // Other fluid parameters
128  params.molemass = 148.07452 ;
129  params.Ttriple = 239;
130  params.accentricfactor = 0.37741704621544692;
131  params.R_u = 8.314472;
132  params.ptriple = 2.4784182018851801;
133 
134  // Limits of EOS
135  limits.Tmin = params.Ttriple;
136  limits.Tmax = 500.0;
137  limits.pmax = 100000.0;
138  limits.rhomax = 1000000.0*params.molemass;
139 
140  phirlist.push_back(new phir_power( n,d,t,c,1,11,16));
141  phirlist.push_back(new phir_gaussian( n,d,t, eta, epsilon, beta, gamma, 12,15,16));
142 
143  const double n5 = 0, n6 = 0, n0 = 4;
144  phi0list.push_back(new phi0_lead(n5, n6));
145  phi0list.push_back(new phi0_logtau(n0-1));
146 
147  const double u0[] = {0, 569/crit.T, 2232/crit.T};
148  const double v0[] = {0, 17.47, 16.29};
149  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
150  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
151 
152  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,2));
153 
154  EOSReference.assign("Mark O. McLinden, Eric W. Lemmon, \" Thermodynamic Properties of R-227ea, R-365mfc, R-115, and R-13I1\" Preprint provided by Eric Lemmon");
155  TransportReference.assign("Using ECS in fully predictive mode. Lennard-Jones parameters from NISTIR 6650");
156 
157  name.assign("R365MFC");
158  aliases.push_back(std::string("R365mfc"));
159  REFPROPname.assign("R365MFC");
160 
161  ECSReferenceFluid = "Propane";
162 
163  BibTeXKeys.EOS = "McLinden-PREPRINT-2013";
164  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
165 }
166 double R365MFCClass::psat(double T)
167 {
168  // Fit from Eric Lemmon, April 8, 2013
169  const double ti[]={0,1.0,1.5,3.4,4.3,5.0};
170  const double Ni[]={0,-8.0955,2.0414,-13.3333,25.514,-19.967};
171  double summer=0,theta;
172  int i;
173  theta=1-T/reduce.T;
174  for (i=1;i<=5;i++)
175  {
176  summer=summer+Ni[i]*pow(theta,ti[i]);
177  }
178  return reduce.p.Pa*exp(reduce.T/T*summer);
179 }
180 double R365MFCClass::rhosatL(double T)
181 {
182  // Fit from Eric Lemmon, April 8, 2013
183  const double ti[]={0,0.31,0.6,0.9,1.2,1.5};
184  const double Ni[]={0,1.7933,-1.8792,9.0006,-11.669,5.6329};
185  double summer=0;
186  int i;
187  double theta;
188  theta=1-T/reduce.T;
189  for (i=1;i<=5;i++)
190  {
191  summer+=Ni[i]*pow(theta,ti[i]);
192  }
193  return reduce.rho*(1+summer);
194 }
195 double R365MFCClass::rhosatV(double T)
196 {
197  // Fit from Eric Lemmon, April 8, 2013
198  const double ti[]={0,0.281,0.91,3.0,5.0,8.0,10.0};
199  const double Ni[]={0,-1.6120,-6.7679,-24.499,3.3398,-211.10,258.07};
200  double summer=0,theta;
201  int i;
202  theta=1.0-T/reduce.T;
203  for (i=1;i<=6;i++)
204  {
205  summer=summer+Ni[i]*pow(theta,ti[i]);
206  }
207  return reduce.rho*exp(summer);
208 }
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)
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 psat(double)
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
std::string ECS_FITS
Definition: FluidClass.h:125
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 rhosatV(double)
double rhosatV(double)
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 psat(double)
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
double rhosatL(double)