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
R161_Fluoroethane.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 "R161_Fluoroethane.h"
6 
8 {
9  double n[] = {0.0, 1.511, -2.3, -0.457, 0.1683, 0.04133, 0.62187, -0.0265, -1.03, -0.285, -0.476, 0.82, -0.3532, -0.116, -0.0220583, -1.63148};
10  double t[] = {0, 0.37, 0.97, 1.14, 0.744, 1, 1.26, 1, 1.8, 3, 2.25, 1, 1.2, 5.3, 1, 4};
11  double d[] = {0, 1, 1, 2, 3, 4, 2, 7, 1, 2, 3, 1, 1, 3, 3, 3};
12  double c[] = {0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0};
13  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.96, 1.35, 1.26, 1.23, 16.8};
14  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.7, 5.2, 3.9, 4.7, 413};
15  double gamma[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.9, 0.69, 0.67, 0.67, 1.15};
16  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.683, 0.892, 0.785, 1.33, 0.86};
17 
18  //Critical parameters
19  crit.rho = 6.28*48.0595; //[kg/m^3]
20  crit.p = PressureUnit(5010, UNIT_KPA); //[kPa]
21  crit.T = 375.25; //[K]
22  crit.v = 1/crit.rho;
23 
24  // Other fluid parameters
25  params.molemass = 48.0595;
26  params.Ttriple = 130;
27  params.accentricfactor = 0.21624284106618674;
28  params.R_u = 8.314472;
29  params.ptriple = 0.005512;
30 
31  // Limits of EOS
32  limits.Tmin = 130;
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,10,16));
38  phirlist.push_back(new phir_gaussian( n,d,t, eta, epsilon, beta, gamma, 11,15,16));
39 
40  const double a0 = -6.9187, a1 = 5.4788, n0 = 4;
41  phi0list.push_back(new phi0_lead(a0, a1));
42  phi0list.push_back(new phi0_logtau(n0-1));
43 
44  const double u0[] = {0, 420/crit.T, 1548/crit.T, 3882/crit.T};
45  const double v0[] = {0, 2.059, 9.253, 6.088};
46 
47  phi0list.push_back(new phi0_Planck_Einstein(v0,u0,1,3,4));
48 
49  EOSReference.assign("Jiangtao Wu and Yong Zhou, \"An Equation of State for Fluoroethane (R161)\", Int J Thermophys (2012) 33:220-234");
50  TransportReference.assign("Using ECS in fully predictive mode.");
51 
52  name.assign("R161");
53  aliases.push_back(std::string("Fluoroethane"));
54  aliases.push_back(std::string("FLUOROETHANE"));
55 
56  REFPROPname.assign("R161");
57 
58  BibTeXKeys.EOS = "Wu-IJT-2012";
59  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
60 }
61 double R161Class::psat(double T)
62 {
63  // Max error is 0.230661857744 % between 130.0 and 375.249999 K
64  const double t[]={0, 0.3575, 0.3605, 0.8333333333333334, 1.1666666666666667, 3.6666666666666665, 5.5};
65  const double N[]={0, 0.31348208716072901, -0.23919030666253932, -3.2448016166944127, -3.2492132423845081, -1.5585118618296889, -2.427095112126342};
66  double summer=0,theta;
67  theta=1-T/reduce.T;
68  for (int i=1; i<=6; i++)
69  {
70  summer += N[i]*pow(theta,t[i]);
71  }
72  return reduce.p.Pa*exp(reduce.T/T*summer);
73 }
74 
75 double R161Class::rhosatL(double T)
76 {
77  // Maximum absolute error is 0.240076 % between 130.000000 K and 375.250000 K
78  const double t[] = {0, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667, 1.8333333333333333, 2.0};
79  const double N[] = {0, -0.047548020147135293, 72.327097393829419, -819.54669834482479, 4946.726597164351, -18870.150565849312, 48463.342332873617, -84949.003918399481, 99927.349954656311, -75150.383145190368, 32522.693777539549, -6140.6005518003303};
80  double summer=0,theta;
81  theta=1-T/reduce.T;
82  for (int i=1; i<=11; i++)
83  {
84  summer += N[i]*pow(theta,t[i]);
85  }
86  return reduce.rho*(summer+1);
87 }
88 
89 double R161Class::rhosatV(double T)
90 {
91  // Maximum absolute error is 0.294100 % between 130.000000 K and 375.250000 K
92  const double t[] = {0, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667, 1.8333333333333333, 2.0, 2.1666666666666665};
93  const double N[] = {0, 4.4900108859020449, -289.55507432056027, 4058.7708236096973, -29986.440551303382, 137204.7283140849, -417289.03201597766, 870535.22359268588, -1255033.5731927676, 1232137.9562410619, -787892.80993800913, 296355.72520564846, -49815.743244828758};
94  double summer=0,theta;
95  theta=1-T/reduce.T;
96  for (int i=1; i<=12; i++)
97  {
98  summer += N[i]*pow(theta,t[i]);
99  }
100  return reduce.rho*exp(reduce.T/T*summer);
101 }
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)
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
std::string REFPROPname
The name of the fluid.
Definition: FluidClass.h:152
std::string SURFACE_TENSION
Definition: FluidClass.h:126
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
double rhosatL(double)
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)
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54