OGS
DensityLegacy.cpp
Go to the documentation of this file.
1
10
#include "
DensityLegacy.h
"
11
12
namespace
13
{
14
// parameters from least squares fit (experimental data)
15
const
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
22
namespace
Adsorption
23
{
24
double
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
35
double
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)
45
double
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
57
double
DensityLegacy::dCharacteristicCurve
(
const
double
A)
const
58
{
59
return
dCurvePolyfrac
(DensityLegacy_c, A);
60
}
61
62
}
// namespace Adsorption
DensityLegacy.h
Adsorption::DensityLegacy::characteristicCurve
double characteristicCurve(const double A) const override
Definition
DensityLegacy.cpp:45
Adsorption::DensityLegacy::getAlphaT
double getAlphaT(const double T_Ads) const override
Definition
DensityLegacy.cpp:35
Adsorption::DensityLegacy::dCharacteristicCurve
double dCharacteristicCurve(const double A) const override
Definition
DensityLegacy.cpp:57
Adsorption::DensityLegacy::getAdsorbateDensity
double getAdsorbateDensity(const double T_Ads) const override
Definition
DensityLegacy.cpp:24
Adsorption
Definition
Adsorption.cpp:38
Adsorption::curvePolyfrac
double curvePolyfrac(const double *coeffs, const double x)
Definition
Adsorption.h:52
Adsorption::dCurvePolyfrac
double dCurvePolyfrac(const double *coeffs, const double x)
Definition
Adsorption.h:61
anonymous_namespace{DensityLegacy.cpp}::DensityLegacy_c
const double DensityLegacy_c[]
Definition
DensityLegacy.cpp:15
MaterialLib
Adsorption
DensityLegacy.cpp
Generated by
1.11.0