<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "https://jats.nlm.nih.gov/nlm-dtd/publishing/3.0/journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0" article-type="research-article">
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-18-3241-2025</article-id><title-group><article-title>Alquimia v1.0: a generic interface to biogeochemical codes – a tool for interoperable development, prototyping and benchmarking for multiphysics simulators</article-title><alt-title>Alquimia</alt-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1">
          <name><surname>Molins</surname><given-names>Sergi</given-names></name>
          <email>smolins@lbl.gov</email>
        <ext-link>https://orcid.org/0000-0001-7675-3218</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Andre</surname><given-names>Benjamin J.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff8">
          <name><surname>Johnson</surname><given-names>Jeffrey N.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Hammond</surname><given-names>Glenn E.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-6903-2807</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Sulman</surname><given-names>Benjamin N.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-3265-6691</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>Lipnikov</surname><given-names>Konstantin</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff5">
          <name><surname>Day</surname><given-names>Marcus S.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-1711-3963</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Beisman</surname><given-names>James J.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>Svyatsky</surname><given-names>Daniil</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff6">
          <name><surname>Deng</surname><given-names>Hang</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff7">
          <name><surname>Lichtner</surname><given-names>Peter C.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Steefel</surname><given-names>Carl I.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>Moulton</surname><given-names>J. David</given-names></name>
          
        </contrib>
        <aff id="aff1"><label>1</label><institution>Energy Geosciences Division, Lawrence Berkeley National Laboratory, 1 Cyclotron Rd, Berkeley, CA 94720, USA</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Energy and Environment Directorate, Pacific Northwest National Laboratory, Richland, WA 99354, USA</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Environmental Sciences Division, Oak Ridge National Laboratory, Oak Ridge, TN 37830, USA</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>Applied Mathematics and Plasma Physics, Los Alamos National Laboratory, Los Alamos, NM 87545, USA</institution>
        </aff>
        <aff id="aff5"><label>5</label><institution>Computational Science Center, National Renewable Energy Laboratory, Golden, CO 80401, USA</institution>
        </aff>
        <aff id="aff6"><label>6</label><institution>Department of Energy and Resources Engineering, Peking University, Peking, 100871, China</institution>
        </aff>
        <aff id="aff7"><label>7</label><institution>Department of Civil Engineering, University of New Mexico, Albuquerque, NM 87131, USA</institution>
        </aff>
        <aff id="aff8"><label>8</label><institution>Cohere Consulting, LLC, Seattle, WA 98105, USA</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Sergi Molins (smolins@lbl.gov)</corresp></author-notes><pub-date><day>2</day><month>June</month><year>2025</year></pub-date>
      
      <volume>18</volume>
      <issue>11</issue>
      <fpage>3241</fpage><lpage>3263</lpage>
      <history>
        <date date-type="received"><day>5</day><month>June</month><year>2024</year></date>
           <date date-type="rev-request"><day>27</day><month>August</month><year>2024</year></date>
           <date date-type="rev-recd"><day>6</day><month>March</month><year>2025</year></date>
           <date date-type="accepted"><day>10</day><month>March</month><year>2025</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2025 Sergi Molins et al.</copyright-statement>
        <copyright-year>2025</copyright-year>
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025.html">This article is available from https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025.pdf</self-uri>
      <abstract><title>Abstract</title>

      <p id="d2e242">Alquimia v1.0 is a generic interface to geochemical solvers that facilitates development of multiphysics simulators by enabling code coupling, prototyping and benchmarking. The interface enforces the function arguments and their types for setting up, solving, serving up output data and carrying out other common auxiliary tasks while providing a set of structures for data transfer between the multiphysics code driving the simulation and the geochemical solver. Alquimia relies on a single-cell approach that permits operator splitting coupling and parallel computation. We describe the implementation in Alquimia of two widely used open-source codes that perform geochemical calculations: PFLOTRAN and CrunchFlow. We then exemplify its use for the implementation and simulation of reactive transport in porous media by two open-source flow and transport simulators: Amanzi and ParFlow. We also demonstrate its use for the simulation of coupled processes in novel multiphysics applications including the effect of multiphase flow on reaction rates at the pore scale with OpenFOAM, the role of complex biogeochemical processes in land surface models such as the E3SM Land Model (ELM) and the impact of surface–subsurface hydrological interactions on hydrogeochemical export from watersheds with the Advanced Terrestrial Simulator (ATS). These applications make it apparent that the availability of a well-defined yet flexible interface has the potential to improve the software development workflow, freeing up resources to focus on advances in process models and mechanistic understanding of coupled problems.</p>
  </abstract>
    
<funding-group>
<award-group id="gs1">
<funding-source>Biological and Environmental Research</funding-source>
<award-id>DE-AC02-05CH11231</award-id>
<award-id>DE-AC05-00OR22725</award-id>
<award-id>DE-AC05-76RL01830</award-id>
</award-group>
<award-group id="gs2">
<funding-source>Office of Environmental Management</funding-source>
<award-id>DE-AC02-05CH11231</award-id>
</award-group>
</funding-group>
</article-meta>
  <notes notes-type="copyrightstatement">
  
      <p id="d2e252">This article has been authored under contract with the U.S. Department of Energy (DOE). The US government retains and the publisher, by accepting the article for publication, acknowledges that the US government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US government purposes. DOE will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (<uri>http://energy.gov/doe-public-access-plan</uri>, last access: 2 April 2025).</p>
</notes></front>
<body>
      


<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d2e267">Numerical modeling has become an integral part of the investigation of some of the world's most pressing environmental challenges, such as climate change, pollution prevention, contaminant remediation and nuclear waste management <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx23" id="paren.1"/>. For an accurate system representation, models must consider the gamut of processes affecting mass balances and underlying biogeochemical transformations. Different models exist for representing biogeochemical processes including aqueous complexation, mineral dissolution–precipitation, surface sorption and microbiologically mediated reactions. The mathematical expressions for biogeochemical reaction models are diverse and generally express nonlinear relationships with complex parameterizations between primary variables such as concentrations  <xref ref-type="bibr" rid="bib1.bibx47" id="paren.2"/>.</p>
      <p id="d2e276">Multicomponent reactive transport codes couple biogeochemical models with solvers for flow and transport and other relevant processes such as heat transfer or geomechanics <xref ref-type="bibr" rid="bib1.bibx45 bib1.bibx46 bib1.bibx47" id="paren.3"/>. Many of these codes are the legacy of years of development and research, a period over which model complexity has increased incrementally. Further development is driven by continued advances in process model descriptions across spatial scales and hydrological domains, from single pores to the subsurface reservoirs or watersheds. There is also a growing need to expand the role of reactive transport to explore nonlinear interactions among the atmosphere, hydrosphere, biosphere and geosphere in combination with other community models such as land surface models <xref ref-type="bibr" rid="bib1.bibx23 bib1.bibx51" id="paren.4"/>. In parallel, hardware architectures evolve continuously, and new numerical approaches become available for application. Jointly, these developments enable the simulation of tighter process coupling with increasing resolution and mechanistic detail, but they also demand continuous code development and, at times, refactoring. This increasing degree of sophistication also presents some challenges. How does one develop, test and ultimately incorporate biogeochemical capabilities in codes for new applications? How does one ensure the validity of a coupled simulator formulation prior to application? How does one continuously develop code to incorporate new numerical approaches or to take advantage of new computational resources?</p>
      <p id="d2e285">Often the complexity of implementing a comprehensive and flexible treatment of biogeochemistry is a significant obstacle to the development of new biogeochemical capabilities. As a result, this step is often circumvented by coupling flow and transport codes to existing biogeochemical codes, an approach widely used, e.g., HYTEC–CHESS <xref ref-type="bibr" rid="bib1.bibx53" id="paren.5"/>, Chombo-Crunch <xref ref-type="bibr" rid="bib1.bibx31" id="paren.6"/>, Comsol–PHREEQC <xref ref-type="bibr" rid="bib1.bibx37 bib1.bibx19" id="paren.7"/> and ParCrunchFlow <xref ref-type="bibr" rid="bib1.bibx6" id="paren.8"/>. The use of PHREEQC as geochemical solver in this role for multiple codes, e.g., PHT3D <xref ref-type="bibr" rid="bib1.bibx41" id="paren.9"/>, Hydrus/HPx <xref ref-type="bibr" rid="bib1.bibx42" id="paren.10"/> and PHAST <xref ref-type="bibr" rid="bib1.bibx40" id="paren.11"/>, has led to the development of dedicated coupling tools such as IPhreeqc <xref ref-type="bibr" rid="bib1.bibx10" id="paren.12"/> and PhreeqcRM <xref ref-type="bibr" rid="bib1.bibx39" id="paren.13"/>. However, these tools are specific to PHREEQC and thus tied to its capabilities.</p>
      <p id="d2e316">Model development entails (among other tasks) prototyping, implementing and verifying the new coupled capabilities. Prototyping makes it possible to evaluate approach feasibility and often benefits from using high-level weakly typed languages such as Python. Implementation requires a clear, well-documented description of the data structures and function calls that must allow enough flexibility such that a broad range of applications is possible. Ensuring the validity of complex coupled models involves intercomparison studies where multiple codes solve the same problem <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx28 bib1.bibx32" id="paren.14"/>.</p>
      <p id="d2e323">In this article we introduce Alquimia, a new open-source software library that provides a generic interface to existing biogeochemical capabilities. This software is intended to facilitate interoperable code development by exposing tried-and-true biogeochemical capabilities in existing software. Section <xref ref-type="sec" rid="Ch1.S2.SS1"/> describes a general formulation of the problems the interface is designed for and Sect. <xref ref-type="sec" rid="Ch1.S3"/> the functions and data structures of the interface along with software design approaches. The implementation and use of Alquimia are given by the way of examples (Sect. <xref ref-type="sec" rid="Ch1.S4"/>). First, the geochemical capabilities in the open-source reactive transport codes PFLOTRAN and CrunchFlow are implemented in Alquimia. Then, these geochemical capabilities are made available for the simulation of reactive transport in porous media in two codes: Amanzi and ParFlow. Because Alquimia allows for different geochemical codes to share a common flow and transport solver, and therefore the same spatial discretization, time stepping control, and coupling schemes, it may be a useful tool for multi-way model intercomparison. Section <xref ref-type="sec" rid="Ch1.S5"/> includes examples of how Alquimia has enabled incorporation of geochemical capabilities to codes for a range of applications, including prototyping land surface processes in Python as well as in high-performance computing simulations using an OpenFOAM-based code and the Advanced Terrestrial Simulator (ATS).</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Model description</title>
<sec id="Ch1.S2.SS1">
  <label>2.1</label><title>Mass balance equations</title>
      <p id="d2e349">The mass balance of each aqueous species may be written as
            <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M1" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mi>L</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M2" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the concentration of species <inline-formula><mml:math id="M3" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> (mass per unit water), <inline-formula><mml:math id="M4" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula> is the volumetric water content, <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:mi>L</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> represents the transport operator and <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the contribution of reactions to the mass balance of species <inline-formula><mml:math id="M7" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>. While <inline-formula><mml:math id="M8" display="inline"><mml:mrow><mml:mi>L</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> represents the solute transport operator here, it may be also read as a more general operator that includes other processes.</p>
      <p id="d2e492">Equilibrium aqueous complexation reactions make it possible to rewrite Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) as
            <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M9" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mi>L</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>R</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where the aqueous concentration of each component (<inline-formula><mml:math id="M10" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) is defined as the sum of the concentration of a primary species and a set of secondary species: <xref ref-type="bibr" rid="bib1.bibx45" id="paren.15"/>
            <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M11" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>c</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M12" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the stoichiometric coefficient of component <inline-formula><mml:math id="M13" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> in reaction <inline-formula><mml:math id="M14" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M15" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the contribution of kinetic reactions to the mass balance of component <inline-formula><mml:math id="M16" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>.</p>
      <p id="d2e688">This approach reduces substantially the number of governing equations and unknowns from <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> species in Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) to <inline-formula><mml:math id="M18" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> components in Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) by using the mass of law action equations of the <inline-formula><mml:math id="M19" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> equilibrium reactions:
            <disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M20" display="block"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mo>∏</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:mrow></mml:msubsup><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msub><mml:mi>K</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M22" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the activity coefficient of primary and secondary species, and <inline-formula><mml:math id="M23" display="inline"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the equilibrium constant of reaction <inline-formula><mml:math id="M24" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>.</p>
      <p id="d2e868">Mass action law equations for heterogeneous equilibrium reactions follow a similar form <xref ref-type="bibr" rid="bib1.bibx47" id="paren.16"><named-content content-type="pre">e.g.,</named-content></xref>. When these are considered, the mass of each component (<inline-formula><mml:math id="M25" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>) also includes the mass present as a mineral (<inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>) or sorbed/exchanged on a surface (<inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>):
            <disp-formula id="Ch1.E5" content-type="numbered"><label>5</label><mml:math id="M28" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d2e990">The kinetic reaction rates are calculated as functions of primary variables such as concentrations (<inline-formula><mml:math id="M29" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and sets of intrinsic parameters (<inline-formula><mml:math id="M30" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) that are specific to each reaction <inline-formula><mml:math id="M31" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>:
            <disp-formula id="Ch1.E6" content-type="numbered"><label>6</label><mml:math id="M32" display="block"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo movablelimits="false">∑</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          The <inline-formula><mml:math id="M33" display="inline"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> functions take different mathematical forms for different reaction types. Different codes may implement somewhat different formulations or allow for generalized formulations <xref ref-type="bibr" rid="bib1.bibx29" id="paren.17"><named-content content-type="pre">e.g.,</named-content></xref> and custom rate expressions <xref ref-type="bibr" rid="bib1.bibx17" id="paren.18"/>. Examples of established formulations include the transition-state-theory-type (TST) rate law for mineral dissolution–precipitation or the Monod-type rate expression for microbially mediated reduction–oxidation reactions. The interface presented in Sect. <xref ref-type="sec" rid="Ch1.S3"/> does not stipulate any specific mathematical form. Hence, we do not provide a specific form for <inline-formula><mml:math id="M34" display="inline"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> here. In Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/>, we compare codes when well-established reaction models are used in different geochemical engines. In Sect. <xref ref-type="sec" rid="Ch1.S5"/>, we give some specific reaction rate expressions connected to example applications.</p>
</sec>
<sec id="Ch1.S2.SS2">
  <label>2.2</label><title>Coupling approaches</title>
      <p id="d2e1122">The set of equations for all components along with the geochemical equilibrium and kinetic equations (Eqs. <xref ref-type="disp-formula" rid="Ch1.E2"/>–<xref ref-type="disp-formula" rid="Ch1.E6"/>) <xref ref-type="bibr" rid="bib1.bibx47" id="paren.19"><named-content content-type="pre">e.g.,</named-content></xref> is in general a coupled system of nonlinear equations. Two broad approaches are used to solve this system. The global implicit approach entails the simultaneous solution of the coupled system including reactions and transport, often directly substituting Eqs. (<xref ref-type="disp-formula" rid="Ch1.E4"/>) and (<xref ref-type="disp-formula" rid="Ch1.E6"/>) in Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>). In contrast, operator splitting consists of, first, simulating transport for each component (and phase) separately and, second, updating the concentrations by solving the geochemical equations. Mathematically, the method can be represented as a two-step sequential process consisting of a transport step (tr):
            <disp-formula id="Ch1.E7" content-type="numbered"><label>7</label><mml:math id="M35" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">θ</mml:mi><mml:mi mathvariant="normal">tr</mml:mi></mml:msup><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">tr</mml:mi></mml:msubsup><mml:mo>-</mml:mo><mml:msup><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mi>L</mml:mi><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi></mml:msubsup><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>
          followed by a reaction step
            <disp-formula id="Ch1.E8" content-type="numbered"><label>8</label><mml:math id="M36" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mi mathvariant="italic">θ</mml:mi><mml:mi mathvariant="normal">tr</mml:mi></mml:msup><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>-</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">tr</mml:mi></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msubsup><mml:mi>R</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where the reaction step includes the time-discretized form of the component balance over the different phases (Eq. <xref ref-type="disp-formula" rid="Ch1.E5"/>), equilibrium aqueous speciation (Eq. <xref ref-type="disp-formula" rid="Ch1.E3"/>) and kinetic reactions (Eq. <xref ref-type="disp-formula" rid="Ch1.E6"/>).
            <disp-formula id="Ch1.E9" content-type="numbered"><label>9</label><mml:math id="M37" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msubsup><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msubsup><mml:mi mathvariant="italic">ν</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:msubsup><mml:mi>c</mml:mi><mml:mi>j</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:msubsup><mml:mi>R</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msubsup><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d2e1468">While the transport step requires the solution over the entire domain, the geochemical equations can be solved independently within each cell. By separating the problem into two steps, operator splitting allows for solving the transport problem with linear solvers, confining the nonlinearity to the geochemical problem within a single cell. The time step size, however, is limited by the Courant criterion to avoid operator splitting error <xref ref-type="bibr" rid="bib1.bibx45" id="paren.20"/>.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Interface description</title>
