OGS
Adsorption::ReactionCaOH2 Class Referencefinal

Detailed Description

Definition at line 27 of file ReactionCaOH2.h.

#include <ReactionCaOH2.h>

Inheritance diagram for Adsorption::ReactionCaOH2:
[legend]
Collaboration diagram for Adsorption::ReactionCaOH2:
[legend]

Public Member Functions

 ReactionCaOH2 (BaseLib::ConfigTree const &conf)
 
double getEnthalpy (const double, const double, const double) const override
 
double getReactionRate (const double, const double, const double, const double) const override
 
const BaseLib::ConfigTreegetOdeSolverConfig () const
 
double getReactionRate (double const solid_density)
 
void updateParam (double T_solid, double _p_gas, double _x_react, double rho_s_initial)
 
- Public Member Functions inherited from Adsorption::Reaction
virtual double getEquilibriumLoading (const double, const double, const double) const
 
virtual ~Reaction ()=default
 

Static Public Attributes

static MATERIALLIB_EXPORT const double rho_low = 1656.0
 
static MATERIALLIB_EXPORT const double rho_up = 2200.0
 lower density limit More...
 

Private Member Functions

void calculateQR ()
 
void setChemicalEquilibrium ()
 
double CaHydration ()
 

Private Attributes

double _rho_s
 solid phase density More...
 
double _p_gas
 gas phase pressure in unit bar More...
 
double _p_r_g
 pressure of H2O on gas phase More...
 
double _p_eq = 1.0
 equilibrium pressure in bar More...
 
double _T_eq
 equilibrium temperature More...
 
double _T_s
 solid phase temperature More...
 
double _qR
 rate of solid density change More...
 
double _x_react
 mass fraction of water in gas phase More...
 
double _X_D
 mass fraction of dehydration (CaO) in the solid phase More...
 
double _X_H
 mass fraction of hydration in the solid phase More...
 
const BaseLib::ConfigTree _ode_solver_config
 

Static Private Attributes

static const double _reaction_enthalpy = -1.12e+05
 reaction enthalpy in J/mol; negative for exothermic composition reaction More...
 
static const double _reaction_entropy = -143.5
 reaction entropy in J/mol/K More...
 
static const double _M_carrier
 inert component molar mass More...
 
static const double _M_react
 reactive component molar mass More...
 
static const double _tol_l = 1e-4
 
static const double _tol_u = 1.0 - 1e-4
 
static const double _tol_rho = 0.1
 

Friends

template<typename >
class ProcessLib::TESFEMReactionAdaptorCaOH2
 

Additional Inherited Members

- Static Public Member Functions inherited from Adsorption::Reaction
static std::unique_ptr< ReactionnewInstance (BaseLib::ConfigTree const &conf)
 

Constructor & Destructor Documentation

◆ ReactionCaOH2()

Adsorption::ReactionCaOH2::ReactionCaOH2 ( BaseLib::ConfigTree const &  conf)
inlineexplicit

Definition at line 30 of file ReactionCaOH2.h.

30  :
32  _ode_solver_config{conf.getConfigSubtree("ode_solver_config")}
33  {}
const BaseLib::ConfigTree _ode_solver_config
Definition: ReactionCaOH2.h:77
ConfigTree getConfigSubtree(std::string const &root) const
Definition: ConfigTree.cpp:146

Member Function Documentation

◆ CaHydration()

double Adsorption::ReactionCaOH2::CaHydration ( )
private

Definition at line 99 of file ReactionCaOH2.cpp.

