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
R125.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 "R125.h"
6 #include "REFPROP.h"
7 
9 {
10  double n[] = {0.0, 5.280760, -8.676580, 0.7501127, 0.7590023, 0.01451899, 4.777189, -3.330988, 3.775673, -2.290919, 0.8888268, -0.6234864, -0.04127263, -0.08455389, -0.1308752, 0.008344962, -1.532005, -0.05883649, 0.02296658};
11  double t[] = {0, 0.669, 1.05, 2.75, 0.956, 1.00, 2.00, 2.75, 2.38, 3.37, 3.47, 2.63, 3.45, 0.72, 4.23, 0.20, 4.5, 29.0, 24.0};
12  double d[] = {0, 1, 1, 1, 2, 4, 1, 1, 2, 2, 3, 4, 5, 1, 5, 1, 2, 3, 5};
13  double l[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 3, 3};
14  double m[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.7, 7.0, 6.0};
15 
16  //Critical parameters
17  crit.rho = 4.779*120.0214; //[kg/m^3]
18  crit.p = PressureUnit(3617.7, UNIT_KPA); //[kPa]
19  crit.T = 339.173; //[K]
20  crit.v = 1/crit.rho;
21 
22  // Other fluid parameters
23  params.molemass = 120.0214;
24  params.Ttriple = 172.52;
25  params.accentricfactor = 0.3052;
26  params.R_u = 8.314472;
27  params.ptriple = 2.914;
28 
29  // Limits of EOS
30  limits.Tmin = params.Ttriple;
31  limits.Tmax = 500.0;
32  limits.pmax = 100000.0;
33  limits.rhomax = 1000000.0*params.molemass;
34 
35  phirlist.push_back(new phir_Lemmon2005( n,d,t,l,m,1,18,19));
36 
37  const double a1 = 37.2674, a2 = 8.88404, a3 = -49.8651;
38  phi0list.push_back(new phi0_lead(a1,a2));
39  phi0list.push_back(new phi0_logtau(-1));
40  phi0list.push_back(new phi0_power(a3,-0.1));
41 
42  double a[] = {0,0,0,0, 2.303, 5.086, 7.3};
43  double b[] = {0,0,0,0, 0.92578, 2.22895, 5.03283};
44 
45  std::vector<double> a_v(a,a+sizeof(a)/sizeof(double));
46  std::vector<double> b_v(b,b+sizeof(b)/sizeof(double));
47 
48  phi0list.push_back(new phi0_Planck_Einstein(a_v,b_v,4,6));
49 
50  EOSReference.assign("Lemmon-JPCRD-2005");
51  TransportReference.assign("Viscosity: Huber IECR 2006\n\n Conductivity: Perkins JCED 2006");
52  name.assign("R125");
53  REFPROPname.assign("R125");
54 
55  BibTeXKeys.EOS = "Lemmon-JPCRD-2005";
56  BibTeXKeys.VISCOSITY = "Huber-IECR-2006";
57  BibTeXKeys.CONDUCTIVITY = "Perkins-JCED-2006";
58  BibTeXKeys.ECS_LENNARD_JONES = "Huber-IECR-2006";
59  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
60 }
61 
62 double R125Class::psat(double T)
63 {
64  const double ti[]={0,1.0,1.5,2.3,4.6};
65  const double Ni[]={0, -7.5295, 1.9026, -2.2966, -3.4480};
66  double summer=0,theta;
67  int i;
68  theta=1-T/reduce.T;
69  for (i=1;i<=4;i++)
70  {
71  summer=summer+Ni[i]*pow(theta,ti[i]);
72  }
73  return reduce.p.Pa*exp(reduce.T/T*summer);
74 }
75 double R125Class::rhosatL(double T)
76 {
77  const double ti[]={0,1.0/3.0,0.6,2.9};
78  const double Ni[]={0, 1.6684, 0.88415, 0.44383};
79  double summer=0;
80  int i;
81  double theta;
82  theta=1-T/reduce.T;
83  for (i=1;i<=3;i++)
84  {
85  summer+=Ni[i]*pow(theta,ti[i]);
86  }
87  return reduce.rho*(summer+1);
88 }
89 double R125Class::rhosatV(double T)
90 {
91  // Maximum absolute error is 0.161887 % between 87.800001 K and 419.289990 K
92  const double ti[]={0,0.38,1.22,3.3,6.9};
93  const double Ni[]={0, -2.8403, -7.2738, -21.890, -58.825};
94  double summer=0,theta;
95  int i;
96  theta=1.0-T/reduce.T;
97  for (i=1; i<=4; i++)
98  {
99  summer=summer+Ni[i]*pow(theta,ti[i]);
100  }
101  return reduce.rho*exp(summer);
102 }
103 double R125Class::viscosity_Trho(double T, double rho)
104 {
105  double b[] = {-19.572881, 219.73999, -1015.3226, 2471.01251, -3375.1717, 2491.6597, -787.26086, 14.085455, -0.34664158};
106  double N_A = 6.0221415e23;
107 
108  double e_k, sigma;
109  this->ECSParams(&e_k,&sigma);
110  double Tstar = T/e_k;
111 
112  double eta_0 = this->viscosity_dilute(T,e_k,sigma)*1e6; // uPa-s
113 
114  //Rainwater-Friend for Bstar
115  double Bstar = b[0]*pow(Tstar,-0.25*0)+b[1]*pow(Tstar,-0.25*1)+b[2]*pow(Tstar,-0.25*2)+b[3]*pow(Tstar,-0.25*3)+b[4]*pow(Tstar,-0.25*4)+b[5]*pow(Tstar,-0.25*5)+b[6]*pow(Tstar,-0.25*6)+b[7]*pow(Tstar,-2.5)+b[8]*pow(Tstar,-5.5);
116  double B = Bstar*N_A*sigma*sigma*sigma/1e27*1000;
117 
118  double e[4][4]; // init with zeros
119  e[2][1] = 0; e[3][2] = 0;
120  e[2][2] = 5.677448e-3; e[3][1] = -5.096662e-3;
121 
122  double c1 = 1.412564e-1, c2 = 3.033797, c3 = 2.992464e-1;
123 
124  double sumresid = 0;
125  double tau = T/crit.T, delta = rho/crit.rho;
126  for (int i = 2; i<=3; i++)
127  {
128  for (int j = 1; j <= 2; j++)
129  {
130  sumresid += e[i][j]*pow(delta,i)/pow(tau,j);
131  }
132  }
133  double delta_0 = c2 + c3*sqrt(T/crit.T);
134  double eta_r = (sumresid + c1*(delta/(delta_0-delta)-delta/delta_0))*1000; // uPa-s
135 
136  double rhobar = rho/params.molemass; // [mol/L]
137  return (eta_0*(1+B*rhobar)+eta_r)/1e6;
138 }
139 void R125Class::ECSParams(double *e_k, double *sigma)
140 {
141  // Huber IECR 2006
142  *e_k = 237.077; *sigma = 0.5235;
143 }
144 double R125Class::conductivity_Trho(double T, double rho)
145 {
146  // Perkins JCED 2006
147 
148  double sumresid = 0, tau = T/crit.T;
149  double lambda_0 = (-4.6082e-3 + 1.68688e-2*tau + 4.88345e-3*tau*tau); //[W/m/K]
150 
151  double B1[] = {0, -7.29410e-3, 4.16339e-2, -3.11487e-2, 1.12682e-2, -1.38322e-3};
152  double B2[] = {0, 1.10497e-2, -2.89236e-2, 2.78399e-2, -1.2110e-2, 2.11196e-3};
153  for (int i = 1; i <= 5; i++)
154  {
155  sumresid += (B1[i]+B2[i]*T/crit.T)*pow(rho/crit.rho,i);
156  }
157  double lambda_r = sumresid; //[W/m/K]
158 
159  double lambda_c = this->conductivity_critical(T,rho,1.7139e9); //[W/m/K]
160 
161  return lambda_0 + lambda_r + lambda_c; //[W/m/K]
162 }
163 
165 {
166  return 0.05252*pow(1-T/crit.T, 1.237);
167 }
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
R125Class()
Definition: R125.cpp:8
double surface_tension_T(double T)
Definition: R125.cpp:164
double conductivity_critical(double T, double rho, double qd=2e9, double GAMMA=0.0496, double zeta0=1.94e-10)
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 viscosity_dilute(double T, double e_k, double sigma)
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 conductivity_Trho(double T, double rho)
Definition: R125.cpp:144
double pmax
Definition: FluidClass.h:54
double rhosatL(double)
Definition: R125.cpp:75
params
double viscosity_Trho(double T, double rho)
Definition: R125.cpp:103
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double psat(double)
Definition: R125.cpp:62
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 rhosatV(double)
Definition: R125.cpp:89
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
std::string CONDUCTIVITY
Definition: FluidClass.h:123
void ECSParams(double *e_k, double *sigma)
Definition: R125.cpp:139