<sec id="Ch1.S3.SS1">
  <label>3.1</label><title>Functions</title>
      <p id="d2e1490">The Alquimia interface is designed to act as a generic, intermediary layer between a code that solves Eq. (<xref ref-type="disp-formula" rid="Ch1.E7"/>) and a code that solves Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>). We will refer to the former code as the <italic>driver</italic> and the latter as the <italic>engine</italic> (Fig. <xref ref-type="fig" rid="Ch1.F1"/>).</p>

      <fig id="Ch1.F1" specific-use="star"><label>Figure 1</label><caption><p id="d2e1507">Example of a workflow in a code coupling a transport driver (left) and a geochemical engine (right) via Alquimia indicating the responsibilities for each the driver (green), Alquimia (pink) and engine (blue) codes. Calls to Alquimia functions in the driver code (unfilled boxes) replace development of native capabilities. Calls to Alquimia's utility library are indicated by dashed lines in the bounding box. The prefix Alquimia is omitted from Alquimia functions for clarity (i.e., <italic>AlquimiaSetup, AlquimiaProcessCondition, AlquimiaReactionStepOperatorSplit, AlquimiaGetAuxiliaryOutput</italic>).</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-f01.png"/>

        </fig>

      <p id="d2e1519">The <italic>driver</italic> is the code that drives the simulation, handles the spatial description of the problem, including the meshing and spatial discretization, and solves Eq. (<xref ref-type="disp-formula" rid="Ch1.E7"/>). It is responsible for managing global variable storage, including reading spatially and/or temporally varying material properties, looping through space, managing time stepping,  and unpacking and moving data from the mesh-dependent storage into data transfer containers, as well as input/output (I/O) operations.</p>
      <p id="d2e1528">The geochemical <italic>engine</italic> defines the geochemical problem and solves Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>) at each point in space independently. It is responsible for reading the geochemical reaction data, managing the geochemical system (e.g., reading the thermodynamic database), reading and processing the initial and boundary solutions (e.g., equilibrating the solution with specific minerals, or a pH value), and providing access to geochemical data for output (pH, mineral saturation indices, reaction rates).</p>
      <p id="d2e1536">The Alquimia interface itself handles the engine-dependent implementation for setting up, processing the speciation constraints, performing the reaction step solution and shutting down. Alquimia does not do any geochemical calculations but does perform any unit conversions required by each engine. At the start of each operation, it unpacks data from the Alquimia data transfer containers provided by the engine and packages them into the correct format for that engine. Then, calls to engine subroutines are made to perform the appropriate calculations. At the end of the operation, it packages the results back into the Alquimia containers for use by the driver.</p>
</sec>
<sec id="Ch1.S3.SS2">
  <label>3.2</label><title>Software</title>
      <p id="d2e1547">Alquimia has two parts: (1) an engine-independent application programming interface (API) consisting of all relevant functions, data structures, constants, and their respective types (Table <xref ref-type="table" rid="Ch1.T1"/>) and (2) an optional utility library.</p>
      <p id="d2e1552">The API works by enforcing the arguments and types of the geochemical subroutines using a single-cell model. That is, the calls to the geochemical solver are carried out for a single element of a given spatial discretization of a driver, and thus they are made within a loop over space.</p>
      <p id="d2e1555">The main calls in the workflow include <italic>AlquimiaSetup</italic>, <italic>AlquimiaProcessCondition</italic> and <italic>AlquimiaReactionStepOperatorSplit</italic>. <italic>AlquimiaSetup</italic> initializes the engine by reading the geochemical engine's input file and database. This builds the geochemical system, sets the values of the reaction parameters and generates a list of aqueous solutions with appropriate equilibration constraints. <italic>AlquimiaProcessCondition</italic> performs the speciation calculations on this list of aqueous solutions to obtain initial and boundary concentrations as needed by the engine, solving a steady-state form of Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>), with additional constraints such as fixed species concentration or pH values, and charge balance or mineral equilibrium. <italic>AlquimiaReactionStepOperatorSplit</italic> performs the solution of the geochemical problem (Eq. <xref ref-type="disp-formula" rid="Ch1.E8"/>).</p>
      <p id="d2e1581">Variables that may change in the engine with each call to reaction time stepping are part of Alquimia's <italic>AlquimiaState</italic> data structure, including porosity, fluid density and pressure, and the total concentrations (<inline-formula><mml:math id="M38" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> , <inline-formula><mml:math id="M39" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> , and <inline-formula><mml:math id="M40" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Ψ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>); the reactive surface areas of the minerals; the surface site density for sorption; and the cation exchange capacity. Variables that do not change in the engine are part of the <italic>AlquimiaProperties</italic> data structure, including water saturation and cell volume and miscellaneous reaction parameters (sorption constants, Freundlich sorption exponents, Langmuir sorption coefficients, mineral rate constants and kinetic reaction rate constants). The units used for each set of variables are required by the interface as outlined in the documentation. This implies that the driver must supply in the values in these units, but it is the responsibility of the Alquimia interface implementation of each engine to perform the necessary conversions to the engine's internal units.</p>
      <p id="d2e1634">Other structures contain information about the available functionality in the engine (<italic>AlquimiaFunctionality</italic>) (e.g., is porosity updated by the engine?), the status of the geochemistry engine after the last operation (<italic>AlquimiaEngineStatus</italic>) (e.g., did the solution converge for the time step?), data such as names of all species (<italic>AlquimiaProblemMetaData</italic>), and data for output purposes (<italic>AlquimiaAuxiliaryOutputData</italic>). Another structure  (<italic>AlquimiaAuxiliaryData</italic>) is used to store data necessary for the engine, the type of which is known but on which the driver should not do any operation. These data include for example the initial guesses for the next nonlinear solution, and thus the driver must return them on the next call and write them to checkpoint files. Last, a standalone pointer variable contains all the persistent internal state data for the chemistry engine that is not mesh-dependent and can be reinitialized from the input file upon restart (<italic>AlquimiaEngineState</italic>).</p>

<table-wrap id="Ch1.T1" specific-use="star"><label>Table 1</label><caption><p id="d2e1659">Summary of Alquimia's API (data transfer containers, functions, constants) and C utilities library.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Data transfer containers </oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaVectors</oasis:entry>
         <oasis:entry colname="col2">struct: AlquimiaEngineFunctionality</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">void pointer: engine_state</oasis:entry>
         <oasis:entry colname="col2">struct: AlquimiaProblemMetaData</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaSizes</oasis:entry>
         <oasis:entry colname="col2">struct: AlquimiaAuxiliaryOutputData</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaState</oasis:entry>
         <oasis:entry colname="col2">struct: AlquimiaGeochemicalCondition</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaProperties</oasis:entry>
         <oasis:entry colname="col2">struct: AlquimiaAqueousConstraint</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaAuxiliaryData</oasis:entry>
         <oasis:entry colname="col2">struct: AlquimiaMineralConstraint</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">struct: AlquimiaEngineStatus</oasis:entry>
         <oasis:entry colname="col2"/>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Functions </oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">void AlquimiaSetup</oasis:entry>
         <oasis:entry colname="col2">void AlquimiaProcessCondition</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">void AlquimiaShutdown</oasis:entry>
         <oasis:entry colname="col2">void AlquimiaReactionStepOperatorSplit</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">void AlquimiaGetEngineMetaData</oasis:entry>
         <oasis:entry colname="col2">void AlquimiaGetAuxiliaryOutput</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Constants </oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">error codes</oasis:entry>
         <oasis:entry colname="col2"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">string lengths</oasis:entry>
         <oasis:entry colname="col2"/>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">strings</oasis:entry>
         <oasis:entry colname="col2"/>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">C utilities library </oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaInterface</oasis:entry>
         <oasis:entry colname="col2">void AllocateAlquimiaXXX</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">void CreateAlquimiaInterface</oasis:entry>
         <oasis:entry colname="col2">void FreeAlquimiaXXX</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">struct: AlquimiaData</oasis:entry>
         <oasis:entry colname="col2">void PrintAlquimiaXXX</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">void AllocateAlquimiaData</oasis:entry>
         <oasis:entry colname="col2"/>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p id="d2e1852">Generally, the parameter values of the geochemical model are set by the engine. This simplifies code development on the driver side as the engines already have facilities to read in these parameters. However, there are cases where there is finer-grained control of certain parameter values by the driver. For example, in parameter estimation simulations or inverse problems that involve varying these values, it may be easier to control model parameters from the driver rather than having to write scripts that change the values in engine input files. For this purpose, Alquimia provides the ability to control a limited set of reaction parameters. These are part of the <italic>AlquimiaProperties</italic> data structure and include the linear sorption constant, the Freundlich sorption exponent, the Langmuir sorption coefficient, the mineral dissolution–precipitation kinetic rate constant, and the aqueous kinetic reaction rate constant. A single flag controls this behavior. When turned on (“hands-on” mode), Alquimia will use the parameter values coming from the driver for each cell at every time step to populate the appropriate data holders in the engine. Otherwise (“hands-off” mode), the default behavior is to let the engine control these parameters. While enabling this option gives the driver more control over some engine parameters, this approach is involved in terms of coding and must be used with caution, especially because it may expand the capabilities of the engines. For example, one can specify a different value of the rate constants in each grid cell, which in general is not an option available in most geochemical models.</p>
      <p id="d2e1858">The second part of the Alquimia library is a C utility library that contains reusable code for common tasks such as allocating memory, printing data and other miscellaneous auxiliary tasks. These are optionally used in driver codes to facilitate implementation of these common tasks.</p>
      <p id="d2e1861">For wide compatibility with mixed language programming, Alquimia is implemented in the C language as it offers the most flexibility to mix with other languages, including C++, Python and Fortran. Examples of this flexibility are given in Sects. <xref ref-type="sec" rid="Ch1.S4"/> and <xref ref-type="sec" rid="Ch1.S5"/>. The two engines currently available in Alquimia are implemented in Fortran (Sect. <xref ref-type="sec" rid="Ch1.S4.SS1"/>).</p>
</sec>
<sec id="Ch1.S3.SS3">
  <label>3.3</label><title>Development practices</title>
      <p id="d2e1878">Alquimia adheres to best practices set forth by the Extreme-scale Scientific Software Development Kit (xSDK) <xref ref-type="bibr" rid="bib1.bibx5" id="paren.21"/>. Among other things, this means that Alquimia uses a CMake-based build system, provides a comprehensive test suite, provides a documented, reliable way to contact the development team, and has an accessible repository <xref ref-type="bibr" rid="bib1.bibx1" id="paren.22"/>.</p>
      <p id="d2e1887">The required parts of the Alquimia are compiled using CMake-based build system into libalquimia_c.a and libalquimia_fortran.a. Semantic versioning is used for its public API. The source code and tagged releases are hosted in a GitHub repository, publicly available via a three-clause BSD license. A test suite is provided that is based on two simple driver codes: one for batch geochemistry calculations and another for coupled reactive transport calculations. Both the build system and the test suite are included in the automated continuous integration framework available from GitHub Actions <xref ref-type="bibr" rid="bib1.bibx14" id="paren.23"/>, which is triggered by pull requests and used as a condition for their approval. Alquimia is documented using restructured text files included in the source distribution and may be built and exported to different formats using Python's Sphinx package <xref ref-type="bibr" rid="bib1.bibx44" id="paren.24"/>.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Implementation and use</title>
      <p id="d2e1906">The implementation and use of Alquimia are illustrated here by describing selected examples of the two tasks that Alquimia separates for engine and driver codes. One is the implementation of the geochemical calls in driver codes (e.g., left column in Fig. <xref ref-type="fig" rid="Ch1.F1"/>). This implementation is independent of the engines available; it only depends on Alquimia's data structures and call signatures. The second task is the implementation of the engine-specific function calls in Alquimia for a given engine (e.g., right column in Fig. <xref ref-type="fig" rid="Ch1.F1"/>). This also includes the necessary transfer of data between Alquimia data transfer containers and the engine's internal data structures. This implementation is independent of the use any driver makes of Alquimia and does not need to be repeated every time the interface is implemented in a new driver code. That is, if a new engine is added, no changes are needed in any driver that uses Alquimia to make use of these new engine's capabilities. This allows for performing simulations using the same driver replacing the geochemical engine. We use this feature to compare results from simulations performed using different driver-engine combinations of the codes presented in what follows.</p>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Geochemical engines</title>
      <p id="d2e1920">The widely used open-source codes PFLOTRAN and CrunchFlow have been implemented as engines in Alquimia. PFLOTRAN is an open-source, massively parallel multiscale and multiphysics code for subsurface multiphase flow, reactive transport, geomechanics and geophysics applications <xref ref-type="bibr" rid="bib1.bibx18 bib1.bibx26 bib1.bibx20" id="paren.25"/>. CrunchFlow is an open-source software package for simulating reactive transport <xref ref-type="bibr" rid="bib1.bibx47" id="paren.26"/>. Although both codes also solve for flow and transport processes and are known for implementing the global implicit approach, they also give the user the possibility of running reactive transport simulations in operator splitting mode, e.g., <xref ref-type="bibr" rid="bib1.bibx45" id="text.27"/>. This facilitated the isolation of the geochemical capabilities of these codes for implementation in Alquimia. Although this applies to <italic>AlquimiaSetup</italic>, <italic>AlquimiaProcessCondition</italic> and <italic>AlquimiaReactionStepOperatorSplit</italic>, we focus here on the latter function for brevity to exemplify the steps to implement engine capabilities in Alquimia.</p>
      <p id="d2e1942">The implementation of <italic>AlquimiaReactionStepOperatorSplit</italic> for both engines follows essentially the same steps. These include copying the data from the transfer containers, passing the initial guesses to the appropriate variables, performing the iterative nonlinear solve of the geochemical problem and upon checking for convergence updating mineral concentrations (Listings <xref ref-type="fig" rid="Ch1.F2"/>–<xref ref-type="fig" rid="Ch1.F3"/>). However, the details of the implementation differ somewhat owing to the differences between the two codes.</p><fig id="Ch1.F2" specific-use="star"><label>Listing 1</label><caption><p id="d2e1955">Selected sections of Alquimia's implementation of the PFLOTRAN operator splitting step in <italic>AlquimiaReactionStepOperatorSplit</italic>. Lines starting with “!...” indicate portions of the code omitted for brevity. Some sections have been edited for legibility. The reader is directed to the actual code for full details.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-l01.png"/>

        </fig>

      <p id="d2e1968">PFLOTRAN uses an object-oriented programming model introduced in a code refactoring <xref ref-type="bibr" rid="bib1.bibx17" id="paren.28"/>, while CrunchFlow uses a legacy procedural modular programming. These two different approaches require different ways of storing and manipulating engine data within Alquimia.</p>
      <p id="d2e1974">In PFLOTRAN, most data structures needed to describe the geochemical problem are passed as arguments and thus must be included as part of the <italic>AlquimiaEngineState</italic> in Alquimia. These include those that contain geochemical reaction data such as stoichiometric coefficients (<italic>engine_state%reaction</italic>), global variables such as aqueous saturation (<italic>engine_state%global_auxvar</italic>), reactive transport variables such as total concentrations (<italic>engine_state%rt_auxvar</italic>), or material properties such as porosity (<italic>engine_state%material_auxvar</italic>). As shown in Listing <xref ref-type="fig" rid="Ch1.F2"/>, handling this within Alquimia is straightforward using <italic>AlquimiaEngineState</italic> and also makes it for easy-to-maintain code. When new variables are added in PFLOTRAN, the Alquimia interface does not need to change; only if the capabilities of Alquimia are expanded and there are new variables that need to be passed explicitly does the interface require modification. These changes would mostly be limited to <italic>CopyAlquimiaToAuxVars</italic> and <italic>CopyAuxVarsToAlquimia</italic>, which are helper subroutines that copy data from Alquimia transfer containers to the engine's variables and back.</p>
      <p id="d2e2004">CrunchFlow relies on global variables declared in modules, which are dynamically allocated upon initialization from the inputs. This requires that these modules are included in the Alquimia interface. Examples include aqueous saturation (<italic>satliq</italic>) from the transport module, porosity (<italic>por</italic>) from the medium properties module and total concentrations (<italic>sn</italic>) from the concentration module (see <italic>CopyAlquimiaToAuxVars</italic> subroutine in <italic>crunch_alquimia_interface.F90</italic>). By contrast, CrunchFlow passes the dimensions of the geochemical problem from high-level subroutines to low-level subroutines; thus the <italic>AlquimiaEngineState</italic> data structure is used to store them (e.g., <italic>engine_state%ncomp</italic>, <italic>engine_state%nspec</italic> and <italic>engine_state%nkin</italic>, among other geochemical sizes).</p>
      <p id="d2e2035">While Alquimia’s approach to engine data sometimes introduces more detail in the code, its flexibility allows Alquimia to accommodate the needs of very different engines. Ultimately, this makes it possible for example for the subroutine <italic>ReactionStepOperatorSplit</italic> to share the same arguments for different engines (compare lines 1 and 2, Listings <xref ref-type="fig" rid="Ch1.F2"/> and <xref ref-type="fig" rid="Ch1.F3"/>).</p>

      <fig id="Ch1.F3" specific-use="star"><label>Listing 2</label><caption><p id="d2e2047">Selected sections of Alquimia implementation of the CrunchFlow operator splitting step in <italic>AlquimiaReactionStepOperatorSplit</italic>. Lines starting with “!...” indicate portions of the code omitted for brevity. Some sections have been edited for brevity.  The reader is directed to the actual code for full details.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-l02.png"/>

        </fig>