100 {
102  double dXdt;
103  // step 3, calculate dX/dt
104 #ifdef SIMPLE_KINETICS
105  if (T_s < T_eq) // hydration - simple model
106 #else
107  if (_p_r_g > _p_eq) // hydration - Schaube model
108 #endif
109  {
110  // X_H = max(tol_l,X_H); //lower tolerance to avoid oscillations at
111  // onset of hydration reaction. Set here so that no residual reaction
112  // rate occurs at end of hydration.
113 #ifdef SIMPLE_KINETICS // this is from P. Schmidt
114  dXdt = -1.0 * (1.0 - X_H) * (T_s - T_eq) / T_eq * 0.2 *
115  conversion_rate::x_react;
116 #else // this is from Schaube
117  if (_X_H == _tol_u || _rho_s == rho_up)
118  {
119  dXdt = 0.0;
120  }
121  else if ((_T_eq - _T_s) >= 50.0)
122  {
123  dXdt = 13945.0 * exp(-89486.0 / R / _T_s) *
124  std::pow(_p_r_g / _p_eq - 1.0, 0.83) * 3.0 *
125  (_X_D)*std::pow(-1.0 * log(_X_D), 0.666);
126  }
127  else
128  {
129  dXdt = 1.0004e-34 * exp(5.3332e4 / _T_s) * std::pow(_p_r_g, 6.0) *
130  (_X_D);
131  }
132 #endif
133  }
134  else // dehydration
135  {
136  // X_D = max(tol_l,X_D); //lower tolerance to avoid oscillations at
137  // onset of dehydration reaction. Set here so that no residual reaction
138  // rate occurs at end of dehydration.
139 #ifdef SIMPLE_KINETICS // this is from P. Schmidt
140  dXdt = -1.0 * (1.0 - X_D) * (T_s - T_eq) / T_eq * 0.05;
141 #else
142  if (_X_D == _tol_u || _rho_s == rho_low)
143  {
144  dXdt = 0.0;
145  }
146  else if (_X_D < 0.2)
147  {
148  dXdt = -1.9425e12 * exp(-1.8788e5 / R / _T_s) *
149  std::pow(1.0 - _p_r_g / _p_eq, 3.0) * (_X_H);
150  }
151  else
152  {
153  dXdt = -8.9588e9 * exp(-1.6262e5 / R / _T_s) *
154  std::pow(1.0 - _p_r_g / _p_eq, 3.0) * 2.0 *
155  std::pow(_X_H, 0.5);
156  }
157 #endif
158  }
159  return dXdt;
160 }
static MATERIALLIB_EXPORT const double rho_low
Definition: ReactionCaOH2.h:83
static MATERIALLIB_EXPORT const double rho_up
lower density limit
Definition: ReactionCaOH2.h:84
double _p_eq
equilibrium pressure in bar
Definition: ReactionCaOH2.h:59
double _T_s
solid phase temperature
Definition: ReactionCaOH2.h:61
double _rho_s
solid phase density
Definition: ReactionCaOH2.h:56
double _T_eq
equilibrium temperature
Definition: ReactionCaOH2.h:60
static const double _tol_u
Definition: ReactionCaOH2.h:74
double _X_H
mass fraction of hydration in the solid phase
Definition: ReactionCaOH2.h:65
double _X_D
mass fraction of dehydration (CaO) in the solid phase
Definition: ReactionCaOH2.h:64
double _p_r_g
pressure of H2O on gas phase
Definition: ReactionCaOH2.h:58

References _p_eq, _p_r_g, _rho_s, _T_eq, _T_s, _tol_u, _X_D, _X_H, MaterialLib::PhysicalConstant::IdealGasConstant, rho_low, and rho_up.

Referenced by calculateQR().

◆ calculateQR()

void Adsorption::ReactionCaOH2::calculateQR ( )
private

Definition at line 67 of file ReactionCaOH2.cpp.

68 {
69  // Convert mass fraction into mole fraction
70  const double mol_frac_react =
72 
73  _p_r_g = std::max(mol_frac_react * _p_gas, 1.0e-3); // avoid illdefined log
75  const double dXdt = CaHydration();
76  _qR = (rho_up - rho_low) * dXdt;
77 }
static double getMolarFraction(double xm, double M_this, double M_other)
Definition: Adsorption.cpp:96
static const double _M_react
reactive component molar mass
Definition: ReactionCaOH2.h:71
double _x_react
mass fraction of water in gas phase
Definition: ReactionCaOH2.h:63
double _p_gas
gas phase pressure in unit bar
Definition: ReactionCaOH2.h:57
double _qR
rate of solid density change
Definition: ReactionCaOH2.h:62
static const double _M_carrier
inert component molar mass
Definition: ReactionCaOH2.h:70

References _M_carrier, _M_react, _p_gas, _p_r_g, _qR, _x_react, CaHydration(), Adsorption::AdsorptionReaction::getMolarFraction(), rho_low, rho_up, and setChemicalEquilibrium().

Referenced by getReactionRate().

◆ getEnthalpy()

double Adsorption::ReactionCaOH2::getEnthalpy ( const double  ,
const double  ,
const double   
) const
overridevirtual

