OGS 6.2.1-372-g67eca524a.dirty.20190919230349
Density100MPa.cpp
Go to the documentation of this file.
1 
10 #include "Density100MPa.h"
11 
12 namespace
13 {
14 
15 // NaX_HighP_polyfrac_CC.pickle
16 // date extracted 2015-06-23 15:38:35 file mtime 2015-06-23 15:19:57
17 const double c[] = {
18  0.3490302932983226, /* a0 */
19  -0.0014061345691831226, /* a1 */
20  -0.0007399303393402753, /* a2 */
21  5.129318840267485e-09, /* a3 */
22  5.243619689772646e-07, /* a4 */
23  6.347011955956523e-10, /* a5 */
24  -9.919599580166727e-11 /* a6 */
25 };
26 
27 } // namespace
28 
29 namespace Adsorption
30 {
31 
32 double Density100MPa::getAdsorbateDensity(const double T_Ads) const
33 {
34  return -0.0013*T_Ads*T_Ads + 0.3529*T_Ads + 1049.2;
35 }
36 
37 // Thermal expansivity model for water found in the works of Hauer
38 double Density100MPa::getAlphaT(const double T_Ads) const
39 {
40  const double rho = -0.0013*T_Ads*T_Ads+0.3529*T_Ads+1049.2;
41  const double drhodT = -0.0026*T_Ads + 0.3529;
42 
43  return - drhodT / rho;
44 }
45 
46 // Characteristic curve. Return W (A)
47 double Density100MPa::characteristicCurve(const double A) const
48 {
49  double W = curvePolyfrac(c, A); // cm^3/g
50 
51  if (W < 0.0) {
52  W = 0.0; // TODO [CL] debug output
53  }
54 
55  return W/1.e3; // m^3/kg
56 }
57 
58 double Density100MPa::dCharacteristicCurve(const double A) const
59 {
60  return dCurvePolyfrac(c, A);
61 }
62 
63 } // namespace Adsorption
double curvePolyfrac(const double *coeffs, const double x)
Definition: Adsorption.h:66
double getAdsorbateDensity(const double T_Ads) const override
double getAlphaT(const double T_Ads) const override
double dCharacteristicCurve(const double A) const override
double dCurvePolyfrac(const double *coeffs, const double x)
Definition: Adsorption.h:73
double characteristicCurve(const double A) const override