OGS
DensityNunez.cpp
Go to the documentation of this file.
1
10#include "DensityNunez.h"
11
12namespace
13{
14// NaX_Nunez_polyfrac_CC.pickle
15// date extracted 2015-06-23 15:38:35 file mtime 2015-06-23 15:19:34
16const double DensityNunez_c[] = {
17 0.3631900485031771, /* a0 */
18 -0.0014242280940080726, /* a1 */
19 -0.0007751726942386291, /* a2 */
20 2.1775655036811842e-08, /* a3 */
21 5.488166913667265e-07, /* a4 */
22 6.204064716725214e-10, /* a5 */
23 -1.0345385018952998e-10 /* a6 */
24};
25
26} // namespace
27
28namespace Adsorption
29{
30double DensityNunez::getAdsorbateDensity(const double T_Ads) const
31{
32 // TODO admissible T range: 273.16 K <= T_Ads <= 633.15 K
33 const double a[] = {1.0644e3, -8.01905, 1.445348e-2, -4.19589e-6,
34 -4.5294e-9};
35 const double b[] = {-8.039e-3, 1.8698e-5, -2.3015e-8, 2.3809e-11,
36 -1.388e-14};
37 const double u =
38 a[0] + T_Ads * (a[1] + T_Ads * (a[2] + T_Ads * (a[3] + T_Ads * a[4])));
39 const double v =
40 1.0 +
41 T_Ads *
42 (b[0] +
43 T_Ads * (b[1] + T_Ads * (b[2] + T_Ads * (b[3] + T_Ads * b[4]))));
44 return u / v;
45}
46
47// Thermal expansivity model for water found in the works of Hauer
48double DensityNunez::getAlphaT(const double T_Ads) const
49{
50 // TODO admissible T range: 273.16 K <= T_Ads <= 633.15 K
51 const double a[] = {1.0644e3, -8.01905, 1.445348e-2, -4.19589e-6,
52 -4.5294e-9};
53 const double b[] = {-8.039e-3, 1.8698e-5, -2.3015e-8, 2.3809e-11,
54 -1.388e-14};
55 const double u =
56 a[0] + T_Ads * (a[1] + T_Ads * (a[2] + T_Ads * (a[3] + T_Ads * a[4])));
57 const double v =
58 1.0 +
59 T_Ads *
60 (b[0] +
61 T_Ads * (b[1] + T_Ads * (b[2] + T_Ads * (b[3] + T_Ads * b[4]))));
62 const double du =
63 a[1] + T_Ads * (2.0 * a[2] + T_Ads * (3.0 * a[3] + T_Ads * 4.0 * a[4]));
64 const double dv =
65 b[0] + T_Ads * (2.0 * b[1] +
66 T_Ads * (3.0 * b[2] +
67 T_Ads * (4.0 * b[3] + T_Ads * 5.0 * b[4])));
68 return dv / v - du / u;
69}
70
71// Characteristic curve. Return W (A)
72double DensityNunez::characteristicCurve(const double A) const
73{
74 double W = curvePolyfrac(DensityNunez_c, A); // cm^3/g
75
76 if (W < 0.0)
77 {
78 W = 0.0; // TODO [CL] debug output
79 }
80
81 return W / 1.e3; // m^3/kg
82}
83
84double DensityNunez::dCharacteristicCurve(const double A) const
85{
86 return dCurvePolyfrac(DensityNunez_c, A);
87}
88
89} // namespace Adsorption
double getAlphaT(const double T_Ads) const override
double characteristicCurve(const double A) const override
double getAdsorbateDensity(const double T_Ads) const override
double dCharacteristicCurve(const double A) const override
double curvePolyfrac(const double *coeffs, const double x)
Definition Adsorption.h:52
double dCurvePolyfrac(const double *coeffs, const double x)
Definition Adsorption.h:61