From 0cff54f8c0d37b42d42bff9ffceab6f4c5555b57 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Fri, 31 Mar 2023 16:25:05 +0300 Subject: [PATCH] [biomin] adjust slides to better fit content --- slides/biomin.md | 79 +++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/slides/biomin.md b/slides/biomin.md index 1a806f36..45fee9a8 100644 --- a/slides/biomin.md +++ b/slides/biomin.md @@ -1,7 +1,6 @@ --- -title: Modelling porous medium modification through induced calcite precipitation +title: Modelling porous medium modification </br><small>Induced Calcite Precipitation</small> author: The DuMux Development Team, IWS-LH2, University of Stuttgart -margin: 0.1 --- # SFB Project Area C: Biomineralization @@ -142,15 +141,16 @@ $$ Different reactions in detail: -<!-- TODO: check whether large content fits / reformat --> +<!-- \! creates negative spacing to fit the two columns --> $$ \begin{array}{lr} -CO(NH_2)_2 + 2 H_2O \rightarrow 2 NH_3 + H_2CO_3 & \text{ureolysis} \\ -H_2CO_3 \leftrightarrow HCO_3^- + H^+ & \text{dissociation of carbonic acid} \\ -HCO_3^- \leftrightarrow CO_3^{2-} + H^+ & \text{dissociation of bicarbonate ion} \\ -2 NH_4^+ \leftrightarrow 2 NH_3 + 2 H^+ & \text{dissociation of ammonia} \\ -Ca^{2+} + CO_3^{2-} \leftrightarrow CaCO_3 \downarrow & \text{calcite precipitation/dissolution} +CO(NH_2)_2 + 2 H_2O \rightarrow 2 NH_3 + H_2CO_3 \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! + & \text{ureolysis} \\ +H_2CO_3 \leftrightarrow HCO_3^- + H^+ & \text{dissociation of carbonic acid} \\ +HCO_3^- \leftrightarrow CO_3^{2-} + H^+ & \text{dissociation of bicarbonate ion} \\ +2 NH_4^+ \leftrightarrow 2 NH_3 + 2 H^+ & \text{dissociation of ammonia} \\ +Ca^{2+} + CO_3^{2-} \leftrightarrow CaCO_3 \downarrow & \text{calcite precipitation/dissolution} \end{array} $$ @@ -221,28 +221,38 @@ $$ **For this exercise:** -* Nelecting microbial growth and decay, attachment and detachment as we assume a fixed biofilm for simplicity! +* Neglecting microbial growth and decay, attachment and detachment as we assume a fixed biofilm for simplicity! * We also assume that the rate of precipitation is equal to the rate of ureolysis, saving the work of detailed geochemistry calculations for the sake of both simplicity and faster run times. ## Sources & Sinks: -<!-- TODO: check whether large content fits / reformat --> +$$ +\begin{aligned} +&\text{Urea:} & q^{\text{urea}} &= -r_\text{urea} \\ +&\text{Calcium:} & q^{\mathrm{Ca}^2+} &= -r_\text{precip} \\ +&\text{Total carbon:}& q^{\mathrm{C}_\text{tot}^+} &= r_\text{urea} - r_\text{precip} \\ +&\text{Calcite:} & q^{\mathrm{C}} &= r_\text{precip} +\end{aligned} +$$ + +## Sources & Sinks: + +<!-- use creates negative spacing from \! to align equations --> $$ -\begin{array}{lrcl} -\text{Urea:} & q^{\text{urea}} &=& -r_\text{urea} \\ -\text{Calcium:} & q^{\mathrm{Ca}^2+} &=& -r_\text{precip} \\ -\text{Total carbon:}& q^{\mathrm{C}_\text{tot}^+} &=& r_\text{urea} - r_\text{precip} \\ -\text{Calcite:} & q^{\mathrm{C}} &=& r_\text{precip} \\ +\begin{aligned} +\qquad\qquad & \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! +\text{Precipitation rate:} \\ +r_\text{precip} &= f\; \left( A_\text{interface}, \Omega = \frac{\left[\mathrm{Ca}^{2+}\right]\left[CO_3^{2-}\right]}{K_\text{sp}}, T \right) \\ -\text{Precipitation rate:} & r_\text{precip} &=& -f\; \left( A_\text{interface}, \Omega = \frac{\left[\mathrm{Ca}^{2+}\right]\left[CO_3^{2-}\right]}{K_\text{sp}}, T \right) +\qquad\qquad & \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! +\text{For this exercise:} \\ +r_\text{precip} &= r_\text{urea} \\ -\text{For this exercise:} & r_\text{precip} &=& r_\text{urea} \\ -\text{Ureolysis rate:} & r_\text{urea} &=& k_\mathrm{urease}^\mathrm{m} -k_{\mathrm{urease}, \text{biofilm}} \left(\rho_\text{biofilm} \phi_\text{biofilm}\right) -\frac{m_\text{urea}}{K_\text{urea} + m_\text{urea}} -\end{array} +\qquad\qquad & \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! \!\!\!\!\!\! +\text{Ureolysis rate:} \\ +r_\text{urea} &= k_\mathrm{urease}^\mathrm{m} k_{\mathrm{urease}, \text{biofilm}} \left(\rho_\text{biofilm} \phi_\text{biofilm}\right) \frac{m_\text{urea}}{K_\text{urea} + m_\text{urea}} +\end{aligned} $$ ## Supplementary Equation: @@ -265,15 +275,22 @@ $$ * Implement reactive sources and sinks, calling a seperate chemistry file -<!-- TODO: make large content fit --> - ```cpp #include "chemistry/simplebiocarbonicacid.hh" // chemical reactions … using Chemistry = typename Dumux::BioCarbonicAcidChemistry<TypeTag>; … -NumEqVector source(const Element &element, const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolVars, const SubControlVolume &scv) const +``` + +## Specific Implementations + +* Implement reactive sources and sinks, calling a seperate chemistry file + +```cpp +NumEqVector source(const Element& element, + const FVElementGeometry& fvGeometry, + const ElementVolumeVariables& elemVolVars, + const SubControlVolume& scv) const { NumEqVector source(0.0); Chemistry chemistry; @@ -283,7 +300,6 @@ NumEqVector source(const Element &element, const FVElementGeometry& fvGeometry, return source; } -… ``` ## Specific Implementations @@ -295,8 +311,8 @@ auto priVars = evalSolution(element, element.geometry(), elemSol, scv.center()); Scalar sumPrecipitates = 0.0; -for (unsigned int solidPhaseIdx = 0; - solidPhaseIdx < numSolidPhases; ++solidPhaseIdx) +for (unsigned int solidPhaseIdx = 0; solidPhaseIdx < numSolidPhases; + ++solidPhaseIdx) sumPrecipitates += priVars[numComp + solidPhaseIdx]; using std::max; @@ -309,7 +325,8 @@ return max(minPoro, refPoro - sumPrecipitates); ```cpp template<class Scalar> PermeabilityType evaluatePermeability(PermeabilityType refPerm, - Scalar refPoro, Scalar poro) const + Scalar refPoro, + Scalar poro) const { using std::pow; auto factor = pow((1.0 - refPoro)/(1.0 - poro), 2) @@ -332,7 +349,7 @@ Academic problem setup * Lower aquifer: "$CO_2$ storage" * Problem: * Leakage pathway - * -> stored $CO_2$ would migrate to drinking water aquifer! + * Stored $CO_2$ would migrate to drinking water aquifer! * Biomineralization injection could "seal" the leakage pathway ::: ::: {.column width=55%} -- GitLab