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
R404A.cpp
Go to the documentation of this file.
1 /*
2 Properties for R404A.
3 by Ian Bell
4 
5 Pseudo-pure fluid thermo props from
6 "Pseudo-pure fluid Equations of State for the Refrigerant Blends R410A, R404A, R507C and R407C"
7 by E.W. Lemmon, Int. J. Thermophys. v. 24, n4, 2003
8 
9 In order to call the exposed functions, rho_, h_, s_, cp_,......
10 there are three different ways the inputs can be passed, and this is expressed by the Types integer flag.
11 These macros are defined in the PropMacros.h header file:
12 1) First parameter temperature, second parameter pressure ex: h_R404A(260,354.7,1)=274
13  In this case, the lookup tables are built if needed and then interpolated
14 2) First parameter temperature, second parameter density ex: h_R404A(260,13.03,2)=274
15  Density and temp plugged directly into EOS
16 3) First parameter temperature, second parameter pressure ex: h_R404A(260,354.7,3)=274
17  Density solved for, then plugged into EOS (can be quite slow)
18 
19 */
20 
21 #if defined(_MSC_VER)
22 #define _CRTDBG_MAP_ALLOC
23 #define _CRT_SECURE_NO_WARNINGS
24 #include <stdlib.h>
25 #include <crtdbg.h>
26 #else
27 #include <stdlib.h>
28 #endif
29 
30 #include "math.h"
31 #include "stdio.h"
32 #include <string.h>
33 #include "CoolProp.h"
34 #include "FluidClass.h"
35 #include "R404A.h"
36 
38 {
39  static const double a[]={
40  7.00407, //[0]
41  7.98695, //[1]
42  -18.8664, //[2]
43  0.63078, //[3]
44  3.5979, //[4]
45  5.0335 //[5]
46  };
47 
48  static const double b[]={
49  0, //[0]
50  0, //[1]
51  -0.3, //[2]
52  1.19617, //[3]
53  2.32861, //[4]
54  5.00188 //[5]
55  };
56 
57  static const double N[]={
58  0.0, //[0]
59  6.10984, //[1]
60  -7.79453, //[2]
61  0.0183377, //[3]
62  0.262270, //[4]
63  -0.00351688, //[5]
64  0.0116181, //[6]
65  0.00105992, //[7]
66  0.850922, //[8]
67  -0.520084, //[9]
68  -0.0464225, //[10]
69  0.621190, //[11]
70  -0.195505, //[12]
71  0.336159, //[13]
72  -0.0376062, //[14]
73  -0.00636579, //[15]
74  -0.0758262, //[16]
75  -0.0221041, //[17]
76  0.0310441, //[18]
77  0.0132798, //[19]
78  0.0689437, //[20]
79  -0.0507525, //[21]
80  0.0161382, //[22]
81  };
82 
83  static const double t[]={
84  0.0, //[0]
85  0.67, //[1]
86  0.91, //[2]
87  5.96, //[3]
88  0.7, //[4]
89  6.0, //[5]
90  0.3, //[6]
91  0.7, //[7]
92  1.7, //[8]
93  3.3, //[9]
94  7.0, //[10]
95  2.05, //[11]
96  4.3, //[12]
97  2.7, //[13]
98  1.8, //[14]
99  1.25, //[15]
100  12.0, //[16]
101  6.0, //[17]
102  8.7, //[18]
103  11.6, //[19]
104  13.0, //[20]
105  17.0, //[21]
106  16.0 //[22]
107  };
108 
109  static const int d[]={
110  0, //[0]
111  1, //[1]
112  1, //[2]
113  1, //[3]
114  2, //[4]
115  2, //[5]
116  4, //[6]
117  6, //[7]
118  1, //[8]
119  1, //[9]
120  1, //[10]
121  2, //[11]
122  2, //[12]
123  3, //[13]
124  4, //[14]
125  7, //[15]
126  2, //[16]
127  3, //[17]
128  4, //[18]
129  4, //[19]
130  2, //[20]
131  3, //[21]
132  5 //[22]
133  };
134 
135  static const int l[]={
136  0, //[0]
137  0, //[1]
138  0, //[2]
139  0, //[3]
140  0, //[4]
141  0, //[5]
142  0, //[6]
143  0, //[7]
144  1, //[8]
145  1, //[9]
146  1, //[10]
147  1, //[11]
148  1, //[12]
149  1, //[13]
150  1, //[14]
151  1, //[15]
152  2, //[16]
153  2, //[17]
154  2, //[18]
155  2, //[19]
156  3, //[20]
157  3, //[21]
158  3 //[22]
159  };
160 
161  std::vector<double> n_v(N,N+sizeof(N)/sizeof(double));
162  std::vector<double> d_v(d,d+sizeof(d)/sizeof(int));
163  std::vector<double> t_v(t,t+sizeof(t)/sizeof(double));
164  std::vector<double> l_v(l,l+sizeof(l)/sizeof(int));
165  std::vector<double> a0(a,a+sizeof(a)/sizeof(double));
166  std::vector<double> n0(b,b+sizeof(b)/sizeof(double));
167 
168  phi_BC * phir_ = new phir_power(n_v,d_v,t_v,l_v,1,22);
169  phirlist.push_back(phir_);
170 
171  /*
172  sum=log(delta)-log(tau)+a[0]+a[1]*tau+a[2]*pow(tau,b[2]);
173  for(k=3;k<=5;k++)
174  {
175  sum+=a[k]*log(1.0-exp(-b[k]*tau));
176  }
177  */
178  phi_BC * phi0_lead_ = new phi0_lead(a0[0],a0[1]);
179  phi_BC * phi0_logtau_ = new phi0_logtau(-1.0);
180  phi_BC * phi0_power_ = new phi0_power(a0[2],n0[2]);
181  phi_BC * phi0_Planck_Einstein_ = new phi0_Planck_Einstein(a0,n0,3,5);
182 
183  phi0list.push_back(phi0_lead_);
184  phi0list.push_back(phi0_logtau_);
185  phi0list.push_back(phi0_power_);
186  phi0list.push_back(phi0_Planck_Einstein_);
187 
188  // Critical parameters (max condensing temperature)
189  crit.rho = 482.162772;
190  crit.p = PressureUnit(3734.8,UNIT_KPA);
191  crit.T = 345.27;
192  crit.v = 1.0/crit.rho;
193 
194  // Other fluid parameters
195  params.molemass = 97.6038;
196  params.Ttriple = 200.0;
197  params.ptriple = 21.2656766151;
198  params.accentricfactor = 0.293;
199  params.R_u = 8.314472;
200  isPure = false;
201 
202  // Limits of EOS
203  limits.Tmin = params.Ttriple;
204  limits.Tmax = 500.0;
205  limits.pmax = 50000.0;
206  limits.rhomax = 14.21*params.molemass;
207 
208  EOSReference.assign("E.W. Lemmon, \"Pseudo-pure fluid Equations of State for the Refrigerant Blends R410A, R404A, R507C and R407C\""
209  ",Int. J. Thermophys. v. 24, n4, 2003");
210  TransportReference.assign("Viscosity: V. Geller, \"Viscosity of Mixed Refrigerants R404A,R407C,"
211  "R410A, and R507A\", 2000 Purdue Refrigeration conferences\n\n"
212  "Thermal Conductivity: V.Z. Geller, B.Z. Nemzer, and U.V. Cheremnykh \"Thermal Conductivity "
213  "of the Refrigerant mixtures R404A,R407C,R410A, and R507A\" "
214  "Int. J. Thermophysics, v. 22, n 4 2001\n\n"
215  "Surface Tension: R. Heide, \"The surface tension of HFC refrigerants and mixtures\", Int J. Refrig. Vol. 20, No. 7, pp. 496-503, 1997");
216 
217  name.assign("R404A");
218  aliases.push_back("R404a");
219 
220  BibTeXKeys.EOS = "Lemmon-IJT-2003";
221  BibTeXKeys.VISCOSITY = "Geller-PURDUE-2000";
222  BibTeXKeys.CONDUCTIVITY = "Geller-IJT-2001";
223  BibTeXKeys.SURFACE_TENSION ="Heide-IJR-1997";
224 }
225 
226 double R404AClass::conductivity_Trho(double T, double rho)
227 {
228  // Properties taken from "Thermal Conductivity
229  // of the Refrigerant mixtures R404A,R407C,R410A, and R507A"
230  // by V.Z. Geller, B.Z. Nemzer, and U.V. Cheremnykh
231  // Int. J. Thermophysics, v. 22, n 4 2001
232 
233  // inputs in T [K], and p [kPa] or rho [kg/m^3]
234  // output in W/m-K
235 
236  //Set constants required
237  double a_0=-8.624e0,a_1=7.360e-2,b_1=3.222e-2,b_2=2.569e-5,b_3=-2.693e-8,b_4=2.007e-11;
238 
239  return (a_0+a_1*T+b_1*rho+b_2*rho*rho+b_3*rho*rho*rho+b_4*rho*rho*rho*rho)/1.e3; // from mW/m-K to kW/m-K
240 }
241 
242 double R404AClass::psatL(double T)
243 {
244  //Bubble point of R410A
245  double sum=0,theta;
246  int k;
247 
248  static const double Nbp[]={
249  0.0, //[0]
250  0.061067, //[1]
251  -6.5646, //[2]
252  -3.6162, //[3]
253  -3.9771 //[4]
254  };
255 
256  static const double tbp[]={
257  0.0, //[0]
258  0.54, //[1]
259  0.965, //[2]
260  3.7, //[3]
261  9.0 //[4]
262  };
263  theta=1-T/crit.T;
264 
265  for (k=1;k<=4;k++)
266  {
267  sum+=Nbp[k]*pow(theta,tbp[k]);
268  }
269  return reduce.p.Pa*exp(reduce.T/T*sum);
270 }
271 
272 double R404AClass::psatV(double T)
273 {
274  //Dew point of R410A
275  double sum=0,theta;
276  int k;
277 
278  static const double Ndp[]={
279  0.0, //[0]
280  -0.00026863, //[1]
281  -6.5757, //[2]
282  -4.1802, //[3]
283  -7.9102 //[4]
284  };
285 
286  static const double tdp[]={
287  0.0, //[0]
288  0.1, //[1]
289  0.972, //[2]
290  3.8, //[3]
291  9.0 //[4]
292  };
293 
294  theta=1-T/crit.T;
295 
296  for (k=1;k<=4;k++)
297  {
298  sum+=Ndp[k]*pow(theta,tdp[k]);
299  }
300  return reduce.p.Pa*exp(reduce.T/T*sum);
301 }
302 
303 double R404AClass::rhosatV(double T)
304 {
305  double THETA,a1,a2,a3,a4,a5,a6,a7,b1,b2,b3,b4,b5,b6,b7;
306  THETA=1-T/345.27;
307 
308  a1 = -17.61;
309  a2 = -16.61;
310  a3 = -6.059;
311  a4 = -16.43;
312  a5 = -16.85;
313  a6 = -16.26;
314  a7 = -2.926;
315  b1 = 2.939;
316  b2 = 6.538;
317  b3 = 1.144;
318  b4 = 6.536;
319  b5 = 6.54;
320  b6 = 6.533;
321  b7 = 0.3967;
322 
323  return exp(a1*pow(THETA,b1)+a2*pow(THETA,b2)+a3*pow(THETA,b3)+a4*pow(THETA,b4)+a5*pow(THETA,b5)+a6*pow(THETA,b6)+a7*pow(THETA,b7))*482.13;
324 }
325 
326 double R404AClass::rhosatL(double T)
327 {
328  double THETA,a1,a2,a3,a4,a5,a6,a7,b1,b2,b3,b4,b5,b6,b7;
329  THETA=1-T/345.27;
330 
331  a1 = 0.3897;
332  a2 = 0.2768;
333  a3 = 0.546;
334  a4 = 0.3473;
335  a5 = -0.1371;
336  a6 = 0.2254;
337  a7 = -0.1426;
338  b1 = 0.2581;
339  b2 = 2.985;
340  b3 = 0.255;
341  b4 = 0.2596;
342  b5 = 1.526;
343  b6 = 0.2661;
344  b7 = 0.0742;
345 
346  return exp(a1*pow(THETA,b1)+a2*pow(THETA,b2)+a3*pow(THETA,b3)+a4*pow(THETA,b4)+a5*pow(THETA,b5)+a6*pow(THETA,b6)+a7*pow(THETA,b7))*482.163;
347 }
348 
349 double R404AClass::viscosity_Trho(double T, double rho)
350 {
351  // Properties taken from "Viscosity of Mixed
352  // Refrigerants R404A,R407C,R410A, and R507A"
353  // by Vladimir Geller,
354  // 2000 Purdue Refrigeration conferences
355 
356  // inputs in T [K], and rho [kg/m^3]
357  // output in Pa-s
358 
359  double
360  eta_microPa_s;
361 
362  //Set constants required
363  double a_0=9.766e-1,a_1=3.676e-2,a_2=2.938e-6,b_1=2.260e-3,b_2=1.786e-4,
364  b_3=-4.202e-7,b_4=8.489e-10,b_5=-8.670e-13,b_6=3.566e-16;
365 
366  eta_microPa_s=a_0+a_1*T+a_2*T*T+b_1*rho+b_2*rho*rho+b_3*rho*rho*rho+b_4*rho*rho*rho*rho+b_5*rho*rho*rho*rho*rho+b_6*rho*rho*rho*rho*rho*rho;
367  return eta_microPa_s/1e6;
368 }
370 {
371  return 0.0538534*pow(1-T/reduce.T,1.259);
372 }
double psatL(double)
Definition: R404A.cpp:242
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
std::string VISCOSITY
Definition: FluidClass.h:122
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
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 EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
Definition: FluidClass.h:157
R404AClass()
Definition: R404A.cpp:37
bool isPure
A std::string that contains a reference for the transport properties of the fluid.
Definition: FluidClass.h:159
std::string SURFACE_TENSION
Definition: FluidClass.h:126
double surface_tension_T(double T)
Definition: R404A.cpp:369
double psatV(double)
Definition: R404A.cpp:272
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double rhosatL(double)
Definition: R404A.cpp:326
virtual double viscosity_Trho(double, double)
Definition: R404A.cpp:349
virtual double conductivity_Trho(double, double)
Definition: R404A.cpp:226
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 rhosatV(double)
Definition: R404A.cpp:303
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
std::string CONDUCTIVITY
Definition: FluidClass.h:123