</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Drivers</title>
      <p id="d2e2067">The widely used open-source codes Amanzi and ParFlow use Alquimia to implement geochemical capabilities. Amanzi is a multi-process high-performance-computing simulator that provides a flexible and extensible simulation capability. ParFlow is a parallel, integrated hydrology model that simulates spatially distributed surface and subsurface flow, as well as land surface processes including evapotranspiration and snow. The implementation of Alquimia in these codes responded to the particular needs and capabilities in each case.</p>

      <fig id="Ch1.F4" specific-use="star"><label>Listing 3</label><caption><p id="d2e2072">Amanzi implementation of Alquimia's <italic>AlquimiaReactionStepOperatorSplit</italic>. Lines starting with “// ...” indicate portions of the code omitted for brevity.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-l03.png"/>

        </fig>

      <p id="d2e2084">In Amanzi, unstructured-mesh and structured-mesh discretizations are available in a single C++ code base, and Alquimia was the right solution for a unified geochemical interface that worked for the different data structures holding the state variables for both meshes. (In this work we use the labels Amanzi-U and Amanzi-S for convenience to distinguish between unstructured and structured capabilities, respectively.) <italic>ChemistryEngine::Advance</italic> is the C++ function that provides a unified access within Amanzi to Alquimia's <italic>AlquimiaReactionStepOperatorSplit</italic> C function (Listing <xref ref-type="fig" rid="Ch1.F4"/>). After calling <italic>AlquimiaReactionStepOperatorSplit</italic>, it obtains the auxiliary output variables. This is by choice here; there is no requirement to do so every time step, but in Amanzi it is done so that when requested by the user, certain output variables can be written to the output file. This function is called for each cell of the discretization; thus the driver is responsible for handling how their data structures are accessed for each cell.</p>
      <p id="d2e2099">The structured-mesh capabilities rely on block-structured adaptive mesh refinement (AMR) from the BoxLib library <xref ref-type="bibr" rid="bib1.bibx13" id="paren.29"/>, built upon Fortran Array Boxes (<italic>FArrayBox</italic>). The function that solves the geochemical problem is written for this <italic>FArrayBox</italic>. Using the available box iterators, the code iterates for each grid cell in the box, performing three operations (Listing <xref ref-type="fig" rid="Ch1.F5"/>). First, the Alquimia transfer containers are updated using the structured variables, then the <italic>ChemistryEngine::Advance</italic>) function (described above) is called with these updated data structures, solving the geochemical problem, and last the new solution is passed back to the (<italic>FArrayBox</italic>) structures for the next transport step.</p>

      <fig id="Ch1.F5" specific-use="star"><label>Listing 4</label><caption><p id="d2e2122">Amanzi-S call to advance chemistry. Lines starting with “// ...” indicate portions of the code omitted for brevity.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-l04.png"/>

        </fig>

      <p id="d2e2131">The three operations are also present in the unstructured counterpart of the <italic>Advance</italic> function (Listing <xref ref-type="fig" rid="Ch1.F6"/>). The copy operations from and to Alquimia data structures are different than those in the structured function and thus cannot be re-used. However, the call to the chemistry engine <italic>Advance</italic> is the same as in the structured function. This exemplifies how the single-cell model adopted in Alquimia offers significant flexibility in enabling a broad range of discretizations.</p>

      <fig id="Ch1.F6" specific-use="star"><label>Listing 5</label><caption><p id="d2e2144">Amanzi-U call to advance chemistry.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-l05.png"/>

        </fig>

      <p id="d2e2153">In ParFlow, earlier work entailed coupling solute transport in the subsurface to a subset of the geochemical capabilities in CrunchFlow via a custom interface <xref ref-type="bibr" rid="bib1.bibx6" id="paren.30"/>. In that case, the same C-to-Fortran macros used for coupling ParFlow with the Community Land Model (CLM) <xref ref-type="bibr" rid="bib1.bibx27" id="paren.31"/> were applied. This earlier work served as the basis for the implementation of Alquimia in the code, although the availability of Alquimia's C interface here enabled a more seamless coupling, without the need of C-to-Fortran macros. For example, the <italic>AlquimiaReactionStepOperatorSplit</italic> C function is called directly within a loop inside block-structured discretization (Listing <xref ref-type="fig" rid="Ch1.F7"/>). The function in Listing <xref ref-type="fig" rid="Ch1.F7"/> shows how the coupling utilizes the C utility library extensively. ParFlow calls <italic>CopyAlquimiaState</italic>, <italic>CopyAlquimiaProperties</italic> and <italic>CopyAlquimiaAuxiliaryData</italic> to store and retrieve data before and after the call to <italic>AlquimiaReactionStepOperatorSplit</italic> in case of non-convergence of the solution (Listing <xref ref-type="fig" rid="Ch1.F7"/>). This is in contrast to Amanzi, where similar functions are used but they are written as new C++ code in Amanzi itself and encapsulated in <italic>BL_to_Alquimia</italic> and <italic>Alquimia_to_BL</italic> for the structured capabilities and <italic>CopyToAlquimia</italic> and <italic>CopyAlquimiaStateToAmanzi</italic> for the unstructured ones.</p>

      <fig id="Ch1.F7" specific-use="star"><label>Listing 6</label><caption><p id="d2e2200">ParFlow call to Alquimia. Lines starting with “// ...” indicate portions of the code omitted for brevity.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-l06.png"/>

        </fig>

</sec>
<sec id="Ch1.S4.SS3">
  <label>4.3</label><title>Multi-way comparison</title>
      <p id="d2e2217">We build on the tests in the Alquimia test suite to develop a set of one-dimensional simulations of reactive transport with Amanzi and ParFlow. The test suite (Sect. <xref ref-type="sec" rid="Ch1.S3.SS3"/>) ensures the correct functioning in the simulation of specific reaction types separately: mineral dissolution–precipitation, aqueous kinetics, ion exchange, surface complexation, and isotherm-based sorption in batch and reactive transport scenarios. In addition, a non-reactive tracer simulation is used to identify how the different discretization schemes affect the differences in the results but also to rule out numerical issues by the data transfer steps involved in using Alquimia.</p>
      <p id="d2e2222">The simulations are simple with regard to the transport processes and the spatial distribution of properties in this domain. The domain is one-dimensional, 100 m in length and discretized with 100 cells, with a porosity of 0.25. A uniform flow rate is applied along the domain in fully saturated conditions such that the infiltrating front is half-way through the domain in the 50-year simulations. Diffusive–dispersive processes are not considered. In the tests with heterogeneous reactions, the solution initially in the domain is in equilibrium with the mineral or surface. A solution with a distinct composition infiltrates from the left boundary, displacing the initial solution and driving the geochemical reactions considered in each case (except for the non-reactive tracer.)</p><fig id="Ch1.F8" specific-use="star"><label>Figure 2</label><caption><p id="d2e2227">Selected results from six 1D reactive transport simulations that consider common geochemical reactions separately: <bold>(a)</bold> non-reactive tracer, <bold>(b)</bold> tritium decay, <bold>(c)</bold> calcite dissolution, <bold>(d)</bold> ion exchange, <bold>(e)</bold> surface complexation and <bold>(f)</bold> isotherm-based sorption. Each simulation was  performed with different code combinations of Amanzi (Amanzi-S and  Amanzi-U), and ParFlow was used as driver codes, with PFLOTRAN and CrunchFlow as engine codes. Additionally, PFLOTRAN and CrunchFlow were also used as reactive transport simulators, where GIMRT and OS3D refer to the global implicit and operator splitting capabilities of CrunchFlow. In global implicit mode, PFLOTRAN and CrunchFlow solve transport implicitly resulting in diffuse solutions, which are omitted in the figure. The Langmuir and Freundlich sorption isotherms are not presented for CrunchFlow. While they can be simulated via a surface complexation model and a single sorbing species, no specific keyword in the input deck is available, and this was not pursued further here. Standalone CrunchFlow does not output sorbed concentrations for linear sorption.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-f02.png"/>

        </fig>

      <p id="d2e2256">Each problem is simulated eight times. This includes six times with different driver–engine combinations (two each with Amanzi-S, Amanzi-U, and ParFlow, using PFLOTRAN and CrunchFlow as engines). Two additional simulations are performed with PFLOTRAN and CrunchFlow as standalone codes using their own transport solvers. In all cases, the Courant number was kept to 1, as needed by the operator splitting approach.</p>
      <p id="d2e2259">Results from the non-reactive tracer show that the advective front is at 50 m at 50 years (Fig. <xref ref-type="fig" rid="Ch1.F8"/>a). Spreading of the front can be attributed exclusively to numerical dispersion added by the numerical scheme employed in each case. Results from Amanzi-S show the sharpest advective front, consistent with the high-order methods in BoxLib <xref ref-type="bibr" rid="bib1.bibx13" id="paren.32"/>, especially when the Courant number equals 1. CrunchFlow's third-order time-diminishing variation (TVD) scheme <xref ref-type="bibr" rid="bib1.bibx16" id="paren.33"/> in operator splitting mode results in a numerical dispersion similar to that of Amanzi-U's explicit second-order scheme. PFLOTRAN and CrunchFlow in global implicit mode use both implicit solvers that result in larger numerical dispersion.</p>
      <p id="d2e2270">The differences in the discretization schemes affect the results from the reactive transport simulations differently. For kinetically controlled aqueous reactions such as first-order tritium radioactive decay, <inline-formula><mml:math id="M41" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:math></inline-formula>, differences arise at the leading edge of the infiltration front but disappear with time behind the front (Fig. <xref ref-type="fig" rid="Ch1.F8"/>b). For fast or equilibrium heterogeneous reactions, two fronts may be present: one associated with the advective infiltration front and one with the heterogeneous reaction.</p>
      <p id="d2e2291">In the calcite simulation, dissolution is treated as a kinetic reaction with a transition-state-theory-type rate law:
            <disp-formula id="Ch1.E10" content-type="numbered"><label>10</label><mml:math id="M42" display="block"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>k</mml:mi><mml:mi>A</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>Q</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M43" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> is the rate constant, <inline-formula><mml:math id="M44" display="inline"><mml:mi>Q</mml:mi></mml:math></inline-formula> is the ion activity product, <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the equilibrium constant of the reaction and <inline-formula><mml:math id="M46" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula> is the reactive surface area. The intrinsic rate of reaction (<inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mi>A</mml:mi></mml:mrow></mml:math></inline-formula>) is much faster than the rate of advective transport, which effectively results in equilibrium conditions. The incoming solution drives dissolution, depleting over time the initial mass of calcite. Where calcite is still present, the solution is in equilibrium with respect to calcite (between 22–100 m at 50 years; Fig. <xref ref-type="fig" rid="Ch1.F8"/>c). Where calcite has been depleted, the concentrations reflect the incoming solution (between 0–22 m at 50 years). The reactive front is thus sharp. All codes capture accurately the location of this sharp front, with only minor differences in the values in the grid cells near the front compared to the absolute variation in values in the front. Thus, this front is not as affected by the numerical dispersion discussed earlier. In contrast, the infiltration front at 50 m shares the same issues discussed previously with regard to the front spreading. The solution resulting from calcite dissolution upstream mixes with the initial solution owing to numerical dispersion (Fig. <xref ref-type="fig" rid="Ch1.F8"/>c). In this example, the reactions reduce differences that may arise from the transport calculations such as those from discretization schemes. In reactive transport systems at steady-state or quasi-steady-state conditions (such as this slow-moving calcite dissolution front), numerical dispersion is often less of a concern to practitioners in contrast to the small time steps required with the operator splitting approach.</p>
      <p id="d2e2378">Surface reactions (sorption isotherms, ion exchange and surface complexation) are all treated as equilibrium reactions by the two engines available in Alquimia. Results for the associated test examples also show a very reasonable agreement between codes capturing the resulting fronts (Fig. <xref ref-type="fig" rid="Ch1.F8"/>). Sorption isotherms (linear, Freundlich and Langmuir) express relationships between aqueous and sorbed concentrations. As such, there is only the advective front present in the results, with the sorbed concentrations tracking this front (Fig. <xref ref-type="fig" rid="Ch1.F8"/>f, compare with Fig. <xref ref-type="fig" rid="Ch1.F8"/>a), and the codes perform according to their performance in the conservative tracer simulations.</p>
      <p id="d2e2387">The ion exchange simulation shows two sets of fronts (Fig. <xref ref-type="fig" rid="Ch1.F8"/>d). The fronts are limited to very narrow bands near the inlet and at 50 m (not visible in Fig. <xref ref-type="fig" rid="Ch1.F8"/>d). The infiltrating solution is dilute in comparison to the initial solution, but the proportions of the solutes are different. Sorbed concentrations change accordingly, with Mg<sup>2+</sup> and Ca<sup>2+</sup> increasing relatively to initial and Na<sup>+</sup> decreasing. Surface complexation of Zn<sup>2+</sup> also shows good agreement between codes, where the greater Zn<sup>2+</sup> concentrations in the infiltrating solution result in increasing sorbed concentrations with time (Fig. <xref ref-type="fig" rid="Ch1.F8"/>e).</p>
</sec>
</sec>
<sec id="Ch1.S5">
  <label>5</label><title>Applications</title>
      <p id="d2e2463">This section presents examples of how Alquimia can be deployed within very different applications and purposes. Alquimia's interface is well-defined (i.e., variables and parameters given and returned are unequivocally specified with their units, and functions are clearly described) and is flexible enough to allow for the peculiarities associated with each application, making it broadly applicable to the simulation of geochemical systems. From a software perspective, the interface must couple with codes written in different programming languages, and the code performance must not be hindered by the coupling. This section also documents issues associated with the development and how they were overcome in each case.</p>
