OGS
DensityLegacy.cpp
Go to the documentation of this file.
1
10#include "DensityLegacy.h"
11
12namespace
13{
14// parameters from least squares fit (experimental data)
15const double DensityLegacy_c[] = {
16 0.34102920966608297, -0.0013106032830951296, -0.00060754147575378876,
17 3.7843404172683339e-07, 4.0107503869519016e-07, 3.1274595098338057e-10,
18 -7.610441241719489e-11};
19
20} // namespace
21
22namespace Adsorption
23{
24double DensityLegacy::getAdsorbateDensity(const double T_Ads) const
25{
26 // set reference state for adsorbate EOS in Hauer
27 const double T0 = 293.15;
28 const double rho0 = 998.084;
29 const double alpha0 = 2.06508e-4; // K; kg/m^3; 1/K
30
31 return (rho0 * (1. - alpha0 * (T_Ads - T0))); // in kg/m^3
32}
33
34// Thermal expansivity model for water found in the works of Hauer
35double DensityLegacy::getAlphaT(const double T_Ads) const
36{
37 // set reference state for adsorbate EOS in Hauer
38 const double T0 = 293.15;
39 const double alpha0 = 2.06508e-4; // K; 1/K
40
41 return (alpha0 / (1. - alpha0 * (T_Ads - T0))); // in 1/K
42}
43
44// Characteristic curve. Return W (A)
45double DensityLegacy::characteristicCurve(const double A) const
46{
47 double W = curvePolyfrac(DensityLegacy_c, A); // cm^3/g
48
49 if (W < 0.0)
50 {
51 W = 0.0; // TODO [CL] debug output
52 }
53
54 return W / 1.e3; // m^3/kg
55}
56
57double DensityLegacy::dCharacteristicCurve(const double A) const
58{
59 return dCurvePolyfrac(DensityLegacy_c, A);
60}
61
62} // namespace Adsorption
double characteristicCurve(const double A) const override
double getAlphaT(const double T_Ads) const override
double dCharacteristicCurve(const double A) const override
double getAdsorbateDensity(const double T_Ads) 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