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
Argon.cpp
Go to the documentation of this file.
1 /* Properties of Argon
2 by Ian Bell
3 
4 Thermo properties from
5 ---------------------
6 "A New Equation of State for Argon Covering the Fluid Region
7 for Temperatures From the Melting Line to 700 K
8 at Pressures up to 1000 MPa"
9 Ch. Tegeler, R. Span, and W. Wagner
10 J. Phys. Chem. Ref. Data, Vol. 28, No. 3, 1999
11 
12 Transport properties from
13 -------------------------
14 "Viscosity and Thermal Conductivity Equations for
15 Nitrogen, Oxygen, Argon, and Air"
16 E. W. Lemmon and R. T Jacobsen
17 International Journal of Thermophysics, Vol. 25, No. 1, January 2004
18 
19 Note: Critical enhancement included
20 
21 */
22 
23 #if defined(_MSC_VER)
24 #define _CRTDBG_MAP_ALLOC
25 #define _CRT_SECURE_NO_WARNINGS
26 #include <stdlib.h>
27 #include <crtdbg.h>
28 // The most important line
29 //#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
30 #else
31 #include <stdlib.h>
32 #endif
33 
34 #include "math.h"
35 #include "stdio.h"
36 #include <string.h>
37 #include "CoolProp.h"
38 #include <vector>
39 #include <iostream>
40 #include <list>
41 #include "Helmholtz.h"
42 #include "FluidClass.h"
43 #include "Argon.h"
44 
46 {
47  static const double n[]={0,
48  0.088722304990011,//[1]
49  0.70514805167298,//[2]
50  -1.682011565409,//[3]
51  -0.14909014431486,//[4]
52  -0.1202480460094,//[5]
53  -0.12164978798599,//[6]
54  0.40035933626752,//[7]
55  -0.27136062699129,//[8]
56  0.24211924579645,//[9]
57  0.005788958318557,//[10]
58  -0.041097335615341,//[11]
59  0.024710761541614,//[12]
60  -0.32181391750702,//[13]
61  0.33230017695794,//[14]
62  0.031019986287345,//[15]
63  -0.030777086002437,//[16]
64  0.093891137419581,//[17]
65  -0.090643210682031,//[18]
66  -0.00045778349276654,//[19]
67  -0.000082659729025197,//[20]
68  0.00013013415603147,//[21]
69  -0.011397840001996,//[22]
70  -0.024455169960535,//[23]
71  -0.064324067175955,//[24]
72  0.058889471093674,//[25]
73  -0.00064933552112965,//[26]
74  -0.013889862158435,//[27]
75  0.4048983929691,//[28]
76  -0.38612519594749,//[29]
77  -0.18817142332233,//[30]
78  0.15977647596482,//[31]
79  0.053985518513856,//[32]
80  -0.028953417958014,//[33]
81  -0.013025413381384,//[34]
82  0.0028948696775778,//[35]
83  -0.0022647134304796,//[36]
84  0.0017616456196368,//[37]
85  0.0058552454482774,//[38]
86  -0.69251908270028,//[39]
87  1.5315490030516,//[40]
88  -0.0027380447449783//[41]
89  };
90 
91  static const double d[]={0,
92  1,//[1]
93  1,//[2]
94  1,//[3]
95  1,//[4]
96  1,//[5]
97  2,//[6]
98  2,//[7]
99  2,//[8]
100  2,//[9]
101  3,//[10]
102  3,//[11]
103  4,//[12]
104  1,//[13]
105  1,//[14]
106  3,//[15]
107  4,//[16]
108  4,//[17]
109  5,//[18]
110  7,//[19]
111  10,//[20]
112  10,//[21]
113  2,//[22]
114  2,//[23]
115  4,//[24]
116  4,//[25]
117  8,//[26]
118  3,//[27]
119  5,//[28]
120  5,//[29]
121  6,//[30]
122  6,//[31]
123  7,//[32]
124  7,//[33]
125  8,//[34]
126  9,//[35]
127  5,//[36]
128  6,//[37]
129  2,//[38]
130  1,//[39]
131  2,//[40]
132  3,//[41]
133  };
134 
135  static const double t[]={0.00,
136  0,//[1]
137  0.25,//[2]
138  1,//[3]
139  2.75,//[4]
140  4,//[5]
141  0,//[6]
142  0.25,//[7]
143  0.75,//[8]
144  2.75,//[9]
145  0,//[10]
146  2,//[11]
147  0.75,//[12]
148  3,//[13]
149  3.5,//[14]
150  1,//[15]
151  2,//[16]
152  4,//[17]
153  3,//[18]
154  0,//[19]
155  0.5,//[20]
156  1,//[21]
157  1,//[22]
158  7,//[23]
159  5,//[24]
160  6,//[25]
161  6,//[26]
162  10,//[27]
163  13,//[28]
164  14,//[29]
165  11,//[30]
166  14,//[31]
167  8,//[32]
168  14,//[33]
169  6,//[34]
170  7,//[35]
171  24,//[36]
172  22,//[37]
173  3,//[38]
174  1,//[39]
175  0,//[40]
176  0//[41]
177  };
178 
179  static const double c[]={
180  0,0,0,0,0,0,0,0,0,0,0,0,0, // indices [0-12]
181  1,//[13]
182  1,//[14]
183  1,//[15]
184  1,//[16]
185  1,//[17]
186  1,//[18]
187  1,//[19]
188  1,//[20]
189  1,//[21]
190  2,//[22]
191  2,//[23]
192  2,//[24]
193  2,//[25]
194  2,//[26]
195  3,//[27]
196  3,//[28]
197  3,//[29]
198  3,//[30]
199  3,//[31]
200  3,//[32]
201  3,//[33]
202  3,//[34]
203  3,//[35]
204  4,//[36]
205  4,//[37]
206  0,0,0,0 // indices [38-41]
207  };
208 
209  // alpha is used here for consistency with the definitions in R744.c upon which Argon.c is based
210  static const double alpha[]={
211  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // indices [0-37]
212  20,
213  20,
214  20,
215  20
216  };
217 
218  static const double beta[]={
219  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // indices [0-37]
220  250,
221  375,
222  300,
223  225
224  };
225 
226  static const double GAMMA[]={
227  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // indices [0-37]
228  1.11,
229  1.14,
230  1.17,
231  1.11
232  };
233 
234  static const double epsilon[]={
235  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // indices [0-37]
236  1,
237  1,
238  1,
239  1
240  };
241 
242  //Constants for ideal gas expression
243  static double a0[]={0.0,
244  8.31666243,
245  -4.94651164
246  };
247 
248  phirlist.push_back(new phir_power(n,d,t,c,1,37,38));
249  phirlist.push_back(new phir_gaussian(n,d,t,alpha,epsilon,beta,GAMMA,38,41,42));
250 
251  phi0list.push_back(new phi0_lead(a0[1],a0[2]));
252  phi0list.push_back(new phi0_logtau(1.5));
253 
254  // Critical parameters
255  crit.rho = 535.6;
256  crit.p = PressureUnit(4863.0,UNIT_KPA);
257  crit.T = 150.687;
258  crit.v = 1.0/crit.rho;
259 
260  // Other fluid parameters
261  params.molemass = 39.948;
262  params.Ttriple = 83.806;
263  params.ptriple = 68.9004210852;
264  params.accentricfactor = -0.00219;
265  params.R_u = 8.31451;
266 
267  // Limits of EOS
268  limits.Tmin = params.Ttriple;
269  limits.Tmax = 2000.0;
270  limits.pmax = 1000000.0;
271  limits.rhomax = 50.65*params.molemass;
272 
273  EOSReference.assign("\"A New Equation of State for Argon Covering the Fluid Region"
274  " for Temperatures From the Melting Line to 700 K"
275  " at Pressures up to 1000 MPa\""
276  " Ch. Tegeler, R. Span, and W. Wagner,"
277  " J. Phys. Chem. Ref. Data, Vol. 28, No. 3, 1999");
278  TransportReference.assign("\"Viscosity and Thermal Conductivity Equations for Nitrogen, Oxygen, Argon, and Air\" E. W. Lemmon and R. T Jacobsen International Journal of Thermophysics, Vol. 25, No. 1, January 2004 \nNote: Critical enhancement included");
279 
280  name.assign("Argon");
281  aliases.push_back("argon");
282  aliases.push_back("ARGON");
283 
284  BibTeXKeys.EOS = "Tegeler-JPCRD-1999";
285  BibTeXKeys.VISCOSITY = "Lemmon-IJT-2004";
286  BibTeXKeys.CONDUCTIVITY = "Lemmon-IJT-2004";
287  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
288 }
289 double ArgonClass::X_tilde(double T,double tau,double delta)
290 {
291  // X_tilde is dimensionless
292  // Equation 11 slightly rewritten
293  double drho_dp,R_Argon;
294  R_Argon=params.R_u/params.molemass;
295  drho_dp=1.0/(R_Argon*T*(1+2*delta*dphir_dDelta(tau,delta)+delta*delta*d2phir_dDelta2(tau,delta)));
296  return reduce.p.Pa*delta/reduce.rho*drho_dp;
297 }
298 double ArgonClass::conductivity_Trho(double T, double rho)
299 {
300  double e_k=143.2, //[K]
301  sigma=0.335, //[nm]
302  Tref=301.374, //[K]
303  zeta0=0.13, //[nm]
304  LAMBDA=0.055,
305  q_D=0.32; //[nm]
306  double eta0,OMEGA,delta,tau,Tstar,lambda0,lambdar,num,
307  cp,cv,OMEGA_tilde,OMEGA_tilde0,zeta,nu,gamma,R0,lambdac,k,
308  pi=3.141592654,mu;
309  double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
310 
311  double N[]={0,0.8158,-0.4320,0.0,13.73,10.07,0.7375,-33.96,20.47,-2.274,-3.973};
312  double t[]={0,0,-0.77,-1.0,0.0,0.0,0.0,0.8,1.2,0.8,0.5};
313  double d[]={0,0,0,0,1,2,4,5,6,9,1};
314  double l[]={0,0,0,0,0,0,0,2,2,2,4};
315  double g[]={0,0,0,0,0,0,0,1,1,1,1};
316 
317  delta=rho/reduce.rho;
318  tau=reduce.T/T;
319  Tstar=T/(e_k);
320 
321  OMEGA=exp(b[0]*powInt(log(Tstar),0)
322  +b[1]*powInt(log(Tstar),1)
323  +b[2]*powInt(log(Tstar),2)
324  +b[3]*powInt(log(Tstar),3)
325  +b[4]*powInt(log(Tstar),4));
326 
327  eta0=0.0266958*sqrt(params.molemass*T)/(sigma*sigma*OMEGA);
328  lambda0=N[1]*eta0+N[2]*pow(tau,t[2])+N[3]*pow(tau,t[3]);
329 
330  lambdar=N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
331  +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]))
332  +N[6]*pow(tau,t[6])*pow(delta,d[6])*exp(-g[6]*pow(delta,l[6]))
333  +N[7]*pow(tau,t[7])*pow(delta,d[7])*exp(-g[7]*pow(delta,l[7]))
334  +N[8]*pow(tau,t[8])*pow(delta,d[8])*exp(-g[8]*pow(delta,l[8]))
335  +N[9]*pow(tau,t[9])*pow(delta,d[9])*exp(-g[9]*pow(delta,l[9]))
336  +N[10]*pow(tau,t[10])*pow(delta,d[10])*exp(-g[10]*pow(delta,l[10]));
337 
338  R0=1.01;
339  nu=0.63;
340  gamma=1.2415;
341  k=1.380658e-23; //[J/K]
342 
343  num=X_tilde(T,reduce.T/T,delta)-X_tilde(Tref,reduce.T/Tref,delta)*Tref/T;
344 
345  // no critical enhancement if numerator of Eq. 10 is negative
346  if (num<0)
347  return (lambda0+lambdar)/1e3;
348 
349  cp = specific_heat_p_Trho(T,rho); //[J/kg/K]
350  cv = specific_heat_v_Trho(T,rho); //[J/kg/K]
351  mu = viscosity_Trho(T,rho)*1e6; //[uPa-s]
352 
353  zeta=zeta0*pow(num/LAMBDA,nu/gamma); //[nm]
354  OMEGA_tilde=2.0/pi*((cp-cv)/cp*atan(zeta/q_D)+cv/cp*(zeta/q_D));
355  OMEGA_tilde0=2.0/pi*(1.-exp(-1./(q_D/zeta+1.0/3.0*(zeta/q_D)*(zeta/q_D)/delta/delta)));
356  lambdac=rho*cp*k*R0*T/(6*pi*zeta*mu)*(OMEGA_tilde-OMEGA_tilde0)*1e18; // 1e18 is conversion to W/m-K (not described in paper)
357 
358  return (lambda0+lambdar+lambdac)/1e3; //[W/m/K]
359 }
360 double ArgonClass::viscosity_Trho(double T, double rho)
361 {
362  double e_k=143.2, //[K]
363  sigma=0.335; //[nm]
364  double eta0,etar,OMEGA,delta,tau,Tstar;
365  double b[]={0.431,-0.4623,0.08406,0.005341,-0.00331};
366 
367  double N[]={0,12.19,13.99,0.005027,-18.93,-6.698,-3.827};
368  double t[]={0,0.42,0.0,0.95,0.5,0.9,0.8};
369  double d[]={0,1,2,10,5,1,2};
370  double l[]={0,0,0,0,2,4,4};
371  double g[]={0,0,0,0,1,1,1};
372 
373  delta=rho/reduce.rho;
374  tau=reduce.T/T;
375  Tstar=T/(e_k);
376  OMEGA=exp(b[0]*powInt(log(Tstar),0)
377  +b[1]*powInt(log(Tstar),1)
378  +b[2]*powInt(log(Tstar),2)
379  +b[3]*powInt(log(Tstar),3)
380  +b[4]*powInt(log(Tstar),4));
381 
382  eta0=0.0266958*sqrt(params.molemass*T)/(sigma*sigma*OMEGA);
383  etar=N[1]*pow(tau,t[1])*pow(delta,d[1])*exp(-g[1]*pow(delta,l[1]))
384  +N[2]*pow(tau,t[2])*pow(delta,d[2])*exp(-g[2]*pow(delta,l[2]))
385  +N[3]*pow(tau,t[3])*pow(delta,d[3])*exp(-g[3]*pow(delta,l[3]))
386  +N[4]*pow(tau,t[4])*pow(delta,d[4])*exp(-g[4]*pow(delta,l[4]))
387  +N[5]*pow(tau,t[5])*pow(delta,d[5])*exp(-g[5]*pow(delta,l[5]))
388  +N[6]*pow(tau,t[6])*pow(delta,d[6])*exp(-g[6]*pow(delta,l[6]));
389 
390  return (eta0+etar)/1e6; // uPa-s to Pa-s
391 }
392 double ArgonClass::psat(double T)
393 {
394  const double ti[]={0,1.0,1.5,2.0,4.5};
395  const double ai[]={0,-5.9409785,1.3553888,-0.46497607,-1.5399043};
396  double summer=0;
397  int i;
398  for (i=1;i<=4;i++)
399  {
400  summer=summer+ai[i]*pow(1-T/reduce.T,ti[i]);
401  }
402  return reduce.p.Pa*exp(reduce.T/T*summer);
403 }
404 double ArgonClass::rhosatL(double T)
405 {
406  const double ti[]={0,0.334,2.0/3.0,7.0/3.0,4.0};
407  const double ai[]={0,1.5004262,-0.31381290,0.086461622,-0.041477525};
408  double summer=0;
409  int i;
410  for (i=1;i<=4;i++)
411  {
412  summer=summer+ai[i]*pow(1.0-T/reduce.T,ti[i]);
413  }
414  return reduce.rho*exp(summer);
415 }
416 double ArgonClass::rhosatV(double T)
417 {
418  const double ti[]={0,0.345,5.0/6.0,1.0,13.0/3.0};
419  const double ai[]={0,-1.70695656,-4.02739448,1.55177558,-2.30683228};
420  double summer=0;
421  int i;
422  for (i=1;i<=4;i++)
423  {
424  summer=summer+ai[i]*pow(1.0-T/reduce.T,ti[i]);
425  }
426  return reduce.rho*exp(reduce.T/T*summer);
427 }
429 {
430  // From Mulero, 2012, JPCRD
431  return 0.037*pow(1-T/reduce.T,1.25);
432 }
virtual double viscosity_Trho(double, double)
Definition: Argon.cpp:360
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
double powInt(double x, int y)
double rhosatV(double)
Definition: Argon.cpp:416
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
virtual double conductivity_Trho(double, double)
Definition: Argon.cpp:298
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
Definition: FluidClass.h:157
double rhosatL(double)
Definition: Argon.cpp:404
std::string SURFACE_TENSION
Definition: FluidClass.h:126
double specific_heat_v_Trho(double T, double rho)
Definition: FluidClass.cpp:480
double pmax
Definition: FluidClass.h:54
params
virtual double d2phir_dDelta2(double tau, double delta)
Definition: FluidClass.cpp:276
struct CriticalStruct crit
Definition: FluidClass.h:218
double psat(double)
Definition: Argon.cpp:392
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double surface_tension_T(double T)
Definition: Argon.cpp:428
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 specific_heat_p_Trho(double T, double rho)
Definition: FluidClass.cpp:487
ArgonClass()
Definition: Argon.cpp:45
virtual double dphir_dDelta(double tau, double delta)
Definition: FluidClass.cpp:257
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
std::string CONDUCTIVITY
Definition: FluidClass.h:123