## 2 Methodology
### Model Setup  
Gaseous hydrogen (H2(g)) is injected into the reservoir rock where residual gas from the previous natural gas reservoir is still available and the reservoir brine is in equilibrium with these gases and the reservoir rock. When H2(g) is injected, the available brine is saturated with H2. With ongoing injection of H2(g), the initial reservoir brine is displaced and H2(g) builds up a plume. The only available water in the reservoir rock is then the irreducible water. On contact with the cap rock, H2(g) dissolves into the cap rock brine and diffuses through the cap rock brine. These processes are retraced with a hydrogeochemical, 1D reactive mass transport modeling approach, which is of semi-generic nature. The conditions assumed in the model are based on conditions of a depleted gas field with a temperature of 40 \({}^{\circ}\)C and a reservoir pressure of 40 atm. The model is divided into a column of 1488 cells, with a cell \begin{table}
\begin{tabular}{c c c} \hline
**Equilibrium Phase** & **Equilibrium Reaction** & **log**\(K\) **at 25 \({}^{\circ}\)C, 1 bar** \\ \hline K-feldspar & KAlSi3O8 + 8H2O = K\({}^{+}\) + Al(OH)4\({}^{-}\) + 3H4 SiO4 & \(-\)20.573 \\ \hline Albite & NaAlSi3O8 + 8H2O = Na\({}^{+}\) + Al(OH)4\({}^{-}\) + 3H4 SiO4 & \(-\)18.002 \\ \hline Kaolinite & Al2 Si2O5(OH)4 + 6H\({}^{+}\) = H2O + 2H4 SiO4 + 2 Al3\({}^{+}\) & 7.435 \\ \hline Quartz & SiO2 + 2H2O = H4 SiO4 & 3.98 \\ \hline Calcite & CaCO3 = CO3\({}^{-2}\)\({}^{+}\) + Ca2\({}^{+}\) & 8.48 \\ \hline Pyrite & FeS2 + 2H\({}^{+}\) + 2e\({}^{-}\) = Fe2\({}^{+}\) + 2 HS\({}^{-}\) & \(-\)18.479 \\ \hline Illite & K06 Mg2,2S42,2 Si3,53O1O(OH)2 + 11.2H2O = 0.6K\({}^{+}\) + & \(-\)40.267 \\  & 0.25 Mg2\({}^{+}\) + 2.3 Al(OH)4\({}^{-}\) + 3.5H4 SiO4 + 1.2H\({}^{+}\) & \\ \hline Dawsonite & NaAlCO3(OH)2 + 3H\({}^{+}\) = Al3\({}^{+}\) + HCO3\({}^{-}\) + Na\({}^{+}\) + 2H2O & 4.35 \\ \hline Mackinawite & FeS + H\({}^{+}\) = Fe2\({}^{+}\) + HS\({}^{-}\) & \(-\)4.648 \\ \hline Dolomite & CaMg(CO3)2 = Ca2\({}^{+}\) + Mg2\({}^{+}\) + 2 CO3\({}^{-}\) & \(-\)17.09 \\ \hline Nahcolite & NaHCO3 = HCO3\({}^{-}\) + Na\({}^{+}\) & \(-\)0.11 \\ \hline Anhydrite & CaSO4 = Ca2\({}^{+}\) + SO4\({}^{2-}\) & \(-\)4.39 \\ \hline Halite & NaCl = Cl\({}^{-}\) + Na\({}^{+}\) & 1.570 \\ \hline Gypsum & CaSO4 - 2H2O = Ca2\({}^{+}\) + SO4\({}^{2-}\) + 2H2O & \(-\)4.58 \\ \hline Sulfur a  & S + 2H\({}^{+}\) + 2e\({}^{-}\) = H2S & 4.882 \\ \hline Barite & BaSO4 = Ba2\({}^{+}\) + SO4\({}^{2-}\) & \(-\)9.97 \\ \hline Goethite & FeOOH + 3H\({}^{+}\) = Fe3\({}^{+}\) + 2H2O & \(-\)1.0 \\ \hline H2(g) & H2 = H2 & \(-\)3.1050 \\ \hline CO2(g) & CO2 = CO2 & \(-\)1.468 \\ \hline CH4(g) & CH4 = CH4 & \(-\)2.8502 \\ \hline H2S(g) & H2S = H\({}^{+}\) + HS\({}^{-}\) & \(-\)7.9759 \\ \hline N2(g) & N2 = N2 & \(-\)3.1864 \\ \hline \end{tabular}
\end{table} 
Table 1: Equilibrium phases, mass action equations, and equilibrium constants used in the model. Data from phreeqc.dat, except for dawsonite, nahcolite, CH4(g), H2S(g), N2(g), which are from llnl.dat [38]. height of 1.0 m each (in the \(z\)-direction). The cap rock is assumed to have a height of 182 m (cells 1-182), the reservoir rock consists of 667 m (cells 183-850), and the underlying rock of 637 m (cells 851-1488; Figure 1). For the sake of simplicity, a constant partial pressure in the H\({}_{2(\mathrm{g})}\) plume is assumed and the partial pressure is set to be equal to the hydrostatic pressure. Even during production, an amount of hydrogen remains in the reservoir. The mineralogical compositions of the cap rock, the reservoir rock, and the underlying rock are based on data of the Rot Formation [39; 40], Buntsandstein Formation [41], and Zechstein Formation [42; 43] and are summarized in Table 2. The reactive amount of each mineral phase is calculated in moles per kg of pore water (mol kgw\({}^{-1}\)) with the consideration of the specific density of each mineral phase (g cm\({}^{-3}\)).