OGS
DensityDubinin.cpp
Go to the documentation of this file.
1
10#include "DensityDubinin.h"
11
12#include "Adsorption.h"
13#include "DensityCook.h"
15
16namespace
17{
18// NaX_Dubinin_polyfrac_CC.pickle
19// date extracted 2015-06-23 16:47:50 file mtime 2015-06-23 16:47:23
20const double DensityDubinin_c[] = {
21 0.3635538371322433, /* a0 */
22 -0.0014521033261199435, /* a1 */
23 -0.0007855160157616825, /* a2 */
24 4.385666000850253e-08, /* a3 */
25 5.567776459188524e-07, /* a4 */
26 6.026002134230559e-10, /* a5 */
27 -1.0477401124006098e-10 /* a6 */
28};
29
30} // namespace
31
32namespace Adsorption
33{
34double DensityDubinin::getAdsorbateDensity(const double T_Ads) const
35{
36 const double Tb = 373.1;
37
38 if (T_Ads < Tb)
39 {
40 return rhoWaterDean(T_Ads);
41 }
42 const double Tc = 647.3; // K
43 const double pc = 221.2e5; // Pa
44 // boiling point density
45 const double rhob = rhoWaterDean(Tb);
46 // state values
49 const double b = R * Tc / (8. * pc); // m^3/mol
50 const double rhom = M / b; // kg/m^3
51 const double rho = rhob - (rhob - rhom) / (Tc - Tb) * (T_Ads - Tb);
52 return rho;
53}
54
55// Thermal expansivity model for water found in the works of Hauer
56double DensityDubinin::getAlphaT(const double T_Ads) const
57{
58 const double Tb = 373.1;
59 if (T_Ads <= Tb)
60 {
61 return alphaTWaterDean(T_Ads);
62 }
63 // critical T and p
64 const double Tc = 647.3; // K
65 // const double rhoc = 322.; // kg/m^3
66 const double pc = 221.2e5; // Pa
67 // boiling point density
68 const double rhob = rhoWaterDean(Tb);
69 // state values
72 const double b = R * Tc / (8. * pc); // m^3/mol
73 const double rhom = M / (b); // kg/m^3
74 const double rho = rhob - (rhob - rhom) / (Tc - Tb) * (T_Ads - Tb);
75 return ((rhob - rhom) / (Tc - Tb) * 1. / rho);
76}
77
78// Characteristic curve. Return W (A)
79double DensityDubinin::characteristicCurve(const double A) const
80{
81 double W = curvePolyfrac(DensityDubinin_c, A); // cm^3/g
82
83 if (W < 0.0)
84 {
85 W = 0.0; // TODO [CL] debug output
86 }
87
88 return W / 1.e3; // m^3/kg
89}
90
91double DensityDubinin::dCharacteristicCurve(const double A) const
92{
93 return dCurvePolyfrac(DensityDubinin_c, A);
94}
95
96} // namespace Adsorption
double dCharacteristicCurve(const double A) const override
double getAlphaT(const double T_Ads) const override
double getAdsorbateDensity(const double T_Ads) const override
double characteristicCurve(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
double rhoWaterDean(const double T_Ads)
Definition DensityCook.h:26
double alphaTWaterDean(const double T_Ads)
Definition DensityCook.h:41