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
R236FA.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 "R236FA.h"
6 
8 {
9  double n[] = {0.0, 0.04453255, 1.777017, -2.230519, -0.6708606, 0.1587907, -1.425119, -0.6461628, 0.8469985, -0.5635356, -0.01535611, 1.156362, -0.4070310, -0.2172753, -1.007176, -0.00006902909};
10  double t[] = {0, 1.07, 0.222, 0.66, 1.33, 0.227, 2.33, 1.94, 1.53, 2.65, 0.722, 1.11, 2.31, 3.68, 4.23, 0.614};
11  double d[] = {0, 4, 1, 1, 2, 3, 1, 3, 2, 2, 7, 1, 1, 3, 3, 2};
12  double c[] = {0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 1, 0, 0, 0, 0};
13  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.02, 1.336, 1.055, 5.84, 16.2};
14  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.42, 2.31, 0.89, 80.0, 108.0};
15  double gamma[] = {0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.13, 0.67, 0.46, 1.28, 1.2};
16  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.712, 0.91, 0.677, 0.718, 1.64};
17 
18  //Critical parameters
19  crit.rho = 3.626*152.0384; //[kg/m^3]
20  crit.p = PressureUnit(3200, UNIT_KPA); //[kPa]
21  crit.T = 398.07; //[K]
22  crit.v = 1/crit.rho;
23 
24  // Other fluid parameters
25  params.molemass = 152.0384;
26  params.Ttriple = 179.6;
27  params.accentricfactor = 0.37691179763369909;
28  params.R_u = 8.314472;
29  params.ptriple = 0.16032679731173749;
30 
31  // Limits of EOS
32  limits.Tmin = params.Ttriple;
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 n5 = -17.5983849, n6 = 8.87150449, n0 = 10.175;
41  phi0list.push_back(new phi0_lead(n5,n6));
42  phi0list.push_back(new phi0_logtau(n0-1));
43 
44  const double u0[] = {0, 962/crit.T, 2394/crit.T, 5188/crit.T};
45  const double v0[] = {0, 9.8782, 18.236, 49.934};
46  std::vector<double> u0_v(u0,u0+sizeof(u0)/sizeof(double));
47  std::vector<double> v0_v(v0,v0+sizeof(v0)/sizeof(double));
48 
49  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,3));
50 
51  EOSReference.assign("Jiang Pan and Xinfang Rui and Xiaodong Zhao and Liming Qiu, \"An equation of state for the thermodynamic properties of 1,1,1,3,3,3-hexafluoropropane (HFC-236fa)\", Fluid Phase Equilibria 321 (2012) 10--16\n\nNote: REFPROP 9.0 does not use this EOS, they use thermodynamic corresponding states");
52  TransportReference.assign("Using ECS in fully predictive mode.");
53 
54  name.assign("R236FA");
55  aliases.push_back(std::string("R236fa"));
56  REFPROPname.assign("R236FA");
57 
58  BibTeXKeys.EOS = "Pan-FPE-2012";
59  BibTeXKeys.ECS_LENNARD_JONES = "Huber-IECR-2003";
60  BibTeXKeys.ECS_FITS = "Huber-IECR-2003";
61  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
62 }
63 
64 
65 double R236FAClass::psat(double T)
66 {
67  // Max error is 0.17009505573 % between 179.6 and 398.069999 K
68  const double t[]={0, 0.12200000000000001, 1.1666666666666667, 1.3333333333333333, 2.3333333333333335, 2.5, 3.5};
69  const double N[]={0, -0.012979211638964282, -28.829423111516142, 28.838546594062379, -75.471830356030637, 78.305145880492105, -15.984987308278052};
70  double summer=0,theta;
71  theta=1-T/reduce.T;
72  for (int i=1; i<=6; i++)
73  {
74  summer += N[i]*pow(theta,t[i]);
75  }
76  return reduce.p.Pa*exp(reduce.T/T*summer);
77 }
78 
79 double R236FAClass::rhosatL(double T)
80 {
81  // Maximum absolute error is 0.239080 % between 179.600000 K and 398.070000 K
82  const double t[] = {0, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667};
83  const double N[] = {0, 110.99431711060721, -653.8278250306164, 1808.4970386386176, -2819.9588105709872, 2549.3846572841617, -1252.0268343097021, 259.90253247283982};
84  double summer=0,theta;
85  theta=1-T/reduce.T;
86  for (int i=1; i<=7; i++)
87  {
88  summer += N[i]*pow(theta,t[i]);
89  }
90  return reduce.rho*(summer+1);
91 }
92 
93 double R236FAClass::rhosatV(double T)
94 {
95  // Maximum absolute error is 0.372237 % between 179.600000 K and 398.070000 K
96  const double t[] = {0, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.6666666666666667, 1.8333333333333333};
97  const double N[] = {0, -11.794124580366443, -645.63181864379703, 5244.661122543529, -18060.343097280878, 33869.097416810924, -36245.578523710719, 20887.554530748635, -5050.4457446082124};
98  double summer=0,theta;
99  theta=1-T/reduce.T;
100  for (int i=1; i<=8; i++)
101  {
102  summer += N[i]*pow(theta,t[i]);
103  }
104  return reduce.rho*exp(reduce.T/T*summer);
105 
106 }
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
double rhosatL(double)
Definition: R236FA.cpp:79
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
R236FAClass()
Definition: R236FA.cpp:7
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 rhosatV(double)
Definition: R236FA.cpp:93
std::string ECS_FITS
Definition: FluidClass.h:125
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 psat(double)
Definition: R236FA.cpp:65
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
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 Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54