Implements Adsorption::Reaction.

Definition at line 34 of file ReactionCaOH2.cpp.

37 {
38  return -_reaction_enthalpy / _M_react;
39 }
static const double _reaction_enthalpy
reaction enthalpy in J/mol; negative for exothermic composition reaction
Definition: ReactionCaOH2.h:68

References _M_react, and _reaction_enthalpy.

◆ getOdeSolverConfig()

const BaseLib::ConfigTree& Adsorption::ReactionCaOH2::getOdeSolverConfig ( ) const
inline

◆ getReactionRate() [1/2]

double Adsorption::ReactionCaOH2::getReactionRate ( const double  ,
const double  ,
const double  ,
const double   
) const
overridevirtual

Implements Adsorption::Reaction.

Definition at line 41 of file ReactionCaOH2.cpp.

45 {
46  OGS_FATAL("get_reaction_rate do not call directly");
47 }
#define OGS_FATAL(...)
Definition: Error.h:26

References OGS_FATAL.

Referenced by ProcessLib::TES::TESFEMReactionAdaptorCaOH2::TESFEMReactionAdaptorCaOH2().

◆ getReactionRate() [2/2]

double Adsorption::ReactionCaOH2::getReactionRate ( double const  solid_density)

Definition at line 49 of file ReactionCaOH2.cpp.

50 {
51  _rho_s = solid_density;
52  calculateQR();
53  return _qR;
54 }

References _qR, _rho_s, and calculateQR().

◆ setChemicalEquilibrium()

void Adsorption::ReactionCaOH2::setChemicalEquilibrium ( )
private

Definition at line 80 of file ReactionCaOH2.cpp.

81 {
83 
84  _X_D = (_rho_s - rho_up - _tol_rho) / (rho_low - rho_up - 2.0 * _tol_rho);
85  _X_D = (_X_D < 0.5)
86  ? std::max(_tol_l, _X_D)
87  : std::min(_X_D, _tol_u); // constrain to interval [tol_l;tol_u]
88 
89  _X_H = 1.0 - _X_D;
90 
91  // calculate equilibrium
92  // using the p_eq to calculate the T_eq - Clausius-Clapeyron
93  _T_eq = (_reaction_enthalpy / R) /
94  ((_reaction_entropy / R) + std::log(_p_r_g)); // unit of p in bar
95  // Alternative: Use T_s as T_eq and calculate p_eq - for Schaube kinetics
96  _p_eq = std::exp((_reaction_enthalpy / R) / _T_s - (_reaction_entropy / R));
97 }
static const double _tol_rho
Definition: ReactionCaOH2.h:75
static const double _reaction_entropy
reaction entropy in J/mol/K
Definition: ReactionCaOH2.h:69
static const double _tol_l
Definition: ReactionCaOH2.h:73

References _p_eq, _p_r_g, _reaction_enthalpy, _reaction_entropy, _rho_s, _T_eq, _T_s, _tol_l, _tol_rho, _tol_u, _X_D, _X_H, MaterialLib::PhysicalConstant::IdealGasConstant, rho_low, and rho_up.

Referenced by calculateQR().

◆ updateParam()

void Adsorption::ReactionCaOH2::updateParam ( double  T_solid,
double  _p_gas,
double  _x_react,
double  rho_s_initial 
)

Definition at line 56 of file ReactionCaOH2.cpp.

60 {
61  _T_s = T_solid;
62  _p_gas = p_gas / 1e5; // convert Pa to bar
63  _x_react = x_react;
64  _rho_s = rho_s_initial;
65 }

References _p_gas, _rho_s, _T_s, and _x_react.

Referenced by ProcessLib::TES::TESFEMReactionAdaptorCaOH2::initReaction().

Friends And Related Function Documentation

◆ ProcessLib::TESFEMReactionAdaptorCaOH2

template<typename >
friend class ProcessLib::TESFEMReactionAdaptorCaOH2
friend

Definition at line 80 of file ReactionCaOH2.h.

Member Data Documentation

◆ _M_carrier

const double Adsorption::ReactionCaOH2::_M_carrier
staticprivate
Initial value:

inert component molar mass

Definition at line 70 of file ReactionCaOH2.h.

Referenced by calculateQR().

◆ _M_react

