OGS
Adsorption Namespace Reference

Classes

class  AdsorptionReaction
 
class  Density100MPa
 
class  DensityConst
 
class  DensityCook
 
class  DensityDubinin
 
class  DensityHauer
 
class  DensityLegacy
 
class  DensityMette
 
class  DensityNunez
 
class  Reaction
 
class  ReactionCaOH2
 
class  ReactionInert
 
class  ReactionSinusoidal
 

Functions

double curvePolyfrac (const double *coeffs, const double x)
 
double dCurvePolyfrac (const double *coeffs, const double x)
 
double rhoWaterDean (const double T_Ads)
 
double alphaTWaterDean (const double T_Ads)
 
double rhoWaterHauer (const double T_Ads)
 

Variables

constexpr double reaction_enthalpy = -1.12e+05
 reaction enthalpy in J/mol; negative for exothermic composition reaction
 
constexpr double reaction_entropy = -143.5
 reaction entropy in J/mol/K
 
constexpr double M_carrier = MaterialLib::PhysicalConstant::MolarMass::N2
 inert component molar mass
 
constexpr double M_react = MaterialLib::PhysicalConstant::MolarMass::Water
 reactive component molar mass
 
constexpr double tol_l = 1e-4
 
constexpr double tol_u = 1.0 - 1e-4
 
constexpr double tol_rho = 0.1
 

Function Documentation

◆ alphaTWaterDean()

double Adsorption::alphaTWaterDean ( const double T_Ads)
inline

Definition at line 41 of file DensityCook.h.

42{
43 const double Tcel = T_Ads - 273.15;
44 const double b[] = { 999.9,2.03E-02,-6.16E-03,2.26E-05,-4.68E-08 };
45 if (Tcel <= 100.) {
46 const double r = b[0] + Tcel * (b[1] + Tcel * (b[2] + Tcel * (b[3] + Tcel * b[4]) ) );
47 return -1.0/r * ( b[1] + Tcel * (2.0*b[2] + Tcel * (3.0*b[3] + Tcel * 4.0*b[4]) ) );
48 }
49
50 const double rho_100 =
51 b[0] + b[1] * 1.e2 + b[2] * 1.e4 + b[3] * 1.e6 + b[4] * 1.e8;
52 const double aT_100 = -1. / rho_100 * (b[1] + 2. * b[2] * 1.e2 +
53 3. * b[3] * 1.e4 + 4. * b[4] * 1.e6);
54 return aT_100 / (1. - aT_100 * (Tcel - 100.));
55}

Referenced by Adsorption::DensityMette::getAdsorbateDensity(), Adsorption::DensityCook::getAlphaT(), Adsorption::DensityDubinin::getAlphaT(), and Adsorption::DensityMette::getAlphaT().

◆ curvePolyfrac()

double Adsorption::curvePolyfrac ( const double * coeffs,
const double x )
inline

Definition at line 52 of file Adsorption.h.

53{
54 // TODO use Horner scheme
55 return (coeffs[0] + coeffs[2] * x + coeffs[4] * std::pow(x, 2) +
56 coeffs[6] * std::pow(x, 3)) /
57 (1.0 + coeffs[1] * x + coeffs[3] * std::pow(x, 2) +
58 coeffs[5] * std::pow(x, 3));
59}

Referenced by Adsorption::Density100MPa::characteristicCurve(), Adsorption::DensityConst::characteristicCurve(), Adsorption::DensityCook::characteristicCurve(), Adsorption::DensityDubinin::characteristicCurve(), Adsorption::DensityHauer::characteristicCurve(), Adsorption::DensityLegacy::characteristicCurve(), Adsorption::DensityMette::characteristicCurve(), and Adsorption::DensityNunez::characteristicCurve().

◆ dCurvePolyfrac()

double Adsorption::dCurvePolyfrac ( const double * coeffs,
const double x )
inline

Definition at line 61 of file Adsorption.h.

62{
63 const double x2 = x*x;
64 const double x3 = x2*x;
65 const double u = coeffs[0] + coeffs[2] * x + coeffs[4] * x2 + coeffs[6] * x3;
66 const double du = coeffs[2] + 2.0*coeffs[4] * x + 3.0*coeffs[6] * x2;
67 const double v = 1.0 + coeffs[1] * x + coeffs[3] * x2 + coeffs[5] * x3;
68 const double dv = coeffs[1] + 2.0*coeffs[3] * x + 3.0*coeffs[5] * x2;
69
70 return (du*v - u*dv) / v / v;
71}

