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
R1233zd(E).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 "R1233zd(E).h"
6 
8 {
9  double n[] = {0.0, 0.03920261, 1.639052, -1.997147, -0.6603372, 0.1498682, -1.408791, -0.7920426, 0.8549678, -0.5301920, -0.01408562, 1.335117, -0.5441797, -0.05862723, -0.04123614, -0.6619106};
10  double t[] = {0, 1.0, 0.24, 0.83, 1.17, 0.6, 2.2, 2.88, 1.1, 2.0, 1.07, 1.27, 1.94, 2.0, 1.5, 1.0};
11  double d[] = {0, 4, 1, 1, 2, 3, 1, 3, 2, 2, 7, 1, 1, 3, 2, 3};
12  double c[] = {0, 0., 0., 0., 0., 0., 2., 2., 1., 2., 1., 0, 0, 0, 0, 0};
13  double eta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.215, 1.5, 1.1, 2.52, 4.55};
14  double beta[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.27, 0.82, 0.94, 20, 32};
15  double gamma[] = {0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.32, 0.82, 0.66, 0.66, 1.39};
16  double epsilon[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.77, 0.976, 1.08, 0.62, 0.61};
17 
18  //Critical parameters
19  crit.rho = 3.67*130.4961896 ; //[kg/m^3]
20  crit.p = PressureUnit(3570.9, UNIT_KPA); //[kPa]
21  crit.T = 438.75; //[K]
22  crit.v = 1/crit.rho;
23 
24  // Other fluid parameters
25  params.molemass = 130.4961896;
26  params.Ttriple = 195.15;
27  params.accentricfactor = 0.305;
28  params.R_u = 8.314472;
29  params.ptriple = 0.25;
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,16));
38  phirlist.push_back(new phir_gaussian( n,d,t, eta, epsilon, beta, gamma, 11,15,16));
39 
40  const double n5 = 0, n6 = 0, n0 = 0;
41  phi0list.push_back(new phi0_lead(n5,n6));
42  phi0list.push_back(new phi0_logtau(n0-1));
43 
44  const double u0[] = {0, 400/crit.T, 1900/crit.T};
45  const double v0[] = {0, 8.962, 11.94};
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  phi0list.push_back(new phi0_cp0_poly(4,0,crit.T,298.15));
49  phi0list.push_back(new phi0_Planck_Einstein(v0_v,u0_v,1,2));
50 
51  name.assign("R1233zd(E)");
52  aliases.push_back(std::string("R1233zdE"));
53  aliases.push_back(std::string("R1233ZDE"));
54  aliases.push_back(std::string("R1233ZD(E)"));
55  REFPROPname.assign("R1233zd");
56 }
57 
58 double R1233zdEClass::psat(double T)
59 {
60  const double ti[]={0,1.0, 1.5, 2.0, 4.3, 14.0};
61  const double Ni[]={0,-7.6021, 2.3265, -1.9771, -4.8451, -4.8762};
62  double summer=0,theta;
63  int i;
64  theta=1-T/reduce.T;
65  for (i=1;i<=5;i++)
66  {
67  summer=summer+Ni[i]*pow(theta,ti[i]);
68  }
69  return reduce.p.Pa*exp(reduce.T/T*summer);
70 }
71 double R1233zdEClass::rhosatL(double T)
72 {
73  const double ti[]={0,0.355, 0.9, 3.5, 8.0};
74  const double Ni[]={0,2.13083, 0.583568, 0.247871, 0.472173};
75  double summer=0;
76  int i;
77  double theta;
78  theta=1-T/reduce.T;
79  for (i=1;i<=4;i++)
80  {
81  summer+=Ni[i]*pow(theta,ti[i]);
82  }
83  double rho = reduce.rho*(summer+1);
84  return rho;
85 }
86 double R1233zdEClass::rhosatV(double T)
87 {
88  const double ti[]={0, 0.397, 1.2, 3.1, 6.6, 15.0};
89  const double Ni[]={0, -3.0152, -6.5621, -19.427, -62.650, -181.64 };
90  double summer=0,theta;
91  int i;
92  theta=1.0-T/reduce.T;
93  for (i=1;i<=5;i++)
94  {
95  summer=summer+Ni[i]*pow(theta,ti[i]);
96  }
97  double rho = reduce.rho*exp(summer);
98  return rho;
99 }
double rhosatL(double)
Definition: R1233zd(E).cpp:71
std::vector< phi_BC * > phirlist
Definition: FluidClass.h:178
struct FluidLimits limits
Definition: FluidClass.h:219
PressureUnit p
Definition: FluidClass.h:50
std::string name
A container to hold the cache for residual Helmholtz derivatives.
Definition: FluidClass.h:151
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
double psat(double)
Definition: R1233zd(E).cpp:58
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: R1233zd(E).cpp:86
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