<sec id="Ch1.S5.SS1">
  <label>5.1</label><title>Pore-scale multiphase flow and reactive transport</title>
      <p id="d2e2473">In recent years, there has been an increase in the use of reactive transport models to simulate pore-scale processes, e.g., <xref ref-type="bibr" rid="bib1.bibx32 bib1.bibx35" id="text.34"/>. A distinctive aspect of pore-scale models is that they represent explicitly the fluid and solid phases that make up porous media. From a geochemical perspective, this allows for consideration of mineral surface areas directly from the pore space geometry and thus for the accessibility of the reactive fluids to the mineral surfaces <xref ref-type="bibr" rid="bib1.bibx30" id="paren.35"/>.</p>
      <p id="d2e2482">A recent area of interest is the coupling of pore-scale models for multiphase flow to reactive transport. In this direction, <xref ref-type="bibr" rid="bib1.bibx24" id="text.36"/> developed a multiphase flow and reactive transport simulator building on capabilities of OpenFOAM <xref ref-type="bibr" rid="bib1.bibx38" id="paren.37"/>. OpenFOAM (for “Open-source Field Operation And Manipulation”) is a very popular open-source platform written in C++ to develop computational models in fluid dynamics applications and beyond. For the application presented in  <xref ref-type="bibr" rid="bib1.bibx24" id="text.38"/>, OpenFOAM provides the solver tools for multiphase flow and transport of solutes in the aqueous phase. However, no geochemical packages are available to represent multicomponent aqueous speciation and mineral dissolution–precipitation reactions. CrunchFlow has been used previously in this role, including in pore-scale applications <xref ref-type="bibr" rid="bib1.bibx31 bib1.bibx6 bib1.bibx55 bib1.bibx56" id="paren.39"/>, and thus its use was a preferred choice.</p>
      <p id="d2e2497">Alquimia facilitated the development of the application. Because it is written in C, it was straightforward to use in OpenFOAM's C++-based code. It also provided enough flexibility to incorporate the pore-scale conceptualization of reactive processes. Importantly for pore-scale applications, the reactive surface area (<inline-formula><mml:math id="M53" display="inline"><mml:mrow><mml:msup><mml:mi>A</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>) in the mineral rate (<inline-formula><mml:math id="M54" display="inline"><mml:mrow><mml:msubsup><mml:mi>R</mml:mi><mml:mi>i</mml:mi><mml:mo>′</mml:mo></mml:msubsup></mml:mrow></mml:math></inline-formula>) is in units of area (e.g., m<sup>2</sup>). Mineral dissolution in the pore-scale model is simulated with a transition-state-theory-type rate law:
            <disp-formula id="Ch1.E11" content-type="numbered"><label>11</label><mml:math id="M56" display="block"><mml:mrow><mml:msubsup><mml:mi>R</mml:mi><mml:mi>i</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mi>k</mml:mi><mml:msup><mml:mi>A</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>Q</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M57" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> is the rate constant, <inline-formula><mml:math id="M58" display="inline"><mml:mi>Q</mml:mi></mml:math></inline-formula> is the ion activity product, <inline-formula><mml:math id="M59" display="inline"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the equilibrium constant of the reaction and <inline-formula><mml:math id="M60" display="inline"><mml:mrow><mml:msup><mml:mi>A</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is the reactive surface area. Alquimia was originally designed with porous-media applications, and it also assumes mass balance is performed per unit volume. As such, it requires this surface area to be in units of specific area, namely m<sup>2</sup> m<sup>−3</sup> bulk  as the conservation Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>) is written per unit volume. In other words, this implies that the surface area must be normalized by the volume of medium it occupies. In a discretized form, this volume is the volume of the grid cell <inline-formula><mml:math id="M63" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> (<inline-formula><mml:math id="M64" display="inline"><mml:mrow><mml:msup><mml:mi>V</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>). Hence, in the single-cell Alquimia model, the surface area is the area of the interface as computed by OpenFOAM normalized by the grid cell volume (<inline-formula><mml:math id="M65" display="inline"><mml:mrow><mml:msup><mml:mi>A</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:msup><mml:mi>A</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mi>n</mml:mi></mml:msup><mml:mo>/</mml:mo><mml:msup><mml:mi>V</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>). At the same time, the volumetric water content (<inline-formula><mml:math id="M66" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula>) on the left-hand side of Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>) is set to be the water volume in the cell normalized to the grid cell volume (<inline-formula><mml:math id="M67" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mi mathvariant="normal">aq</mml:mi><mml:mi>n</mml:mi></mml:msubsup><mml:mo>/</mml:mo><mml:msup><mml:mi>V</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>). Hence, the function <inline-formula><mml:math id="M68" display="inline"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E6"/>) is in discretized form:
            <disp-formula id="Ch1.E12" content-type="numbered"><label>12</label><mml:math id="M69" display="block"><mml:mrow><mml:msubsup><mml:mi>R</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mi>k</mml:mi><mml:msup><mml:mi>A</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msup><mml:mi>Q</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>/</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          In a cell <inline-formula><mml:math id="M70" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> where <inline-formula><mml:math id="M71" display="inline"><mml:mrow><mml:msup><mml:msup><mml:mi>A</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> is not zero (i.e., in contact with the solid phase) and where <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:msubsup><mml:mi>V</mml:mi><mml:mi mathvariant="normal">aq</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is not zero (i.e., the aqueous phase is present), <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msubsup><mml:mi>R</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> can be non-zero (i.e., dissolution or precipitation may take place).</p>
      <p id="d2e2825">OpenFOAM uses header files for setting up and initializing the problem at hand. This implies that initial values for primary variables such as species concentrations in solute transport problems are given in these files.  In multicomponent geochemical models, the value of the initial and boundary concentrations is generally not known before the simulation; rather, a set of constraints is given to obtain species concentrations. The specialized Alquimia <italic>AlquimiaProcessCondition</italic> function call is used for this purpose in <xref ref-type="bibr" rid="bib1.bibx24" id="text.40"/>. In a first step, the dimensions of the geochemical problem are given in OpenFOAM header files, which then are used to allocate and initialize the concentration variables with dummy values. In a second step, the Alquimia <italic>AlquimiaSetup</italic> function is called which provides the dimensions of the geochemical system, which must be checked for consistency with those in the header files, followed by a call to <italic>AlquimiaProcessCondition</italic> (Fig. <xref ref-type="fig" rid="Ch1.F9"/>) to initialize and set the boundary conditions of the pore-scale problem in OpenFOAM.</p>

      <fig id="Ch1.F9" specific-use="star"><label>Figure 3</label><caption><p id="d2e2845">Diagram summarizing the computational workflow of CrunchFOAM, including initialization of the CrunchFlow geochemical problem and calls to its solver via Alquimia. Reprinted from <xref ref-type="bibr" rid="bib1.bibx24" id="text.41"/>.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-f03.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS2">
  <label>5.2</label><title>Land surface processes</title>
      <p id="d2e2865">In the Earth system model (ESM) context, the land surface represents the lower boundary of the atmosphere. It also acts as a host of biogeochemical cycles such as soil organic matter decomposition that influence the global carbon budget. Land surface models (LSMs) couple the relevant processes in terrestrial environments in order to quantify key interactions including greenhouse gas exchange fluxes between soil and atmosphere or the capacity of soils to sequester carbon. LSMs generally use simplified representations of biogeochemical cycling that consider the role of carbon, nitrogen, phosphorus and water but neglect other components, pH and the aqueous reactions associated with it, including detailed terminal electron accepting processes <xref ref-type="bibr" rid="bib1.bibx51" id="paren.42"/>. There is an opportunity to significantly improve LSMs by incorporating the broad range of reactions that are available in general-purpose geochemical models. In particular, PFLOTRAN offers flexible options via its Reaction Sandbox feature to readily implement custom reaction rate models <xref ref-type="bibr" rid="bib1.bibx17" id="paren.43"/>.  LSMs are already complex codes in that they include many processes, and thus development often benefits from prototyping new process models, testing them considering a reduced number of coupled processes or exploring scenarios systematically. This process typically also benefits from using tools that automate processing and visualization of the results.</p>
      <p id="d2e2874">In this example application, <xref ref-type="bibr" rid="bib1.bibx54 bib1.bibx51" id="text.44"/> used Alquimia to incorporate geochemical processes in land surface modeling. Rather than tackling a full implementation to an existing land surface model, a two-step approach was used.</p>
      <p id="d2e2880">In a first step, a Python-based prototyping simulator was developed and applied to the simulations of methane processes in Arctic soils. A Python interface implemented Alquimia's API functions and data structures as Python functions using the CFFI package <xref ref-type="bibr" rid="bib1.bibx8" id="paren.45"/>. Alquimia's C interface was used to couple it to this Python implementation. As a prototyping tool, the model consisted of a single-cell representation of the system, and the main use was to systematically prescribe fluxes in the Python code directly. This allowed for setting up the domain in Python data structures while retaining the PFLOTRAN reaction network capabilities. Time-stepping was done in the Python code. The <italic>hands-on</italic> mode in Alquimia allowed setting and updating reaction rate constants from the Python code in each time step. This is not necessarily possible with PFLOTRAN directly. This Python–Alquimia prototyping system was further applied to simulate one-dimensional soil column processes in coastal wetlands <xref ref-type="bibr" rid="bib1.bibx54" id="paren.46"/>.</p>
      <p id="d2e2892">In a second step, Alquimia was used to couple PFLOTRAN to the existing Energy Exascale Earth System Model (E3SM) Land Model (ELM). This allowed for representing complex redox dynamics, aqueous and solid-phase chemistry, and pH dynamics in ELM <xref ref-type="bibr" rid="bib1.bibx21 bib1.bibx51" id="paren.47"/>.  This is especially important in tidal wetlands, which are subject to both saltwater and freshwater inputs driven by tidal hydrological dynamics. Saltwater inputs are associated with elevated sulfate concentrations that provide alternative terminal electron acceptors and reduce methane emissions in saltwater-affected wetlands. This work built on the prototype developed earlier but relied on the Fortran interface in Alquimia for convenience given that ELM is written in Fortran. Although PFLOTRAN is also in Fortran, from the engine's perspective (ELM in this case), the implementation is independent of the language the engine is written. Alquimia initialization (<italic>AlquimiaSetup</italic>) and initial condition equilibration (<italic>AlquimiaProcessCondition</italic>) subroutines were added to the ELM initialization code, and the Alquimia time stepping subroutine was added to ELM (Fig. <xref ref-type="fig" rid="Ch1.F10"/>).</p>

      <fig id="Ch1.F10" specific-use="star"><label>Figure 4</label><caption><p id="d2e2909">Diagram summarizing the computational workflow of ELM-PFLOTRAN, including initialization of the PFLOTRAN geochemical problem and calls to its solver via Alquimia.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-f04.png"/>

        </fig>

      <p id="d2e2918">ELM has its own description of biogeochemical processes, including consideration of carbon and nitrogen, which are present in multiple solid-state pools such as litter and soil organic matter, as well as aqueous soil nitrate and ammonium. In order to replace the ELM description of biogeochemical processes with that of PFLOTRAN, there has to be a one-to-one correspondence between ELM pools and the pools that are included in the PFLOTRAN reaction network used in the coupling <xref ref-type="bibr" rid="bib1.bibx52" id="paren.48"/>. This is accomplished via the PFLOTRAN input file, along with soil organic matter decomposition kinetics defined using the PFLOTRAN Reaction Sandbox <xref ref-type="bibr" rid="bib1.bibx17" id="paren.49"/>. In this process, however, the Alquimia data structure interface was also augmented to treat solid-state soil organic matter pools as immobile chemicals, allowing for transparent data transfer of the pools from ELM to PFLOTRAN and back via the interface.</p>
      <p id="d2e2927">In the implementation, ELM decomposition processes were fully replaced by equivalent or modified calculations on the PFLOTRAN side and included the pools required by ELM. However, additional reactive processes are not affected by any requirements, enabling the consideration of reaction networks of arbitrary complexity using PFLOTRAN's flexible input file. For example, additional elemental cycles such as Mn redox processes or inorganic C interactions with soil minerals could be added to ELM simulations with minimal changes to ELM code. From a software design perspective, ELM stores all state variables of the geochemical problem (e.g., C and N concentrations as well as aqueous concentrations of H<sup>+</sup>, SO<inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:msubsup><mml:mi/><mml:mn mathvariant="normal">4</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>-</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula>, and HS<sup>−</sup> and soil minerals such as iron oxides and iron sulfides if defined in the reaction network), but only those that are directly relevant to ELM state are visible to other model components (primarily organic matter and nutrient pools), while others are only handled by the interface. This allows for minimizing changes in ELM. We can, however, envision that certain process models in ELM could be improved on or refined with the addition of variables from the geochemical model currently not considered. For example, vegetation responses to phytotoxic sulfide concentrations or soil oxygen concentration could be added to improve representation of wetland vegetation <xref ref-type="bibr" rid="bib1.bibx21" id="paren.50"/>.</p>
</sec>
<sec id="Ch1.S5.SS3">
  <label>5.3</label><title>Reactive transport for integrated surface–subsurface hydrology</title>
      <p id="d2e2974">There is an increasing interest in using integrated hydrology models to quantify not only the water exports but also the solute exports from watersheds that impact human activities downstream <xref ref-type="bibr" rid="bib1.bibx4" id="paren.51"/>. While integrated hydrology models have been used extensively to capture the feedback between flow in the surface and subsurface, solute transport and reactive processes are not represented in most models.</p>
      <p id="d2e2980"><xref ref-type="bibr" rid="bib1.bibx33" id="text.52"/> developed an approach to simulate reactive transport processes in integrated surface–subsurface hydrology problems. This approach was implemented in the open-source Advanced Terrestrial Simulator (ATS) <xref ref-type="bibr" rid="bib1.bibx11" id="paren.53"/>, an integrated hydrology code built upon Amanzi solvers for subsurface flow and transport. The approach included geochemical processes both in the surface and subsurface compartments. Alquimia facilitated the implementation because ATS is built upon Amanzi, which already implemented Alquimia. In turn, the flexible multiphysics framework in ATS, which specifies interfaces for coupled processes (process kernels) and automates coupling strategies, allowed for defining separate process kernels for geochemistry in the surface and the subsurface (Fig. <xref ref-type="fig" rid="Ch1.F11"/>).</p>

      <fig id="Ch1.F11" specific-use="star"><label>Figure 5</label><caption><p id="d2e2992">Process tree for a model of integrated hydrology and integrated reactive transport implemented in ATS <xref ref-type="bibr" rid="bib1.bibx11 bib1.bibx33" id="paren.54"/> with calls to Alquimia, including both CrunchFlow and PFLOTRAN. In the example presented here, CrunchFlow is used in the PK subsurface reaction (left) and PFLOTRAN in the PK overland reaction (right). Reprinted from <xref ref-type="bibr" rid="bib1.bibx33" id="text.55"/>.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-f05.png"/>

        </fig>

      <p id="d2e3008">The separation of multiphysics process kernels in ATS offers an excellent opportunity to showcase the flexibility that Alquimia provides in order to develop increasingly complex conceptual models and facilitate its implementation in software. This is exemplified here with simple simulations of reactive transport in a vertical column. To do so, we consider distinct geochemical models in the surface and subsurface and then use both geochemical engines, CrunchFlow and PFLOTRAN, in the same simulation.</p>
      <p id="d2e3011">In the column, the subsurface soil is initially partially saturated and the surface is dry. Over the initial 105 d, a constant precipitation rate is applied to the surface domain, which exceeds the rate of drainage at the bottom of the column. As a result, water infiltrates into the subsurface, which becomes progressively saturated. The surface domain remains dry initially, but eventually the subsurface becomes fully saturated and water accumulates in the surface as well. The saturated hydraulic conductivity of the soil is larger than any of the prescribed water fluxes, precipitation or drainage. At 105 d, precipitation ceases and drainage increases. As a result, the ponded depth of water accumulated on the surface decreases. For the geochemical problem, we consider the presence of calcite and a set of dissolved species that describe the calcium carbonate system, including Ca<sup>2+</sup>, HCO<inline-formula><mml:math id="M78" display="inline"><mml:mrow><mml:msubsup><mml:mi/><mml:mn mathvariant="normal">3</mml:mn><mml:mo>-</mml:mo></mml:msubsup></mml:mrow></mml:math></inline-formula> and H<sup>+</sup> as primaries. The water in the column is initially in equilibrium with calcite. Rainwater is equilibrated with atmospheric CO<sub>2</sub>, resulting in a relatively low pH, which drives calcite dissolution.</p>
      <p id="d2e3056">We consider two separate scenarios that represent two end-member conceptual models. Because in ATS surface water is treated with the shallow-water approximation, water on the surface is well mixed. If heterogeneous reactions such as calcite dissolution are considered, this implies that the entire water column volume is in contact with mineral surfaces. This may overestimate the actual rate of dissolution if well-mixed conditions are not achieved (e.g., gradients in concentrations exist along the water column). In scenario 1, surface water is assumed not to be in contact with the mineral at all, and calcite dissolution is not included. In scenario 2, calcite is also present at the surface for dissolution.</p>
      <p id="d2e3059">In these simulations, we further demonstrate Alquimia's flexibility by using it to couple ATS with PFLOTRAN in the surface and CrunchFlow in the subsurface. These simultaneous couplings are not strictly necessary here because the capabilities to describe mineral dissolution and aqueous complexation in PFLOTRAN and CrunchFlow are very similar (yielding to the results shown in Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/>). However, one can envision situations where different engines have different capabilities or that different process representations could be used in different parts of the domain with different codes. For example, a land surface model could be used to describe geochemical processes in the shallow subsurface in connection with soil organic matter, vegetation and microbial dynamics, and a specialized geochemical model could be used to describe deeper subsurface processes, including mineral weathering.</p>

      <fig id="Ch1.F12" specific-use="star"><label>Figure 6</label><caption><p id="d2e3066">Results from surface–subsurface reactive transport simulation by ATS, with PFLOTRAN solving the geochemical problem in the surface and CrunchFlow in the subsurface, showing <bold>(a)</bold> ponded depth and water saturation, <bold>(b)</bold> Ca<sup>2+</sup> concentrations in scenario 1 with dissolution in the surface, and <bold>(c)</bold> Ca<sup>2+</sup> concentrations in scenario 2. Surface variables are shown as symbols at an arbitrary height and subsurface variables as solid lines as a function of height.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/3241/2025/gmd-18-3241-2025-f06.png"/>

        </fig>

      <p id="d2e3109">Results show differences in Ca<sup>2+</sup> concentrations with depth in the two scenarios (Fig. <xref ref-type="fig" rid="Ch1.F12"/>). Before day 75, the surface is dry, and there are no solutes in the surface. Rainwater infiltrates directly into the subsurface, and in both scenarios results are identical for concentrations, with concentrations increasing with depth as calcite dissolves. From day 75, concentrations appear in the surface. In scenario 1, dissolution in the surface results in an increase of concentrations there with respect to rainwater values, while in scenario 2, the values reflect those in rainwater. As surface water infiltrates, it continues to drive calcite dissolution in both scenarios. Concentration profiles until day 105 are visually very similar in both scenarios, although numerical values differ by as much as 6 %. This is due to how ATS calculates mass fluxes at the surface–subsurface interface <xref ref-type="bibr" rid="bib1.bibx33" id="paren.56"/>. As indicated in the process kernel (PK) tree in Fig. <xref ref-type="fig" rid="Ch1.F11"/>, solute fluxes are obtained first for integrated transport; then the resulting concentrations from these fluxes are used to solve the geochemical problem. In this case, this means that fluxes into the subsurface reflect not only concentrations in the surface but also concentrations in the rainwater. Because concentrations in the rainwater are essentially zero, the solution infiltrating in the subsurface until day 105 is much more diluted than that in the surface. When precipitation ceases, the infiltrating concentrations reflect solely those in the ponded water and thus start to differ more clearly between scenario 1 and 2 (Fig. <xref ref-type="fig" rid="Ch1.F12"/>). This type of conceptual choices is made in the development of the driver code (ATS in this case) and enabled by the flexibility of the software interface.</p>
</sec>
</sec>
<sec id="Ch1.S6" sec-type="conclusions">
  <label>6</label><title>Discussion and conclusions</title>
<sec id="Ch1.S6.SS1">
  <label>6.1</label><title>Flexibility</title>
      <p id="d2e3149">The examples presented above highlight the flexibility of the generic interface Alquimia to expand the capabilities of multiphysics simulators to include multicomponent geochemical processes. Some of these applications go beyond the use initially envisioned for the interface, i.e., flow and reactive transport in subsurface porous media <xref ref-type="bibr" rid="bib1.bibx36" id="paren.57"/>. From this point of view, the operator <inline-formula><mml:math id="M84" display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) can be seen as a generic process operator that applies to concentration and affects the mass balance of component <inline-formula><mml:math id="M85" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>.</p>
      <p id="d2e3171">For example, Alquimia can be used to perform simple batch chemistry calculations of the kind routinely carried out by geochemical models such as PHREEQC, without consideration of other processes that involve fluxes over a spatially discretized domain. This may be necessary for batch-scale laboratory experiments or, as in the land surface model example, to expand the range of reactive processes considered <xref ref-type="bibr" rid="bib1.bibx50 bib1.bibx48" id="paren.58"/>. Further, when column-based land surface models such as ELM are used <xref ref-type="bibr" rid="bib1.bibx51" id="paren.59"/>, in addition to solute transport, the <inline-formula><mml:math id="M86" display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> operator can also include gas transport and lateral fluxes associated with tidal fluctuations along the depth of column with consideration of the corresponding salinity gradients.</p>
      <p id="d2e3187">Generally, however, the operator <inline-formula><mml:math id="M87" display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> includes fluxes over a spatial domain. In the pore-scale application, transport was considered in the aqueous phase only (Sect. <xref ref-type="sec" rid="Ch1.S5.SS1"/>). In the integrated hydrology application (Sect.  <xref ref-type="sec" rid="Ch1.S5.SS3"/>), the subsurface was simulated as a porous medium like in Amanzi or ParFlow (Sect. <xref ref-type="sec" rid="Ch1.S4.SS2"/>), but the surface was represented as a 2D domain using the shallow-water approximation. There, the solute mass balance is solved for the ponded depth of water. Because the surface may be wet or dry as a result of the dynamic conditions driven by rain events, the reactive transport processes are solved only for the wet portion of the surface.</p>
      <p id="d2e3203">The flexibility is also demonstrated by its application to different meshing and discretization schemes. The single-cell approach enabled the use of structured and unstructured meshes in Amanzi <xref ref-type="bibr" rid="bib1.bibx36" id="paren.60"/>. The unstructured capabilities in Amanzi allowed for traditional finite volume schemes, mimetic finite differences and nonlinear finite volumes <xref ref-type="bibr" rid="bib1.bibx36" id="paren.61"/>, while the structured capabilities allowed for adaptive mesh refinement (AMR) <xref ref-type="bibr" rid="bib1.bibx13" id="paren.62"/>.</p>