Referenced by Adsorption::Density100MPa::dCharacteristicCurve(), Adsorption::DensityConst::dCharacteristicCurve(), Adsorption::DensityCook::dCharacteristicCurve(), Adsorption::DensityDubinin::dCharacteristicCurve(), Adsorption::DensityHauer::dCharacteristicCurve(), Adsorption::DensityLegacy::dCharacteristicCurve(), Adsorption::DensityMette::dCharacteristicCurve(), and Adsorption::DensityNunez::dCharacteristicCurve().

◆ rhoWaterDean()

double Adsorption::rhoWaterDean ( const double T_Ads)
inline

Definition at line 26 of file DensityCook.h.

27{
28 const double Tcel = T_Ads - 273.15;
29 const double b[] = { 999.9,2.03E-02,-6.16E-03,2.26E-05,-4.68E-08 };
30 if (Tcel <= 100.) {
31 return b[0] + Tcel * (b[1] + Tcel * (b[2] + Tcel * (b[3] + Tcel * b[4]) ) );
32 }
33
34 const double rho_100 =
35 b[0] + b[1] * 1.e2 + b[2] * 1.e4 + b[3] * 1.e6 + b[4] * 1.e8;
36 const double aT_100 = -1. / rho_100 * (b[1] + 2. * b[2] * 1.e2 +
37 3. * b[3] * 1.e4 + 4. * b[4] * 1.e6);
38 return rho_100 * (1. - aT_100 * (Tcel - 100.));
39}

Referenced by Adsorption::DensityCook::getAdsorbateDensity(), Adsorption::DensityDubinin::getAdsorbateDensity(), Adsorption::DensityMette::getAdsorbateDensity(), Adsorption::DensityDubinin::getAlphaT(), and rhoWaterHauer().

◆ rhoWaterHauer()

double Adsorption::rhoWaterHauer ( const double T_Ads)
inline

Definition at line 27 of file DensityHauer.h.

28{
29 // data like in python script
30 const double T0 = 283.15, rho0 = rhoWaterDean(T0), alpha0 = 3.781e-4; // K; kg/m^3; 1/K
31
32 return rho0 * (1. - alpha0 * (T_Ads-T0)); // in kg/m^3
33}
double rhoWaterDean(const double T_Ads)
Definition DensityCook.h:26

References rhoWaterDean().

Referenced by Adsorption::DensityConst::getAdsorbateDensity(), and Adsorption::DensityHauer::getAdsorbateDensity().

Variable Documentation

◆ M_carrier

constexpr double Adsorption::M_carrier = MaterialLib::PhysicalConstant::MolarMass::N2
constexpr

inert component molar mass

Definition at line 26 of file ReactionCaOH2.cpp.

Referenced by Adsorption::ReactionCaOH2::calculateQR().

◆ M_react

constexpr double Adsorption::M_react = MaterialLib::PhysicalConstant::MolarMass::Water
constexpr

reactive component molar mass

Definition at line 28 of file ReactionCaOH2.cpp.

Referenced by Adsorption::ReactionCaOH2::calculateQR(), and Adsorption::ReactionCaOH2::getEnthalpy().

◆ reaction_enthalpy

constexpr double Adsorption::reaction_enthalpy = -1.12e+05
constexpr

reaction enthalpy in J/mol; negative for exothermic composition reaction

Definition at line 22 of file ReactionCaOH2.cpp.

Referenced by Adsorption::ReactionCaOH2::getEnthalpy(), and Adsorption::ReactionCaOH2::setChemicalEquilibrium().

◆ reaction_entropy

constexpr double Adsorption::reaction_entropy = -143.5
constexpr

reaction entropy in J/mol/K

Definition at line 24 of file ReactionCaOH2.cpp.

Referenced by Adsorption::ReactionCaOH2::setChemicalEquilibrium().

◆ tol_l

constexpr double Adsorption::tol_l = 1e-4
constexpr

Definition at line 30 of file ReactionCaOH2.cpp.

Referenced by Adsorption::ReactionCaOH2::setChemicalEquilibrium().

◆ tol_rho

constexpr double Adsorption::tol_rho = 0.1
constexpr

Definition at line 32 of file ReactionCaOH2.cpp.

Referenced by Adsorption::ReactionCaOH2::setChemicalEquilibrium().

◆ tol_u

constexpr double Adsorption::tol_u = 1.0 - 1e-4
constexpr