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
IncompSolution.h
Go to the documentation of this file.
1 
2 #ifndef INCOMPRESSIBLE_SOLUTION_H
3 #define INCOMPRESSIBLE_SOLUTION_H
4 
5 #include <string>
6 #include <vector>
7 #include <math.h>
8 #include "CPExceptions.h"
9 #include "CoolPropTools.h"
10 #include "IncompBase.h"
11 #include <stdio.h>
12 
21 
26 
31 protected:
32  double xmin, xmax;
33  std::vector< std::vector<double> > cRho;
34  std::vector< std::vector<double> > cHeat;
35  std::vector< std::vector<double> > cVisc;
36  std::vector< std::vector<double> > cCond;
37  std::vector< std::vector<double> > cPsat;
38  std::vector<double> cTfreeze;
39 
40 public:
41  // Constructor
43  xmin = -1.;
44  xmax = -1.;
45  };
46 
47  std::vector<std::vector<double> > getcRho() const {return cRho;}
48  std::vector<std::vector<double> > getcHeat() const {return cHeat;}
49  std::vector<std::vector<double> > getcVisc() const {return cVisc;}
50  std::vector<std::vector<double> > getcCond() const {return cCond;}
51  std::vector<std::vector<double> > getcPsat() const {return cPsat;}
52  std::vector<double> getcTfreeze() const {return cTfreeze;}
53 
54  /* All functions need T, p and x as input. Might not
55  * be necessary, but gives a clearer structure.
56  */
58  virtual double rho (double T_K, double p, double x){return -_HUGE;};
60  virtual double c (double T_K, double p, double x){return -_HUGE;};
61  virtual double cp (double T_K, double p, double x){return c(T_K,p,x);};
62  virtual double cv (double T_K, double p, double x){return c(T_K,p,x);};
64  virtual double s (double T_K, double p, double x){return -_HUGE;};
66  virtual double u (double T_K, double p, double x){return -_HUGE;};
68  virtual double h (double T_K, double p, double x){return -_HUGE;};
70  virtual double visc(double T_K, double p, double x){return -_HUGE;};
72  virtual double cond(double T_K, double p, double x){return -_HUGE;};
74  virtual double psat(double T_K , double x){return -_HUGE;};
76  virtual double Tfreeze( double p, double x){return -_HUGE;};
77 
78  void testInputs(double T_K, double p, double x);
79 
80 
81 protected:
82  /* Define internal energy and enthalpy as functions of the
83  * other properties to provide data in case there are no
84  * coefficients.
85  */
86 
88 
91  double h_u(double T_K, double p, double x) {
92  return u(T_K,p,x)+p/rho(T_K,p,x);
93  };
94 
96 
99  double u_h(double T_K, double p, double x) {
100  return h(T_K,p,x)-p/rho(T_K,p,x);
101  };
102 
103 
104  /*
105  * Some more functions to provide a single implementation
106  * of important routines.
107  * We start with the check functions that can validate input
108  * in terms of pressure p, temperature T and composition x.
109  */
110 
112 
115  bool checkT(double T_K, double p, double x);
116 
118 
124  bool checkP(double T_K, double p, double x);
125 
127 
130  bool checkX(double x);
131 
133  bool checkTPX(double T, double p, double x);
134 };
135 
136 
141 bool IsIncompressibleSolution(std::string name);
142 double IncompSolutionSI(long iOutput, double T, double p, double x, long iFluid);
143 double IncompSolutionSI(long iOutput, double T, double p, double x, std::string name);
144 double IncompSolutionSI(long iOutput, double T, double p, std::string name); // TODO Solutions: Remove as soon as possible
145 std::string getSolutionName(std::string name); // TODO Solutions: Remove as soon as possible
146 double getSolutionConc(std::string name); // TODO Solutions: Remove as soon as possible
147 
148 
152 private:
153  std::vector<IncompressibleSolution*> solution_list;
154  std::map<std::string,IncompressibleSolution*> solution_map;
155 
156 public:
157  IncompressibleSolution * get_solution(long index);
158  IncompressibleSolution * get_solution(std::string name);
159  void set_solutions(std::vector<IncompressibleSolution*> list);
160 
163 };
164 
166 
175 
176 protected:
177  static double const M_H2O; /* kg/mol, molar mass of H2O */
178  static double const M_LiBr; /* kg/mol, molar mass of LiBr */
179  static double const T0; /* K, constant */
180 
181  /* Critical point of H2O */
182  static double const Tc_H2O; /* K, temperature */
183  static double const pc_H2O; /* MPa, pressure */
184  static double const rhoc_H2O; /* mol/m^3 (322 kg/m^3), molar density */
185  static double const hc_H2O; /* J/mol, molar enthalpy */
186  static double const sc_H2O; /* J/(mol.K) molar entropy*/
187 
188  /*Triple point of H2O */
189  static double const Tt_H2O; /* K, temperature */
190  static double const cpt_H2O; /* J/(mol.K), molar isobaric heat capacity*/
191 
192  double ps_mix(double T, double x)
193  /* Equation (1) */
194  {
195  static double m[8] = { 3.0, 4.0, 4.0, 8.0, 1.0, 1.0, 4.0, 6.0 };
196  static double n[8] = { 0.0, 5.0, 6.0, 3.0, 0.0, 2.0, 6.0, 0.0 };
197  static double t[8] = { 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0 };
198  static double a[8] = { -2.41303e2, 1.91750e7, -1.75521e8, 3.25430e7,
199  3.92571e2, -2.12626e3, 1.85127e8, 1.91216e3 };
200  double tau, suma = 0.0;
201  int i;
202 
203  tau = T / Tc_H2O;
204  for (i = 0; i <= 7; i++)
205  suma += a[i] * pow(x, m[i]) * pow(0.4 - x, n[i]) * pow(tau, t[i]);
206  return (ps_H2O(T - suma));
207 
208  } /* end function ps_mix */
209 
210  double rho_mix(double T, double x)
211  /* Equation (2) */
212  {
213  static double m[2] = { 1.0, 1.0 };
214  static double n[2] = { 0.0, 6.0 };
215  static double a[2] = { 1.746, 4.709 };
216 
217  double tau, suma = 0.0;
218  int i;
219 
220  tau = T / Tc_H2O;
221  for (i = 0; i <= 1; i++)
222  suma += a[i] * pow(x, m[i]) * pow(tau, n[i]);
223 
224  return ((1.0 - x) * rho_H2O(T) + rhoc_H2O * suma);
225 
226  } /* end function rho_mix */
227 
228  double cp_mix(double T, double x)
229  /* Equation (3) */
230  {
231  static double m[8] = { 2.0, 3.0, 3.0, 3.0, 3.0, 2.0, 1.0, 1.0 };
232  static double n[8] = { 0.0, 0.0, 1.0, 2.0, 3.0, 0.0, 3.0, 2.0 };
233  static double t[8] = { 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 3.0, 4.0 };
234  static double a[8] = { -1.42094e1, 4.04943e1, 1.11135e2, 2.29980e2,
235  1.34526e3, -1.41010e-2, 1.24977e-2, -6.83209e-4 };
236 
237  double tau, suma = 0.0;
238  int i;
239 
240  tau = Tc_H2O / (T - T0);
241  for (i = 0; i <= 7; i++)
242  suma += a[i] * pow(x, m[i]) * pow(0.4 - x, n[i]) * pow(tau, t[i]);
243 
244  return ((1.0 - x) * cp_H2O(T) + cpt_H2O * suma);
245 
246  } /* end function cp_mix */
247 
248  double h_mix(double T, double x)
249  /* Equation (4) */
250  {
251  static double m[30] = { 1.0, 1.0, 2.0, 3.0, 6.0, 1.0, 3.0, 5.0, 4.0,
252  5.0, 5.0, 6.0, 6.0, 1.0, 2.0, 2.0, 2.0, 5.0, 6.0, 7.0, 1.0, 1.0,
253  2.0, 2.0, 2.0, 3.0, 1.0, 1.0, 1.0, 1.0 };
254 
255  static double n[30] = { 0.0, 1.0, 6.0, 6.0, 2.0, 0.0, 0.0, 4.0, 0.0,
256  4.0, 5.0, 5.0, 6.0, 0.0, 3.0, 5.0, 7.0, 0.0, 3.0, 1.0, 0.0, 4.0,
257  2.0, 6.0, 7.0, 0.0, 0.0, 1.0, 2.0, 3.0 };
258 
259  static double t[30] = { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0,
260  2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0,
261  4.0, 4.0, 4.0, 4.0, 5.0, 5.0, 5.0, 5.0 };
262 
263  static double a[30] = { 2.27431, -7.99511, 3.85239e2, -1.63940e4,
264  -4.22562e2, 1.13314e-1, -8.33474, -1.73833e4, 6.49763,
265  3.24552e3, -1.34643e4, 3.99322e4, -2.58877e5, -1.93046e-3,
266  2.80616, -4.04479e1, 1.45342e2, -2.74873, -4.49743e2,
267  -1.21794e1, -5.83739e-3, 2.33910e-1, 3.41888e-1, 8.85259,
268  -1.78731e1, 7.35179e-2, -1.79430e-4, 1.84261e-3, -6.24282e-3,
269  6.84765e-3 };
270 
271  double tau, suma = 0.0;
272  int i;
273 
274  tau = Tc_H2O / (T - T0);
275  for (i = 0; i <= 29; i++)
276  suma += a[i] * pow(x, m[i]) * pow(0.4 - x, n[i]) * pow(tau, t[i]);
277 
278  return ((1.0 - x) * h_H2O(T) + hc_H2O * suma);
279 
280  } /* end function h_mix */
281 
282  double s_mix(double T, double x)
283  /* Equation (5) */
284  {
285  static double m[29] = { 1.0, 1.0, 2.0, 3.0, 6.0, 1.0, 3.0, 5.0, 1.0,
286  2.0, 2.0, 4.0, 5.0, 5.0, 6.0, 6.0, 1.0, 3.0, 5.0, 7.0, 1.0, 1.0,
287  1.0, 2.0, 3.0, 1.0, 1.0, 1.0, 1.0 };
288 
289  static double n[29] = { 0.0, 1.0, 6.0, 6.0, 2.0, 0.0, 0.0, 4.0, 0.0,
290  0.0, 4.0, 0.0, 4.0, 5.0, 2.0, 5.0, 0.0, 4.0, 0.0, 1.0, 0.0, 2.0,
291  4.0, 7.0, 1.0, 0.0, 1.0, 2.0, 3.0 };
292 
293  static double t[29] = { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0,
294  2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0,
295  4.0, 4.0, 4.0, 5.0, 5.0, 5.0, 5.0 };
296 
297  static double a[29] = { 1.53091, -4.52564, 6.98302e+2, -2.16664e+4,
298  -1.47533e+3, 8.47012e-2, -6.59523, -2.95331e+4, 9.56314e-3,
299  -1.88679e-1, 9.31752, 5.78104, 1.38931e+4, -1.71762e+4,
300  4.15108e+2, -5.55647e+4, -4.23409e-3, 3.05242e+1, -1.67620,
301  1.48283e+1, 3.03055e-3, -4.01810e-2, 1.49252e-1, 2.59240,
302  -1.77421e-1, -6.99650e-5, 6.05007e-4, -1.65228e-3, 1.22966e-3 };
303 
304  double tau, suma = 0.0;
305  int i;
306 
307  tau = Tc_H2O / (T - T0);
308  for (i = 0; i <= 28; i++)
309  suma += a[i] * pow(x, m[i]) * pow(0.4 - x, n[i]) * pow(tau, t[i]);
310 
311  return ((1.0 - x) * s_H2O(T) + sc_H2O * suma);
312 
313  } /* end function s_mix */
314 
315  double ps_H2O(double T)
316  /* Equation (28) */
317  {
318  static double a[7] = { 0.0, -7.85951783, 1.84408259, -11.7866497,
319  22.6807411, -15.9618719, 1.80122502 };
320 
321  double tau, ps;
322 
323  tau = 1 - T / Tc_H2O;
324 
325  ps = pc_H2O
326  * exp(
327  Tc_H2O / T
328  * (a[1] * tau + a[2] * pow(tau, 1.5)
329  + a[3] * pow(tau, 3.0)
330  + a[4] * pow(tau, 3.5)
331  + a[5] * pow(tau, 4.0)
332  + a[6] * pow(tau, 7.5)));
333 
334  return (ps * 1.0e6);
335 
336  } /* end function ps_H2O */
337 
338  double rho_H2O(double T)
339  /* Equation (29) */
340  {
341  static double b[7] = { 0.0, 1.99274064, 1.09965342, -0.510839303,
342  -1.75493479, -45.5170352, -6.7469445e5 };
343  double theta, rho;
344 
345  theta = 1.0 - T / Tc_H2O;
346 
347  rho = rhoc_H2O
348  * (1.0 + b[1] * pow(theta, 1.0 / 3.0)
349  + b[2] * pow(theta, 2.0 / 3.0)
350  + b[3] * pow(theta, 5.0 / 3.0)
351  + b[4] * pow(theta, 16.0 / 3.0)
352  + b[5] * pow(theta, 43.0 / 3.0)
353  + b[6] * pow(theta, 110.0 / 3.0));
354 
355  return (rho);
356  } /* end function rho_H2O */
357 
358  double cp_H2O(double T)
359  /* Equation (30) */
360  {
361  static double a[5] =
362  { 1.38801, -2.95318, 3.18721, -0.645473, 9.18946e5 };
363  static double b[5] = { 0.0, 2.0, 3.0, 6.0, 34.0 };
364  static double c[5] = { 0.0, 2.0, 3.0, 5.0, 0.0 };
365 
366  double suma = 0.0;
367  int i;
368 
369  for (i = 0; i <= 4; i++)
370  suma += a[i] * exp(b[i] * log(1.0 - T / Tc_H2O))
371  * exp(c[i] * log(T / Tt_H2O));
372 
373  return (cpt_H2O * suma);
374 
375  } /* end function cp_H2O */
376 
377  double h_H2O(double T)
378  /* Equation (31) */
379  {
380  static double a[4] = { -4.37196e-1, 3.03440e-1, -1.29582, -1.76410e-1 };
381  static double alpha[4] = { 1.0 / 3.0, 2.0 / 3.0, 5.0 / 6.0, 21.0 / 6.0 };
382 
383  double suma = 0.0;
384  int i;
385 
386  for (i = 0; i <= 3; i++)
387  suma += a[i] * exp(alpha[i] * log(1.0 - T / Tc_H2O));
388 
389  return (hc_H2O * (1.0 + suma));
390 
391  } /* end function h_H2O */
392 
393  double s_H2O(double T)
394  /* Equation (32) */
395  {
396  static double a[4] = { -3.34112e-1, -8.47987e-1, -9.11980e-1, -1.64046 };
397  static double alpha[4] = { 1.0 / 3.0, 3.0 / 3.0, 8.0 / 3.0, 24.0 / 3.0 };
398 
399  double suma = 0.0;
400  int i;
401 
402  for (i = 0; i <= 3; i++)
403  suma += a[i] * exp(alpha[i] * log(1.0 - T / Tc_H2O));
404 
405  return (sc_H2O * (1.0 + suma));
406 
407  } /* end function s_H2O */
408 
409 
412  double massToMole(double w)
413  /* Equation (7) */
414  {
415  return (w/M_LiBr)/(w/M_LiBr+(1.-w)/M_H2O);
416  //return (w*M_LiBr)/(w*M_LiBr+(1.-w)*M_H2O);
417  }
418 
419  double molarToSpecific(double w, double value)
420  /* Equation (7,8) */
421  {
422  double x = massToMole(w);
423  //return w/(x*M_LiBr) * value;
424  return 1. / ( x*M_LiBr + (1.-x)*M_H2O ) * value;
425  }
426 
427  static const bool debug = false;
428 
429 public:
430 
432  name = std::string("LiBr");
433  description = std::string("Lithium-Bromide solution from Patek2006");
434  reference = std::string("Patek2006");
435 
436  Tmin = 273.00;
437  Tmax = 500.00;
438  TminPsat = Tmin;
439 
440  xmin = 0.0;
441  xmax = 1.0;
442 
443  };
444 
445  double rho(double T_K, double p, double x){
446  checkTPX(T_K, p, x);
447  return 1./molarToSpecific(x, 1./rho_mix(T_K,massToMole(x)));
448  }
449  double c(double T_K, double p, double x){
450  checkTPX(T_K, p, x);
451  return molarToSpecific(x, cp_mix(T_K,massToMole(x)));
452  }
453  double h(double T_K, double p, double x){
454  return h_u(T_K,p,x);
455  }
456  double s(double T_K, double p, double x){
457  checkTPX(T_K, p, x);
458  return molarToSpecific(x, s_mix(T_K,massToMole(x)));
459  }
460  double visc(double T_K, double p, double x){
461  throw ValueError("Viscosity is not defined for LiBr-solutions.");
462  }
463  double cond(double T_K, double p, double x){
464  throw ValueError("Thermal conductivity is not defined for LiBr-solutions.");
465  }
466  double u(double T_K, double p, double x){
467  checkTPX(T_K, p, x);
468  return molarToSpecific(x, h_mix(T_K,massToMole(x)));
469  }
470  double psat(double T_K, double x){
471  //checkT(T_K,p,x);
472  if (debug) throw ValueError(format("Your concentration is %f in kg/kg and %f in mol/mol.",x,massToMole(x)));
473  return ps_mix(T_K,massToMole(x));
474  };
475  double Tfreeze(double p, double x){
476  if (debug) throw ValueError(format("No freezing point data available for Lithium-Bromide: p=%f, x=%f",p,x));
477  return Tmin;
478  }
479 };
480 
481 
483 
493 
494 protected:
495  double Tbase, xbase;
497  double baseFunction(std::vector<double> const& coefficients, double T_K, double p, double x);
498  std::vector< std::vector<double> > makeMatrix(std::vector<double> const& coefficients);
499 
500 public:
501 
503  Tbase = -1.;
504  xbase = -1.;
505  };
506 
507  double getTbase() const {return Tbase;}
508  double getxbase() const {return xbase;}
509 
510  double getTInput(double curTValue){
511  return curTValue-Tbase;
512  }
513 
514  double getxInput(double curxValue){
515  return (curxValue-xbase)*100.0;
516  }
517 
518  double rho(double T_K, double p, double x){
519  checkTPX(T_K, p, x);
521  return polyval(cRho, getxInput(x), getTInput(T_K));
522  }
523  double c(double T_K, double p, double x){
524  checkTPX(T_K, p, x);
526  return polyval(cHeat, getxInput(x), getTInput(T_K));
527  }
528  double h(double T_K, double p, double x){
529  return h_u(T_K,p,x);
530  }
531  double s(double T_K, double p, double x){
532  checkTPX(T_K, p, x);
534  return polyfracintcentral(cHeat, getxInput(x), T_K, Tref, Tbase);
535  }
536  double visc(double T_K, double p, double x){
537  checkTPX(T_K, p, x);
539  return expval(cVisc, getxInput(x), getTInput(T_K), 2)/1e3;
540  }
541  double cond(double T_K, double p, double x){
542  checkTPX(T_K, p, x);
544  return polyval(cCond, getxInput(x), getTInput(T_K));
545  }
546  double u(double T_K, double p, double x){
547  checkTPX(T_K, p, x);
549  return polyint(cHeat, getxInput(x), getTInput(T_K), getTInput(Tref));
550  }
551 // double psat(double T_K, double x){
552 // //checkT(T_K,p,x);
553 // Incompressible::checkCoefficients(cPsat,6,4);
554 // if (T_K<TminPsat || TminPsat<0){
555 // return -1.;
556 // } else {
557 // return expval(cPsat, getxInput(x), getTInput(T_K), 2);
558 // }
559 // };
560 // double Tfreeze(double p, double x){
561 // IncompressibleClass::checkCoefficients(cTfreeze,5);
562 // std::vector<double> tmpVector(cTfreeze.begin()+1,cTfreeze.end());
563 // return polyval(tmpVector, x*100.0-cTfreeze[0])+273.15;
564 // }
565 };
566 
567 
569 
570 protected:
572  std::vector<std::vector<double> > convertCoeffs(double *oldestCoeffs, int A, int B);
573 
574 public:
576 
577  name = std::string("MelinderSolution");
578  description = std::string("Test Methanol Melinder");
579  reference = std::string("Melinder-BOOK-2010");
580 
581  Tmin = -50 + 273.15;
582  Tmax = 40 + 273.15;
583  TminPsat = Tmax;
584 
585  xmin = 0.0;
586  xmax = 0.6;
587 
588  Tbase = 3.5359 + 273.15;
589  xbase = 30.5128 / 100.0;
590 
591  const int lengthA = 18;
592  const int lengthB = 5;
593 
594  double oldCoeffs[lengthA][lengthB]={
595  { -26.29 , 958.1 ,3887 , 0.4175 , 1.153 },//
596  { -0.000002575 , -0.4151 , 7.201 , 0.0007271 , -0.03866 },
597  { -0.000006732 , -0.002261 , -0.08979 , 0.0000002823 , 0.0002779 },
598  { 0.000000163 , 0.0000002998 , -0.000439 , 0.000000009718 , -0.000001543 },
599  { -1.187 , -1.391 , -18.5 , -0.004421 , 0.005448 },//
600  { -0.00001609 , -0.0151 , 0.2984 , -0.00002952 , 0.0001008 },
601  { 0.000000342 , 0.0001113 , -0.001865 , 0.00000007336 , -0.000002809 },
602  { 0.0000000005687 , -0.0000003264 , -0.00001718 , 0.0000000004328 , 0.000000009811 },
603  { -0.01218 , -0.01105 , -0.03769 , 0.00002044 , -0.0005552 },//
604  { 0.0000003865 , 0.0001828 , -0.01196 , 0.0000003413 , 0.000008384 },
605  { 0.000000008768 , -0.000001641 , 0.00009801 , -0.000000003665 , -0.00000003997 },
606  { -0.0000000002095 , 0.0000000151 , 0.000000666 , -0.00000000002791 , -0.0000000003466 },
607  { -0.00006823 , -0.0001208 , -0.003776 , 0.0000002943 , 0.000003038 },//
608  { 0.00000002137 , 0.000002992 , -0.00005611 , -0.0000000009646 , -0.00000007435 },
609  { -0.0000000004271 , 0.000000001455 , -0.0000007811, 0.00000000003174 , 0.0000000007442 },
610  { 0.0000001297 , 0.000004927 , -0.0001504 , -0.0000000008666 , 0.00000006669 },//
611  { -0.0000000005407 , -0.0000001325 , 0.000007373 , -0.0000000000004573 , -0.0000000009105 },
612  { 0.00000002363 , -0.00000007727 , 0.000006433 , -0.0000000002033 , -0.0000000008472 }};//
613 
614  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
615 
616  cTfreeze.clear();
617  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
618 
619  cRho.clear();
620  cRho = makeMatrix(tmpVector[1]);
621 
622  cHeat.clear();
623  cHeat = makeMatrix(tmpVector[2]);
624 
625  cCond.clear();
626  cCond = makeMatrix(tmpVector[3]);
627 
628  cVisc.clear();
629  cVisc = makeMatrix(tmpVector[4]);
630  };
631 
633  double Tfreeze(double p, double x){
635  return polyval(cTfreeze, getxInput(x))+273.15;
636  }
637 };
638 
640 public:
642 
643  name = std::string("MEG");
644  description = std::string("Ethylene Glycol");
645  reference = std::string("Melinder-BOOK-2010");
646 
647  Tmin =-100 + 273.15;
648  Tmax = 100 + 273.15;
649  TminPsat = Tmax;
650 
651  xmin = 0.0;
652  xmax = 0.6;
653 
654  Tbase = 31.728 + 273.15;
655  xbase = 30.8462 / 100.0;
656 
657  const int lengthA = 18;
658  const int lengthB = 5;
659 
660  double oldCoeffs[lengthA][lengthB]={
661  {-15.25,1034,3.737,0.472,0.4705},
662  {-0.000001566,-0.4781,0.00293,0.0008903,-0.0255},
663  {-0.0000002278,-0.002692,-0.000004675,-0.000001058,0.0001782},
664  {0.000000002169,0.000004725,-0.00000001389,-0.000000002789,-0.0000007669},
665  {-0.808,1.311,-0.01799,-0.004286,0.02471},
666  {-0.000001339,-0.006876,0.0001046,-0.00001473,-0.0001171},
667  {0.00000002047,0.00004805,-0.0000004147,0.0000001059,0.000001052},
668  {-0.00000000002717,0.0000000169,0.0000000001847,-0.0000000001142,-0.00000001634},
669  {-0.01334,0.0000749,-0.00009933,0.00001747,0.000003328},
670  {0.00000006322,0.00007855,0.0000003516,0.00000006814,0.000001086},
671  {0.0000000002373,-0.0000003995,0.000000005109,-0.000000003612,0.00000001051},
672  {-0.000000000002183,0.000000004982,-0.00000000007138,0.000000000002365,-0.0000000006475},
673  {-0.00007293,-0.0001062,0.00000261,0.00000003017,0.000001659},
674  {0.000000001764,0.000001229,-0.000000001189,-0.000000002412,0.000000003157},
675  {-0.00000000002442,-0.00000001153,-0.0000000001643,0.00000000004004,0.0000000004063},
676  {0.000001006,-0.0000009623,0.00000001537,-0.000000001322,0.00000003089},
677  {-0.00000000007662,-0.00000007211,-0.0000000004272,0.00000000002555,0.0000000001831},
678  {0.00000000114,0.00000004891,-0.000000001618,0.00000000002678,-0.000000001865}
679  };
680 
681  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
682 
683  cTfreeze.clear();
684  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
685 
686  cRho.clear();
687  cRho = makeMatrix(tmpVector[1]);
688 
689  cHeat.clear();
690  cHeat = makeMatrix(tmpVector[2]);
691  // fix the typo for Ethylene Glycol
692  for (unsigned int i=0; i<cHeat.size(); i++){
693  for (unsigned int j=0; j<cHeat[i].size(); j++){
694  cHeat[i][j] *= 1000;
695  }
696  }
697 
698  cCond.clear();
699  cCond = makeMatrix(tmpVector[3]);
700 
701  cVisc.clear();
702  cVisc = makeMatrix(tmpVector[4]);
703  };
704 };
705 
707 public:
709 
710  name = std::string("MPG");
711  description = std::string("Propylene Glycol");
712  reference = std::string("Melinder-BOOK-2010");
713 
714  Tmin =-100 + 273.15;
715  Tmax = 100 + 273.15;
716  TminPsat = Tmax;
717 
718  xmin = 0.0;
719  xmax = 0.6;
720 
721  Tbase = 32.7083 + 273.15;
722  xbase = 30.7031 / 100.0;
723 
724  const int lengthA = 18;
725  const int lengthB = 5;
726 
727  double oldCoeffs[lengthA][lengthB]={
728  {-13.25,1018,3882,0.4513,0.6837},
729  {-0.0000382,-0.5406,2.699,0.0007955,-0.03045},
730  {0.0000007865,-0.002666,-0.001659,0.00000003482,0.0002525},
731  {-0.000000001733,0.00001347,-0.00001032,-0.000000005966,-0.000001399},
732  {-0.6631,0.7604,-13.04,-0.004795,0.03328},
733  {0.000006774,-0.00945,0.0507,-0.00001678,-0.0003984},
734  {-0.00000006242,0.00005541,-0.00004752,0.00000008941,0.000004332},
735  {-0.0000000007819,-0.0000001343,0.000001522,0.0000000001493,-0.0000000186},
736  {-0.01094,-0.002498,-0.1598,0.00002076,0.00005453},
737  {0.00000005332,0.000027,0.00009534,0.0000001563,-0.000000086},
738  {-0.000000004169,-0.0000004018,0.00001167,-0.000000004615,-0.00000001593},
739  {0.00000000003288,0.000000003376,-0.0000000487,0.000000000009897,-0.00000000004465},
740  {-0.0002283,-0.000155,0.0003539,-0.00000009083,-0.0000039},
741  {-0.00000001131,0.000002829,0.00003102,-0.000000002518,0.0000001054},
742  {0.0000000001918,-0.000000007175,-0.000000295,0.00000000006543,-0.000000001589},
743  {-0.000003409,-0.000001131,0.00005,-0.0000000005952,-0.00000001587},
744  {0.00000000008035,-0.00000002221,-0.0000007135,-0.00000000003605,0.0000000004475},
745  {0.00000001465,0.00000002342,-0.0000004959,0.00000000002104,0.000000003564}
746  };
747 
748  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
749 
750  cTfreeze.clear();
751  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
752 
753  cRho.clear();
754  cRho = makeMatrix(tmpVector[1]);
755 
756  cHeat.clear();
757  cHeat = makeMatrix(tmpVector[2]);
758 
759  cCond.clear();
760  cCond = makeMatrix(tmpVector[3]);
761 
762  cVisc.clear();
763  cVisc = makeMatrix(tmpVector[4]);
764  };
765 };
766 
768 public:
770 
771  name = std::string("MEA");
772  description = std::string("Ethyl Alcohol (Ethanol)");
773  reference = std::string("Melinder-BOOK-2010");
774 
775  Tmin =-100 + 273.15;
776  Tmax = 40 + 273.15;
777  TminPsat = Tmax;
778 
779  xmin = 0.0;
780  xmax = 0.6;
781 
782  Tbase = 8.1578 + 273.15;
783  xbase = 29.2361 / 100.0;
784 
785  const int lengthA = 18;
786  const int lengthB = 5;
787 
788  double oldCoeffs[lengthA][lengthB]={
789  {-19.41,961.9,4204,0.4067,1.474},
790  {-0.0003668,-0.5222,2.319,0.0006775,-0.04745},
791  {-0.00004005,-0.003281,-0.03042,0.0000003105,0.0004314},
792  {0.000001524,0.00001569,0.000686,-0.00000002,-0.000003023},
793  {-0.954,-1.433,-21.02,-0.005008,0.01565},
794  {-0.00001209,-0.01989,0.4927,-0.00002377,-0.00004106},
795  {0.000002877,0.000187,-0.003072,-0.00000003216,-0.000005135},
796  {-0.00000004394,-0.0000009154,-0.0000569,0.00000000008362,0.00000007004},
797  {-0.002648,-0.0226,-0.3714,0.00002801,-0.0008435},
798  {-0.0000003173,0.0002281,-0.002335,0.0000002669,0.0000164},
799  {0.000000008652,-0.00000008581,-0.0000196,-0.000000003606,-0.0000001091},
800  {-0.0000000003717,0.000000004056,0.0000007461,0.00000000001552,-0.000000001967},
801  {0.0003851,-0.000169,0.01743,-0.00000002009,0.000007552},
802  {0.0000000134,0.000008594,-0.0002969,-0.000000006813,-0.0000001118},
803  {-0.000000002091,-0.00000009607,0.000001901,0.0000000001429,0.000000001899},
804  {-0.0000002858,0.00001291,-0.00006292,-0.000000001506,0.0000001529},
805  {0.0000000009312,-0.000000159,0.000005353,0.0000000001167,-0.0000000009481},
806  {-0.000000167,-0.00000008318,-0.00000829,-0.00000000001653,-0.00000000413}
807  };
808 
809  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
810 
811  cTfreeze.clear();
812  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
813 
814  cRho.clear();
815  cRho = makeMatrix(tmpVector[1]);
816 
817  cHeat.clear();
818  cHeat = makeMatrix(tmpVector[2]);
819 
820  cCond.clear();
821  cCond = makeMatrix(tmpVector[3]);
822 
823  cVisc.clear();
824  cVisc = makeMatrix(tmpVector[4]);
825  };
826 };
827 
829 public:
831 
832  name = std::string("MMA");
833  description = std::string("Methyl Alcohol (Methanol)");
834  reference = std::string("Melinder-BOOK-2010");
835 
836  Tmin =-100 + 273.15;
837  Tmax = 40 + 273.15;
838  TminPsat = Tmax;
839 
840  xmin = 0.0;
841  xmax = 0.6;
842 
843  Tbase = 3.5359 + 273.15;
844  xbase = 30.5128 / 100.0;
845 
846  const int lengthA = 18;
847  const int lengthB = 5;
848 
849  double oldCoeffs[lengthA][lengthB]={
850  {-26.29,958.1,3887,0.4175,1.153},
851  {-0.000002575,-0.4151,7.201,0.0007271,-0.03866},
852  {-0.000006732,-0.002261,-0.08979,0.0000002823,0.0002779},
853  {0.000000163,0.0000002998,-0.000439,0.000000009718,-0.000001543},
854  {-1.187,-1.391,-18.5,-0.004421,0.005448},
855  {-0.00001609,-0.0151,0.2984,-0.00002952,0.0001008},
856  {0.000000342,0.0001113,-0.001865,0.00000007336,-0.000002809},
857  {0.0000000005687,-0.0000003264,-0.00001718,0.0000000004328,0.000000009811},
858  {-0.01218,-0.01105,-0.03769,0.00002044,-0.0005552},
859  {0.0000003865,0.0001828,-0.01196,0.0000003413,0.000008384},
860  {0.000000008768,-0.000001641,0.00009801,-0.000000003665,-0.00000003997},
861  {-0.0000000002095,0.0000000151,0.000000666,-0.00000000002791,-0.0000000003466},
862  {-0.00006823,-0.0001208,-0.003776,0.0000002943,0.000003038},
863  {0.00000002137,0.000002992,-0.00005611,-0.0000000009646,-0.00000007435},
864  {-0.0000000004271,0.000000001455,-0.0000007811,0.00000000003174,0.0000000007442},
865  {0.0000001297,0.000004927,-0.0001504,-0.0000000008666,0.00000006669},
866  {-0.0000000005407,-0.0000001325,0.000007373,-0.0000000000004573,-0.0000000009105},
867  {0.00000002363,-0.00000007727,0.000006433,-0.0000000002033,-0.0000000008472}
868 
869  };
870 
871  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
872 
873  cTfreeze.clear();
874  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
875 
876  cRho.clear();
877  cRho = makeMatrix(tmpVector[1]);
878 
879  cHeat.clear();
880  cHeat = makeMatrix(tmpVector[2]);
881 
882  cCond.clear();
883  cCond = makeMatrix(tmpVector[3]);
884 
885  cVisc.clear();
886  cVisc = makeMatrix(tmpVector[4]);
887  };
888 };
889 
891 public:
893 
894  name = std::string("MGL");
895  description = std::string("Glycerol");
896  reference = std::string("Melinder-BOOK-2010");
897 
898  Tmin =-100 + 273.15;
899  Tmax = 40 + 273.15;
900  TminPsat = Tmax;
901 
902  xmin = 0.0;
903  xmax = 0.6;
904 
905  Tbase = 8.9110 + 273.15;
906  xbase = 36.1905 / 100.0;
907 
908  const int lengthA = 18;
909  const int lengthB = 5;
910 
911  double oldCoeffs[lengthA][lengthB]={
912  {-13,1093,3486,0.4532,1.52},
913  {-0.0008638,-0.3624,3.766,0.0009782,-0.03729},
914  {0.000006895,-0.002451,-0.0001222,-0.0000001196,0.0003572},
915  {0.0000005229,0.00001547,0.00003219,-0.000000008778,-0.000003648},
916  {-0.5742,2.74,-22.5,-0.003223,0.0445},
917  {-0.000007991,-0.008373,0.1811,-0.00001951,-0.0002688},
918  {-0.0000007515,0.00009596,0.0003766,0.0000001178,0.0000008876},
919  {0.0000000171,-0.0000006999,-0.0000173,0.0000000001048,-0.00000002209},
920  {-0.009119,0.004081,-0.03258,0.000005539,0.0003633},
921  {0.000002973,0.00001808,0.0007249,-0.00000006878,-0.000004088},
922  {0.000000002379,-0.0000008516,-0.00002133,-0.000000002587,0.00000006219},
923  {-0.000000001237,0.00000001441,0.0000004907,0.00000000002262,0.0000000006331},
924  {-0.0001641,-0.00004744,0.002922,-0.0000002073,0.000001069},
925  {-0.000000005313,0.000001833,-0.00005346,-0.0000000002235,-0.0000001248},
926  {0.0000000004546,-0.00000003077,0.00000023,-0.00000000001421,0.000000003019},
927  {-0.000002408,-0.000001415,0.00002238,0.000000003,0.00000005729},
928  {-0.000000001682,0.00000001863,-0.0000005383,0.0000000001604,-0.00000000178},
929  {-0.000000007734,-0.000000006097,-0.0000005944,0.0000000002221,0.000000002116}
930  };
931 
932  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
933 
934  cTfreeze.clear();
935  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
936 
937  cRho.clear();
938  cRho = makeMatrix(tmpVector[1]);
939 
940  cHeat.clear();
941  cHeat = makeMatrix(tmpVector[2]);
942 
943  cCond.clear();
944  cCond = makeMatrix(tmpVector[3]);
945 
946  cVisc.clear();
947  cVisc = makeMatrix(tmpVector[4]);
948  };
949 };
950 
952 public:
954 
955  name = std::string("MAM");
956  description = std::string("Ammonia (NH3)");
957  reference = std::string("Melinder-BOOK-2010");
958 
959  Tmin =-100 + 273.15;
960  Tmax = 30 + 273.15;
961  TminPsat = Tmax;
962 
963  xmin = 0.0;
964  xmax = 0.3;
965 
966  Tbase = -4.6490 + 273.15;
967  xbase = 16.0784 / 100.0;
968 
969  const int lengthA = 18;
970  const int lengthB = 5;
971 
972  double oldCoeffs[lengthA][lengthB]={
973  {-25.76,944.5,4233,0.4551,0.9255},
974  {-0.0001817,-0.2743,-1.618,0.001673,-0.03439},
975  {0.00001204,-0.003113,0.0161,-0.000002214,0.0003217},
976  {0.0000005567,0.000003349,0.00001662,0.0000001228,-0.000004544},
977  {-2.385,-2.914,1.145,-0.005216,0.01327},
978  {0.00002315,-0.02307,0.02715,0.000003544,0.0001856},
979  {0.0000001415,0.0001341,0.001072,0.000001057,-0.00001646},
980  {-0.00000004244,-0.0000005151,-0.00005266,-0.00000003474,0.0000003004},
981  {-0.07636,0.02262,-0.001965,0.00008909,-0.0005979},
982  {-0.00000229,0.00006645,0.003472,0.000003526,-0.00002184},
983  {-0.000000262,-0.0000087,-0.00009051,-0.0000001782,0.000001297},
984  {0.0000000001786,0.00000008999,0.000002106,0.000000001858,-0.00000001141},
985  {-0.00261,-0.0006685,0.002131,0.000006807,-0.0001097},
986  {-0.000000376,-0.000001002,0.00004117,-0.0000003394,0.00000167},
987  {0.0000000136,0.0000003309,0.0000004446,0.000000008315,-0.00000003377},
988  {-0.000073,0.000001635,0.0002136,-0.0000001898,0.000003065},
989  {0.00000003524,0.0000004465,-0.00001354,0.000000006304,-0.00000006166},
990  {-0.000001075,0.0000006298,-0.000008551,-0.00000001361,0.0000003244}
991  };
992 
993  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
994 
995  cTfreeze.clear();
996  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
997 
998  cRho.clear();
999  cRho = makeMatrix(tmpVector[1]);
1000 
1001  cHeat.clear();
1002  cHeat = makeMatrix(tmpVector[2]);
1003 
1004  cCond.clear();
1005  cCond = makeMatrix(tmpVector[3]);
1006 
1007  cVisc.clear();
1008  cVisc = makeMatrix(tmpVector[4]);
1009  };
1010 };
1011 
1013 public:
1015 
1016  name = std::string("MKC");
1017  description = std::string("Potassium Carbonate (K2CO3)");
1018  reference = std::string("Melinder-BOOK-2010");
1019 
1020  Tmin =-100 + 273.15;
1021  Tmax = 40 + 273.15;
1022  TminPsat = Tmax;
1023 
1024  xmin = 0.0;
1025  xmax = 0.4;
1026 
1027  Tbase = 11.2422 + 273.15;
1028  xbase = 22.0833 / 100.0;
1029 
1030  const int lengthA = 18;
1031  const int lengthB = 5;
1032 
1033  double oldCoeffs[lengthA][lengthB]={
1034  {-10.3,1216,3217,0.5622,0.8063},
1035  {-0.0001575,-0.4114,1.492,0.001656,-0.02362},
1036  {0.000003598,-0.003383,-0.001539,0.000002108,0.0001851},
1037  {0.000000004324,0.0000299,-0.00003546,-0.00000004482,-0.000002372},
1038  {-0.7786,10.64,-37.33,-0.000892,0.03624},
1039  {0.00001112,-0.007614,-0.01775,0.000002031,-0.00001262},
1040  {-0.0000003479,0.00005214,0.0005416,-0.0000002616,-0.0000003022},
1041  {-0.000000001244,-0.0000008087,0.00000659,0.0000000007965,-0.000000007761},
1042  {-0.02766,0.04413,0.2023,-0.0000005233,0.0006659},
1043  {0.000001616,0.00007806,0.004553,-0.0000002962,-0.00001611},
1044  {-0.00000001681,-0.000001173,0.00003587,-0.000000009174,0.000000153},
1045  {0.00000000003847,0.00000005658,-0.0000003707,0.0000000001027,0.000000001061},
1046  {-0.0008226,-0.0001333,0.01971,-0.0000009283,0.00001077},
1047  {-0.00000004913,-0.000002381,0.0001367,-0.00000001814,-0.00000009796},
1048  {0.000000001395,0.0000001696,-0.000003667,0.0000000008767,0.00000000307},
1049  {-0.000002372,-0.00001246,0.0003405,-0.00000001011,-0.0000001097},
1050  {-0.000000002886,0.0000002708,-0.00001676,0.0000000008471,0.000000007825},
1051  {0.0000003251,0.0000002035,-0.00003488,0.000000001311,-0.000000008453}
1052  };
1053 
1054  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1055 
1056  cTfreeze.clear();
1057  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1058 
1059  cRho.clear();
1060  cRho = makeMatrix(tmpVector[1]);
1061 
1062  cHeat.clear();
1063  cHeat = makeMatrix(tmpVector[2]);
1064 
1065  cCond.clear();
1066  cCond = makeMatrix(tmpVector[3]);
1067 
1068  cVisc.clear();
1069  cVisc = makeMatrix(tmpVector[4]);
1070  };
1071 };
1072 
1074 public:
1076 
1077  name = std::string("MCA");
1078  description = std::string("Calcium Chloride (CaCl2)");
1079  reference = std::string("Melinder-BOOK-2010");
1080 
1081  Tmin =-100.0 + 273.15;
1082  Tmax = 40.0 + 273.15;
1083  TminPsat = Tmax;
1084 
1085  xmin = 0.0;
1086  xmax = 0.3;
1087 
1088  Tbase = 7.52570 + 273.15;
1089  xbase = 18.7414 / 100.0;
1090 
1091  const int lengthA = 18;
1092  const int lengthB = 5;
1093 
1094  double oldCoeffs[lengthA][lengthB]={
1095  {-16.21,1171,3133,0.558,0.8939},
1096  {-0.0001344,-0.1463,2.81,0.00146,-0.02647},
1097  {0.000005073,-0.001302,-0.01563,0.0000003861,0.0001718},
1098  {-0.0000000482,-0.0001871,-0.00001233,0.00000001307,-0.0000007918},
1099  {-1.555,9.847,-44.8,-0.00115,0.04389},
1100  {0.00002146,-0.02488,0.03271,-0.00001008,0.0002102},
1101  {-0.0000015,-0.000553,-0.001205,-0.0000000654,-0.0000008688},
1102  {0.00000002219,0.00001665,0.000009346,0.0000000004728,-0.00000004353},
1103  {-0.05496,0.03389,0.9511,-0.00001784,0.0009121},
1104  {0.0000009415,-0.002302,-0.005191,0.0000003496,0.000003993},
1105  {0.00000006185,0.00003526,0.0002282,-0.00000000484,0.0000003785},
1106  {-0.000000001723,0.0000002788,-0.000000929,-0.0000000002011,-0.000000009979},
1107  {-0.002624,0.001062,0.01472,-0.0000004415,0.000001963},
1108  {-0.0000001082,0.00006291,0.0001615,-0.000000003462,-0.0000004892},
1109  {0.000000003036,0.000001806,0.000005073,0.0000000003922,0.00000000001526},
1110  {-0.0001726,0.00002785,-0.001346,0.00000004699,0.0000002997},
1111  {-0.000000004396,0.000006423,-0.000009754,0.0000000006179,-0.00000003631},
1112  {-0.000004494,-0.000001811,-0.00006674,0.000000002929,0.00000003435}
1113  };
1114 
1115  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1116 
1117  cTfreeze.clear();
1118  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1119 
1120  cRho.clear();
1121  cRho = makeMatrix(tmpVector[1]);
1122 
1123  cHeat.clear();
1124  cHeat = makeMatrix(tmpVector[2]);
1125 
1126  cCond.clear();
1127  cCond = makeMatrix(tmpVector[3]);
1128 
1129  cVisc.clear();
1130  cVisc = makeMatrix(tmpVector[4]);
1131  };
1132 };
1133 
1135 public:
1137 
1138  name = std::string("MMG");
1139  description = std::string("(MgCl2)");
1140  reference = std::string("Melinder-BOOK-2010");
1141 
1142  Tmin =-100.0 + 273.15;
1143  Tmax = 40.0 + 273.15;
1144  TminPsat = Tmax;
1145 
1146  xmin = 0.0;
1147  xmax = 0.3;
1148 
1149  Tbase = 9.3163 + 273.15;
1150  xbase = 14.1327 / 100.0;
1151 
1152  const int lengthA = 18;
1153  const int lengthB = 5;
1154 
1155  double oldCoeffs[lengthA][lengthB]={
1156  {-15.12,1124,3365,0.5461,0.9573},
1157  {-0.0004843,-0.3072,2.229,0.001784,-0.03065},
1158  {0.00001113,-0.003295,-0.004627,-0.0000008171,0.0001115},
1159  {0.0000001858,0.00001015,0.00009186,-0.00000006594,-0.000002923},
1160  {-1.885,9.071,-52.22,-0.00273,0.04968},
1161  {-0.00005461,-0.006513,0.1162,-0.00001483,0.0001559},
1162  {0.000003579,0.00004664,0.001249,0.000000385,-0.00001796},
1163  {-0.00000003999,0.000002287,0.000002421,-0.000000005556,0.0000003051},
1164  {-0.05455,0.02449,0.6202,0.000008675,-0.002722},
1165  {0.00001887,0.00003574,0.002337,-0.000001489,-0.00001753},
1166  {-0.0000003171,0.000004337,0.0000724,-0.00000003882,0.000002021},
1167  {-0.000000006246,0.0000006044,-0.000003613,0.0000000009282,0.00000002614},
1168  {-0.0007257,0.003402,0.01052,0.0000008651,0.00009351},
1169  {0.0000007588,-0.0001409,-0.000459,0.0000001992,-0.000008353},
1170  {-0.00000004102,0.000001857,-0.00002477,-0.000000001196,0.0000001901},
1171  {-0.0003208,0.0003344,-0.001067,-0.0000004779,0.00007364},
1172  {-0.0000000492,-0.00000683,-0.0001048,0.00000001797,-0.0000004014},
1173  {-0.00001794,0.000007239,-0.0000696,-0.00000002503,0.000003717}
1174  };
1175 
1176  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1177 
1178  cTfreeze.clear();
1179  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1180 
1181  cRho.clear();
1182  cRho = makeMatrix(tmpVector[1]);
1183 
1184  cHeat.clear();
1185  cHeat = makeMatrix(tmpVector[2]);
1186 
1187  cCond.clear();
1188  cCond = makeMatrix(tmpVector[3]);
1189 
1190  cVisc.clear();
1191  cVisc = makeMatrix(tmpVector[4]);
1192  };
1193 };
1194 
1196 public:
1198 
1199  name = std::string("MNA");
1200  description = std::string("Sodium Chloride (NaCl)");
1201  reference = std::string("Melinder-BOOK-2010");
1202 
1203  Tmin =-100.0 + 273.15;
1204  Tmax = 40.0 + 273.15;
1205  TminPsat = Tmax;
1206 
1207  xmin = 0.0;
1208  xmax = 0.23;
1209 
1210  Tbase = 12.6179 + 273.15;
1211  xbase = 13.3897 / 100.0;
1212 
1213  const int lengthA = 18;
1214  const int lengthB = 5;
1215 
1216  double oldCoeffs[lengthA][lengthB]={
1217  {-9.383,1099,3593,0.5736,0.4369},
1218  {-0.00002581,-0.3758,1.669,0.001595,-0.02666},
1219  {0.000001423,-0.002023,-0.02019,-0.0000004003,0.0002035},
1220  {0,0,0,0,0},
1221  {-0.9039,7.723,-32.48,-0.0009383,0.02346},
1222  {0.000002578,-0.01426,-0.03331,-0.00001248,-0.00005368},
1223  {-0.00000003318,0.0001535,-0.001164,0.0000003353,0.000002871},
1224  {0,0,0,0,0},
1225  {-0.02204,0.02567,0.6453,-0.00001057,0.0004276},
1226  {0.0000001192,0.0003994,-0.009314,0.0000004158,-0.000004526},
1227  {-0.000000008993,-0.000007281,0.0002236,-0.00000002032,0.0000001838},
1228  {0,0,0,0,0},
1229  {-0.0004827,0.0001108,-0.01629,-0.0000004853,0.000007386},
1230  {-0.00000001467,0.0000003522,0.0007927,-0.00000001587,0.0000005437},
1231  {0,0,0,0,0},
1232  {0.000002247,-0.00001686,0.0002331,-0.000000004654,0.0000004688},
1233  {0,0,0,0,0},
1234  {0,0,0,0,0}
1235  };
1236 
1237  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1238 
1239  cTfreeze.clear();
1240  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1241 
1242  cRho.clear();
1243  cRho = makeMatrix(tmpVector[1]);
1244 
1245  cHeat.clear();
1246  cHeat = makeMatrix(tmpVector[2]);
1247 
1248  cCond.clear();
1249  cCond = makeMatrix(tmpVector[3]);
1250 
1251  cVisc.clear();
1252  cVisc = makeMatrix(tmpVector[4]);
1253  };
1254 };
1255 
1257 public:
1259 
1260  name = std::string("MKA");
1261  description = std::string("Potassium Acetate (CH3CO2K)");
1262  reference = std::string("Melinder-BOOK-2010");
1263 
1264  Tmin =-100.0 + 273.15;
1265  Tmax = 40.0 + 273.15;
1266  TminPsat = Tmax;
1267 
1268  xmin = 0.0;
1269  xmax = 0.45;
1270 
1271  Tbase = 6.7757 + 273.15;
1272  xbase = 25.6757 / 100.0;
1273 
1274  const int lengthA = 18;
1275  const int lengthB = 5;
1276 
1277  double oldCoeffs[lengthA][lengthB]={
1278  {-17.04,1138,3327,0.4958,1.042},
1279  {-0.0001082,-0.3565,1.806,0.00134,-0.03071},
1280  {0.000006892,-0.00202,-0.001766,0.00000006837,0.0002819},
1281  {-0.0000001397,0.000004205,0.00004357,0.000000002637,-0.00000219},
1282  {-1.228,5.796,-28.95,-0.002931,0.03405},
1283  {0.0000002302,-0.0079,0.04131,-0.00001477,-0.0001511},
1284  {-0.0000008711,0.00002753,0.0004429,0.00000004659,0.000001172},
1285  {0.00000002016,0.0000000514,0.00001125,0.0000000002886,-0.00000002379},
1286  {-0.03862,0.01306,0.04663,0.00001032,0.0005017},
1287  {0.000001565,0.00006845,0.0007775,-0.0000002396,-0.000007779},
1288  {0.000000007565,-0.00000113,0.00003463,-0.000000004352,0.00000009125},
1289  {-0.0000000003063,0.00000002433,-0.0000007261,-0.0000000000223,-0.000000001888},
1290  {-0.0004571,-0.001427,-0.001249,-0.0000002024,0.000005637},
1291  {-0.00000003734,0.0000008304,0.00005115,-0.000000005541,0.00000002534},
1292  {0.000000001268,0.00000001303,-0.000002987,0.00000000008984,0.000000001596},
1293  {0.00002969,0.000009353,0.0001659,-0.000000002371,-0.0000002922},
1294  {-0.000000002817,0.00000002322,-0.000005193,0.0000000005573,0.000000004601},
1295  {0.000000869,0.000002285,-0.0000004612,0.0000000005515,-0.00000000796}
1296  };
1297 
1298  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1299 
1300  cTfreeze.clear();
1301  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1302 
1303  cRho.clear();
1304  cRho = makeMatrix(tmpVector[1]);
1305 
1306  cHeat.clear();
1307  cHeat = makeMatrix(tmpVector[2]);
1308 
1309  cCond.clear();
1310  cCond = makeMatrix(tmpVector[3]);
1311 
1312  cVisc.clear();
1313  cVisc = makeMatrix(tmpVector[4]);
1314  };
1315 };
1316 
1318 public:
1320 
1321  name = std::string("MKF");
1322  description = std::string("Potassium Formate (CHKO2)");
1323  reference = std::string("Melinder-BOOK-2010");
1324 
1325  Tmin =-100.0 + 273.15;
1326  Tmax = 40.0 + 273.15;
1327  TminPsat = Tmax;
1328 
1329  xmin = 0.0;
1330  xmax = 0.48;
1331 
1332  Tbase = 5.89080 + 273.15;
1333  xbase = 29.1447 / 100.0;
1334 
1335  const int lengthA = 18;
1336  const int lengthB = 5;
1337 
1338  double oldCoeffs[lengthA][lengthB]={
1339  {-20.19,1189,3144,0.5253,0.8088},
1340  {-0.0001703,-0.3515,1.698,0.001241,-0.02556},
1341  {-0.000007478,-0.001918,-0.001303,-0.00000003799,0.0002195},
1342  {0.0000003761,0.00003132,0.00005177,-0.000000002951,-0.000001667},
1343  {-1.106,7.044,-29.94,-0.001972,0.01758},
1344  {-0.000004203,-0.00656,0.0229,-0.000006322,0.00008603},
1345  {-0.0000005737,0.00007018,0.000003898,0.00000002654,0.000002498},
1346  {0.00000001474,-0.000001459,0.000007391,-0.0000000007324,-0.00000003569},
1347  {-0.021,0.01889,0.2944,-0.00002596,-0.00008372},
1348  {-0.0000003802,0.0001034,-0.002482,-0.00000004693,-0.000001601},
1349  {0.00000006504,-0.000003889,0.000033,-0.000000004362,0.000000004815},
1350  {-0.000000001877,0.000000009225,-0.0000004871,0.00000000002899,-0.000000001861},
1351  {-0.0002638,-0.0002262,0.001161,-0.0000005062,-0.000001184},
1352  {0.00000004027,0.0000003692,0.00006758,-0.000000005229,-0.0000001331},
1353  {-0.0000000004789,0.00000006609,-0.000001277,0.0000000001035,-0.000000005489},
1354  {0.0000008327,0.00002368,-0.0001429,0.00000001501,0.000001088},
1355  {0.0000000009507,0.00000008766,0.0000009949,0.0000000005376,-0.000000007003},
1356  {0.00000006345,0.000001061,-0.000003221,0.0000000005562,0.00000003098}
1357  };
1358 
1359  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1360 
1361  cTfreeze.clear();
1362  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1363 
1364  cRho.clear();
1365  cRho = makeMatrix(tmpVector[1]);
1366 
1367  cHeat.clear();
1368  cHeat = makeMatrix(tmpVector[2]);
1369 
1370  cCond.clear();
1371  cCond = makeMatrix(tmpVector[3]);
1372 
1373  cVisc.clear();
1374  cVisc = makeMatrix(tmpVector[4]);
1375  };
1376 };
1377 
1379 public:
1381 
1382  name = std::string("MLI");
1383  description = std::string("Lithium Chloride (LiCl)");
1384  reference = std::string("Melinder-BOOK-2010");
1385 
1386  Tmin =-100.0 + 273.15;
1387  Tmax = 40.0 + 273.15;
1388  TminPsat = Tmax;
1389 
1390  xmin = 0.0;
1391  xmax = 0.24;
1392 
1393  Tbase = 1.4895 + 273.15;
1394  xbase = 14.8000 / 100.0;
1395 
1396  const int lengthA = 18;
1397  const int lengthB = 5;
1398 
1399  double oldCoeffs[lengthA][lengthB]={
1400  {-23.29,1088,3383,0.5362,1.013},
1401  {0.0006555,-0.1772,3.958,0.001454,-0.03062},
1402  {-0.0001208,-0.002619,-0.0003035,-0.0000000326,0.000294},
1403  {0.000002616,0.000006209,-0.000003477,-0.0000000142,-0.000002719},
1404  {-3.051,6.056,-50.36,-0.001855,0.0392},
1405  {-0.0003972,-0.008588,0.4415,-0.00001405,0.00006246},
1406  {0.00003674,0.0001567,-0.0002609,-0.000000005424,-0.000001752},
1407  {-0.0000005569,-0.000001847,0.000003651,0.0000000009821,0.00000008346},
1408  {-0.179,0.02556,0.6298,0.00001017,0.000332},
1409  {0.00001391,0.00007194,-0.004384,0.0000006821,0.000000784},
1410  {-0.000001997,-0.00001053,0.0001039,-0.000000008674,-0.00000031},
1411  {0.00000002931,0.00000009716,-0.000001076,0.0000000001095,0.00000001381},
1412  {-0.002917,0.0009407,0.04544,0.0000007084,0.000002206},
1413  {0.00000149,-0.000007253,-0.0008787,-0.00000007434,-0.0000006011},
1414  {-0.00000006904,0.0000003144,-0.000008457,0.0000000006988,0.000000004023},
1415  {0.0005715,-0.00008105,0.002527,-0.0000001273,0.000001745},
1416  {0.0000001186,0.000001072,-0.0000358,-0.000000003058,-0.00000007094},
1417  {0.00002757,-0.000003974,0.00004058,-0.000000009124,0.00000006699}
1418  };
1419 
1420  std::vector<std::vector<double> > tmpVector = convertCoeffs( *oldCoeffs, lengthA, lengthB);
1421 
1422  cTfreeze.clear();
1423  cTfreeze = get_col(makeMatrix(tmpVector[0]),0); // Discard temperature coefficients.
1424 
1425  cRho.clear();
1426  cRho = makeMatrix(tmpVector[1]);
1427 
1428  cHeat.clear();
1429  cHeat = makeMatrix(tmpVector[2]);
1430 
1431  cCond.clear();
1432  cCond = makeMatrix(tmpVector[3]);
1433 
1434  cVisc.clear();
1435  cVisc = makeMatrix(tmpVector[4]);
1436  };
1437 };
1438 
1439 
1440 
1441 
1442 
1443 
1444 
1445 
1446 
1448 public:
1450 
1451  std::vector<double> tmpVector;
1452 
1453  name = std::string("SecCoolSolution");
1454  description = std::string("Test Methanol SecCool");
1455  reference = std::string("Test");
1456 
1457  Tmin = -50 + 273.15;
1458  Tmax = 20 + 273.15;
1459  TminPsat = Tmax;
1460 
1461  xmin = 0.0;
1462  xmax = 0.5;
1463 
1464  Tbase = -4.48 + 273.15;
1465  xbase = 31.57 / 100.0;
1466 
1467  tmpVector.clear();
1468  tmpVector.push_back( 960.24665800);
1469  tmpVector.push_back(-1.2903839100);
1470  tmpVector.push_back(-0.0161042520);
1471  tmpVector.push_back(-0.0001969888);
1472  tmpVector.push_back( 1.131559E-05);
1473  tmpVector.push_back( 9.181999E-08);
1474  tmpVector.push_back(-0.4020348270);
1475  tmpVector.push_back(-0.0162463989);
1476  tmpVector.push_back( 0.0001623301);
1477  tmpVector.push_back( 4.367343E-06);
1478  tmpVector.push_back( 1.199000E-08);
1479  tmpVector.push_back(-0.0025204776);
1480  tmpVector.push_back( 0.0001101514);
1481  tmpVector.push_back(-2.320217E-07);
1482  tmpVector.push_back( 7.794999E-08);
1483  tmpVector.push_back( 9.937483E-06);
1484  tmpVector.push_back(-1.346886E-06);
1485  tmpVector.push_back( 4.141999E-08);
1486  cRho.clear();
1487  cRho = makeMatrix(tmpVector);
1488 
1489  tmpVector.clear();
1490  tmpVector.push_back( 3822.9712300);
1491  tmpVector.push_back(-23.122409500);
1492  tmpVector.push_back( 0.0678775826);
1493  tmpVector.push_back( 0.0022413893);
1494  tmpVector.push_back(-0.0003045332);
1495  tmpVector.push_back(-4.758000E-06);
1496  tmpVector.push_back( 2.3501449500);
1497  tmpVector.push_back( 0.1788839410);
1498  tmpVector.push_back( 0.0006828000);
1499  tmpVector.push_back( 0.0002101166);
1500  tmpVector.push_back(-9.812000E-06);
1501  tmpVector.push_back(-0.0004724176);
1502  tmpVector.push_back(-0.0003317949);
1503  tmpVector.push_back( 0.0001002032);
1504  tmpVector.push_back(-5.306000E-06);
1505  tmpVector.push_back( 4.242194E-05);
1506  tmpVector.push_back( 2.347190E-05);
1507  tmpVector.push_back(-1.894000E-06);
1508  cHeat.clear();
1509  cHeat = makeMatrix(tmpVector);
1510 
1511  tmpVector.clear();
1512  tmpVector.push_back( 0.4082066700);
1513  tmpVector.push_back(-0.0039816870);
1514  tmpVector.push_back( 1.583368E-05);
1515  tmpVector.push_back(-3.552049E-07);
1516  tmpVector.push_back(-9.884176E-10);
1517  tmpVector.push_back( 4.460000E-10);
1518  tmpVector.push_back( 0.0006629321);
1519  tmpVector.push_back(-2.686475E-05);
1520  tmpVector.push_back( 9.039150E-07);
1521  tmpVector.push_back(-2.128257E-08);
1522  tmpVector.push_back(-5.562000E-10);
1523  tmpVector.push_back( 3.685975E-07);
1524  tmpVector.push_back( 7.188416E-08);
1525  tmpVector.push_back(-1.041773E-08);
1526  tmpVector.push_back( 2.278001E-10);
1527  tmpVector.push_back( 4.703395E-08);
1528  tmpVector.push_back( 7.612361E-11);
1529  tmpVector.push_back(-2.734000E-10);
1530  cCond.clear();
1531  cCond = makeMatrix(tmpVector);
1532 
1533  tmpVector.clear();
1534  tmpVector.push_back( 1.4725525500);
1535  tmpVector.push_back( 0.0022218998);
1536  tmpVector.push_back(-0.0004406139);
1537  tmpVector.push_back( 6.047984E-06);
1538  tmpVector.push_back(-1.954730E-07);
1539  tmpVector.push_back(-2.372000E-09);
1540  tmpVector.push_back(-0.0411841566);
1541  tmpVector.push_back( 0.0001784479);
1542  tmpVector.push_back(-3.564413E-06);
1543  tmpVector.push_back( 4.064671E-08);
1544  tmpVector.push_back( 1.915000E-08);
1545  tmpVector.push_back( 0.0002572862);
1546  tmpVector.push_back(-9.226343E-07);
1547  tmpVector.push_back(-2.178577E-08);
1548  tmpVector.push_back(-9.529999E-10);
1549  tmpVector.push_back(-1.699844E-06);
1550  tmpVector.push_back(-1.023552E-07);
1551  tmpVector.push_back( 4.482000E-09);
1552  cVisc.clear();
1553  cVisc = makeMatrix(tmpVector);
1554 
1555  cTfreeze.clear();
1556  cTfreeze.push_back( 27.755555600); // reference concentration in per cent
1557  cTfreeze.push_back(-22.973221700);
1558  cTfreeze.push_back(-1.1040507200);
1559  cTfreeze.push_back(-0.0120762281);
1560  cTfreeze.push_back(-9.343458E-05);
1561 
1562  };
1563 
1565  double Tfreeze(double p, double x){
1567  std::vector<double> tmpVector(cTfreeze.begin()+1,cTfreeze.end());
1568  return polyval(tmpVector, x*100.0-cTfreeze[0])+273.15;
1569  }
1570 };
1571 
1572 
1573 class ZitrecAC : public SecCoolSolution{
1574 public:
1576 
1577  std::vector<double> tmpVector;
1578 
1579  name = std::string("ZiAC");
1580  description = std::string("ZitrecAC in water (corrosion inhibitor)");
1581  reference = std::string("SecCool Software");
1582 
1583  Tmin = 0 + 273.15;
1584  Tmax = 100 + 273.15;
1585  TminPsat = Tmax;
1586 
1587  xmin = 0.05;
1588  xmax = 0.50;
1589 
1590  Tbase = 50.00 + 273.15;
1591  xbase = 22.75 / 100.0;
1592 
1593  tmpVector.clear();
1594  tmpVector.push_back( 1003.4314200);
1595  tmpVector.push_back( 0.6164672840);
1596  tmpVector.push_back(-0.0075340011);
1597  tmpVector.push_back( 8.227043E-05);
1598  tmpVector.push_back( 1.416356E-05);
1599  tmpVector.push_back(-3.611589E-07);
1600  tmpVector.push_back(-0.4849253070);
1601  tmpVector.push_back(-0.0015163769);
1602  tmpVector.push_back(-3.076387E-05);
1603  tmpVector.push_back(-4.631673E-07);
1604  tmpVector.push_back( 3.958918E-08);
1605  tmpVector.push_back(-0.0053161289);
1606  tmpVector.push_back(-3.675038E-06);
1607  tmpVector.push_back( 2.245807E-06);
1608  tmpVector.push_back(-5.921160E-08);
1609  tmpVector.push_back(-2.222469E-05);
1610  tmpVector.push_back(-1.016950E-06);
1611  tmpVector.push_back( 1.391098E-08);
1612  cRho.clear();
1613  cRho = makeMatrix(tmpVector);
1614 
1615  tmpVector.clear();
1616  tmpVector.push_back( 4129.8221400);
1617  tmpVector.push_back(-2.4602756000);
1618  tmpVector.push_back( 0.0024608374);
1619  tmpVector.push_back(-0.0018878988);
1620  tmpVector.push_back(-7.525318E-05);
1621  tmpVector.push_back( 3.812299E-06);
1622  tmpVector.push_back( 0.3207990110);
1623  tmpVector.push_back(-0.0059380735);
1624  tmpVector.push_back(-0.0007210516);
1625  tmpVector.push_back( 1.852057E-05);
1626  tmpVector.push_back( 1.280127E-07);
1627  tmpVector.push_back( 0.0099912322);
1628  tmpVector.push_back( 0.0001857846);
1629  tmpVector.push_back(-2.266658E-06);
1630  tmpVector.push_back(-5.937414E-09);
1631  tmpVector.push_back(-0.0001641590);
1632  tmpVector.push_back(-1.708329E-06);
1633  tmpVector.push_back( 8.577111E-08);
1634  cHeat.clear();
1635  cHeat = makeMatrix(tmpVector);
1636 
1637  tmpVector.clear();
1638  tmpVector.push_back( 0.5997434470);
1639  tmpVector.push_back(-0.0014518043);
1640  tmpVector.push_back( 7.240125E-06);
1641  tmpVector.push_back(-6.458395E-07);
1642  tmpVector.push_back(-1.035513E-08);
1643  tmpVector.push_back( 6.862018E-10);
1644  tmpVector.push_back( 0.0011059284);
1645  tmpVector.push_back(-1.686714E-06);
1646  tmpVector.push_back(-1.542610E-08);
1647  tmpVector.push_back(-3.730822E-09);
1648  tmpVector.push_back( 1.286049E-11);
1649  tmpVector.push_back(-5.567860E-06);
1650  tmpVector.push_back( 5.331112E-08);
1651  tmpVector.push_back(-1.738845E-09);
1652  tmpVector.push_back( 2.641378E-11);
1653  tmpVector.push_back(-1.195582E-08);
1654  tmpVector.push_back(-3.329696E-10);
1655  tmpVector.push_back( 2.343560E-11);
1656  cCond.clear();
1657  cCond = makeMatrix(tmpVector);
1658 
1659  tmpVector.clear();
1660  tmpVector.push_back(-0.2833999350);
1661  tmpVector.push_back( 0.0113457408);
1662  tmpVector.push_back(-0.0002173449);
1663  tmpVector.push_back( 9.645169E-06);
1664  tmpVector.push_back( 6.299118E-07);
1665  tmpVector.push_back(-2.190184E-08);
1666  tmpVector.push_back(-0.0185725092);
1667  tmpVector.push_back(-8.290652E-05);
1668  tmpVector.push_back(-2.186512E-06);
1669  tmpVector.push_back( 1.126354E-07);
1670  tmpVector.push_back(-2.387450E-09);
1671  tmpVector.push_back( 0.0001256061);
1672  tmpVector.push_back( 1.147598E-06);
1673  tmpVector.push_back( 1.128849E-08);
1674  tmpVector.push_back(-1.723001E-09);
1675  tmpVector.push_back( 7.142151E-07);
1676  tmpVector.push_back(-5.140398E-09);
1677  tmpVector.push_back( 4.535194E-10);
1678  cVisc.clear();
1679  cVisc = makeMatrix(tmpVector);
1680 
1681  cTfreeze.clear();
1682  cTfreeze.push_back( 22.750000000); // reference concentration in per cent
1683  cTfreeze.push_back(-2.2469093100);
1684  cTfreeze.push_back(-0.0942887708);
1685  cTfreeze.push_back( 0.0002636562);
1686  cTfreeze.push_back( 9.008030E-07);
1687 
1688  };
1689 
1690 };
1691 
1692 
1694 public:
1696 
1697  std::vector<double> tmpVector;
1698 
1699  name = std::string("IceEA");
1700  description = std::string("Ethanol-water mixture with slurry ice");
1701  reference = std::string("SecCool Software");
1702 
1703  Tmin = -35 + 273.15;
1704  Tmax = -10 + 273.15;
1705  TminPsat = Tmax;
1706 
1707  xmin = 0.05;
1708  xmax = 0.35;
1709 
1710  Tbase = -22.5 + 273.15;
1711  xbase = 20.0 / 100.0;
1712 
1713  tmpVector.clear();
1714  tmpVector.push_back( 959.65328700);
1715  tmpVector.push_back(-0.6063295290);
1716  tmpVector.push_back(-1.249095E-05);
1717  tmpVector.push_back(-2.175929E-05);
1718  tmpVector.push_back( 1.414141E-06);
1719  tmpVector.push_back( 8.888899E-08);
1720  tmpVector.push_back( 0.4964468440);
1721  tmpVector.push_back(-0.0048152589);
1722  tmpVector.push_back(-3.703183E-05);
1723  tmpVector.push_back( 7.619048E-07);
1724  tmpVector.push_back( 1.454545E-07);
1725  tmpVector.push_back(-0.0105000000);
1726  tmpVector.push_back( 0.0001660431);
1727  tmpVector.push_back( 1.020408E-07);
1728  tmpVector.push_back(-1.587301E-07);
1729  tmpVector.push_back( 0.0003601411);
1730  tmpVector.push_back(-4.814815E-06);
1731  tmpVector.push_back( 1.763668E-08);
1732  cRho.clear();
1733  cRho = makeMatrix(tmpVector);
1734 
1735  tmpVector.clear();
1736  tmpVector.push_back( 8.241062E+04);
1737  tmpVector.push_back( 4133.4319000);
1738  tmpVector.push_back(-0.0525342683);
1739  tmpVector.push_back(-0.0332405251);
1740  tmpVector.push_back(-0.0007070707);
1741  tmpVector.push_back( -9.555626E-05);
1742  tmpVector.push_back(-175.73225900);
1743  tmpVector.push_back(-19.750427100);
1744  tmpVector.push_back(-0.5552331250);
1745  tmpVector.push_back(-0.0024634921);
1746  tmpVector.push_back( 0.0001094372);
1747  tmpVector.push_back(-20.031632700);
1748  tmpVector.push_back(-1.1448185800);
1749  tmpVector.push_back(-0.0049591837);
1750  tmpVector.push_back( 0.0003301587);
1751  tmpVector.push_back(-1.3004938300);
1752  tmpVector.push_back(-0.0241058201);
1753  tmpVector.push_back( 0.0012176367);
1754  cHeat.clear();
1755  cHeat = makeMatrix(tmpVector);
1756 
1757  tmpVector.clear();
1758  tmpVector.push_back( 0.5466734710);
1759  tmpVector.push_back( 0.0098512311);
1760  tmpVector.push_back( 6.916942E-05);
1761  tmpVector.push_back( 4.423616E-07);
1762  tmpVector.push_back( 1.313131E-09);
1763  tmpVector.push_back( 1.333317E-10);
1764  tmpVector.push_back( 0.0064403362);
1765  tmpVector.push_back( 6.261462E-05);
1766  tmpVector.push_back(-1.361660E-07);
1767  tmpVector.push_back(-4.190476E-09);
1768  tmpVector.push_back( 9.350649E-11);
1769  tmpVector.push_back( 1.914626E-05);
1770  tmpVector.push_back(-4.656462E-07);
1771  tmpVector.push_back(-5.544218E-09);
1772  tmpVector.push_back(-4.761923E-11);
1773  tmpVector.push_back( 1.093474E-08);
1774  tmpVector.push_back(-1.322751E-09);
1775  tmpVector.push_back( 1.763668E-11);
1776  cCond.clear();
1777  cCond = makeMatrix(tmpVector);
1778 
1779  tmpVector.clear();
1780  tmpVector.push_back( 3.9714277000);
1781  tmpVector.push_back( 0.0217778490);
1782  tmpVector.push_back(-0.0002520703);
1783  tmpVector.push_back( 3.339905E-06);
1784  tmpVector.push_back(-6.179120E-08);
1785  tmpVector.push_back( 2.654128E-09);
1786  tmpVector.push_back(-0.0820149233);
1787  tmpVector.push_back( 3.060191E-06);
1788  tmpVector.push_back(-1.789494E-07);
1789  tmpVector.push_back(-3.463500E-09);
1790  tmpVector.push_back(-5.507847E-11);
1791  tmpVector.push_back(-0.0010965961);
1792  tmpVector.push_back( 5.631692E-08);
1793  tmpVector.push_back( 1.027114E-08);
1794  tmpVector.push_back(-8.462427E-10);
1795  tmpVector.push_back(1.855647E-05);
1796  tmpVector.push_back( 6.616363E-09);
1797  tmpVector.push_back( 1.185315E-10);
1798  cVisc.clear();
1799  cVisc = makeMatrix(tmpVector);
1800 
1801  cTfreeze.clear();
1802  };
1804  double Tfreeze(double p, double x){
1805  return Tmin;
1806  }
1807 };
1808 
1809 
1811 public:
1813 
1814  std::vector<double> tmpVector;
1815 
1816  name = std::string("IcePG");
1817  description = std::string("Propylene glycol-water mixture with slurry ice");
1818  reference = std::string("SecCool Software");
1819 
1820  Tmin = -45 + 273.15;
1821  Tmax = -10 + 273.15;
1822  TminPsat = Tmax;
1823 
1824  xmin = 0.05;
1825  xmax = 0.35;
1826 
1827  Tbase = -27.5 + 273.15;
1828  xbase = 20.0 / 100.0;
1829 
1830  tmpVector.clear();
1831  tmpVector.push_back(1026.0807100);
1832  tmpVector.push_back(-1.5901706300);
1833  tmpVector.push_back( 0.0023632306);
1834  tmpVector.push_back(-5.555564E-05);
1835  tmpVector.push_back( 3.787877E-07);
1836  tmpVector.push_back( 1.500003E-07);
1837  tmpVector.push_back(-0.8565823200);
1838  tmpVector.push_back( 0.0158439454);
1839  tmpVector.push_back(-4.885161E-05);
1840  tmpVector.push_back( 5.820106E-07);
1841  tmpVector.push_back(-1.298701E-08);
1842  tmpVector.push_back(-0.0205963719);
1843  tmpVector.push_back( 0.0002962207);
1844  tmpVector.push_back(-3.287982E-07);
1845  tmpVector.push_back( 2.645504E-08);
1846  tmpVector.push_back(-0.0002976431);
1847  tmpVector.push_back( 3.477633E-06);
1848  tmpVector.push_back( 1.827802E-08);
1849  cRho.clear();
1850  cRho = makeMatrix(tmpVector);
1851 
1852  tmpVector.clear();
1853  tmpVector.push_back( 9.202807E+04);
1854  tmpVector.push_back( 4259.8599100);
1855  tmpVector.push_back(-13.425892900);
1856  tmpVector.push_back( 0.1972224350);
1857  tmpVector.push_back( 0.0016666667);
1858  tmpVector.push_back( 2.333263E-05);
1859  tmpVector.push_back(-1347.4964300);
1860  tmpVector.push_back(-40.622180100);
1861  tmpVector.push_back( 1.2466366000);
1862  tmpVector.push_back(-0.0089735450);
1863  tmpVector.push_back(-0.0002542569);
1864  tmpVector.push_back( 9.1439909300);
1865  tmpVector.push_back( 0.3821466440);
1866  tmpVector.push_back(-0.0142154195);
1867  tmpVector.push_back(-0.0004074074);
1868  tmpVector.push_back( 0.4962000960);
1869  tmpVector.push_back( 0.0010591631);
1870  tmpVector.push_back(-0.0011599808);
1871  cHeat.clear();
1872  cHeat = makeMatrix(tmpVector);
1873 
1874  tmpVector.clear();
1875  tmpVector.push_back( 0.5308857010);
1876  tmpVector.push_back( 0.0102779335);
1877  tmpVector.push_back( 6.990287E-05);
1878  tmpVector.push_back( 4.527783E-07);
1879  tmpVector.push_back( 3.030303E-09);
1880  tmpVector.push_back( 9.999831E-11);
1881  tmpVector.push_back( 0.0037803301);
1882  tmpVector.push_back( 3.128644E-05);
1883  tmpVector.push_back(-1.033550E-07);
1884  tmpVector.push_back(-3.809524E-09);
1885  tmpVector.push_back( 4.617604E-11);
1886  tmpVector.push_back( 8.588549E-05);
1887  tmpVector.push_back( 3.319350E-07);
1888  tmpVector.push_back(-5.147392E-09);
1889  tmpVector.push_back(-1.164022E-10);
1890  tmpVector.push_back( 2.443001E-06);
1891  tmpVector.push_back( 8.542569E-09);
1892  tmpVector.push_back(-1.558442E-10);
1893  cCond.clear();
1894  cCond = makeMatrix(tmpVector);
1895 
1896  tmpVector.clear();
1897  tmpVector.push_back( 5.4382616400);
1898  tmpVector.push_back( 0.0178821732);
1899  tmpVector.push_back(-0.0001873851);
1900  tmpVector.push_back( 2.395101E-06);
1901  tmpVector.push_back(-3.751781E-08);
1902  tmpVector.push_back( 5.875223E-10);
1903  tmpVector.push_back(-0.1513106190);
1904  tmpVector.push_back(-6.271586E-06);
1905  tmpVector.push_back( 3.964457E-07);
1906  tmpVector.push_back(-1.180828E-08);
1907  tmpVector.push_back( 9.672800E-11);
1908  tmpVector.push_back(-0.0002684929);
1909  tmpVector.push_back(-1.099919E-07);
1910  tmpVector.push_back( 6.150740E-09);
1911  tmpVector.push_back(-1.902903E-10);
1912  tmpVector.push_back(-4.725022E-06);
1913  tmpVector.push_back(-1.027292E-10);
1914  tmpVector.push_back( 8.515353E-11);
1915  cVisc.clear();
1916  cVisc = makeMatrix(tmpVector);
1917 
1918  cTfreeze.clear();
1919  };
1921  double Tfreeze(double p, double x){
1922  return Tmin;
1923  }
1924 };
1925 
1926 
1928 public:
1930 
1931  std::vector<double> tmpVector;
1932 
1933  name = std::string("IceNA");
1934  description = std::string("Sodium chloride-water mixture with slurry ice");
1935  reference = std::string("SecCool Software");
1936 
1937  Tmin = -20 + 273.15;
1938  Tmax = -5 + 273.15;
1939  TminPsat = Tmax;
1940 
1941  xmin = 0.05;
1942  xmax = 0.35;
1943 
1944  Tbase = -12.5 + 273.15;
1945  xbase = 20.0 / 100.0;
1946 
1947  tmpVector.clear();
1948  tmpVector.push_back( 1081.6353100);
1949  tmpVector.push_back(-2.4559523700);
1950  tmpVector.push_back( 0.0058152057);
1951  tmpVector.push_back(-7.500013E-05);
1952  tmpVector.push_back(-7.575759E-07);
1953  tmpVector.push_back( 1.666671E-07);
1954  tmpVector.push_back(-5.6609963900);
1955  tmpVector.push_back( 0.1002726190);
1956  tmpVector.push_back(-0.0004797330);
1957  tmpVector.push_back( 1.333333E-06);
1958  tmpVector.push_back( 3.636364E-08);
1959  tmpVector.push_back(-0.0852857143);
1960  tmpVector.push_back( 0.0007904762);
1961  tmpVector.push_back( 1.428571E-06);
1962  tmpVector.push_back( 6.666668E-07);
1963  tmpVector.push_back(-0.0037650794);
1964  tmpVector.push_back( 3.333333E-05);
1965  tmpVector.push_back( 6.984127E-07);
1966  cRho.clear();
1967  cRho = makeMatrix(tmpVector);
1968 
1969  tmpVector.clear();
1970  tmpVector.push_back( 7.434384E+04);
1971  tmpVector.push_back( 3669.8467100);
1972  tmpVector.push_back(-2.0844426400);
1973  tmpVector.push_back( 0.0312501929);
1974  tmpVector.push_back(-0.0002727273);
1975  tmpVector.push_back(-8.333396E-05);
1976  tmpVector.push_back(-794.24689800);
1977  tmpVector.push_back(-33.895515900);
1978  tmpVector.push_back( 0.3610772000);
1979  tmpVector.push_back(-0.0016888889);
1980  tmpVector.push_back( 0.0001406061);
1981  tmpVector.push_back( 12.209523800);
1982  tmpVector.push_back( 0.3702381290);
1983  tmpVector.push_back(-0.0099523810);
1984  tmpVector.push_back( 0.0001333331);
1985  tmpVector.push_back(-0.1358730160);
1986  tmpVector.push_back( 0.0145714286);
1987  tmpVector.push_back(-0.0014412698);
1988  cHeat.clear();
1989  cHeat = makeMatrix(tmpVector);
1990 
1991  tmpVector.clear();
1992  tmpVector.push_back( 0.7579141770);
1993  tmpVector.push_back( 0.0124563700);
1994  tmpVector.push_back( 5.749080E-05);
1995  tmpVector.push_back( 2.263889E-07);
1996  tmpVector.push_back(-7.575758E-10);
1997  tmpVector.push_back( 1.333333E-10);
1998  tmpVector.push_back( 0.0009894098);
1999  tmpVector.push_back(-5.386429E-05);
2000  tmpVector.push_back( 2.049928E-07);
2001  tmpVector.push_back( 1.333333E-09);
2002  tmpVector.push_back(-3.757576E-10);
2003  tmpVector.push_back( 8.761905E-06);
2004  tmpVector.push_back(-9.531746E-07);
2005  tmpVector.push_back( 3.809524E-09);
2006  tmpVector.push_back( 2.222222E-10);
2007  tmpVector.push_back(-9.777778E-07);
2008  tmpVector.push_back(-5.904762E-08);
2009  tmpVector.push_back(-1.269841E-10);
2010  cCond.clear();
2011  cCond = makeMatrix(tmpVector);
2012 
2013  tmpVector.clear();
2014  tmpVector.push_back( 1.9270346900);
2015  tmpVector.push_back( 0.0216118832);
2016  tmpVector.push_back(-0.0002820062);
2017  tmpVector.push_back( 4.476720E-06);
2018  tmpVector.push_back(-9.032034E-08);
2019  tmpVector.push_back( 2.020892E-09);
2020  tmpVector.push_back(-0.0713269985);
2021  tmpVector.push_back(-2.729779E-05);
2022  tmpVector.push_back( 2.115509E-06);
2023  tmpVector.push_back(-7.777973E-08);
2024  tmpVector.push_back( 2.272317E-09);
2025  tmpVector.push_back( 0.0003930707);
2026  tmpVector.push_back(-7.171429E-07);
2027  tmpVector.push_back( 4.470017E-08);
2028  tmpVector.push_back(-1.194034E-09);
2029  tmpVector.push_back( 2.156903E-05);
2030  tmpVector.push_back(-1.127279E-08);
2031  tmpVector.push_back( 3.086759E-09);
2032  cVisc.clear();
2033  cVisc = makeMatrix(tmpVector);
2034 
2035  cTfreeze.clear();
2036  };
2038  double Tfreeze(double p, double x){
2039  return Tmin;
2040  }
2041 };
2042 
2043 
2044 class PK2000 : public SecCoolSolution{
2045 protected:
2046  std::vector<double> cMaVo;
2047 public:
2049 
2050  std::vector<double> tmpVector;
2051 
2052  name = std::string("PK2000");
2053  description = std::string("Pekasol 2000 in water (Potassium acetate and formate)");
2054  reference = std::string("SecCool Software");
2055 
2056  Tmin = -62 + 273.15;
2057  Tmax = 100 + 273.15;
2058  TminPsat = Tmax;
2059 
2060  xmin = 0.36;
2061  xmax = 1.00;
2062 
2063  Tbase = 33.31 + 273.15;
2064  xbase = 67.60 / 100.0; // volume percent!
2065 
2066  tmpVector.clear();
2067  tmpVector.push_back( 1197.8306300);
2068  tmpVector.push_back( 2.7580390000);
2069  tmpVector.push_back(-0.0046328716);
2070  tmpVector.push_back(-2.118894E-05);
2071  tmpVector.push_back( 5.174717E-08);
2072  tmpVector.push_back( 2.265693E-09);
2073  tmpVector.push_back(-0.5038076360);
2074  tmpVector.push_back(-0.0020754530);
2075  tmpVector.push_back( 7.670317E-06);
2076  tmpVector.push_back( 1.443587E-08);
2077  tmpVector.push_back(-1.451878E-09);
2078  tmpVector.push_back(-0.0015712351);
2079  tmpVector.push_back( 2.546509E-05);
2080  tmpVector.push_back(-8.010506E-08);
2081  tmpVector.push_back(-4.948979E-10);
2082  tmpVector.push_back( 2.947414E-08);
2083  tmpVector.push_back(-4.747692E-09);
2084  tmpVector.push_back( 8.927986E-11);
2085  cRho.clear();
2086  cRho = makeMatrix(tmpVector);
2087 
2088  tmpVector.clear();
2089  tmpVector.push_back( 3012.5363200);
2090  tmpVector.push_back(-11.345089400);
2091  tmpVector.push_back( 0.0512475571);
2092  tmpVector.push_back(-0.0004261743);
2093  tmpVector.push_back( 5.582778E-06);
2094  tmpVector.push_back( 2.339332E-08);
2095  tmpVector.push_back( 1.8771264300);
2096  tmpVector.push_back(-0.0024687047);
2097  tmpVector.push_back(-0.0001136660);
2098  tmpVector.push_back(-3.281309E-06);
2099  tmpVector.push_back(-2.598223E-08);
2100  tmpVector.push_back(-0.0117207757);
2101  tmpVector.push_back( 0.0001728598);
2102  tmpVector.push_back( 2.221588E-06);
2103  tmpVector.push_back(-1.099247E-07);
2104  tmpVector.push_back( 6.566134E-05);
2105  tmpVector.push_back( 3.261243E-06);
2106  tmpVector.push_back(-5.841138E-08);
2107  cHeat.clear();
2108  cHeat = makeMatrix(tmpVector);
2109 
2110  tmpVector.clear();
2111  tmpVector.push_back( 0.5060902210);
2112  tmpVector.push_back(-0.0015058953);
2113  tmpVector.push_back( 4.296707E-06);
2114  tmpVector.push_back(-1.171421E-09);
2115  tmpVector.push_back(-5.116965E-12);
2116  tmpVector.push_back( 8.612329E-14);
2117  tmpVector.push_back( 0.0009077322);
2118  tmpVector.push_back(-4.052813E-06);
2119  tmpVector.push_back( 8.942927E-09);
2120  tmpVector.push_back(-3.126326E-11);
2121  tmpVector.push_back( 1.729361E-12);
2122  tmpVector.push_back( 2.222018E-09);
2123  tmpVector.push_back(-4.276078E-10);
2124  tmpVector.push_back(-3.160239E-11);
2125  tmpVector.push_back( 1.220910E-12);
2126  tmpVector.push_back( 3.600639E-10);
2127  tmpVector.push_back(-3.839049E-11);
2128  tmpVector.push_back( 7.540478E-13);
2129  cCond.clear();
2130  cCond = makeMatrix(tmpVector);
2131 
2132  tmpVector.clear();
2133  tmpVector.push_back( 0.5631031820);
2134  tmpVector.push_back( 0.0147645079);
2135  tmpVector.push_back(-1.024523E-05);
2136  tmpVector.push_back(-7.780506E-07);
2137  tmpVector.push_back( 1.243805E-08);
2138  tmpVector.push_back( 7.494764E-12);
2139  tmpVector.push_back(-0.0199399025);
2140  tmpVector.push_back(-1.895556E-05);
2141  tmpVector.push_back(-8.956373E-07);
2142  tmpVector.push_back(-1.780877E-08);
2143  tmpVector.push_back( 9.735698E-11);
2144  tmpVector.push_back( 0.0001153086);
2145  tmpVector.push_back( 2.823599E-07);
2146  tmpVector.push_back( 7.608202E-09);
2147  tmpVector.push_back(-3.413081E-10);
2148  tmpVector.push_back(-1.580556E-06);
2149  tmpVector.push_back(-1.693264E-08);
2150  tmpVector.push_back(-1.648529E-10);
2151  cVisc.clear();
2152  cVisc = makeMatrix(tmpVector);
2153 
2154  cTfreeze.clear();
2155  cTfreeze.push_back( 65.000000000); // reference concentration in per cent
2156  cTfreeze.push_back(-28.549321300);
2157  cTfreeze.push_back(-0.7312947390);
2158  cTfreeze.push_back(-0.0061085973);
2159  cTfreeze.push_back(-8.714598E-06);
2160 
2161  cMaVo.clear();
2162  cMaVo.push_back( 63.693536900);
2163  cMaVo.push_back( 1.0864767400);
2164  cMaVo.push_back( 0.0033972173);
2165  cMaVo.push_back( 1.986130E-05);
2166 
2167  };
2168 
2169  // Redefine x_m to convert from mass to volume fraction
2170  // M1 = M-M_m
2171  // Vol% = A[1] + A[2]*M1 + A[3]*M1^2 + A[4]*M1^3
2172  double getxInput(double curxValue){
2173  double xVolume = polyval(cMaVo, (curxValue*100.-69.92));
2174  return xVolume-xbase*100.0;
2175  }
2176 
2177 
2178 };
2179 
2180 #endif
double c(double T_K, double p, double x)
Heat capacities as a function of temperature, pressure and composition.
static double const M_LiBr
std::vector< std::vector< double > > cVisc
virtual double cp(double T_K, double p, double x)
double h(double T_K, double p, double x)
Enthalpy as a function of temperature, pressure and composition.
virtual double cv(double T_K, double p, double x)
virtual double c(double T_K, double p, double x)
Heat capacities as a function of temperature, pressure and composition.
double h_H2O(double T)
Class to use Melinder and SecCool parameters.
The base class for incompressible fluids only.
Definition: IncompBase.h:16
static double const M_H2O
double rho(double T_K, double p, double x)
Density as a function of temperature, pressure and composition.
double s(double T_K, double p, double x)
Entropy as a function of temperature, pressure and composition.
virtual double s(double T_K, double p, double x)
Entropy as a function of temperature, pressure and composition.
std::string getSolutionName(std::string name)
double psat(double T_K, double x)
Saturation pressure as a function of temperature and composition.
virtual double visc(double T_K, double p, double x)
Viscosity as a function of temperature, pressure and composition.
double polyfracintcentral(std::vector< double > const &coefficients, double T, double Tbase)
Definition: IncompBase.h:308
virtual double cond(double T_K, double p, double x)
Thermal conductivity as a function of temperature, pressure and composition.
double cp_mix(double T, double x)
bool checkTPX(double T, double p, double x)
Check validity of temperature, pressure and composition input.
virtual double psat(double T_K, double x)
Saturation pressure as a function of temperature and composition.
std::vector< std::vector< double > > getcCond() const
std::vector< std::vector< double > > cRho
double getTInput(double curTValue)
double Tfreeze(double p, double x)
Define freezing point calculations.
std::string reference
Definition: IncompBase.h:21
static double const T0
bool IsIncompressibleSolution(std::string name)
double rho_mix(double T, double x)
std::vector< std::vector< double > > cHeat
std::vector< std::vector< double > > getcPsat() const
virtual double u(double T_K, double p, double x)
Internal energy as a function of temperature, pressure and composition.
double h(double T_K, double p, double x)
Enthalpy as a function of temperature, pressure and composition.
double polyint(std::vector< double > const &coefficients, double T)
Definition: IncompBase.h:227
double getSolutionConc(std::string name)
double c(double T_K, double p, double x)
Heat capacities as a function of temperature, pressure and composition.
double h_mix(double T, double x)
double cond(double T_K, double p, double x)
Thermal conductivity as a function of temperature, pressure and composition.
bool checkT(double T_K, double p, double x)
Check validity of temperature input.
std::vector< std::vector< double > > cPsat
double rho(double T_K, double p, double x)
Density as a function of temperature, pressure and composition.
std::string description
Definition: IncompBase.h:20
double h_u(double T_K, double p, double x)
Enthalpy from x, u, p and rho.
double getTbase() const
double massToMole(double w)
double ps_H2O(double T)
Base class for simplified brine/solution models.
std::string format(const char *fmt,...)
double visc(double T_K, double p, double x)
Viscosity as a function of temperature, pressure and composition.
double getxInput(double curxValue)
std::vector< std::vector< double > > makeMatrix(std::vector< double > const &coefficients)
std::vector< double > cTfreeze
std::vector< std::vector< double > > getcHeat() const
double Tfreeze(double p, double x)
Define freezing point calculations.
double s_H2O(double T)
virtual double h(double T_K, double p, double x)
Enthalpy as a function of temperature, pressure and composition.
double s(double T_K, double p, double x)
Entropy as a function of temperature, pressure and composition.
double Tfreeze(double p, double x)
Freezing temperature as a function of pressure and composition.
static const bool debug
double s_mix(double T, double x)
Class to access Lithium-Bromide solutions.
std::vector< double > x(ncmax, 0)
void testInputs(double T_K, double p, double x)
Base class for simplified brine/solution models.
static double const pc_H2O
double baseFunction(std::vector< double > const &coefficients, double T_K, double p, double x)
Some more general purpose functions.
IncompressibleSolution * get_solution(long index)
double expval(std::vector< double > const &coefficients, double T, int n)
Definition: IncompBase.cpp:812
double u(double T_K, double p, double x)
Internal energy as a function of temperature, pressure and composition.
double getxbase() const
virtual double rho(double T_K, double p, double x)
Density as a function of temperature, pressure and composition.
bool checkP(double T_K, double p, double x)
Check validity of pressure input.
double cond(double T_K, double p, double x)
Thermal conductivity as a function of temperature, pressure and composition.
double cp_H2O(double T)
double u(double T_K, double p, double x)
Internal energy as a function of temperature, pressure and composition.
std::vector< std::vector< double > > convertCoeffs(double *oldestCoeffs, int A, int B)
Convert pre-v4.0-style coefficient array to new format.
static double const Tt_H2O
double Tfreeze(double p, double x)
Define freezing point calculations.
static double const Tc_H2O
double u_h(double T_K, double p, double x)
Internal energy from x, h, p and rho.
std::vector< std::vector< double > > cCond
double visc(double T_K, double p, double x)
Viscosity as a function of temperature, pressure and composition.
double rho_H2O(double T)
static double const sc_H2O
bool checkCoefficients(std::vector< double > const &coefficients, unsigned int n)
Basic checks for coefficient vectors.
Definition: IncompBase.cpp:16
static double const cpt_H2O
bool checkX(double x)
Check validity of composition input.
double polyval(std::vector< double > const &coefficients, double x)
Definition: IncompBase.h:210
double molarToSpecific(double w, double value)
double ps_mix(double T, double x)
static double const rhoc_H2O
double Tfreeze(double p, double x)
Define freezing point calculations.
double getxInput(double curxValue)
void set_solutions(std::vector< IncompressibleSolution * > list)
std::vector< double > get_col(std::vector< std::vector< double > > const &in, size_t col)
Definition: MatrixMath.cpp:226
std::vector< double > getcTfreeze() const
static double const hc_H2O
std::vector< double > cMaVo
std::string name
Definition: IncompBase.h:19
double IncompSolutionSI(long iOutput, double T, double p, double x, long iFluid)
double Tfreeze(double p, double x)
Define freezing point calculations.
std::vector< std::vector< double > > getcRho() const
std::vector< std::vector< double > > getcVisc() const
virtual double Tfreeze(double p, double x)
Freezing temperature as a function of pressure and composition.