const double Adsorption::ReactionCaOH2::_M_react
staticprivate
Initial value:

reactive component molar mass

Definition at line 71 of file ReactionCaOH2.h.

Referenced by calculateQR(), and getEnthalpy().

◆ _ode_solver_config

const BaseLib::ConfigTree Adsorption::ReactionCaOH2::_ode_solver_config
private

Definition at line 77 of file ReactionCaOH2.h.

Referenced by getOdeSolverConfig().

◆ _p_eq

double Adsorption::ReactionCaOH2::_p_eq = 1.0
private

equilibrium pressure in bar

Definition at line 59 of file ReactionCaOH2.h.

Referenced by CaHydration(), and setChemicalEquilibrium().

◆ _p_gas

double Adsorption::ReactionCaOH2::_p_gas
private

gas phase pressure in unit bar

Definition at line 57 of file ReactionCaOH2.h.

Referenced by calculateQR(), and updateParam().

◆ _p_r_g

double Adsorption::ReactionCaOH2::_p_r_g
private

pressure of H2O on gas phase

Definition at line 58 of file ReactionCaOH2.h.

Referenced by CaHydration(), calculateQR(), and setChemicalEquilibrium().

◆ _qR

double Adsorption::ReactionCaOH2::_qR
private

rate of solid density change

Definition at line 62 of file ReactionCaOH2.h.

Referenced by calculateQR(), and getReactionRate().

◆ _reaction_enthalpy

const double Adsorption::ReactionCaOH2::_reaction_enthalpy = -1.12e+05
staticprivate

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

Definition at line 68 of file ReactionCaOH2.h.

Referenced by getEnthalpy(), and setChemicalEquilibrium().

◆ _reaction_entropy

const double Adsorption::ReactionCaOH2::_reaction_entropy = -143.5
staticprivate

reaction entropy in J/mol/K

Definition at line 69 of file ReactionCaOH2.h.

Referenced by setChemicalEquilibrium().

◆ _rho_s

double Adsorption::ReactionCaOH2::_rho_s
private

solid phase density

Definition at line 56 of file ReactionCaOH2.h.

Referenced by CaHydration(), getReactionRate(), setChemicalEquilibrium(), and updateParam().

◆ _T_eq

double Adsorption::ReactionCaOH2::_T_eq
private

equilibrium temperature

Definition at line 60 of file ReactionCaOH2.h.

Referenced by CaHydration(), and setChemicalEquilibrium().

◆ _T_s

double Adsorption::ReactionCaOH2::_T_s
private

solid phase temperature

Definition at line 61 of file ReactionCaOH2.h.

Referenced by CaHydration(), setChemicalEquilibrium(), and updateParam().

◆ _tol_l

const double Adsorption::ReactionCaOH2::_tol_l = 1e-4
staticprivate

Definition at line 73 of file ReactionCaOH2.h.

Referenced by setChemicalEquilibrium().

◆ _tol_rho

const double Adsorption::ReactionCaOH2::_tol_rho = 0.1
staticprivate

Definition at line 75 of file ReactionCaOH2.h.

Referenced by setChemicalEquilibrium().

◆ _tol_u

const double Adsorption::ReactionCaOH2::_tol_u = 1.0 - 1e-4
staticprivate

Definition at line 74 of file ReactionCaOH2.h.

Referenced by CaHydration(), and setChemicalEquilibrium().

◆ _X_D

double Adsorption::ReactionCaOH2::_X_D
private

mass fraction of dehydration (CaO) in the solid phase

Definition at line 64 of file ReactionCaOH2.h.

Referenced by CaHydration(), and setChemicalEquilibrium().

◆ _X_H

double Adsorption::ReactionCaOH2::_X_H
private

mass fraction of hydration in the solid phase

Definition at line 65 of file ReactionCaOH2.h.

Referenced by CaHydration(), and setChemicalEquilibrium().

◆ _x_react

double Adsorption::ReactionCaOH2::_x_react
private

mass fraction of water in gas phase

Definition at line 63 of file ReactionCaOH2.h.

Referenced by calculateQR(), and updateParam().

◆ rho_low

const double Adsorption::ReactionCaOH2::rho_low = 1656.0
static

◆ rho_up

const double Adsorption::ReactionCaOH2::rho_up = 2200.0
static

The documentation for this class was generated from the following files: