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
Cyclopentane.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 "Cyclopentane.h"
6 
8 {
9  double n[] = {0.0, 0.0536938, 1.60394, -2.41244, -0.474009, 0.203482, -0.965616, -0.344543, 0.353975, -0.231373, -0.0379099, 0.867586, -0.381827, -0.108741, -0.0976984};
10  double t[] = {0, 1.0, 0.29, 0.8, 1.14, 0.5, 2.0, 1.5, 1.0, 3.36, 0.95, 1.0, 2.5, 2.5, 1.5};
11  double d[] = {0, 4, 1, 1, 2, 3, 1, 3, 2, 2, 7, 1, 1, 3, 3};
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, 0.82, 1.19, 0.79, 1.52};
14  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.15, 1.61, 0.66, 2.72};
15  double gamma[] = {0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.08, 0.36, 0.09, 1.48};
16  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.68, 0.97, 0.84, 0.66};
17 
18  //Critical parameters
19  crit.rho = 3.82*70.1329; //[kg/m^3]
20  crit.p = PressureUnit(4571.2, UNIT_KPA); //[kPa]
21  crit.T = 511.72; //[K]
22  crit.v = 1/crit.rho;
23 
24  // Other fluid parameters
25  params.molemass = 70.1329;
26  params.Ttriple = 179.7;
27  params.accentricfactor = 0.20111257338059896;
28  params.R_u = 8.314472;
29  params.ptriple = 0.0088542726061155586;
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,15));
38  phirlist.push_back(new phir_gaussian( n,d,t, eta, epsilon, beta, gamma, 11,14,15));
39 
40  const double n5 = 3.2489131288, n6 = 2.6444166315, n0 = 1.96;
41  phi0list.push_back(new phi0_lead(n5,n6));
42  phi0list.push_back(new phi0_logtau(n0-1));
43 
44  const double u0[] = {0, 120/crit.T, 1300/crit.T, 2700/crit.T, 5300/crit.T};
45  const double v0[] = {0, 3.34, 18.6, 13.9, 4.86};
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,4));
50 
51  EOSReference.assign("Holger Gedanitz, Maria J. Davila, Eric W. Lemmon \" Speed of sound measurements and a fundamental equation of state for cyclopentane\" Preprint provided by Eric Lemmon");
52  TransportReference.assign("Using ECS in fully predictive mode.");
53 
54  name.assign("Cyclopentane");
55  aliases.push_back(std::string("CycloPentane"));
56  aliases.push_back(std::string("cyclopentane"));
57  aliases.push_back(std::string("CYCLOPENTANE"));
58  REFPROPname.assign("CYCLOPEN");
59 
60  BibTeXKeys.EOS = "Gedanitz-PREPRINT-2013";
61 
62 }
63 
64 double CyclopentaneClass::psat(double T)
65 {
66  // Maximum absolute error is 0.044586 % between 179.722001 K and 511.689990 K
67  const double ti[]={0,1.0,1.5,2.3,3.6,5.2,7.3};
68  const double Ni[]={0,-6.5559892604046448, 0.1683169483823736, 0.98984878102513452, -3.7731391793932954, 0.062343331455625178, -0.66025999749599096 };
69  double summer=0,theta;
70  int i;
71  theta=1-T/reduce.T;
72  for (i=1;i<=6;i++)
73  {
74  summer=summer+Ni[i]*pow(theta,ti[i]);
75  }
76  return reduce.p.Pa*exp(reduce.T/T*summer);
77 }
79 {
80  // Max error is 0.0537787674075 % between 179.7 and 511.7199 K
81  const double ti[]={0, 0.127, 0.137, 0.14100000000000001, 0.14700000000000002, 0.3505, 0.3685, 0.38699999999999996, 0.39849999999999997, 1.8333333333333333, 3.8333333333333335};
82  const double Ni[]={0, -2949907.6373172961, 26157071.053032953, -34291932.874714434, 11119726.461818002, -2256287.1652462273, 5780550.4968119375, -6150540.6041890942, 2591325.8956157742, -3.4860599305100841, 0.71396246842304301};
83  double summer=0;
84  int i;
85  double theta;
86  theta=1-T/reduce.T;
87  for (i=1;i <= 10;i++)
88  {
89  summer += Ni[i]*pow(theta,ti[i]);
90  }
91  return reduce.rho*(summer+1);
92 }
94 {
95  // Max error is 0.130802597771 % between 179.7 and 511.7199 K
96  const double ti[]={0, 0.053000000000000005, 0.356, 0.3605, 0.364, 0.378, 0.39149999999999996, 0.39549999999999996, 0.8333333333333334, 6.333333333333333, 7.5};
97  const double Ni[]={0, 12.066536979526935, -561852563.38938332, 2137733277.8963461, -1918813779.8001397, 552902395.41400063, -465184138.2543214, 255214994.8445133, -205.13360552504494, -12.344541888181883, 10.571728743217056};
98  double summer=0,theta;
99  int i;
100  theta=1.0-T/reduce.T;
101  for (i=1; i<=10; i++)
102  {
103  summer += Ni[i]*pow(theta,ti[i]);
104  }
105  return reduce.rho*exp(crit.T/T*summer);
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
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)
double rhosatL(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
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
double rhosatV(double)