</sec>
<sec id="Ch1.S6.SS2">
  <label>6.2</label><title>Prototyping and benchmarking</title>
      <p id="d2e3223">Alquimia allows for rapid prototyping new capabilities and approaches. Examples include time stepping schemes or implementations of processes that are not readily available in engine codes. In the example of <xref ref-type="bibr" rid="bib1.bibx50" id="text.63"/>, this enabled prescribing the oxic/anoxic fluctuations of the system from the Python driver code by exchanging oxygen via a time-varying external boundary condition. Similarly, rate constants were updated by the driver at specified time points using the fine-grained access to the reaction parameters provided by Alquimia's hands-on mode.</p>
      <p id="d2e3229">As a generic interface, once Alquimia is implemented in a driver, one can swap engines for the same problem as long as these engines provide the same capabilities. This is of particular interest in benchmarking of reactive transport models. Because of the coupled nature of reactive transport models, it is important to narrow down the source of discrepancies between codes. By sharing the same engine or by sharing the same driver, the use of Alquimia allows one to isolate the potential sources of discrepancies. The example presented in Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/> demonstrated how this approach can be used to investigate the impact of discretization schemes, but this could be extended to other aspects.</p>
</sec>
<sec id="Ch1.S6.SS3">
  <label>6.3</label><title>Parallelization</title>
      <p id="d2e3242">Alquimia is a single-cell or 0-dimensional model that has no notion of the spatial problem. As discussed in Sect. <xref ref-type="sec" rid="Ch1.S5.SS1"/> and <xref ref-type="sec" rid="Ch1.S5.SS3"/>, this assumes well-mixed geochemical conditions in this cell, which can be viewed as a batch reactor. The geochemical solution can be obtained independently of the other cells within the discretized spatial domain in a multiphysics problem. Hence, the driver determines the parallelization strategy for the solution of the spatially distributed, multiphysics problem. Because the geochemical equations are uncoupled across the domain, there is considerable freedom in staging their integration and load balancing.</p>
      <p id="d2e3249">All code examples presented here, except the Python-based prototype in Sect. <xref ref-type="sec" rid="Ch1.S5.SS2"/>, are multithreaded CPU-based implementations and involve Message Passing Interface (MPI) parallelization by the driver. The work to integrate all the cells in the domain can be distributed across the available threads with no race or synchronization concerns. Load balance can be achieved by evenly distributing the work across processors and within each processor across available threads. Listing <xref ref-type="fig" rid="Ch1.F5"/> shows how Amanzi-S is explicitly exploiting multi-threading within a Fortran Array Box. However, the load balancing of chemical calculations may be at odds with load-balancing strategies that incorporate stencil operations (such as advection or diffusion).  While none of the examples presented tested this, it is possible to use different load-balancing strategies for transport and chemistry when using Alquimia. The driver could choose to redistribute the state data between each stage of the time-split integration differently, including one that seeks better load balancing when sharp geochemical fronts are present in areas of the domain (and thus computations are more expensive) such as round-robin approaches,  (e.g., <xref ref-type="bibr" rid="bib1.bibx12" id="altparen.64"/>). The situation is more complex in GPU implementations <xref ref-type="bibr" rid="bib1.bibx3" id="paren.65"/>. This contribution could not address the GPU use case with the capabilities available in the engines and drivers using Alquimia.</p>
      <p id="d2e3262">Geochemical engines could also implement a form of task parallelism for the geochemical solution within each cell. Although it is not the case for PFLOTRAN or CrunchFlow, it has been suggested that such a form of parallelism could speed up geochemical calculations in systems with a very large number of species and reactions.  Anecdotal reports indicate that this has been effective for the codes the Geochemist's Workbench (GWB) ChemPlugin <xref ref-type="bibr" rid="bib1.bibx7" id="paren.66"/> and TOUGHREACT <xref ref-type="bibr" rid="bib1.bibx43" id="paren.67"/>.</p>
</sec>
<sec id="Ch1.S6.SS4">
  <label>6.4</label><title>Limitations and Future work</title>
      <p id="d2e3279">As a generic interface, Alquimia is designed to allow for the implementation of different engines. However, the current number of implemented engines is still limited. As a result, only a small portion of all potential options have been demonstrated here.</p>
      <p id="d2e3282">Alquimia allows for the canonical approach (Eqs. <xref ref-type="disp-formula" rid="Ch1.E2"/>–<xref ref-type="disp-formula" rid="Ch1.E3"/>), commonly used in reactive transport models such as PFLOTRAN and CrunchFlow <xref ref-type="bibr" rid="bib1.bibx25" id="paren.68"/>, but this is not required. If this approach is not available in a given engine or equilibrium may not be assumed, there are no restrictions in setting the number of aqueous complexes (<inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) to zero and using the total mobile concentrations to hold all the species concentrations. Heterogeneous reactions present a similar case. For mineral dissolution–precipitation, mineral volume fractions and surface areas are passed between driver and engine, but there is no implied assumption whether they are implemented as equilibrium or kinetic reactions in the engine. Likewise, only sorbed concentrations are required for surface complexation reactions, which have been modeled both as equilibrium <xref ref-type="bibr" rid="bib1.bibx47" id="paren.69"/> and as kinetic processes <xref ref-type="bibr" rid="bib1.bibx15" id="paren.70"/>. The assumption on the driver side is only that total mobile concentrations are to be transported with the aqueous phase, while total immobile concentrations are not.</p>
      <p id="d2e3310">Alquimia currently only permits operator splitting coupling between engines and drivers. This poses a constraint on the time step size and thus hampers the solution of certain problems, e.g., rapid transport. However, the interface can be expanded to allow for the global implicit approach. The same single-cell model used for operator splitting would be applicable, but the Alquimia state variables would have to include the Jacobian matrix of the geochemical problem in each grid cell. The driver code would be set up to solve the nonlinear problem resulting from coupling solute transport and reactions over the spatial domain. Parallelization responsibilities would remain with the driver with geochemical calculation still being performed for a cell. For the operator splitting coupling, there are no restrictions on how the nonlinear problem is solved, and other schemes could be considered such as Strang symmetrization to speed up calculations if needed, e.g., in the case of rapid transport.</p>
      <p id="d2e3313">In the applications presented here, the choice of engine was often a function of the familiarity of the users with one of the engines available but also with the availability of specific capabilities from one engine. While most codes with geochemical capabilities share a set of basic capabilities <xref ref-type="bibr" rid="bib1.bibx47" id="paren.71"/>, one can anticipate that, as the number of engines connected to Alquimia grows, specialized capabilities will vary more widely between engines, and this will open up the range of applications Alquimia can be used for. The example in Sect. <xref ref-type="sec" rid="Ch1.S5.SS3"/> can serve as an example of this, where different geochemical engines can be used in different parts of the domain as appropriate. Further, increasingly geochemical models make use of machine learning tools to accelerate calculations <xref ref-type="bibr" rid="bib1.bibx22" id="paren.72"/> or replace process-based calculations <xref ref-type="bibr" rid="bib1.bibx9" id="paren.73"/>. These machine learning models could be seamlessly integrated in the interface as additional engines, which may be used in isolation or in combination with process-based engines as needed. While the two engines currently available are Fortran codes, the interface is prepared to couple with engines in other languages, e.g., PHREEQC, written in C++.</p>
      <p id="d2e3328">Against the backdrop of continuous evolution and development of multiphysics simulators driven and enabled by new approaches and capabilities, tools like Alquimia that simplify coupling by codifying a clear and flexible interface between codes and processes are increasingly valuable. Specifically, Alquimia enables access to existing tried-and-true geochemical models, but also it facilitates future development and implementation of new models. Code interoperability gives access to a range of capabilities with simple, easily maintainable code bases that also facilitate prototyping and validation of new software. Ultimately, improved software productivity and sustainability have the potential to increase the pace of scientific discovery and promote more efficient and effective use of research resources.</p>
