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
Cyclopropane_Propyne.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 "Cyclopropane_Propyne.h"
6 
8 {
9  double n[] = {0, -1.15634007067133000, 2.52574627508968000, -2.82266128097357000, 0.28357680160523500, -0.08427204963322530, 0.93108856598845400, -1.05296839887510000, 0.43202158160276800, -0.25110886434063600, 0.12772589248249800, 0.04836223357857030, -0.01164740783339940, 0.00033400656553506, -1.37016097592368000, 2.12444673007915000, -0.57890894273166200, 0.30494577050653800, -0.18427616517007700, -0.29211146040448100, 1.37016097592368000, -2.12444673007915000, 0.57890894273166200};
10  double t[] = {0, 0, 1, 2, 3, 4, 0, 1, 2, 0, 1, 0, 1, 1, 3, 4, 5, 3, 4, 5, 3, 4, 5};
11  double d[] = {0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 0, 0, 0, 2, 2, 2, 0, 0, 0};
12  double c[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2};
13 
14  //Critical parameters
15  crit.rho = 42.081*6.1429149; //[kg/m^3]
16  crit.p = PressureUnit(5579.7, UNIT_KPA); //[kPa]
17  crit.T = 398.3; //[K]
18  crit.v = 1/crit.rho;
19 
20  // Other fluid parameters
21  params.molemass = 42.081;
22  params.Ttriple = 145.7;
23  params.accentricfactor = 0.13054956636875170;
24  params.R_u = 8.3143;
25  params.ptriple = 342.70692277003945;
26 
27  // Limits of EOS
28  limits.Tmin = 273;
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,22,23));
34 
35  phi0list.push_back(new phi0_lead(0,0));
36  phi0list.push_back(new phi0_logtau(-1));
37 
38  const double a0[] = {1.26016e0/0.197578, -9.05307e-3/0.197578, 5.05504e-5/0.197578, -7.72237e-8/0.197578, 4.0538e-11/0.197578};
39  const double n0[] = {0, 1, 2, 3, 4};
40  std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
41  std::vector<double> n0_v(n0,n0+sizeof(n0)/sizeof(double));
42 
43  phi0list.push_back(new phi0_cp0_poly(a0_v,n0_v,crit.T,298.15,0,4));
44 
45  name.assign("CycloPropane");
46  aliases.push_back(std::string("cyclopropane"));
47  aliases.push_back(std::string("Cyclopropane"));
48  aliases.push_back(std::string("CYCLOPROPANE"));
49  REFPROPname.assign("CYCLOPRO");
50 
51  BibTeXKeys.EOS = "Polt-CT-1992";
52  BibTeXKeys.CP0 = "Polt-CT-1992";
53 }
54 double CycloPropaneClass::psat(double T)
55 {
56  // Max error is 0.0119532667406 % between 273.0 and 398.299999 K
57  const double t[]={0, 0.060000000000000005, 0.373, 0.8333333333333334, 0.38699999999999996, 1.0, 6.166666666666667};
58  const double N[]={0, -0.0066049611475060624, -0.033960224958691061, -1.0723103687158344, 0.09566816778003541, -4.8279317520422547, -21.663297696353155};
59  double summer=0,theta;
60  int i;
61  theta=1-T/reduce.T;
62  for (i=1; i<=6; i++)
63  {
64  summer += N[i]*pow(theta,t[i]);
65  }
66  return reduce.p.Pa*exp(reduce.T/T*summer);
67 }
68 
70 {
71  // Maximum absolute error is 0.127947 % between 273.000001 K and 398.299990 K
72  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.1666666666666667, 1.3333333333333333, 1.6666666666666667};
73  const double N[] = {0, 4.2130826166202509, -37.918092707580193, 149.7380622313288, -281.61370700759898, 244.50899198420026, -166.77358044074828, 101.52186468251415, -10.969640624299528};
74  double summer=0,theta;
75  int i;
76  theta=1-T/reduce.T;
77  for (i=1; i<=8; i++)
78  {
79  summer += N[i]*pow(theta,t[i]);
80  }
81  return reduce.rho*(summer+1);
82 }
83 
85 {
86  // Maximum absolute error is 0.171588 % between 273.000001 K and 398.299990 K
87  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.8333333333333333};
88  const double N[] = {0, -4.0162733322058601, 17.579157820549558, 129.28293085434478, -1511.7458291465116, 6396.6245746851037, -15200.674472181481, 21775.796916494346, -18139.92511444999, 7189.2193923624845, -661.11090761629998};
89  double summer=0,theta;
90  int i;
91  theta=1-T/reduce.T;
92  for (i=1; i<=10; i++)
93  {
94  summer += N[i]*pow(theta,t[i]);
95  }
96  return reduce.rho*exp(reduce.T/T*summer);
97 }
98 
100 {
101  double n[] = {0, -9.86950667682466E-01, 4.59528109357232E+00, -8.86063623531859E+00, 5.56346955560542E+00, -1.57450028544218E+00, -1.59068753573430E-01, 2.35738270184042E-01, 4.40755494598713E-01, 1.96126150614333E-01, -3.67759650330219E-01, 7.92931851007852E-03, 2.47509085735293E-03, 8.32903610194452E-03, 1.02590136933231E+00, -2.20786016506394E+00, 1.07889905203761E+00, -3.82188466985900E+00, 8.30345065618981E+00, -4.48323072602860E+00, -1.02590136933231E+00, 2.20786016506394E+00, -1.07889905203761E+00};
102  double t[] = {0, 0, 1, 2, 3, 4, 0, 1, 2, 0, 1, 0, 1, 1, 3, 4, 5, 3, 4, 5, 3, 4, 5};
103  double d[] = {0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 0, 0, 0, 2, 2, 2, 0, 0, 0};
104  double c[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2};
105  double g[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.65533788, 1.65533788, 1.65533788, 1.65533788, 1.65533788, 1.65533788};
106 
107  //Critical parameters
108  crit.rho = 40.06*6.11333; //[kg/m^3]
109  crit.p = PressureUnit(5626, UNIT_KPA); //[kPa]
110  crit.T = 402.38; //[K]
111  crit.v = 1/crit.rho;
112 
113  // Other fluid parameters
114  params.molemass = 40.06;
115  params.Ttriple = 170.5;
116  params.accentricfactor = 0.204;
117  params.R_u = 8.3143;
118  params.ptriple = 263.566905989;
119 
120  // Limits of EOS
121  limits.Tmin = 273;
122  limits.Tmax = 500.0;
123  limits.pmax = 100000.0;
124  limits.rhomax = 1000000.0*params.molemass;
125 
126  phirlist.push_back(new phir_power(n,d,t,c,1,16,23));
127  phirlist.push_back(new phir_exponential(n,d,t,c,g,17,22,23));
128 
129  phi0list.push_back(new phi0_lead(0,0));
130  phi0list.push_back(new phi0_logtau(-1));
131 
132  double R = params.R_u/params.molemass;
133  const double a0[] = {3.42418e-1/R, 4.84403e-3/R, -3.47414e-6/R, 1.44887e-9/R, -2.6815e-13/R};
134  const double n0[] = {0, 1, 2, 3, 4};
135  std::vector<double> a0_v(a0,a0+sizeof(a0)/sizeof(double));
136  std::vector<double> n0_v(n0,n0+sizeof(n0)/sizeof(double));
137 
138  phi0list.push_back(new phi0_cp0_poly(a0_v,n0_v,crit.T,298.15,0,4));
139 
140  EOSReference.assign("");
141  TransportReference.assign("Using ECS in fully predictive mode");
142 
143  name.assign("Propyne");
144  aliases.push_back(std::string("propyne"));
145  aliases.push_back(std::string("PROPYNE"));
146  REFPROPname.assign("PROPYNE");
147 
148  ECSReferenceFluid = "Propane";
149 
150  BibTeXKeys.EOS = "Polt-CT-1992";
151  BibTeXKeys.CP0 = "Polt-CT-1992";
152 }
153 double PropyneClass::psat(double T)
154 {
155  // Max error is 0.0257131564429 % between 273.0 and 402.379999 K
156  const double t[]={0, 0.082, 0.363, 1.0, 1.1666666666666667, 3.3333333333333335, 13.333333333333334};
157  const double N[]={0, 0.00010080009642318073, 0.002891896060186386, -7.3925772455032153, 1.1171903341456655, 0.15103683905132995, -9781.2864014399875};
158  double summer=0,theta;
159  theta=1-T/reduce.T;
160  for (int i=1; i<=6; i++)
161  {
162  summer += N[i]*pow(theta,t[i]);
163  }
164  return reduce.p.Pa*exp(reduce.T/T*summer);
165 }
166 
167 double PropyneClass::rhosatL(double T)
168 {
169  // Maximum absolute error is 0.135668 % between 273.000001 K and 402.379990 K
170  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.5, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.8333333333333333, 2.1666666666666665};
171  const double N[] = {0, 4.0417756773327778, -31.191719018579267, 68.399467163263139, 211.93208284987557, -1457.8363818716066, 3452.436253269464, -4095.4407531126485, 2114.2042391704863, -402.8056702552895, 142.73254644405606};
172  double summer=0,theta;
173  theta=1-T/reduce.T;
174  for (int i=1; i<=10; i++)
175  {
176  summer += N[i]*pow(theta,t[i]);
177  }
178  return reduce.rho*(summer+1);
179 }
180 
181 double PropyneClass::rhosatV(double T)
182 {
183  // Maximum absolute error is 0.071856 % between 273.000001 K and 402.379990 K
184  const double t[] = {0, 0.16666666666666666, 0.3333333333333333, 0.6666666666666666, 0.8333333333333334, 1.0, 1.1666666666666667, 1.3333333333333333, 1.5, 1.8333333333333333};
185  const double N[] = {0, -3.2611479340583425, 21.113350221071236, -500.60815996337084, 2331.103035511363, -5545.9781937510725, 7874.0174835532853, -6568.2932354931727, 2641.1681543521377, -256.41310994446786};
186  double summer = 0, theta;
187  theta = 1-T/reduce.T;
188  for (int i=1; i<=9; i++)
189  {
190  summer += N[i]*pow(theta,t[i]);
191  }
192  return reduce.rho*exp(reduce.T/T*summer);
193 }
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
double R()
Returns the mass-specific gas constant for the fluid in the desired units.
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::string CP0
Definition: FluidClass.h:121
double rhosatV(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
double psat(double)
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
double rhosatL(double)
params
struct CriticalStruct crit
Definition: FluidClass.h:218
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