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
Methanol.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 "Methanol.h"
6 
8 {
9  double n[] = {0, 0.96352729792779e-1, -0.10848826325874e1, 0.29919647090261e-1, -0.17963419593895e-2, 0.47354317752015e-4, 0.10013578850486e+1, -0.12555691488591e+1, 0.85469725717500e0, -0.58295570793694e-1, 0.26935675584229e-1, 0.11504892676606e0, -0.51081766133636e-2, 0.19167368789348e-2, -0.28618221186953e0, 0.48168213019845e0, -0.33081091251828e0, 0.92842083313630e-1, -0.35936470747247e-1};
10  double d[] = {0, 1, 1, 4, 5, 7, 1, 1, 3, 4, 5, 1, 7, 9, 2, 3, 4, 6, 7};
11  double t[] = {0, -0.125, 1.500, 0.000, -0.875, 1.250, 0.250, 2.000, 1.750, 2.500, 2.375, 6.875, 5.875, 5.000, 18.500, 19.000, 17.500, 14.000, 12.000};
12  double l[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3};
13 
14  // Critical parameters
15  crit.rho = 273;
16  crit.p = PressureUnit(8215.85, UNIT_KPA);
17  crit.T = 512.50;
18  crit.v = 1.0/crit.rho;
19 
20  // Other fluid parameters
21  params.molemass = 32.04216;
22  params.Ttriple = 175.61;
23  params.ptriple = 0.00018629;
24  params.accentricfactor = 0.5720322;
25  params.R_u = 8.314472;
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  // Residual part
34  phirlist.push_back(new phir_power(n,d,t,l,1,18,19));
35  double m = 0.977118832, epsilonbar = 5.46341463, vbarn = 0.204481952, kappabar = 0.148852832e-2;
36  phirlist.push_back(new phir_SAFT_associating_2B(m, epsilonbar, vbarn, kappabar));
37 
38  // Ideal-gas part
39  phi0list.push_back(new phi0_lead(13.9864114647, 3.2006369296e3));
40  phi0list.push_back(new phi0_logtau(3.1950423807804));
41  // Methanol uses tao0 = 1/T as the variable for cp0/R rather than tau,
42  // so we need to convert
43  phi0list.push_back(new phi0_power(-1.14289818828912e-3*crit.T, -1));
44  phi0list.push_back(new phi0_power(-2.62687155181005e-7*pow(crit.T,2), -2));
45  phi0list.push_back(new phi0_power(6.42610441977784e-11*pow(crit.T,3), -3));
46  phi0list.push_back(new phi0_Planck_Einstein( 4.70118076896145, 3.7664265756));
47 
48  name.assign("Methanol");
49  aliases.push_back("methanol");
50  aliases.push_back(std::string("METHANOL"));
51  REFPROPname.assign("METHANOL");
52 
53  reduce = crit;
54 
55  BibTeXKeys.EOS = "Piazza-FPE-2013";
56  BibTeXKeys.SURFACE_TENSION = "Mulero-JPCRD-2012";
57 }
58 
59 double MethanolClass::psat(double T)
60 {
61  // Max error is 0.0991069278587 % between 175.61 and 512.5999 K
62  const double t[] = {0, 0.077, 0.3505, 0.3515, 0.3555, 0.3645, 0.371, 0.383, 4.833333333333333, 5.0, 10.166666666666666};
63  const double N[] = {0, -9.7405903858600631, 3260402084.5156689, -4777161923.1118717, 2016877532.0827882, -811371244.62298751, 338648069.09319597, -27394516.566426165, -46.888287588943143, 46.324153446741605, -3.5670972200405648};
64  double summer = 0, theta;
65  theta = 1 - T/crit.T;
66  for (int i=1; i<=10; i++)
67  {
68  summer += N[i]*pow(theta, t[i]);
69  }
70  return 8103500*exp(crit.T/T*summer);
71 }
72 
73 double MethanolClass::rhosatL(double T)
74 {
75  // Max error is 0.0821373889953 % between 175.61 and 512.4999 K
76  const double t[] = {0, 0.052000000000000005, 0.359, 0.362, 0.3725, 0.38999999999999996, 0.39149999999999996, 1.5, 6.333333333333333};
77  const double N[] = {0, 0.78895468490910248, -430749.82813271997, 688983.70332109113, -408037.75579782907, 951810.28685599519, -802005.68894233427, 1.3144166962003807, 0.62507823719120026};
78  double summer=0,theta;
79  theta = 1 - T/crit.T;
80  for (int i=1; i <= 8; i++)
81  {
82  summer += N[i]*pow(theta,t[i]);
83  }
84  return crit.rho*(summer+1);
85 }
86 
87 double MethanolClass::rhosatV(double T)
88 {
89  // Max error is 0.236163723479 % between 175.61 and 512.4999 K
90  const double t[] = {0, 0.14100000000000001, 0.352, 0.361, 0.363, 0.3645, 0.365, 0.385, 4.0};
91  const double N[] = {0, -177.86155125251409, 826168404.02091146, -73665853180.39566, 307970330692.74481, -666652930848.13257, 431587738673.01379, -65453571.459690347, -2.5772990424534554};
92  double summer=0,theta;
93  theta=1-T/reduce.T;
94  for (int i=1; i<=8; i++)
95  {
96  summer += N[i]*pow(theta,t[i]);
97  }
98  return reduce.rho*exp(reduce.T/T*summer);
99 }
101 {
102  // Mulero, JPCRD 2012
103  return 0.22421*pow(1-T/reduce.T,1.3355) - 0.21408*pow(1-T/reduce.T,1.677) + 0.083233*pow(1-T/reduce.T,4.4402);
104 }
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
double rhosatV(double)
Definition: Methanol.cpp:87
std::string name
A container to hold the cache for residual Helmholtz derivatives.
Definition: FluidClass.h:151
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 surface_tension_T(double T)
Definition: Methanol.cpp:100
double psat(double)
Definition: Methanol.cpp:59
double rhosatL(double)
Definition: Methanol.cpp:73
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
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