</sec>
</sec>

      
      </body>
    <back><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d2e3336">Alquimia <xref ref-type="bibr" rid="bib1.bibx1" id="paren.74"/> is developed and maintained using the repository  at <uri>https://github.com/LBL-EESA/alquimia-dev</uri> <xref ref-type="bibr" rid="bib1.bibx2" id="paren.75"/>, with releases generally timed with xSDK releases <xref ref-type="bibr" rid="bib1.bibx5" id="paren.76"/>. Different versions of the code were used for results presented here. Snapshots of Alquimia, PFLOTRAN, CrunchFlow, Amanzi, ParFlow and ATS for the versions involved in this work (as noted below) as well as the input files for the included simulations are available at <ext-link xlink:href="https://doi.org/10.5281/zenodo.11414442" ext-link-type="DOI">10.5281/zenodo.11414442</ext-link> <xref ref-type="bibr" rid="bib1.bibx34" id="paren.77"/>. The Amanzi source code used in this work is the version with hash 4867af7, which includes input files for Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/> and reference solutions for CrunchFlow and PFLOTRAN. The ParFlow source code used in this work is the version with hash d4b20b9. The versions of Alquimia, PFLOTRAN, CrunchFlow and PETSc used with these versions of Amanzi and ParFlow are 1.0.9,  3.0.2., 906e164 and 3.16.0, respectively. The CrunchFOAM application is described in detail by <xref ref-type="bibr" rid="bib1.bibx24" id="text.78"/> and is based on version 1.0.6 of Alquimia. The land surface model applications are described in detail by <xref ref-type="bibr" rid="bib1.bibx50" id="text.79"/>, <xref ref-type="bibr" rid="bib1.bibx54" id="text.80"/>, <xref ref-type="bibr" rid="bib1.bibx21" id="text.81"/>, and <xref ref-type="bibr" rid="bib1.bibx51" id="text.82"/> and are based on version 1.0.8 of Alquimia, which can be found in the model–data archives associated with these publications at <ext-link xlink:href="https://doi.org/10.5440/1814844" ext-link-type="DOI">10.5440/1814844</ext-link> <xref ref-type="bibr" rid="bib1.bibx48" id="paren.83"/> and at <ext-link xlink:href="https://doi.org/10.15485/1991625" ext-link-type="DOI">10.15485/1991625</ext-link> <xref ref-type="bibr" rid="bib1.bibx49" id="paren.84"/>. The integrated hydrology application with ATS is described in detail by <xref ref-type="bibr" rid="bib1.bibx33" id="text.85"/>, with results presented here obtained with the version with hash 37a7b6e of ATS, which includes the input files of the simulations as part of the regression tests. The versions of Alquimia, PFLOTRAN, CrunchFlow and PETSc used in this version of ATS are 1.0.9, 5.0.0, cf938c8 and 3.20.0, respectively.</p>
  </notes><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d2e3394">SM wrote the manuscript, developed Alquimia and Amanzi-ATS, implemented CrunchFlow in Alquimia, and performed the simulations in Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/> and <xref ref-type="sec" rid="Ch1.S5.SS3"/>. BJA had the original idea for, designed, and developed Alquimia; implemented PFLOTRAN in Alquimia; and developed PFLOTRAN. JNJ developed Alquimia, including compliance to xSDK policies, and implemented Alquimia in Amanzi. GEH developed Alquimia and PFLOTRAN and implemented PFLOTRAN in Alquimia. BNS developed ELM-PFLOTRAN and Alquimia, including its Fortran and CFFI interfaces. KL developed Amanzi-U and Alquimia in Amanzi. MSD developed Amanzi-S and Alquimia in Amanzi. JJB implemented Alquimia in ParFlow. DS developed Amanzi-ATS and Alquimia in ATS. HD led the development of CrunchFOAM. PCL developed PFLOTRAN and participated in the initial Alquimia design. CIS developed CrunchFlow and participated in the initial Alquimia design. JDM developed Amanzi-ATS and led the projects that funded this work.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d2e3404">The contact author has declared that none of the authors has any competing interests.</p>
  </notes><notes notes-type="disclaimer"><title>Disclaimer</title>

      <p id="d2e3410">Any subjective views or opinions that might be expressed in the paper do not necessarily represent the views of the U.S. Department of Energy. Publisher’s note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.</p>
  </notes><ack><title>Acknowledgements</title><p id="d2e3419">This material is based upon work supported as part of the IDEAS-Watersheds project funded by the U.S. Department of Energy, Office of Science, Office of Biological and Environmental Research (contract no. DE-AC02-05CH11231). Initial development of Alquimia was funded by the U.S. Department of Energy, Office of Environmental Management (contract no. DE-AC02-05CH11231). Benjamin N. Sulman is supported by the U.S. Department of Energy Office of Science Early Career Research program as part of research in Earth System Model Development within the Earth and Environmental Systems Modeling Program and by the Next Generation Ecosystem Experiments (NGEE) Arctic project through the Office of Biological and Environmental Research in the U.S. Department of Energy Office of Science. Oak Ridge National Laboratory is managed by UT-Battelle, LLC, for the U.S. Department of Energy under contract  DE-AC05-00OR22725. PNNL is operated for the DOE by Battelle Memorial Institute under contract DE-AC05-76RL01830.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d2e3425">This research has been supported by the U.S. Department of Energy (grant nos. DE-AC02-05CH11231, DE-AC05-00OR22725, and DE-AC05-76RL01830).</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d2e3431">This paper was edited by Hans Verbeeck and reviewed by two anonymous referees.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Andre et al.(2013)Andre, Molins, Johnson, and Steefel</label><mixed-citation>Andre, B., Molins, S., Johnson, J., and Steefel, C.: Alquimia, U.S. Department of Energy Office of Scientific and Technical Information, <ext-link xlink:href="https://doi.org/10.11578/DC.20210416.49" ext-link-type="DOI">10.11578/DC.20210416.49</ext-link>,  2013.</mixed-citation></ref>
      <ref id="bib1.bibx2"><label>Andre et al.(2015)</label><mixed-citation>Andre, B., Molins, S., Johnson, J., and Steefel, C. I.: Alquimia, GitHub, <uri>https://github.com/LBL-EESA/alquimia-dev</uri> (last access: 25 May 2025), 2015.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Balos et al.(2025)Balos, Day, Esclapez, Felden, Gardner, Hassanaly, Reynolds, Rood, Sexton, Wimer, and Woodward</label><mixed-citation>Balos, C. J., Day, M., Esclapez, L., Felden, A. M., Gardner, D. J., Hassanaly, M., Reynolds, D. R., Rood, J. S., Sexton, J. M., Wimer, N. T., and Woodward, C. S.: SUNDIALS time integrators for exascale applications with many independent systems of ordinary differential equations, Int. J. High Perform. C., 39, 123–146, <ext-link xlink:href="https://doi.org/10.1177/10943420241280060" ext-link-type="DOI">10.1177/10943420241280060</ext-link>, 2025.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>Bao et al.(2017)Bao, Li, Shi, and Duffy</label><mixed-citation>Bao, C., Li, L., Shi, Y., and Duffy, C.: Understanding watershed hydrogeochemistry: 1. Development of RT?Flux?PIHM, Water Resour. Res., 53, 2328–2345, <ext-link xlink:href="https://doi.org/10.1002/2016WR018934" ext-link-type="DOI">10.1002/2016WR018934</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>Bartlett et al.(2017)Bartlett, Demeshko, Gamblin, Hammond, Heroux, Johnson, Klinvex, Li, McInnes, Moulton, Osei-Kuffuor, Sarich, Smith, Willenbring, and Yang</label><mixed-citation>Bartlett, R., Demeshko, I., Gamblin, T., Hammond, G., Heroux, M. A., Johnson, J., Klinvex, A., Li, X., McInnes, L. C., Moulton, J. D., Osei-Kuffuor, D., Sarich, J., Smith, B., Willenbring, J., and Yang, U. M.: xSDK Foundations: Toward an Extreme-scale Scientific Software Development Kit, Supercomputing Frontiers and Innovations, 4, 69–82, <ext-link xlink:href="https://doi.org/10.14529/jsfi170104" ext-link-type="DOI">10.14529/jsfi170104</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Beisman et al.(2015)Beisman, Maxwell, Navarre-Sitchler, Steefel, and Molins</label><mixed-citation>Beisman, J., Maxwell, R., Navarre-Sitchler, A., Steefel, C., and Molins, S.: ParCrunchFlow: an efficient, parallel reactive transport simulation tool for physically and chemically heterogeneous saturated subsurface environments, Comput. Geosci., 19,  403–422, <ext-link xlink:href="https://doi.org/10.1007/s10596-015-9475-x" ext-link-type="DOI">10.1007/s10596-015-9475-x</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Bethke(2024)</label><mixed-citation>Bethke, C. M.: The Geochemist's Workbench<sup>®</sup>  Release 17 ChemPlugin™ User's Guide, Aqueous Solutions, LLC, Champaign, Illinois, <uri>https://www.gwb.com/pdf/GWB/ChemPluginUsersGuide.pdf</uri> (last access: 24 May 2025), 2024.</mixed-citation></ref>
      <ref id="bib1.bibx8"><label>CFFI(2023)</label><mixed-citation>CFFI: CFFI documentation – CFFI 1.15.1 documentation, <uri>https://cffi.readthedocs.io/en/latest/</uri> (last access: 24 May 2025), 2023.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Chang et al.(2023)Chang, Zavarin, Beverly, and Wainwright</label><mixed-citation>Chang, E., Zavarin, M., Beverly, L., and Wainwright, H.: A chemistry-informed hybrid machine learning approach to predict metal adsorption onto mineral surfaces, Appl. Geochem., 155, 105731, <ext-link xlink:href="https://doi.org/10.1016/j.apgeochem.2023.105731" ext-link-type="DOI">10.1016/j.apgeochem.2023.105731</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx10"><label>Charlton and Parkhurst(2011)</label><mixed-citation>Charlton, S. R. and Parkhurst, D. L.: Modules based on the geochemical model PHREEQC for use in scripting and programming languages, Comput. Geosci., 37, 1653–1663, <ext-link xlink:href="https://doi.org/10.1016/j.cageo.2011.02.005" ext-link-type="DOI">10.1016/j.cageo.2011.02.005</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Coon et al.(2019)Coon, Svyatsky, Jan, Kikinzon, Berndt, Atchley, Harp, Manzini, Shelef, Lipnikov, Garimella, Xu, Moulton, Karra, Painter, Jafarov, and Molins</label><mixed-citation>Coon, E., Svyatsky, D., Jan, A., Kikinzon, E., Berndt, M., Atchley, A., Harp, D., Manzini, G., Shelef, E., Lipnikov, K., Garimella, R., Xu, C., Moulton, D., Karra, S., Painter, S., Jafarov, E., and Molins, S.: Advanced Terrestrial Simulator, U.S. Department of Energy Office of Scientific and Technical Information, <ext-link xlink:href="https://doi.org/10.11578/DC.20190911.1" ext-link-type="DOI">10.11578/DC.20190911.1</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>De Lucia et al.(2021)De Lucia, Kühn, Lindemann, Lübke, and Schnor</label><mixed-citation>De Lucia, M., Kühn, M., Lindemann, A., Lübke, M., and Schnor, B.: POET (v0.1): speedup of many-core parallel reactive transport simulations with fast DHT lookups, Geosci. Model Dev., 14, 7391–7409, <ext-link xlink:href="https://doi.org/10.5194/gmd-14-7391-2021" ext-link-type="DOI">10.5194/gmd-14-7391-2021</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Dubey et al.(2014)Dubey, Almgren, Bell, Berzins, Brandt, Bryan, Colella, Graves, Lijewski, L”offler, O'Shea, Schnetter, Van Straalen, and Weide</label><mixed-citation>Dubey, A., Almgren, A., Bell, J., Berzins, M., Brandt, S., Bryan, G., Colella, P., Graves, D., Lijewski, M., L”offler, F., O'Shea, B., Schnetter, E., Van Straalen, B., and Weide, K.: A survey of high level frameworks in block-structured adaptive mesh refinement packages, J. Parallel and Distr. Com., 74, 3217–3227, <ext-link xlink:href="https://doi.org/10.1016/j.jpdc.2014.07.001" ext-link-type="DOI">10.1016/j.jpdc.2014.07.001</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx14"><label>GitHub(2024)</label><mixed-citation>GitHub: GitHub Actions documentation, <uri>https://docs.github.com/en/actions</uri> (last access: 24 May 2025), 2024.</mixed-citation></ref>
      <ref id="bib1.bibx15"><label>Greskowiak et al.(2015)Greskowiak, Gwo, Jacques, Yin, and Mayer</label><mixed-citation>Greskowiak, J., Gwo, J., Jacques, D., Yin, J., and Mayer, K. U.: A benchmark for multi-rate surface complexation and 1D dual-domain multi-component reactive transport of U(VI), Comput. Geosci., 19, 585–597, <ext-link xlink:href="https://doi.org/10.1007/s10596-014-9457-4" ext-link-type="DOI">10.1007/s10596-014-9457-4</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Gupta et al.(1991)Gupta, Lake, Pope, Sepehrnoori, and King</label><mixed-citation>Gupta, A. D., Lake, L. W., Pope, G. A., Sepehrnoori, K. T. U., and King, M. J. B. R.: High-Resolution Monotonic Schemes for Reservoir Fluid Flow Simulation, In Situ, (United States), 15, <uri>https://www.osti.gov/scitech/biblio/5799660</uri> (last access: 24 May 2025), 1991.</mixed-citation></ref>
      <ref id="bib1.bibx17"><label>Hammond(2022)</label><mixed-citation>Hammond, G. E.: The PFLOTRAN Reaction Sandbox, Geosci. Model Dev., 15, 1659–1676, <ext-link xlink:href="https://doi.org/10.5194/gmd-15-1659-2022" ext-link-type="DOI">10.5194/gmd-15-1659-2022</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Hammond et al.(2014)Hammond, Lichtner, and Mills</label><mixed-citation>Hammond, G. E., Lichtner, P. C., and Mills, R. T.: Evaluating the performance of parallel subsurface simulators: An illustrative example with PFLOTRAN, Water Resour. Res., 50, 208–228, <ext-link xlink:href="https://doi.org/10.1002/2012WR013483" ext-link-type="DOI">10.1002/2012WR013483</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx19"><label>Jara et al.(2017)Jara, de Dreuzy, and Cochepin</label><mixed-citation>Jara, D., de Dreuzy, J.-R., and Cochepin, B.: TReacLab: An object-oriented implementation of non-intrusive splitting methods to couple independent transport and geochemical software, Comput. Geosci., 109, 281–294, <ext-link xlink:href="https://doi.org/10.1016/j.cageo.2017.09.005" ext-link-type="DOI">10.1016/j.cageo.2017.09.005</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx20"><label>Jaysaval et al.(2023)Jaysaval, Hammond, and Johnson</label><mixed-citation>Jaysaval, P., Hammond, G. E., and Johnson, T. C.: Massively parallel modeling and inversion of electrical resistivity tomography data using PFLOTRAN, Geosci. Model Dev., 16, 961–976, <ext-link xlink:href="https://doi.org/10.5194/gmd-16-961-2023" ext-link-type="DOI">10.5194/gmd-16-961-2023</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>LaFond-Hudson and Sulman(2023)</label><mixed-citation>LaFond-Hudson, S. and Sulman, B.: Modeling strategies and data needs for representing coastal wetland vegetation in land surface models, New Phytol., 238, 938–951, <ext-link xlink:href="https://doi.org/10.1111/nph.18760" ext-link-type="DOI">10.1111/nph.18760</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>Leal et al.(2020)Leal, Kyas, Kulik, and Saar</label><mixed-citation>Leal, A. M. M., Kyas, S., Kulik, D. A., and Saar, M. O.: Accelerating Reactive Transport Modeling: On-Demand Machine Learning Algorithm for Chemical Equilibrium Calculations, Transport Porous Med., 133, 161–204, <ext-link xlink:href="https://doi.org/10.1007/s11242-020-01412-1" ext-link-type="DOI">10.1007/s11242-020-01412-1</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Li et al.(2017)Li, Maher, Navarre-Sitchler, Druhan, Meile, Lawrence, Moore, Perdrial, Sullivan, Thompson, Jin, Bolton, Brantley, Dietrich, Mayer, Steefel, Valocchi, Zachara, Kocar, Mcintosh, Bao, Tutolo, Beisman, Kumar, and Sonnenthal</label><mixed-citation>Li, L., Maher, K., Navarre-Sitchler, A., Druhan, J., Meile, C., Lawrence, C., Moore, J., Perdrial, J., Sullivan, P., Thompson, A., Jin, L., Bolton, E. W., Brantley, S. L., Dietrich, W. E., Mayer, K. U., Steefel, C. I., Valocchi, A., Zachara, J., Kocar, B., Mcintosh, J., Bao, C., Tutolo, B. M., Beisman, J., Kumar, M., and Sonnenthal, E.: Expanding the role of reactive transport models in critical zone processes, Earth-Sci. Rev., 165, 280–301, <ext-link xlink:href="https://doi.org/10.1016/j.earscirev.2016.09.001" ext-link-type="DOI">10.1016/j.earscirev.2016.09.001</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Li et al.(2022)Li, Deng, and Molins</label><mixed-citation>Li, P., Deng, H., and Molins, S.: The Effect of Pore-Scale Two-Phase Flow on Mineral Reaction Rates, Frontiers in Water, 3, 734518, <ext-link xlink:href="https://doi.org/10.3389/frwa.2021.734518" ext-link-type="DOI">10.3389/frwa.2021.734518</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>Lichtner(1991)</label><mixed-citation>Lichtner, P. C.: The Quasi-Stationary State Approximation to Fluid/Rock Reaction: Local Equilibrium Revisited, in: Diffusion, Atomic Ordering, and Mass Transport: Selected Topics in Geochemistry, edited by: Ganguly, J., Advances in Physical Geochemistry, Springer US, New York, NY, 452–560, ISBN 978-1-4613-9019-0, <ext-link xlink:href="https://doi.org/10.1007/978-1-4613-9019-0_13" ext-link-type="DOI">10.1007/978-1-4613-9019-0_13</ext-link>, 1991.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Lichtner et al.(2015)Lichtner, Hammond, Lu, Karra, Bisht, Andre, Lawrence Berkeley National Lab. (LBNL), Mills, Univ. of Tennessee, and Kumar</label><mixed-citation>Lichtner, P. C., Hammond, G. E., Lu, C., Karra, S., Bisht, G., Andre, B. N. C. F. A. R., Lawrence Berkeley National Lab. (LBNL), B., Mills, R. I. C., Univ. of Tennessee, K., and Kumar, J.: Pflotran User Manual: A Massively Parallel Reactive Flow and Transport Model for Describing Surface and Subsurface Processes, Tech. Rep. LA-UR–15-20403, Los Alamos National Lab. (LANL), Los Alamos, NM (United States); Sandia National Lab. (SNL-NM), Albuquerque, NM (United States), Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States), Oak Ridge National Lab. (ORNL), Oak Ridge, TN (United States), OFM Research, Redmond, WA, USA, <ext-link xlink:href="https://doi.org/10.2172/1168703" ext-link-type="DOI">10.2172/1168703</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Maxwell and Miller(2005)</label><mixed-citation>Maxwell, R. M. and Miller, N. L.: Development of a Coupled Land Surface and Groundwater Model, J. Hydrometeorol., 6, 233–247, <ext-link xlink:href="https://doi.org/10.1175/JHM422.1" ext-link-type="DOI">10.1175/JHM422.1</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Maxwell et al.(2014)Maxwell, Putti, Meyerhoff, Delfs, Ferguson, Ivanov, Kim, Kolditz, Kollet, Kumar, Lopez, Niu, Paniconi, Park, Phanikumar, Shen, Sudicky, and Sulis</label><mixed-citation>Maxwell, R. M., Putti, M., Meyerhoff, S., Delfs, J.-O., Ferguson, I. M., Ivanov, V., Kim, J., Kolditz, O., Kollet, S. J., Kumar, M., Lopez, S., Niu, J., Paniconi, C., Park, Y.-J., Phanikumar, M. S., Shen, C., Sudicky, E. A., and Sulis, M.: Surface-subsurface model intercomparison: A first set of benchmark results to diagnose integrated hydrology and feedbacks, Water Resour. Res., 50, 1531–1549, <ext-link xlink:href="https://doi.org/10.1002/2013WR013725" ext-link-type="DOI">10.1002/2013WR013725</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Mayer et al.(2002)Mayer, Frind, and Blowes</label><mixed-citation>Mayer, K. U., Frind, E. O., and Blowes, D. W.: Multicomponent reactive transport modeling in variably saturated porous media using a generalized formulation for kinetically controlled reactions, Water Resour. Res., 38, 1174, <ext-link xlink:href="https://doi.org/10.1029/2001WR000862" ext-link-type="DOI">10.1029/2001WR000862</ext-link>, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Molins(2015)</label><mixed-citation>Molins, S.: Reactive Interfaces in Direct Numerical Simulation of Pore-Scale Processes, Rev. Mineral. Geochem., 80, 461–481, <ext-link xlink:href="https://doi.org/10.2138/rmg.2015.80.14" ext-link-type="DOI">10.2138/rmg.2015.80.14</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Molins et al.(2012)Molins, Trebotich, Steefel, and Shen</label><mixed-citation>Molins, S., Trebotich, D., Steefel, C. I., and Shen, C.: An investigation of the effect of pore scale flow on average geochemical reaction rates using direct numerical simulation, Water Resour. Res., 48, <ext-link xlink:href="https://doi.org/10.1029/2011WR011404" ext-link-type="DOI">10.1029/2011WR011404</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Molins et al.(2020)Molins, Soulaine, Prasianakis, Abbasi, Poncet, Ladd, Starchenko, Roman, Trebotich, Tchelepi, and Steefel</label><mixed-citation>Molins, S., Soulaine, C., Prasianakis, N. I., Abbasi, A., Poncet, P., Ladd, A. J. C., Starchenko, V., Roman, S., Trebotich, D., Tchelepi, H. A., and Steefel, C. I.: Simulation of mineral dissolution at the pore scale with evolving fluid-solid interfaces: review of approaches and benchmark problem set, Comput. Geosci., 25, 1285–1318, <ext-link xlink:href="https://doi.org/10.1007/s10596-019-09903-x" ext-link-type="DOI">10.1007/s10596-019-09903-x</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>Molins et al.(2022)Molins, Svyatsky, Xu, Coon, and Moulton</label><mixed-citation>Molins, S., Svyatsky, D., Xu, Z., Coon, E. T., and Moulton, J. D.: A Multicomponent Reactive Transport Model for Integrated Surface-Subsurface Hydrology Problems, Water Resour. Res., 58, e2022WR032074, <ext-link xlink:href="https://doi.org/10.1029/2022WR032074" ext-link-type="DOI">10.1029/2022WR032074</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx34"><label>Molins et al.(2024a)Molins, Andre, Johnson, Hammond, Sulman, Lipnikov, Day, Beisman, Svyatskiy, Deng, Lichtner, Steefel, and Moulton</label><mixed-citation>Molins, S., Andre, B., Johnson, J., Hammond, G., Sulman, B., Lipnikov, K., Day, M., Beisman, J., Svyatskiy, D., Deng, H., Lichtner, P., Steefel, C., and Moulton, D.: Alquimia: A generic interface to biogeochemical codes – A tool for interoperable development, prototyping and benchmarking for multiphysics simulators, Zenodo [code], <ext-link xlink:href="https://doi.org/10.5281/zenodo.11414442" ext-link-type="DOI">10.5281/zenodo.11414442</ext-link>, 2024a.</mixed-citation></ref>
      <ref id="bib1.bibx35"><label>Molins et al.(2024b)Molins, Trebotich, and Steefel</label><mixed-citation>Molins, S., Trebotich, D., and Steefel, C. I.: Approaches for the simulation of coupled processes in evolving fractured porous media enabled by exascale computing, Comput. Sci. Eng., 26,  33–42, <ext-link xlink:href="https://doi.org/10.1109/MCSE.2024.3403983" ext-link-type="DOI">10.1109/MCSE.2024.3403983</ext-link>, 2024b.</mixed-citation></ref>
      <ref id="bib1.bibx36"><label>Moulton et al.(2011)Moulton, Berndt, Buskas, Garimella, Prichett-Sheats, Hammond, and Meza</label><mixed-citation> Moulton, D., Berndt, M., Buskas, M., Garimella, R., Prichett-Sheats, L., Hammond, G., and Meza, J.: High-level design of Amanzi, the multi-process high performance computing simulator, Technical Report ASCEM-HPC-2011-03-1, US Department of Energy, Washington, DC, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx37"><label>Nardi et al.(2014)Nardi, Idiart, Trinchero, de Vries, and Molinero</label><mixed-citation>Nardi, A., Idiart, A., Trinchero, P., de Vries, L. M., and Molinero, J.: Interface COMSOL-PHREEQC (iCP), an efficient numerical framework for the solution of coupled multiphysics and geochemistry, Comput. Geosci., 69, 10–21, <ext-link xlink:href="https://doi.org/10.1016/j.cageo.2014.04.011" ext-link-type="DOI">10.1016/j.cageo.2014.04.011</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>OpenFOAM(2022)</label><mixed-citation>OpenFOAM: Open-source Field Operation And Manipulation, <uri>https://www.openfoam.com/</uri> (last access: 24 May 2025), 2022.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Parkhurst and Wissmeier(2015)</label><mixed-citation>Parkhurst, D. L. and Wissmeier, L.: PhreeqcRM: A reaction module for transport simulators based on the geochemical model PHREEQC, Adv. Water Resour., 83, 176–189, <ext-link xlink:href="https://doi.org/10.1016/j.advwatres.2015.06.001" ext-link-type="DOI">10.1016/j.advwatres.2015.06.001</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Parkhurst et al.(2010)Parkhurst, Kipp, and Charlton</label><mixed-citation>Parkhurst, D. L., Kipp, K. L., and Charlton, S. R.: PHAST Version 2 – A program for simulating groundwater flow, solute transport, and multicomponent geochemical reactions, in: U.S. Geological Survey Techniques and Methods,  6-A35,  235, <ext-link xlink:href="https://doi.org/10.3133/tm6A35" ext-link-type="DOI">10.3133/tm6A35</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx41"><label>Prommer and Post(2010)</label><mixed-citation>Prommer, H. and Post, V.: PHT3D: A ReactiveMulticomponent Transport Model for Saturated Porous Media, User's Manual v2.10, <uri>http://www.pht3d.org</uri> (last access: 24 May 2025), 2010.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Simunek et al.(2013)Simunek, Jacques, Langergraber, Bradford, Šejna, and Genuchten</label><mixed-citation>Simunek, J., Jacques, D., Langergraber, G., Bradford, S. A., Šejna, M., and Genuchten, M. T. v.: Numerical Modeling of Contaminant Transport Using HYDRUS and its Specialized Modules, J. Indian I. Sci., 93, 265–284, <uri>https://journal.iisc.ac.in/index.php/iisc/article/view/1224</uri> (last access: 24 May 2025), 2013.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Sonnenthal et al.(2021)Sonnenthal, Spycher, Xu, and Zheng</label><mixed-citation>Sonnenthal, E., Spycher, N., Xu, T., and Zheng, L.: TOUGHREACT V4.12-OMP and TReactMech V1.0 Geochemical and Reactive-Transport User Guide, <uri>https://escholarship.org/uc/item/8945d2c1</uri> (last access: 24 May 2025), 2021.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Sphinx(2024)</label><mixed-citation>Sphinx: Welcome – Sphinx documentation, <uri>https://www.sphinx-doc.org/en/master/</uri> (last access:  24 May 2025), 2024.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Steefel and MacQuarrie(1996)</label><mixed-citation> Steefel, C. I. and MacQuarrie, K. T. B.: Approaches to modeling of reactive transport in porous media, Rev. Miner. Geochem., 34, 85–129, ISSN 1529-6466, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Steefel et al.(2005)Steefel, DePaolo, and Lichtner</label><mixed-citation>Steefel, C. I., DePaolo, D. J., and Lichtner, P. C.: Reactive transport modeling: An essential tool and a new research approach for the Earth sciences, Earth  Planet. Sc. Lett., 240, 539–558, <ext-link xlink:href="https://doi.org/10.1016/j.epsl.2005.09.017" ext-link-type="DOI">10.1016/j.epsl.2005.09.017</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Steefel et al.(2015)Steefel, Appelo, Arora, Jacques, Kalbacher, Kolditz, Lagneau, Lichtner, Mayer, Meeussen, Molins, Moulton, Shao, Šimůnek, Spycher, Yabusaki, and Yeh</label><mixed-citation>Steefel, C. I., Appelo, C. A. J., Arora, B., Jacques, D., Kalbacher, T., Kolditz, O., Lagneau, V., Lichtner, P. C., Mayer, K. U., Meeussen, J. C. L., Molins, S., Moulton, D., Shao, H., Šimůnek, J., Spycher, N., Yabusaki, S. B., and Yeh, G. T.: Reactive transport codes for subsurface environmental simulation, Comput. Geosci., 19, 445–478, <ext-link xlink:href="https://doi.org/10.1007/s10596-014-9443-x" ext-link-type="DOI">10.1007/s10596-014-9443-x</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Sulman et al.(2020)Sulman, Yuan, O'Meara, Graham, Gu, Herndon, and Zheng</label><mixed-citation>Sulman, B., Yuan, F., O'Meara, T., Graham, D., Gu, B., Herndon, E., and Zheng, J.: Simulated hydrological dynamics and coupled iron redox cycling impact methane production in an Arctic soil: Modeling Archive, ESS-Dive [code], <ext-link xlink:href="https://doi.org/10.5440/1814844" ext-link-type="DOI">10.5440/1814844</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx49"><label>Sulman et al.(2023)Sulman, Wang, LaFond-Hudson, O'Meara, Yuan, Molins, Forbrich, Cardon, and Giblin</label><mixed-citation>Sulman, B., Wang, J., LaFond-Hudson, S., O'Meara, T., Yuan, F., Molins, S., Forbrich, I., Cardon, Z., and Giblin, A.: Model simulations of Plum Island Ecosystems LTER low marsh site using ELM-PFLOTRAN, ESS-Dive [code], <ext-link xlink:href="https://doi.org/10.15485/1991625" ext-link-type="DOI">10.15485/1991625</ext-link>,  2023.</mixed-citation></ref>
      <ref id="bib1.bibx50"><label>Sulman et al.(2022)Sulman, Yuan, O’Meara, Gu, Herndon, Zheng, Thornton, and Graham</label><mixed-citation>Sulman, B. N., Yuan, F., O'Meara, T., Gu, B., Herndon, E. M., Zheng, J., Thornton, P. E., and Graham, D. E.: Simulated Hydrological Dynamics and Coupled Iron Redox Cycling Impact Methane Production in an Arctic Soil, J. Geophys. Res.-Biogeo., 127, e2021JG006662, <ext-link xlink:href="https://doi.org/10.1029/2021JG006662" ext-link-type="DOI">10.1029/2021JG006662</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx51"><label>Sulman et al.(2024)Sulman, Wang, LaFond-Hudson, O'Meara, Yuan, Molins, Hammond, Forbrich, Cardon, and Giblin</label><mixed-citation>Sulman, B. N., Wang, J., LaFond-Hudson, S., O'Meara, T., Yuan, F., Molins, S., Hammond, G. E., Forbrich, I., Cardon, Z., and Giblin, A.: Integrating tide-driven wetland soil redox and biogeochemical interactions into a land surface model, J. Adv. Model. Earth Sy., 16, e2023MS004002, <ext-link xlink:href="https://doi.org/10.1029/2023MS004002" ext-link-type="DOI">10.1029/2023MS004002</ext-link>, 2024.</mixed-citation></ref>
      <ref id="bib1.bibx52"><label>Tang et al.(2016)Tang, Yuan, Bisht, Hammond, Lichtner, Kumar, Mills, Xu, Andre, Hoffman, Painter, and Thornton</label><mixed-citation>Tang, G., Yuan, F., Bisht, G., Hammond, G. E., Lichtner, P. C., Kumar, J., Mills, R. T., Xu, X., Andre, B., Hoffman, F. M., Painter, S. L., and Thornton, P. E.: Addressing numerical challenges in introducing a reactive transport code into a land surface model: a biogeochemical modeling proof-of-concept with CLM–PFLOTRAN 1.0, Geosci. Model Dev., 9, 927–946, <ext-link xlink:href="https://doi.org/10.5194/gmd-9-927-2016" ext-link-type="DOI">10.5194/gmd-9-927-2016</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx53"><label>van der Lee et al.(2003)van der Lee, De Windt, Lagneau, and Goblet</label><mixed-citation>van der Lee, J., De Windt, L., Lagneau, V., and Goblet, P.: Module-oriented modeling of reactive transport with HYTEC, Comput. Geosci., 29, 265–275, <ext-link xlink:href="https://doi.org/10.1016/S0098-3004(03)00004-9" ext-link-type="DOI">10.1016/S0098-3004(03)00004-9</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx54"><label>Wang et al.(2024)Wang, O'Meara, LaFond-Hudson, He, Maiti, Ward, and Sulman</label><mixed-citation>Wang, J., O'Meara, T., LaFond-Hudson, S., He, S., Maiti, K., Ward, E. J., and Sulman, B. N.: Subsurface Redox Interactions Regulate Ebullitive Methane Flux in Heterogeneous Mississippi River Deltaic Wetland, J. Adv. Model. Earth Sy., 16, e2023MS003762, <ext-link xlink:href="https://doi.org/10.1029/2023MS003762" ext-link-type="DOI">10.1029/2023MS003762</ext-link>,  2024.</mixed-citation></ref>
      <ref id="bib1.bibx55"><label>Zhang et al.(2022)Zhang, Deng, Dong, Molins, Li, and Steefel</label><mixed-citation>Zhang, Q., Deng, H., Dong, Y., Molins, S., Li, X., and Steefel, C.: Investigation of Coupled Processes in Fractures and the Bordering Matrix via a Micro-Continuum Reactive Transport Model, Water Resour. Res., 58, e2021WR030578, <ext-link xlink:href="https://doi.org/10.1029/2021WR030578" ext-link-type="DOI">10.1029/2021WR030578</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx56"><label>Zhang et al.(2024)Zhang, Dong, Molins, and Deng</label><mixed-citation>Zhang, Q., Dong, Y., Molins, S., and Deng, H.: The Impacts of Micro-Porosity and Mineralogical Texture on Fractured Rock Alteration, Water Resour. Res., 60, e2023WR036266, <ext-link xlink:href="https://doi.org/10.1029/2023WR036266" ext-link-type="DOI">10.1029/2023WR036266</ext-link>, 2024.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>Alquimia v1.0: a generic interface to biogeochemical codes – a tool for interoperable development, prototyping and benchmarking for multiphysics simulators</article-title-html>
<abstract-html/>
<ref-html id="bib1.bib1"><label>Andre et al.(2013)Andre, Molins, Johnson, and
Steefel</label><mixed-citation>
      
Andre, B., Molins, S., Johnson, J., and Steefel, C.: Alquimia,
U.S. Department of Energy
Office of Scientific and Technical Information, <a href="https://doi.org/10.11578/DC.20210416.49" target="_blank">https://doi.org/10.11578/DC.20210416.49</a>,  2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Andre et al.(2015)</label><mixed-citation>
      
Andre, B., Molins, S., Johnson, J., and Steefel, C. I.: Alquimia, GitHub, <a href="https://github.com/LBL-EESA/alquimia-dev" target="_blank"/> (last access: 25 May 2025), 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Balos et al.(2025)Balos, Day, Esclapez, Felden, Gardner, Hassanaly,
Reynolds, Rood, Sexton, Wimer, and Woodward</label><mixed-citation>
      
Balos, C. J., Day, M., Esclapez, L., Felden, A. M., Gardner, D. J., Hassanaly,
M., Reynolds, D. R., Rood, J. S., Sexton, J. M., Wimer, N. T., and Woodward,
C. S.: SUNDIALS time integrators for exascale applications with many
independent systems of ordinary differential equations,
Int. J. High Perform. C., 39, 123–146,
<a href="https://doi.org/10.1177/10943420241280060" target="_blank">https://doi.org/10.1177/10943420241280060</a>, 2025.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Bao et al.(2017)Bao, Li, Shi, and
Duffy</label><mixed-citation>
      
Bao, C., Li, L., Shi, Y., and Duffy, C.: Understanding watershed
hydrogeochemistry: 1. Development of RT?Flux?PIHM, Water Resour.
Res., 53, 2328–2345, <a href="https://doi.org/10.1002/2016WR018934" target="_blank">https://doi.org/10.1002/2016WR018934</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Bartlett et al.(2017)Bartlett, Demeshko, Gamblin, Hammond, Heroux,
Johnson, Klinvex, Li, McInnes, Moulton, Osei-Kuffuor, Sarich, Smith,
Willenbring, and Yang</label><mixed-citation>
      
Bartlett, R., Demeshko, I., Gamblin, T., Hammond, G., Heroux, M. A., Johnson,
J., Klinvex, A., Li, X., McInnes, L. C., Moulton, J. D., Osei-Kuffuor, D.,
Sarich, J., Smith, B., Willenbring, J., and Yang, U. M.: xSDK
Foundations: Toward an Extreme-scale Scientific Software
Development Kit, Supercomputing Frontiers and Innovations, 4, 69–82,
<a href="https://doi.org/10.14529/jsfi170104" target="_blank">https://doi.org/10.14529/jsfi170104</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Beisman et al.(2015)Beisman, Maxwell, Navarre-Sitchler, Steefel, and
Molins</label><mixed-citation>
      
Beisman, J., Maxwell, R., Navarre-Sitchler, A., Steefel, C., and Molins, S.:
ParCrunchFlow: an efficient, parallel reactive transport simulation tool
for physically and chemically heterogeneous saturated subsurface
environments, Comput. Geosci., 19,  403–422,
<a href="https://doi.org/10.1007/s10596-015-9475-x" target="_blank">https://doi.org/10.1007/s10596-015-9475-x</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Bethke(2024)</label><mixed-citation>
      
Bethke, C. M.: The Geochemist's Workbench<span style="position:relative; bottom:0.5em; " class="text">®</span>  Release 17 ChemPlugin™
User's Guide, Aqueous Solutions, LLC, Champaign, Illinois,
<a href="https://www.gwb.com/pdf/GWB/ChemPluginUsersGuide.pdf" target="_blank"/> (last access: 24 May 2025), 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>CFFI(2023)</label><mixed-citation>
      
CFFI: CFFI documentation – CFFI 1.15.1 documentation,
<a href="https://cffi.readthedocs.io/en/latest/" target="_blank"/> (last access: 24 May 2025), 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Chang et al.(2023)Chang, Zavarin, Beverly, and
Wainwright</label><mixed-citation>
      
Chang, E., Zavarin, M., Beverly, L., and Wainwright, H.: A chemistry-informed
hybrid machine learning approach to predict metal adsorption onto mineral
surfaces, Appl. Geochem., 155, 105731,
<a href="https://doi.org/10.1016/j.apgeochem.2023.105731" target="_blank">https://doi.org/10.1016/j.apgeochem.2023.105731</a>, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Charlton and Parkhurst(2011)</label><mixed-citation>
      
Charlton, S. R. and Parkhurst, D. L.: Modules based on the geochemical model
PHREEQC for use in scripting and programming languages, Comput.
Geosci., 37, 1653–1663, <a href="https://doi.org/10.1016/j.cageo.2011.02.005" target="_blank">https://doi.org/10.1016/j.cageo.2011.02.005</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Coon et al.(2019)Coon, Svyatsky, Jan, Kikinzon, Berndt, Atchley,
Harp, Manzini, Shelef, Lipnikov, Garimella, Xu, Moulton, Karra, Painter,
Jafarov, and Molins</label><mixed-citation>
      
Coon, E., Svyatsky, D., Jan, A., Kikinzon, E., Berndt, M., Atchley, A., Harp,
D., Manzini, G., Shelef, E., Lipnikov, K., Garimella, R., Xu, C., Moulton,
D., Karra, S., Painter, S., Jafarov, E., and Molins, S.: Advanced
Terrestrial Simulator, U.S. Department of Energy
Office of Scientific and Technical Information, <a href="https://doi.org/10.11578/DC.20190911.1" target="_blank">https://doi.org/10.11578/DC.20190911.1</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>De Lucia et al.(2021)De Lucia, Kühn, Lindemann, Lübke, and
Schnor</label><mixed-citation>
      
De Lucia, M., Kühn, M., Lindemann, A., Lübke, M., and Schnor, B.: POET (v0.1): speedup of many-core parallel reactive transport simulations with fast DHT lookups, Geosci. Model Dev., 14, 7391–7409, <a href="https://doi.org/10.5194/gmd-14-7391-2021" target="_blank">https://doi.org/10.5194/gmd-14-7391-2021</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Dubey et al.(2014)Dubey, Almgren, Bell, Berzins, Brandt, Bryan,
Colella, Graves, Lijewski, L”offler, O'Shea, Schnetter, Van Straalen, and
Weide</label><mixed-citation>
      
Dubey, A., Almgren, A., Bell, J., Berzins, M., Brandt, S., Bryan, G., Colella,
P., Graves, D., Lijewski, M., L”offler, F., O'Shea, B., Schnetter, E.,
Van Straalen, B., and Weide, K.: A survey of high level frameworks in
block-structured adaptive mesh refinement packages,
J. Parallel and Distr. Com., 74, 3217–3227, <a href="https://doi.org/10.1016/j.jpdc.2014.07.001" target="_blank">https://doi.org/10.1016/j.jpdc.2014.07.001</a>,
2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>GitHub(2024)</label><mixed-citation>
      
GitHub: GitHub Actions documentation,
<a href="https://docs.github.com/en/actions" target="_blank"/> (last access: 24 May 2025), 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Greskowiak et al.(2015)Greskowiak, Gwo, Jacques, Yin, and
Mayer</label><mixed-citation>
      
Greskowiak, J., Gwo, J., Jacques, D., Yin, J., and Mayer, K. U.: A benchmark
for multi-rate surface complexation and 1D dual-domain multi-component
reactive transport of U(VI), Comput. Geosci., 19, 585–597,
<a href="https://doi.org/10.1007/s10596-014-9457-4" target="_blank">https://doi.org/10.1007/s10596-014-9457-4</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Gupta et al.(1991)Gupta, Lake, Pope, Sepehrnoori, and
King</label><mixed-citation>
      
Gupta, A. D., Lake, L. W., Pope, G. A., Sepehrnoori, K. T. U., and King, M. J.
B. R.: High-Resolution Monotonic Schemes for Reservoir Fluid Flow
Simulation, In Situ, (United States), 15,
<a href="https://www.osti.gov/scitech/biblio/5799660" target="_blank"/> (last access: 24 May 2025), 1991.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Hammond(2022)</label><mixed-citation>
      
Hammond, G. E.: The PFLOTRAN Reaction Sandbox, Geosci. Model Dev., 15, 1659–1676, <a href="https://doi.org/10.5194/gmd-15-1659-2022" target="_blank">https://doi.org/10.5194/gmd-15-1659-2022</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Hammond et al.(2014)Hammond, Lichtner, and Mills</label><mixed-citation>
      
Hammond, G. E., Lichtner, P. C., and Mills, R. T.: Evaluating the performance
of parallel subsurface simulators: An illustrative example with PFLOTRAN,
Water Resour. Res., 50, 208–228, <a href="https://doi.org/10.1002/2012WR013483" target="_blank">https://doi.org/10.1002/2012WR013483</a>, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Jara et al.(2017)Jara, de Dreuzy, and Cochepin</label><mixed-citation>
      
Jara, D., de Dreuzy, J.-R., and Cochepin, B.: TReacLab: An object-oriented
implementation of non-intrusive splitting methods to couple independent
transport and geochemical software, Comput. Geosci., 109, 281–294,
<a href="https://doi.org/10.1016/j.cageo.2017.09.005" target="_blank">https://doi.org/10.1016/j.cageo.2017.09.005</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Jaysaval et al.(2023)Jaysaval, Hammond, and Johnson</label><mixed-citation>
      
Jaysaval, P., Hammond, G. E., and Johnson, T. C.: Massively parallel modeling and inversion of electrical resistivity tomography data using PFLOTRAN, Geosci. Model Dev., 16, 961–976, <a href="https://doi.org/10.5194/gmd-16-961-2023" target="_blank">https://doi.org/10.5194/gmd-16-961-2023</a>, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>LaFond-Hudson and Sulman(2023)</label><mixed-citation>
      
LaFond-Hudson, S. and Sulman, B.: Modeling strategies and data needs for
representing coastal wetland vegetation in land surface models, New
Phytol., 238, 938–951, <a href="https://doi.org/10.1111/nph.18760" target="_blank">https://doi.org/10.1111/nph.18760</a>,
2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Leal et al.(2020)Leal, Kyas, Kulik, and
Saar</label><mixed-citation>
      
Leal, A. M. M., Kyas, S., Kulik, D. A., and Saar, M. O.: Accelerating
Reactive Transport Modeling: On-Demand Machine Learning
Algorithm for Chemical Equilibrium Calculations,
Transport Porous
Med., 133, 161–204, <a href="https://doi.org/10.1007/s11242-020-01412-1" target="_blank">https://doi.org/10.1007/s11242-020-01412-1</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Li et al.(2017)Li, Maher, Navarre-Sitchler, Druhan, Meile, Lawrence,
Moore, Perdrial, Sullivan, Thompson, Jin, Bolton, Brantley, Dietrich, Mayer,
Steefel, Valocchi, Zachara, Kocar, Mcintosh, Bao, Tutolo, Beisman, Kumar, and
Sonnenthal</label><mixed-citation>
      
Li, L., Maher, K., Navarre-Sitchler, A., Druhan, J., Meile, C., Lawrence, C.,
Moore, J., Perdrial, J., Sullivan, P., Thompson, A., Jin, L., Bolton, E. W.,
Brantley, S. L., Dietrich, W. E., Mayer, K. U., Steefel, C. I., Valocchi, A.,
Zachara, J., Kocar, B., Mcintosh, J., Bao, C., Tutolo, B. M., Beisman, J.,
Kumar, M., and Sonnenthal, E.: Expanding the role of reactive transport
models in critical zone processes, Earth-Sci. Rev., 165, 280–301,
<a href="https://doi.org/10.1016/j.earscirev.2016.09.001" target="_blank">https://doi.org/10.1016/j.earscirev.2016.09.001</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Li et al.(2022)Li, Deng, and Molins</label><mixed-citation>
      
