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
SES36.cpp
Go to the documentation of this file.
1 /* Properties of SES36
2 by Ian Bell, 2012
3 */
4 
5 #if defined(_MSC_VER)
6 #define _CRTDBG_MAP_ALLOC
7 #define _CRT_SECURE_NO_WARNINGS
8 #include <stdlib.h>
9 #include <crtdbg.h>
10 #else
11 #include <stdlib.h>
12 #endif
13 
14 #include "math.h"
15 #include "stdio.h"
16 #include <string.h>
17 #include "CoolProp.h"
18 #include "FluidClass.h"
19 #include "SES36.h"
20 
22 {
23  //Constants for ideal gas expression
24  static const double a0[]={0.0,13.09,85.26};
25  static const double b0 = 2197;
26 
27  static const double n[]={0,
28  0.0675748, //[1]
29  1.76939, //[2]
30  -2.7609, //[3]
31  -0.566938, //[4]
32  0.243576, //[5]
33  -1.50937, //[6]
34  -0.774081, //[7]
35  0.953907, //[8]
36  -1.43736, //[9]
37  -0.0458514, //[10]
38  2.46053, //[11]
39  -0.903158, //[12]
40  -0.288664, //[13]
41  0.061038, //[14]
42  };
43 
44  // d used for consistency with CO2 correlation (corresponds to i from Span)
45  static const double d[]={0,
46  4, //[1]
47  1, //[2]
48  1, //[3]
49  2, //[4]
50  3, //[5]
51  1, //[6]
52  3, //[7]
53  2, //[8]
54  2, //[9]
55  7, //[10]
56  1, //[11]
57  1, //[12]
58  3, //[13]
59  3, //[14]
60  };
61 
62  // t used for consistency with CO2 correlation (corresponds to j from Span)
63  static const double t[]={0.00,
64  1, //[1]
65  0.3, //[2]
66  0.947, //[3]
67  1.08, //[4]
68  0.44, //[5]
69  1.7, //[6]
70  1.5, //[7]
71  1.35, //[8]
72  2.1, //[9]
73  0.97, //[10]
74  0.8, //[11]
75  2, //[12]
76  2.5, //[13]
77  4, //[14]
78  };
79 
80  // c used for consistency with CO2 correlation (corresponds to l from Span)
81  static const double c[]={0,
82  0, //[1]
83  0, //[2]
84  0, //[3]
85  0, //[4]
86  0, //[5]
87  2, //[6]
88  2, //[7]
89  1, //[8]
90  2, //[9]
91  1, //[10]
92  };
93 
94  // alpha is used here for consistency with the definitions in R744.c upon which Nitrogen.c is based
95  // is phi_k from Span
96  static const double eta[]={
97  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
98  1.023, //[11]
99  1.383, //[12]
100  1, //[13]
101  7, //[14]
102  };
103 
104  static const double GAMMA[]={
105  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
106  1.1, //[11]
107  0.64, //[12]
108  0.5, //[13]
109  1.26, //[14]
110  };
111 
112  // epsilon is used here for consistency with the definitions in R744.c upon which Nitrogen.c is based
113  // is the value unity in Span
114  static const double beta[]={
115  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
116  1.7, //[11]
117  1.55, //[12]
118  1.07, //[13]
119  87, //[14]
120  };
121 
122  // GAMMA is used here for consistency with the definitions in R744.c upon which Nitrogen.c is based
123  static const double epsilon[]={
124  0,0,0,0,0,0,0,0,0,0,0, // indices [0-10]
125  0.713, //[11]
126  0.917, //[12]
127  0.69, //[13]
128  0.748, //[14]
129  };
130 
131  std::vector<double> eta_v(eta,eta+sizeof(eta)/sizeof(double));
132  std::vector<double> epsilon_v(epsilon,epsilon+sizeof(epsilon)/sizeof(double));
133  std::vector<double> beta_v(beta,beta+sizeof(beta)/sizeof(double));
134  std::vector<double> gamma_v(GAMMA,GAMMA+sizeof(GAMMA)/sizeof(double));
135 
136  phirlist.push_back(new phir_power(n,d,t,c,1,10,11));
137  phirlist.push_back(new phir_gaussian(n,d,t,eta,epsilon,beta,GAMMA,11,14,15));
138 
139  // phi0=log(delta)+a0[1]*log(tau)+a0[2]*log(1-exp(-b0*tau));
140  phi0list.push_back(new phi0_lead(0,0)); // phi0_lead is like log(delta)+a1+a2*tau with a1=0, a2=0
141  phi0list.push_back(new phi0_logtau(a0[1]-1)); // -1 value needed to yield the correct values for the ideal gas part
142  phi0list.push_back(new phi0_Planck_Einstein(a0[2],b0/450.7));
143 
144  // Critical parameters
145  crit.rho = 2.8*184.85;
146  crit.p = PressureUnit(2849,UNIT_KPA);
147  crit.T = 450.7;
148  crit.v = 1.0/crit.rho;
149 
150  // Other fluid parameters
151  params.molemass = 184.85;
152  params.Ttriple = 200; // No value given, taken from PPF Refprop file
153  params.ptriple = 0.573325755702; //Evaluated at 200 K
154  params.accentricfactor = 0.352;
155  params.R_u = 8.314472;
156  isPure = false;
157 
158  // Limits of EOS
159  limits.Tmin = params.Ttriple;
160  limits.Tmax = 2000.0;
161  limits.pmax = 2200000.0;
162  limits.rhomax = 53.15*params.molemass;
163 
164  EOSReference.assign("Unpublished report: Monika Thol, Eric W. Lemmon, Roland Span, \"Equation of State for a Refrigerant Mixture of R365mfc (1,1,1,3,3-Pentafluorobutane) and Galden® HT 55 (Perfluoropolyether)\",  ");
165  TransportReference.assign("Using ECS in predictive mode\n\n"
166  "Surface Tension: A. P. Fröba, H. Kremer, A. Leipertz, F. Flohr and C. Meurer, "
167  "\"Thermophysical Properties of a Refrigerant Mixture of R365mfc (1,1,1,3,3-Pentafluorobutane) "
168  "and Galden® HT 55 (Perfluoropolyether)\", International Journal of Thermophysics, Volume 28, "
169  "Number 2 (2007), 449-480, DOI: 10.1007/s10765-007-0178-y");
170 
171  name.assign("SES36");
172 
173  BibTeXKeys.EOS = "Thol-2012";
174 }
175 double SES36Class::psatL(double T)
176 {
177  const double ti[]={0,1.0,1.5,2.5,4.5};
178  const double Ni[]={0,-7.9188,2.4297,-5.1434,11.301};
179  double summer=0;
180  int i;
181  for (i=1;i<=4;i++)
182  {
183  summer += Ni[i]*pow(1-T/reduce.T,ti[i]);
184  }
185  return reduce.p.Pa*exp(reduce.T/T*summer);
186 }
187 double SES36Class::psatV(double T)
188 {
189  return psatL(T);
190 }
191 double SES36Class::rhosatL(double T)
192 {
193  const double Ni[]={0,-0.3968,17.9889,-52.375,67.9231,-31.7301};
194  double summer=0;
195  int i;
196  for (i=1;i<=5;i++)
197  {
198  summer += Ni[i]*pow(1.0-T/reduce.T,((double)i)/3.0);
199  }
200  return 538*(1+summer);
201 }
202 double SES36Class::rhosatV(double T)
203 {
204  double theta = 1-T/reduce.T;
205  double RHS,rho;
206 
207  // Max error is 0.722490 %
208  RHS = -0.155721*pow(theta,0.000000)-13.669499*pow(theta,2.452194)-6.186741*pow(theta,0.635276)-5.454902*pow(theta,2.573221)-3.512970*pow(theta,5.915373)-1.760205*pow(theta,7.207006)-0.547867*pow(theta,7.850921);
209  rho = exp(RHS)*reduce.rho;
210  return rho;
211 }
213 {
214  double sigma0 = 0.04193, sigma1 = 1.188, sigma2 = -1.462;
215  return sigma0*pow(1-T/reduce.T,1.26)*(1+sigma1*pow(1-T/reduce.T,0.5)+sigma2*(1-T/reduce.T));
216 }
double rhosatL(double)
Definition: SES36.cpp:191
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 surface_tension_T(double)
Definition: SES36.cpp:212
double Pa
Definition: Units.h:22
struct CriticalStruct reduce
A pointer to the point that is used to reduce the T and rho for EOS.
Definition: FluidClass.h:222
double psatV(double)
Definition: SES36.cpp:187
double Tmax
Definition: FluidClass.h:54
std::string EOSReference
The critical qd parameter for the Olchowy-Sengers cross-over term.
Definition: FluidClass.h:157
bool isPure
A std::string that contains a reference for the transport properties of the fluid.
Definition: FluidClass.h:159
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 rhosatV(double)
Definition: SES36.cpp:202
double Tmin
Definition: FluidClass.h:54
double rhomax
Definition: FluidClass.h:54
double psatL(double)
Definition: SES36.cpp:175
SES36Class()
Definition: SES36.cpp:21