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
Undecane.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 "Undecane.h"
6 
8 {
9  double n[] = {0.0, -0.66172706, 1.3375396, -2.5608399, 0.10678910, 0.28873614e-3, 0.49587209e-1, 0.55407101e-7, 0.99754712, 1.5774025, 0.13108354e-2, -0.59326961, -0.93001876e-1, -0.17960228, -0.22560853e-1};
10  double t[] = {0, 1.5,0.25,1.25,0.25,0.875,1.375,0,2.375,2.0,2.125,3.5,6.5,4.75,12.5};
11  double d[] = {0, 1, 1, 1, 3, 7, 2, 1, 1, 2, 5, 1, 1, 4, 2};
12  double c[] = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3};
13 
14  //Critical parameters
15  crit.rho = 1.5149*156.31; //[kg/m^3]
16  crit.p = PressureUnit(1990.4, UNIT_KPA); //[kPa]
17  crit.T = 638.8; //[K]
18  crit.v = 1/crit.rho;
19 
20  // Other fluid parameters
21  params.molemass = 156.30826;
22  params.Ttriple = 247.541;
23  params.accentricfactor = 0.53903710137185668;
24  params.R_u = 8.314472;
25  params.ptriple = 0.00044605108038132317;
26 
27  // Limits of EOS
28  limits.Tmin = params.Ttriple;
29  limits.Tmax = 500.0;
30  limits.pmax = 100000.0;
31  limits.rhomax = 1000000.0*params.molemass;
32 
33  phirlist.push_back(new phir_power( n,d,t,c,1,14,15));
34 
35  phi0list.push_back(new phi0_lead(0, 0));
36  phi0list.push_back(new phi0_logtau(-1));
37 
38  double alpha[] = {-1158848, 20321.8, -119.4274, 0.4284215, -4.157728e-4, 1.61828e-7};
39  double beta[] = {-2, -1, 0, 1, 2, 3};
40 
41  std::vector<double> alpha_v(alpha, alpha+sizeof(alpha)/sizeof(double));
42  std::vector<double> beta_v(beta, beta+sizeof(beta)/sizeof(double));
43 
44  phi0list.push_back(new phi0_cp0_poly(alpha_v, beta_v, crit.T, 298.15, 0, 5));
45 
46  EOSReference.assign("Aleksandrov, I. S. and A. A. Gerasimov and B. A. Grigor'ev \"Using Fundamental Equations of State for Calculating the Thermodynamic Properties of Normal Undecane\" Thermal Engineering, 2011, Vol. 58, No. 8, pp. 691-698");
47  TransportReference.assign("Using ECS in fully predictive mode.");
48 
49  name.assign("n-Undecane");
50  aliases.push_back("Undecane");
51  aliases.push_back(std::string("UNDECANE"));
52  aliases.push_back(std::string("N-UNDECANE"));
53  aliases.push_back("C11");
54  REFPROPname.assign("C11");
55 
56  ECSReferenceFluid = "n-Dodecane";
57 
58  BibTeXKeys.EOS = "Aleksandrov-TE-2011";
59 }
60 double UndecaneClass::psat(double T)
61 {
62  // Max error is 0.20000641644 % between 247.541001 and 638.799999 K
63  const double ti[]={0,0.39149999999999996, 0.39899999999999997, 1.0, 4.166666666666667, 4.5, 8.833333333333334};
64  const double Ni[]={0,7.2024590872776129, -7.553927264921291, -7.4043762048207817, -28.05154411930712, 23.426166354794919, -5.5925651092739859};
65  double summer=0,theta;
66  int i;
67  theta=1-T/reduce.T;
68  for (i=1;i<=6;i++)
69  {
70  summer=summer+Ni[i]*pow(theta,ti[i]);
71  }
72  return reduce.p.Pa*exp(reduce.T/T*summer);
73 }
74 double UndecaneClass::rhosatL(double T)
75 {
76  // Maximum absolute error is 0.304330 % between 247.541001 K and 638.799990 K
77  const double ti[]={0,0.63229621538870906, 1.0038056284523527, 0.86235851330609503, 0.87952338233778615, 0.90457520801426383, 8.8303918023981769};
78  const double Ni[]={0,67.587954960804993, 622.19343233092457, -15756.38302838042, 28308.555888123774, -13240.532777759823, 0.15299119998547792};
79  double summer=0;
80  int i;
81  double theta;
82  theta=1-T/reduce.T;
83  for (i=1;i<=6;i++)
84  {
85  summer+=Ni[i]*pow(theta,ti[i]);
86  }
87  return reduce.rho*exp(summer);
88 }
89 double UndecaneClass::rhosatV(double T)
90 {
91  // Maximum absolute error is 0.198848 % between 247.541001 K and 638.799990 K
92  const double ti[]={0,0.45209637851715323, 0.62014004645697651, 3.2948486604748419, 3.391538201868411, 3.5175920402216905, 3.4656311291203314};
93  const double Ni[]={0,-3.2503273294249282, -2.1655950913673307, -3691.6518899679063, 14736.668843150595, 8908.4150123462787, -19962.521747567687};
94  double summer=0,theta;
95  int i;
96  theta=1.0-T/reduce.T;
97  for (i=1;i<=6;i++)
98  {
99  summer=summer+Ni[i]*pow(theta,ti[i]);
100  }
101  return reduce.rho*exp(crit.T/T*summer);
102 }
double rhosatL(double)
Definition: Undecane.cpp:74
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
double psat(double)
Definition: Undecane.cpp:60
struct FluidLimits limits
Definition: FluidClass.h:219
std::string EOS
Definition: FluidClass.h:120
PressureUnit p
Definition: FluidClass.h:50
std::string ECSReferenceFluid
A list of aliases of names for the Fluid, each element is a std::string instance. ...
Definition: FluidClass.h:154
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
std::string REFPROPname
The name of the fluid.
Definition: FluidClass.h:152
double pmax
Definition: FluidClass.h:54
params
struct CriticalStruct crit
Definition: FluidClass.h:218
double rhosatV(double)
Definition: Undecane.cpp:89
BibTeXKeysStruct BibTeXKeys
Definition: FluidClass.h:175
Term in the ideal-gas specific heat equation that is polynomial term.
Definition: Helmholtz.h:881
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