Li, P., Deng, H., and Molins, S.: The Effect of Pore-Scale Two-Phase
Flow on Mineral Reaction Rates, Frontiers in Water, 3, 734518,
<a href="https://doi.org/10.3389/frwa.2021.734518" target="_blank">https://doi.org/10.3389/frwa.2021.734518</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Lichtner(1991)</label><mixed-citation>
      
Lichtner, P. C.: The Quasi-Stationary State Approximation to
Fluid/Rock Reaction: Local Equilibrium Revisited, in: Diffusion,
Atomic Ordering, and Mass Transport: Selected Topics in
Geochemistry, edited by: Ganguly, J., Advances in Physical Geochemistry,
Springer US, New York, NY, 452–560, ISBN 978-1-4613-9019-0,
<a href="https://doi.org/10.1007/978-1-4613-9019-0_13" target="_blank">https://doi.org/10.1007/978-1-4613-9019-0_13</a>, 1991.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Lichtner et al.(2015)Lichtner, Hammond, Lu, Karra, Bisht, Andre,
Lawrence Berkeley National Lab. (LBNL), Mills, Univ. of Tennessee, and
Kumar</label><mixed-citation>
      
Lichtner, P. C., Hammond, G. E., Lu, C., Karra, S., Bisht, G., Andre, B. N. C.
F. A. R., Lawrence Berkeley National Lab. (LBNL), B., Mills, R. I. C.,
Univ. of Tennessee, K., and Kumar, J.: Pflotran User Manual: A
Massively Parallel Reactive Flow and Transport Model for
Describing Surface and Subsurface Processes, Tech. Rep.
LA-UR–15-20403, Los Alamos National Lab. (LANL), Los Alamos, NM (United
States); Sandia National Lab. (SNL-NM), Albuquerque, NM (United States),
Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States), Oak
Ridge National Lab. (ORNL), Oak Ridge, TN (United States), OFM Research,
Redmond, WA, USA,
<a href="https://doi.org/10.2172/1168703" target="_blank">https://doi.org/10.2172/1168703</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Maxwell and Miller(2005)</label><mixed-citation>
      
Maxwell, R. M. and Miller, N. L.: Development of a Coupled Land Surface
and Groundwater Model, J. Hydrometeorol., 6, 233–247,
<a href="https://doi.org/10.1175/JHM422.1" target="_blank">https://doi.org/10.1175/JHM422.1</a>, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Maxwell et al.(2014)Maxwell, Putti, Meyerhoff, Delfs, Ferguson,
Ivanov, Kim, Kolditz, Kollet, Kumar, Lopez, Niu, Paniconi, Park, Phanikumar,
Shen, Sudicky, and Sulis</label><mixed-citation>
      
Maxwell, R. M., Putti, M., Meyerhoff, S., Delfs, J.-O., Ferguson, I. M.,
Ivanov, V., Kim, J., Kolditz, O., Kollet, S. J., Kumar, M., Lopez, S., Niu,
J., Paniconi, C., Park, Y.-J., Phanikumar, M. S., Shen, C., Sudicky, E. A.,
and Sulis, M.: Surface-subsurface model intercomparison: A first set of
benchmark results to diagnose integrated hydrology and feedbacks, Water
Resour. Res., 50, 1531–1549, <a href="https://doi.org/10.1002/2013WR013725" target="_blank">https://doi.org/10.1002/2013WR013725</a>, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Mayer et al.(2002)Mayer, Frind, and
Blowes</label><mixed-citation>
      
Mayer, K. U., Frind, E. O., and Blowes, D. W.: Multicomponent reactive
transport modeling in variably saturated porous media using a generalized
formulation for kinetically controlled reactions, Water Resour. Res.,
38, 1174, <a href="https://doi.org/10.1029/2001WR000862" target="_blank">https://doi.org/10.1029/2001WR000862</a>, 2002.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Molins(2015)</label><mixed-citation>
      
Molins, S.: Reactive Interfaces in Direct Numerical Simulation of
Pore-Scale Processes, Rev. Mineral. Geochem., 80,
461–481, <a href="https://doi.org/10.2138/rmg.2015.80.14" target="_blank">https://doi.org/10.2138/rmg.2015.80.14</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Molins et al.(2012)Molins, Trebotich, Steefel, and
Shen</label><mixed-citation>
      
Molins, S., Trebotich, D., Steefel, C. I., and Shen, C.: An investigation of
the effect of pore scale flow on average geochemical reaction rates using
direct numerical simulation, Water Resour. Res., 48,
<a href="https://doi.org/10.1029/2011WR011404" target="_blank">https://doi.org/10.1029/2011WR011404</a>, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Molins et al.(2020)Molins, Soulaine, Prasianakis, Abbasi, Poncet,
Ladd, Starchenko, Roman, Trebotich, Tchelepi, and
Steefel</label><mixed-citation>
      
Molins, S., Soulaine, C., Prasianakis, N. I., Abbasi, A., Poncet, P., Ladd, A.
J. C., Starchenko, V., Roman, S., Trebotich, D., Tchelepi, H. A., and
Steefel, C. I.: Simulation of mineral dissolution at the pore scale with
evolving fluid-solid interfaces: review of approaches and benchmark problem
set, Comput. Geosci., 25, 1285–1318, <a href="https://doi.org/10.1007/s10596-019-09903-x" target="_blank">https://doi.org/10.1007/s10596-019-09903-x</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Molins et al.(2022)Molins, Svyatsky, Xu, Coon, and
Moulton</label><mixed-citation>
      
Molins, S., Svyatsky, D., Xu, Z., Coon, E. T., and Moulton, J. D.: A
Multicomponent Reactive Transport Model for Integrated
Surface-Subsurface Hydrology Problems, Water Resour. Res., 58,
e2022WR032074, <a href="https://doi.org/10.1029/2022WR032074" target="_blank">https://doi.org/10.1029/2022WR032074</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Molins et al.(2024a)Molins, Andre, Johnson, Hammond,
Sulman, Lipnikov, Day, Beisman, Svyatskiy, Deng, Lichtner, Steefel, and
Moulton</label><mixed-citation>
      
Molins, S., Andre, B., Johnson, J., Hammond, G., Sulman, B., Lipnikov, K., Day,
M., Beisman, J., Svyatskiy, D., Deng, H., Lichtner, P., Steefel, C., and
Moulton, D.: Alquimia: A generic interface to biogeochemical codes – A tool
for interoperable development, prototyping and benchmarking for multiphysics
simulators, Zenodo [code], <a href="https://doi.org/10.5281/zenodo.11414442" target="_blank">https://doi.org/10.5281/zenodo.11414442</a>, 2024a.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Molins et al.(2024b)Molins, Trebotich, and
Steefel</label><mixed-citation>
      
Molins, S., Trebotich, D., and Steefel, C. I.: Approaches for the simulation of
coupled processes in evolving fractured porous media enabled by exascale
computing, Comput. Sci. Eng., 26,  33–42,
<a href="https://doi.org/10.1109/MCSE.2024.3403983" target="_blank">https://doi.org/10.1109/MCSE.2024.3403983</a>, 2024b.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Moulton et al.(2011)Moulton, Berndt, Buskas, Garimella,
Prichett-Sheats, Hammond, and Meza</label><mixed-citation>
      
Moulton, D., Berndt, M., Buskas, M., Garimella, R., Prichett-Sheats, L.,
Hammond, G., and Meza, J.: High-level design of Amanzi, the multi-process
high performance computing simulator, Technical Report
ASCEM-HPC-2011-03-1, US Department of Energy, Washington, DC, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Nardi et al.(2014)Nardi, Idiart, Trinchero, de Vries, and
Molinero</label><mixed-citation>
      
Nardi, A., Idiart, A., Trinchero, P., de Vries, L. M., and Molinero, J.:
Interface COMSOL-PHREEQC (iCP), an efficient numerical framework for
the solution of coupled multiphysics and geochemistry, Comput.
Geosci., 69, 10–21, <a href="https://doi.org/10.1016/j.cageo.2014.04.011" target="_blank">https://doi.org/10.1016/j.cageo.2014.04.011</a>, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>OpenFOAM(2022)</label><mixed-citation>
      
OpenFOAM: Open-source Field Operation And Manipulation, <a href="https://www.openfoam.com/" target="_blank"/> (last access: 24 May 2025), 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Parkhurst and Wissmeier(2015)</label><mixed-citation>
      
Parkhurst, D. L. and Wissmeier, L.: PhreeqcRM: A reaction module for
transport simulators based on the geochemical model PHREEQC, Adv.
Water Resour., 83, 176–189, <a href="https://doi.org/10.1016/j.advwatres.2015.06.001" target="_blank">https://doi.org/10.1016/j.advwatres.2015.06.001</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Parkhurst et al.(2010)Parkhurst, Kipp, and
Charlton</label><mixed-citation>
      
Parkhurst, D. L., Kipp, K. L., and Charlton, S. R.: PHAST Version 2 – A
program for simulating groundwater flow, solute transport, and multicomponent
geochemical reactions, in: U.S. Geological Survey Techniques and
Methods,  6-A35,  235, <a href="https://doi.org/10.3133/tm6A35" target="_blank">https://doi.org/10.3133/tm6A35</a>, 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Prommer and Post(2010)</label><mixed-citation>
      
Prommer, H. and Post, V.: PHT3D: A ReactiveMulticomponent Transport
Model for Saturated Porous Media, User's Manual v2.10,
<a href="http://www.pht3d.org" target="_blank"/> (last access: 24 May 2025), 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Simunek et al.(2013)Simunek, Jacques, Langergraber, Bradford, Šejna,
and Genuchten</label><mixed-citation>
      
Simunek, J., Jacques, D., Langergraber, G., Bradford, S. A., Šejna, M., and
Genuchten, M. T. v.: Numerical Modeling of Contaminant Transport
Using HYDRUS and its Specialized Modules, J. Indian
I. Sci., 93, 265–284,
<a href="https://journal.iisc.ac.in/index.php/iisc/article/view/1224" target="_blank"/> (last access: 24 May 2025),
2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Sonnenthal et al.(2021)Sonnenthal, Spycher, Xu, and
Zheng</label><mixed-citation>
      
Sonnenthal, E., Spycher, N., Xu, T., and Zheng, L.: TOUGHREACT V4.12-OMP
and TReactMech V1.0 Geochemical and Reactive-Transport User
Guide, <a href="https://escholarship.org/uc/item/8945d2c1" target="_blank"/> (last access: 24 May 2025), 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Sphinx(2024)</label><mixed-citation>
      
Sphinx: Welcome – Sphinx documentation,
<a href="https://www.sphinx-doc.org/en/master/" target="_blank"/> (last access:  24 May 2025), 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Steefel and MacQuarrie(1996)</label><mixed-citation>
      
Steefel, C. I. and MacQuarrie, K. T. B.: Approaches to modeling of reactive
transport in porous media, Rev. Miner. Geochem., 34,
85–129, ISSN 1529-6466,
1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Steefel et al.(2005)Steefel, DePaolo, and
Lichtner</label><mixed-citation>
      
Steefel, C. I., DePaolo, D. J., and Lichtner, P. C.: Reactive transport
modeling: An essential tool and a new research approach for the Earth
sciences, Earth  Planet. Sc. Lett., 240, 539–558,
<a href="https://doi.org/10.1016/j.epsl.2005.09.017" target="_blank">https://doi.org/10.1016/j.epsl.2005.09.017</a>, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Steefel et al.(2015)Steefel, Appelo, Arora, Jacques, Kalbacher,
Kolditz, Lagneau, Lichtner, Mayer, Meeussen, Molins, Moulton, Shao,
Šimůnek, Spycher, Yabusaki, and Yeh</label><mixed-citation>
      
Steefel, C. I., Appelo, C. A. J., Arora, B., Jacques, D., Kalbacher, T.,
Kolditz, O., Lagneau, V., Lichtner, P. C., Mayer, K. U., Meeussen, J. C. L.,
Molins, S., Moulton, D., Shao, H., Šimůnek, J., Spycher, N., Yabusaki,
S. B., and Yeh, G. T.: Reactive transport codes for subsurface environmental
simulation, Comput. Geosci., 19, 445–478,
<a href="https://doi.org/10.1007/s10596-014-9443-x" target="_blank">https://doi.org/10.1007/s10596-014-9443-x</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Sulman et al.(2020)Sulman, Yuan, O'Meara, Graham, Gu, Herndon, and
Zheng</label><mixed-citation>
      
Sulman, B., Yuan, F., O'Meara, T., Graham, D., Gu, B., Herndon, E., and Zheng,
J.: Simulated hydrological dynamics and coupled iron redox cycling impact
methane production in an Arctic soil: Modeling Archive,
ESS-Dive [code], <a href="https://doi.org/10.5440/1814844" target="_blank">https://doi.org/10.5440/1814844</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Sulman et al.(2023)Sulman, Wang, LaFond-Hudson, O'Meara, Yuan,
Molins, Forbrich, Cardon, and Giblin</label><mixed-citation>
      
Sulman, B., Wang, J., LaFond-Hudson, S., O'Meara, T., Yuan, F., Molins, S.,
Forbrich, I., Cardon, Z., and Giblin, A.: Model simulations of Plum
Island Ecosystems LTER low marsh site using ELM-PFLOTRAN,
ESS-Dive [code], <a href="https://doi.org/10.15485/1991625" target="_blank">https://doi.org/10.15485/1991625</a>,  2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Sulman et al.(2022)Sulman, Yuan, O’Meara, Gu, Herndon, Zheng,
Thornton, and Graham</label><mixed-citation>
      
Sulman, B. N., Yuan, F., O'Meara, T., Gu, B., Herndon, E. M., Zheng, J.,
Thornton, P. E., and Graham, D. E.: Simulated Hydrological Dynamics and
Coupled Iron Redox Cycling Impact Methane Production in an
Arctic Soil, J. Geophys. Res.-Biogeo., 127,
e2021JG006662, <a href="https://doi.org/10.1029/2021JG006662" target="_blank">https://doi.org/10.1029/2021JG006662</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Sulman et al.(2024)Sulman, Wang, LaFond-Hudson, O'Meara, Yuan,
Molins, Hammond, Forbrich, Cardon, and Giblin</label><mixed-citation>
      
Sulman, B. N., Wang, J., LaFond-Hudson, S., O'Meara, T., Yuan, F., Molins, S.,
Hammond, G. E., Forbrich, I., Cardon, Z., and Giblin, A.: Integrating
tide-driven wetland soil redox and biogeochemical interactions into a land
surface model, J. Adv. Model. Earth Sy., 16, e2023MS004002,
<a href="https://doi.org/10.1029/2023MS004002" target="_blank">https://doi.org/10.1029/2023MS004002</a>, 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Tang et al.(2016)Tang, Yuan, Bisht, Hammond, Lichtner, Kumar, Mills,
Xu, Andre, Hoffman, Painter, and Thornton</label><mixed-citation>
      
Tang, G., Yuan, F., Bisht, G., Hammond, G. E., Lichtner, P. C., Kumar, J., Mills, R. T., Xu, X., Andre, B., Hoffman, F. M., Painter, S. L., and Thornton, P. E.: Addressing numerical challenges in introducing a reactive transport code into a land surface model: a biogeochemical modeling proof-of-concept with CLM–PFLOTRAN 1.0, Geosci. Model Dev., 9, 927–946, <a href="https://doi.org/10.5194/gmd-9-927-2016" target="_blank">https://doi.org/10.5194/gmd-9-927-2016</a>, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>van der Lee et al.(2003)van der Lee, De Windt, Lagneau, and
Goblet</label><mixed-citation>
      
van der Lee, J., De Windt, L., Lagneau, V., and Goblet, P.: Module-oriented
modeling of reactive transport with HYTEC, Comput. Geosci., 29,
265–275, <a href="https://doi.org/10.1016/S0098-3004(03)00004-9" target="_blank">https://doi.org/10.1016/S0098-3004(03)00004-9</a>, 2003.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Wang et al.(2024)Wang, O'Meara, LaFond-Hudson, He, Maiti, Ward, and
Sulman</label><mixed-citation>
      
Wang, J., O'Meara, T., LaFond-Hudson, S., He, S., Maiti, K., Ward, E. J., and
Sulman, B. N.: Subsurface Redox Interactions Regulate Ebullitive
Methane Flux in Heterogeneous Mississippi River Deltaic
Wetland, J. Adv. Model. Earth Sy., 16,
e2023MS003762, <a href="https://doi.org/10.1029/2023MS003762" target="_blank">https://doi.org/10.1029/2023MS003762</a>,  2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Zhang et al.(2022)Zhang, Deng, Dong, Molins, Li, and
Steefel</label><mixed-citation>
      
Zhang, Q., Deng, H., Dong, Y., Molins, S., Li, X., and Steefel, C.:
Investigation of Coupled Processes in Fractures and the Bordering
Matrix via a Micro-Continuum Reactive Transport Model, Water
Resour. Res., 58, e2021WR030578, <a href="https://doi.org/10.1029/2021WR030578" target="_blank">https://doi.org/10.1029/2021WR030578</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib56"><label>Zhang et al.(2024)Zhang, Dong, Molins, and Deng</label><mixed-citation>
      
Zhang, Q., Dong, Y., Molins, S., and Deng, H.: The Impacts of
Micro-Porosity and Mineralogical Texture on Fractured Rock
Alteration, Water Resour. Res., 60, e2023WR036266,
<a href="https://doi.org/10.1029/2023WR036266" target="_blank">https://doi.org/10.1029/2023WR036266</a>, 2024.

    </mixed-citation></ref-html>--></article>
