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
R1234ze.cpp
Go to the documentation of this file.
1 /* Properties of SES36
2 by Ian Bell, 2012
3 */
4 
5 #if defined(_MSC_VER)
6 #define _CRTDBG_MAP_ALLOC
7 #define _CRT_SECURE_NO_WARNINGS
8 #include <stdlib.h>
9 #include <crtdbg.h>
10 #else
11 #include <stdlib.h>
12 #endif
13 
14 #include "math.h"
15 #include "stdio.h"
16 #include <string.h>
17 #include "CoolProp.h"
18 #include "FluidClass.h"
19 #include "R1234ze.h"
20 
22 {
23 
24  static const double n[]={0,4.434245E-02, 1.646369E+00, -2.437488E+00, -5.170560E-01, 1.815626E-01, -1.210104E+00, -5.944653E-01, 7.521992E-01, -6.747216E-01, -2.448183E-02, 1.379434E+00, -4.697024E-01, -2.036158E-01, -8.407447E-02, 5.109529E-04};
25 
26  // d used for consistency with CO2 correlation (corresponds to i from Span)
27  static const double d[]={0,
28  4, //[1]
29  1, //[2]
30  1, //[3]
31  2, //[4]
32  3, //[5]
33  1, //[6]
34  3, //[7]
35  2, //[8]
36  2, //[9]
37  7, //[10]
38  1, //[11]
39  1, //[12]
40  3, //[13]
41  3, //[14]
42  2, //[15
43  };
44 
45  static const double t[]={0.00, 1.00,0.31,0.923,1.06,0.44,2.08,2.32,1.25,2.0,1.0,0.93,1.93,2.69,1.0,2.0};
46 
47  // c used for consistency with CO2 correlation (corresponds to l from Span)
48  static const double c[]={0,
49  0, //[1]
50  0, //[2]
51  0, //[3]
52  0, //[4]
53  0, //[5]
54  2, //[6]
55  2, //[7]
56  1, //[8]
57  2, //[9]
58  1, //[10]
59  };
60 
61  static const double eta[]={
62  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
63  1.0, //[11]
64  1.4, //[12]
65  1.134, //[13]
66  7.68, //[14]
67  24 //[15]
68  };
69 
70  // epsilon is used here for consistency with the definitions in R744.c upon which Nitrogen.c is based
71  // is the value unity in Span
72  static const double beta[]={
73  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
74  1.64, //[11]
75  1.57, //[12]
76  1.49, //[13]
77  257.0, //[14]
78  45, //[15]
79  };
80 
81  static const double GAMMA[]={
82  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
83  1.130, //[11]
84  0.61, //[12]
85  0.65, //[13]
86  1.13, //[14]
87  1.34 //[15]
88  };
89 
90  // GAMMA is used here for consistency with the definitions in R744.c upon which Nitrogen.c is based
91  static const double epsilon[]={
92  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
93  0.711, //[11]
94  0.856, //[12]
95  0.753, //[13]
96  0.772, //[14]
97  1.88 //[15]
98  };
99 
100  //Constants for ideal gas expression
101  static const double a0[] = {0.0,6.259,7.303,8.597,2.333};
102  static const double b0[] = {0.0,0.0,691/382.52,1705/382.520,4216/382.52}; // Terms divided by critical temp
103 
104  phirlist.push_back(new phir_power(n,d,t,c,1,10,16));
105  phirlist.push_back(new phir_gaussian(n,d,t,eta,epsilon,beta,GAMMA,11,15,16));
106 
107  // phi0=log(delta)+a0[1]*log(tau)+a0[2]*log(1-exp(-b0*tau));
108  phi0list.push_back(new phi0_lead(0,0)); // phi0_lead is like log(delta)+a1+a2*tau with a1=0, a2=0
109  phi0list.push_back(new phi0_logtau(a0[1]));
110  std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
111  std::vector<double> b0_v(b0,b0+sizeof(b0)/sizeof(double));
112  phi0list.push_back(new phi0_Planck_Einstein(a0_v,b0_v,2,4));
113 
114  // Critical parameters
115  crit.rho = 4.29*114.0415928;
116  crit.p = PressureUnit(3636.25, UNIT_KPA);
117  crit.T = 382.52;
118  crit.v = 1.0/crit.rho;
119 
120  // Other fluid parameters
121  params.molemass = 114.0415928;
122  params.Ttriple = 168.62;
123  params.ptriple = 0.23;
124  params.accentricfactor = 0.313;
125  params.R_u = 8.314472;
126 
127  // Limits of EOS
128  limits.Tmin = params.Ttriple;
129  limits.Tmax = 2000.0;
130  limits.pmax = 2200000.0;
131  limits.rhomax = 53.15*params.molemass;
132 
133  EOSReference.assign("Mark O. McLinden, Monika Thol, Eric W. Lemmon, \"Thermodynamic Properties of trans-1,3,3,3-tetrafluoropropene [R1234ze(E)]: Measurements of Density and Vapor Pressure and a Comprehensive Equation of State\", International Refrigeration and Air Conditioning Conference at Purdue, July 12-15, 2010");
134  TransportReference.assign("Using ECS in fully predictive mode");
135 
136 
137  name.assign("R1234ze(E)");
138  aliases.push_back("R1234ZEE");
139  aliases.push_back("R1234zeE");
140  aliases.push_back(std::string("R1234ZE(E)"));
141  REFPROPname.assign("R1234ZE");
142 
143  BibTeXKeys.EOS = "McLinden-PURDUE-2010";
144  BibTeXKeys.CONDUCTIVITY = "Perkins-JCED-2011";
145 }
146 double R1234zeClass::psat(double T)
147 {
148  // Max error is 0.164450626904 % between 168.62 and 382.519999 K
149  const double ti[]={0, 0.3333333333333333, 0.39799999999999996, 0.38149999999999995, 1.1666666666666667, 2.5, 2.8333333333333335};
150  const double Ni[]={0, -8.3421563693432379, -40.706881720081284, 47.898700907115519, -6.9428753841743065, 12.088882106622243, -14.335385281674474};
151  double summer=0,theta;
152  int i;
153  theta=1 - T/reduce.T;
154  for (i=1; i<=6; i++)
155  {
156  summer += Ni[i]*pow(theta,ti[i]);
157  }
158  return reduce.p.Pa*exp(reduce.T/T*summer);
159 }
160 double R1234zeClass::rhosatL(double T)
161 {
162  // Maximum absolute error is 0.630902 % between 168.620001 K and 382.519990 K
163  const double ti[]={0,0.31509633757947603, 0.79111656912859174, 3.881097108987535, 7.7729566850460978, 2.6317441930191796};
164  const double Ni[]={0,1.5412884996474399, -0.31992997858318134, -0.38423837781818643, 0.56607079429270613, 0.35255364714584947};
165  double summer=0;
166  int i;
167  double theta;
168  theta=1-T/reduce.T;
169  for (i=1;i<=5;i++)
170  {
171  summer+=Ni[i]*pow(theta,ti[i]);
172  }
173  return reduce.rho*exp(summer);
174 }
175 double R1234zeClass::rhosatV(double T)
176 {
177  // Maximum absolute error is 0.449649 % between 168.620001 K and 382.519990 K
178  const double ti[]={0,0.36034291391608658, 1.0029495942911635, 1.5238381484239822, 1.4251613173826694, 3.9498036504642666};
179  const double Ni[]={0,-2.4332814409795982, -6.2539235529221004, -13.867477028090253, 16.426306950344401, -4.6886505464050012};
180  double summer=0,theta;
181  int i;
182  theta=1.0-T/reduce.T;
183  for (i=1;i<=5;i++)
184  {
185  summer=summer+Ni[i]*pow(theta,ti[i]);
186  }
187  return reduce.rho*exp(crit.T/T*summer);
188 }
189 
190 double R1234zeClass::conductivity_Trho(double T, double rho)
191 {
192  double sumresid = 0;
193  double A[] = {-0.0103589, 0.0308929, 0.000230348};
194  double B1[] = {0, -0.0428296, 0.0927099, -0.0702107, 0.0249708, -0.00301838};
195  double B2[] = {0, 0.0434288, -0.0605844, 0.0440187, -0.0155082, 0.00210190};
196 
197  double lambda_0 = A[0]*pow(T/reduce.T,0)+A[1]*pow(T/reduce.T,1)+A[2]*pow(T/reduce.T,2); //[W/m/K]
198 
199  for (int i = 1; i <= 5; i++)
200  {
201  sumresid += (B1[i]+B2[i]*T/reduce.T)*pow(rho/reduce.rho,i);
202  }
203  double lambda_r = sumresid; //[W/m/K]
204 
205  double lambda_c = this->conductivity_critical(T,rho,1/(0.585e-9)); //[W/m/K]
206 
207  return (lambda_0+lambda_r+lambda_c); //[W/m/K]
208 }
209 
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
220 
222 {
223 
224  double n[] = {0, 0.77652368e01, -0.87025756e01, -0.28352251e00, 0.14534501e00, 0.92092105e-02, -0.24997382e00, 0.96674360e-01, 0.24685924e-01, -0.13255083e-01, -0.64231330e-01, 0.36638206e00, -0.25548847e00, -0.95592361e-01, 0.86271444e-01, 0.15997412e-01, -0.13127234e-01, 0.42293990e-02};
225  double t[] = {0, 0.685, 0.8494, 1.87, 2., 0.142, 4.2, 0.08, 0.0, 1.1, 5.5, 6.6, 8.4, 7.2, 7.6, 8.5, 23.0, 18.};
226  double d[] = {0, 1, 1, 1, 2, 5, 1, 3, 5, 7, 1, 2, 2, 3, 4, 2, 3, 5};
227  double l[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3};
228 
229  phirlist.push_back(new phir_power(n,d,t,l,1,17,18));
230 
231  //Constants for ideal gas expression
232  double t0[] = {0.0,0,1,2,3};
233  double c0[] = {0.0,-1.6994, 24.527/423.27, -9.9249/423.27/423.27, 1.5158/423.27/423.27/423.27}; // Terms divided by critical temp
234  std::vector<double> t0_v(t0,t0+sizeof(t0)/sizeof(double));
235  std::vector<double> c0_v(c0,c0+sizeof(c0)/sizeof(double));
236  phi0list.push_back(new phi0_lead(0,0)); // phi0_lead is like log(delta)+a1+a2*tau with a1=0, a2=0
237  phi0list.push_back(new phi0_logtau(-1));
238  phi0list.push_back(new phi0_cp0_poly(c0_v,t0_v,423.27,298,1,4));
239 
240  // Critical parameters
241  crit.rho = 470;
242  crit.p = PressureUnit(3533, UNIT_KPA);
243  crit.T = 423.27;
244  crit.v = 1.0/crit.rho;
245 
246  // Reducing parameters used in EOS
247  reduce.p = PressureUnit(3533, UNIT_KPA);
248  reduce.T = crit.T;
249  reduce.rho = 470.615;
250  reduce.v = 1.0/reduce.rho;
251 
252  preduce = &reduce;
253 
254  // Other fluid parameters
255  params.molemass = 114.0415928;
256  params.Ttriple = 273;
257  params.ptriple = 67.8216;
258  params.accentricfactor = 0.3274;
259  params.R_u = 8.314472;
260 
261  // Limits of EOS
262  limits.Tmin = params.Ttriple;
263  limits.Tmax = 2000.0;
264  limits.pmax = 2200000.0;
265  limits.rhomax = 53.15*params.molemass;
266 
267  name.assign("R1234ze(Z)");
268  aliases.push_back("R1234ZE(Z)");
269  REFPROPname = "N/A";
270 
271  BibTeXKeys.EOS = "Akasaka-DELFT-2013";
272 }
273 double R1234zeZClass::psat(double T)
274 {
275  // Max error is 0.0362197220329 % between 273.0 and 423.269999 K
276  const double t[]={0, 0.3675, 0.378, 0.8333333333333334, 1.1666666666666667, 3.5, 7.5};
277  const double N[]={0, -3.4204004387395877, 3.7549450936800288, -4.2137431456192225, -3.0120279217374324, -2.6348957942753826, -6.8247581635654191};
278  double summer=0,theta;
279  theta=1-T/reduce.T;
280  for (int i=1; i<=6; i++)
281  {
282  summer += N[i]*pow(theta,t[i]);
283  }
284  return reduce.p.Pa*exp(reduce.T/T*summer);
285 }
286 
287 double R1234zeZClass::rhosatL(double T)
288 {
289  // Maximum absolute error is 0.109896 % between 273.000000 K and 423.207000 K
290  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.1666666666666667, 1.3333333333333333, 1.5};
291  const double N[] = {0, 0.67225813646270216, -11.145228554195773, 77.35643204523889, -213.21240955222734, 262.97937232802644, -360.33055287979818, 362.6944623022427, -116.36985864325474};
292  double summer=0,theta;
293  theta=1-T/reduce.T;
294  for (int i=1; i<=8; i++)
295  {
296  summer += N[i]*pow(theta,t[i]);
297  }
298  return reduce.rho*(summer+1);
299 }
300 
301 double R1234zeZClass::rhosatV(double T)
302 {
303  // Maximum absolute error is 0.255509 % between 273.000000 K and 423.207000 K
304  const double t[] = {0, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.6666666666666667, 1.8333333333333333};
305  const double N[] = {0, 20.724125232917633, -334.7988571883364, 1630.4602570459422, -4085.9839380536523, 5626.8672277784344, -3717.4680060891073, 1458.3036712606865, -607.34248139716851};
306  double summer=0,theta;
307  theta=1-T/reduce.T;
308  for (int i=1; i<=8; i++)
309  {
310  summer += N[i]*pow(theta,t[i]);
311  }
312  return reduce.rho*exp(reduce.T/T*summer);
313 }
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
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 psat(double)
Definition: R1234ze.cpp:146
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 Tmax
Definition: FluidClass.h:54
double rhosatL(double)
Definition: R1234ze.cpp:287
struct CriticalStruct * preduce
Definition: FluidClass.h:221
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
double psat(double)
Definition: R1234ze.cpp:273
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double rhosatL(double)
Definition: R1234ze.cpp:160
Term in the ideal-gas specific heat equation that is polynomial term.
Definition: Helmholtz.h:881
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 conductivity_Trho(double T, double rho)
Definition: R1234ze.cpp:190
double Tmin
Definition: FluidClass.h:54
double rhosatV(double)
Definition: R1234ze.cpp:175
double rhosatV(double)
Definition: R1234ze.cpp:301
double rhomax
Definition: FluidClass.h:54
std::string CONDUCTIVITY
Definition: FluidClass.h:123