A framework for reactive transport modeling using FEniCS–Reaktoro: governing equations and benchmarking results

Abstract

Reactive transport codes are widely applied in geoscience to predict or reconstruct spatial and temporal evolution of geochemical systems. To provide an accurate description of natural systems at different spatial and temporal scales, the reactive transport code has to deal with coupling of different physical and chemical phenomena. Many reactive transport codes have been developed in the past and each of these codes has specific strengths and limitations. Here, we present a new versatile reactive transport framework based on the FEniCS equations solver and the chemical solver Reaktoro. This development was motivated by the need for an advanced open-source tool allowing user-friendly modeling environment and, at the same time, full control over the numerical methods. Unlike most of the currently available codes, the developed FEniCS–Reaktoro framework offers full flexibility in setting up the reactive transport simulations of arbitrary complexity in terms of process couplings, simulation domain geometry and the boundary conditions applied. The simulations are setup using a simple high-level scripting language intuitively linked to the equation based model definition without the need of advanced programming skills. The chemical solver Reaktoro allows thermodynamic modeling of multicomponent multiphase system with several fluids and solid phases, including highly non-ideal solid solutions. The coupling of transport and chemistry is implemented using the sequential non-iterative approach (SNIA) in which the transport of the aqueous components and the chemical reactions are solved in two consequent steps. The flexibility and results of the FEniCS–Reaktoro framework are demonstrated against several widely accepted reactive transport benchmarks.

References

  1. 1.

    Steefel, C.I., DePaolo, D.J., Lichtner, P.C.: Reactive transport modeling: an essential tool and a new research approach for the Earth sciences. Earth Planet Sci. Lett. 240.3-4, 539–558 (2005)

    Article  Google Scholar 

  2. 2.

    Bächler, D., Kohl, T.: Coupled thermal-hydraulic-chemical modelling of enhanced geothermal systems. Geophys. J Int. 161.2, 533–548 (2005)

    Article  Google Scholar 

  3. 3.

    Darland, J.E., Inskeep, W.P.: Effects of pore water velocity on the transport of arsenate. J. Am. Chem. Soc. (1997)

  4. 4.

    Lichtner, P.C.: Continuum model for simultaneous chemical reactions and mass transport in hydrothermal systems. Geochim. Cosmochim. Acta 49.3, 779–800 (1985)

    Article  Google Scholar 

  5. 5.

    Tournassat, C., Steefel, C.I.: Ionic transport in nano-porous clays with consideration of electrostatic effects. Rev. Min. Geochem. 80, 287–329 (2015)

    Article  Google Scholar 

  6. 6.

    Muniruzzaman, M., Rolle, M.: Modeling multicomponent ionic transport in groundwater with IPhreeqc coupling Electrostatic interactions and geochemical reactions in homogeneous and heterogeneous domains. Adv. Water Res. 98, 1–15 (2016)

    Article  Google Scholar 

  7. 7.

    Konda, S.S.M., et al.: Chemical reactions modulated by mechanical stress: extended Bell theory. J. Chem. Phys. 135.16, 164103 (2011)

    Article  Google Scholar 

  8. 8.

    Dmitrii, A., et al.: Kulik GEM-selektor geochemical modeling package: revised algorithm and GEMS3k numerical kernel for coupled simulation codes. Computat. Geosci. 17.1, 1–24 (2013)

    Google Scholar 

  9. 9.

    Centler, F., et al.: GeosysBRNS-a exible multidimensional reactive transport model for simulating biogeochemical subsurface processes. Comput. Geosci.-UK. 36.3, 397–405 (2010)

    Article  Google Scholar 

  10. 10.

    Steefel, C., Molins, S.: CrunchFlow software for Modeling Multicomponent Reactive Flow and Transport (2016)

  11. 11.

    Nardi, A., et al.: Interface COMSOL-PHREEQC (iCP), an efficient numerical framework for the solution of coupled multiphysics and geochemistry. Comput. Geosci.-UK. 69, 10–21 (2014)

    Article  Google Scholar 

  12. 12.

    Guo, B., et al.: A COMSOL-PHREEQC interface for modeling the multi-species transport of saturated cement-based materials. Construct. Build Mater. 187, 839–853 (2018)

    Article  Google Scholar 

  13. 13.

    Azad, V.J., et al.: A COMSOL-GEMS interface for modeling coupled reactive-transport geochemical processes. Comput. Geosci. 92, 79–89 (2016)

    Article  Google Scholar 

  14. 14.

    Samper, J., et al.: Core2D. A code for non-isothermal water flow and reactive solute transport. Users Manual version 2 (2000)

  15. 15.

    Yapparova, A., et al.: Reactive transport modelling of dolomitisation using the new CSMP++GEM coupled code: governing equations, solution method and benchmarking results. Transport Porous Med. 117.3, 385–413 (2017)

    Article  Google Scholar 

  16. 16.

    Elakneswaran, Y., Ishida, T.: Development and verification of an integrated physicochemical and geochemical modelling framework for performance assessment of cement-based materials. J. Adv. Concr. Technol. 12.4, 111–126 (2014)

    Article  Google Scholar 

  17. 17.

    Jacques, D., Simunek, J.: User manual of the multicompenent variably-saturated ow and transport model hp1 (2005)

  18. 18.

    Mayer, K.U.: A numerical model for multicomponent reactive transport in variably saturated porous media. PhD thesis (1999)

  19. 19.

    Bethke, C.M.: Geochemical Reaction Modeling: Concepts and Applications. Oxford University Press, Oxford, pp. 416 (1996)

  20. 20.

    Li, D., et al.: OpenGeoSys-ChemApp: a coupled simulator for reactive transport in multiphase systems and application to CO2 storage formation in Northern Germany. Acta Geotech. 9.1, 67–79 (2014)

    Article  Google Scholar 

  21. 21.

    Kosakowski, G., Watanabe, N.: OpenGeoSys-Gem: a numerical tool for calculating geochemical and porosity changes in saturated and partially saturated media. Phys. Chem. Earth 70–71, 138–149 (2014). Mechanisms and Modelling of Waste-Cement and Cement-Host Rock Interactions

    Article  Google Scholar 

  22. 22.

    He, W., et al.: A parallelization scheme to simulate reactive transport in the subsurface environment with OGS#IPhreeqc 5.5.7-3.1.2. Geosci. Model Dev. 8.10, 3333–3348 (2015)

    Article  Google Scholar 

  23. 23.

    Meeussen, J.C.L.: ORCHESTRA: An object-oriented framework for implementing chemical equilibrium models. Environ. Sci. Tech. 37.6, PMID: 12680672, 1175–1182 (2003). eprint: https://doi.org/10.1021/es025597s

    Google Scholar 

  24. 24.

    Lichtner, P.C., et al.: PFLOTRAN User Manual A Massively Parallel Reactive Flow and Transport Model for Describing Surface and Subsurface Processes (2015)

  25. 25.

    Parkhurst, D.L., Appelo, C.A.J.: Description of Input and Examples for PHREEQC Version 3 - A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and Inverse Geochemical Calculations. U.S. Geological Survey Techniques and Methods, book 6, chapter A43, 497 p. U.S. Geological Survey Techniques and Methods, book 6, chapter A43, 6-43A (2013)

  26. 26.

    Gamazo, P., et al.: PROOST: object-oriented approach to multiphase reactive transport modeling in porous media. J. Hydroinform. 18(2), 310–328 (2016)

    Article  Google Scholar 

  27. 27.

    Georget, F., Prévost, J.H., Huet, B.: A reactive transport simulator for variable porosity problems. Computat. Geosci. 21.1, 95–116 (2017)

    Article  Google Scholar 

  28. 28.

    Soetaert, K., Meysman, F.: Reactive transport in aquatic ecosystems Rapid model prototyping in the open source software R. Environ. Model. Softw. 32, 49–60 (2012)

    Article  Google Scholar 

  29. 29.

    Xu, T., et al.: TOUGHREACT-a simulation program for non-isothermal multiphase reactive geochemical transport in variably saturated geologic media: applications to geothermal injectivity and CO2 geological sequestration. Comput. Geosci.-UK. 32.2, 145–165 (2006)

    Article  Google Scholar 

  30. 30.

    Jara, D., de Dreuzy, J.-R., Cochepin, B.: TReacLab: an object-oriented implementation of non-intrusive splitting methods to couple independent transport and geochemical software. Comput. Geosci-UK. 109, 281–294 (2017)

    Article  Google Scholar 

  31. 31.

    Su, D., Ulrich Mayer, K., MacQuarrie, K.T.B.: Parallelization of MIN3p-THCm: a high performance computational framework for subsurface flow and reactive transport simulation. Environ. Model. Softw. 95, 271–289 (2017)

    Article  Google Scholar 

  32. 32.

    Trebotich, D., et al.: High-resolution simulation of pore-scale reactive transport processes associated with carbon sequestration. Comput. Sci. Eng. 16.6, 22–31 (2014)

    Article  Google Scholar 

  33. 33.

    James, J., et al.: Beisman ParCrunchFlow: an efficient, parallel reactive transport simulation tool for physically and chemically heterogeneous saturated subsurface environments. Computat. Geosci. 19.2, 403–422 (2015)

    Google Scholar 

  34. 34.

    Smith, W.R., Missen, R.W.: Chemical reaction equilibrium analysis : theory and algorithms. Wiley, New York, pp. 364 (1982)

  35. 35.

    Leal, M.M., et al.: Computational methods for reactive transport modeling: an extended law of mass-action, xLMA, method for multiphase equilibrium calculations. Adv. Water Res. 96, 405–422 (2016)

    Article  Google Scholar 

  36. 36.

    Comsol Multiphysics, The Platform for Physics-Based Mod- eling and Simulation. Comsol Inc., Burlington, (2013)

  37. 37.

    Bell, L.S.J., Binning, P.J.: A split operator approach to reactive transport with the forward particle tracking Eulerian Lagrangian localized adjoint method. Adv Water Res. 27.4, 323–334 (2004)

    Article  Google Scholar 

  38. 38.

    Saaltink, M.W., Carrera, J., Ayora, C.: On the behavior of approaches to simulate reactive transport. J. Contam. Hydrol. 48.3-4, 213–35 (2001)

    Article  Google Scholar 

  39. 39.

    Carrayrou, J., et al.: Comparison of numerical methods for simulating strongly nonlinear and heterogeneous reactive transport problems-the MoMaS benchmark case. Computat. Geosci. 14.3, 483–502 (2010)

    Article  Google Scholar 

  40. 40.

    Hoffmann, J., Kräutle, S., Knabner, P.: A parallel global-implicit 2-D solver for reactive transport problems in porous media based on a reduction scheme and its application to the MoMaS benchmark problem. Computat. Geosci. 14.3, 421–433 (2010)

    Article  Google Scholar 

  41. 41.

    Yeh, G.T., Tripathi, V.S.: A critical evaluation of recent developments in hydrogeochemical transport models of reactive multichemical components. Water Resour. Res. 25.1, 93–108 (1989)

    Article  Google Scholar 

  42. 42.

    Walter, A.L., et al.: Modeling of multicomponent reactive transport in groundwater: 1. Model development and evaluation. Water Resour. Res. 30.11, 3137–3148 (1994)

    Article  Google Scholar 

  43. 43.

    Samper, J., Xu, T., Yang, C.: A sequential partly iterative approach for multicomponent reactive transport with CORE2D. Computat. Geosci. 13.3, 301–316 (2009)

    Article  Google Scholar 

  44. 44.

    Li, L., et al.: Expanding the role of reactive transport models in critical zone processes. Earth-Sci. Rev. 165, 280–301 (2017)

    Article  Google Scholar 

  45. 45.

    Ravi, A., et al.: Patel A three-dimensional lattice Boltzmann method based reactive transport model to simulate changes in cement paste microstructure due to calcium leaching. Con- Str. Build. Mater. 166, 158–170 (2018)

    Article  Google Scholar 

  46. 46.

    Fowler, D., et al.: Atmospheric composition change: ecosystems- atmosphere interactions. Atmos. Environ. 43.33, 5193–5267 (2009)

    Article  Google Scholar 

  47. 47.

    Dentz, M., et al.: Mixing, spreading and reaction in heterogeneous media: a brief review. J. Contam. Hydrol. 120-121, 1–17 (2011)

    Article  Google Scholar 

  48. 48.

    Ian, G., et al.: Microbiology in nuclear waste disposal: interfaces and reaction fronts. FEMS Microbiol. Rev. 20.3-4, 545–556 (1997)

    Google Scholar 

  49. 49.

    Kosakowski, G., Berner, U.: The evolution of clay rock/cement interfaces in a cementitious repository for low and intermediate level radioactive waste. Phys. Chem. Earth Parts A/B/C 64, 65–86 (2013)

    Article  Google Scholar 

  50. 50.

    Kolditz, O., et al.: OpenGeoSys: an open-source initiative for numerical simulation of thermo - hydro - mechanical / chemical (THM/c) processes in porous media. Environ. Earth Sci. 67.2, 589–599 (2012)

    Article  Google Scholar 

  51. 51.

    Choo, J., Lee, S.: Enriched Galerkin finite elements for coupled poromechanics with local mass conservation. Comput. Methods Appl. Mech Eng. 341, 311–332 (2018)

    Article  Google Scholar 

  52. 52.

    Lehmann, C., Kolditz, O., Nagel, T.: The FEM Simulation Software OpenGeoSys, vol. 6, pp 29–48. Springer, Cham (2018)

    Google Scholar 

  53. 53.

    Sharma, P.K., Joshi, N., Ojha, C.P.: Reactive transport through porous media using finite-difference and finite-volume methods. J. Hydraul. Eng. 18.1, 11–19 (2012)

    Google Scholar 

  54. 54.

    Prasianakis, N.I., et al.: Deciphering pore-level precipitation mechanisms. Sci. Rep. 7.1, 1–9 (2017)

    Google Scholar 

  55. 55.

    Zhao, C.-b., Schaubs, P., Hobbs, B.: Effects of porosity heterogeneity on chemical dissolution-front instability in fluid-saturated rocks. J. Cent South Univ. 24.3, 720–725 (2017)

    Article  Google Scholar 

  56. 56.

    Hatanaka, A., et al.: The impact of tortuosity on chloride ion diffusion in slag-blended cementitious materials. J. Adv. Concr. Technol. 15.8, 426–439 (2017)

    Article  Google Scholar 

  57. 57.

    Navarre-Sitchler, A., et al.: Evolution of porosity and diffusivity associated with chemical weathering of a basalt clast. J. Geophys. Res. 114.F2, F02016 (2009)

    Google Scholar 

  58. 58.

    Ma, R., et al.: Assessment of controlling processes for field-scale uranium reactive transport under highly transient flow conditions. Water Resour. Res. 50.2, 1006–1024 (2014)

    Article  Google Scholar 

  59. 59.

    Van Loon, L.R., et al.: Anisotropic diffusion in layered Argillaceous rocks: a case study with Opalinus clay (2004)

  60. 60.

    Hommel, J., Coltman, E., Class, H.: Porosity-permeability relations for evolving pore space: a review with a focus on (bio-)geochemically altered porous media. Transport Porous Med. 124.2, 589–629 (2018)

    Article  Google Scholar 

  61. 61.

    Trinchero, P., et al.: Implications of grain-scale mineralogical heterogeneity for radionuclide transport in fractured media. Transport Porous Med. 116.1, 73–90 (2017)

    Article  Google Scholar 

  62. 62.

    Steefel, C.I., Yabusaki, S.B., Ulrich Mayer, K.: Reactive transport benchmarks for subsurface environmental simulation. Computat. Geosci. 19.3, 439–443 (2015)

    Article  Google Scholar 

  63. 63.

    Hunter, J.D.: Matplotlib: a 2D graphics environment. Comput. Sci. Eng. 9.3, 90–95 (2007)

    Article  Google Scholar 

  64. 64.

    Perez, F., Granger, B.E.: IPython: A system for interactive scientific computing. Comput. Sci. Eng. 9.3, 21–29 (2007)

    Article  Google Scholar 

  65. 65.

    McKinney, W.: Data structures for statistical computing in Python (2010)

  66. 66.

    Oliphant, T.E.: Guide to NumPy. 2nd USA: Createspace Independent Publishing Platform (2015)

  67. 67.

    Martin, S., et al.: Alnaes The FEniCS Project Version 1.5. Arch. Numer. Softw. 3.100, 9–23 (2015)

    Google Scholar 

  68. 68.

    Allan, M.M., et al.: An overview of computational methods for chemical equilibrium and kinetic calculations for geochemical and reactive transport modeling. Pure Appl. Chem. 89.5, 597–643 (2017)

    Google Scholar 

  69. 69.

    Alnæs, M.S., et al.: Unified form language: a domain speci fic language for weak formulations of partial differential equations. ACM Trans. Math. Softw. 40.2, 9:1-9:37 (2014)

    Google Scholar 

  70. 70.

    Hoffman, J.J.J., Jansson, N.: FEniCS-HPC automated predictive high-performance finite element computing with applications in aerodynamics. Parallel Process. Appl. Math. 9573, 356–365 (2016)

    Google Scholar 

  71. 71.

    Abhyankar, S., et al.: PETSc/TS: A modern scalable ODE/DAE Solver Library. arXiv:1806.01437 (2018)

  72. 72.

    Spycher, N., Pruess, K., Ennis-King, J.: CO2-H2O mixtures in the geological sequestration of CO2. I. Assessment and calculation of mutual solubilities from 12 to 100 C and up to 600 bar. Geochim. Cosmochim. Acta 67.16, 3015–3031 (2003)

    Article  Google Scholar 

  73. 73.

    Spycher, N.F, Reed, M.H.: Fugacity coefficients of H2, CO2, CH4, H2O and of H2O- CO2-CH4 mixtures: a virial equation treatment for moderate pressures and temperatures applicable to calculations of hydrothermal boiling. Geochim. Cosmochim. Acta 52.3, 739–749 (1988)

    Article  Google Scholar 

  74. 74.

    Matschei, T., Lothenbach, B., Glasser, F.P.: Thermodynamic data for hydrated solids in Portland cement system CaO-Al2o3-Sio2-CaSO4-CaCO3- Fe2O3-MgO-H2O. Cem. Concr. Res. 37, 1379–1410 (2007)

    Article  Google Scholar 

  75. 75.

    Thoenen, T., et al.: The PSI/Nagra Chemical Thermodynamic Database 12/07 Nuclear Energy and Safety Research Department Laboratory forWaste Management (LES) (2014)

  76. 76.

    Johnson, J.W., Oelkers, E.H., Helgeson, H.C.: SUPCRT92: a software package for calculating the standard molal thermodynamic properties of minerals, gases, aqueous species, and reactions from 1 to 5000 bar and 0 to 1000 c. Comput. Geosci. 18.7, 899–947 (1992)

    Article  Google Scholar 

  77. 77.

    Wigger, C., Van Loon, L.R.: Importance of interlayer equivalent pores for anion diffusion in clay-rich sedimentary rocks. Environ. Sci. Tech. 51.4, 1998–2006 (2017)

    Article  Google Scholar 

  78. 78.

    Van Loon, L.R., Glaus, M.A., Müller, W.: Anion exclusion effects in compacted bentonites: towards a better understanding of anion diffusion. Appl. Geochem. 22.11, 2536–2552 (2007)

    Article  Google Scholar 

  79. 79.

    Altmann, S., et al.: Diffusion-driven transport in clayrock formations. Appl. Geochem. 27.2, 463–478 (2012). arXiv: 1-1

    Article  Google Scholar 

  80. 80.

    Bear, J., Bachmat, Y.: Introduction to Modeling of Transport Phenomena in Porous Media. Springer, Dordrecht (1990)

  81. 81.

    Samson, E., Marchand, J.: Numerical solution of the extended Nernst-Planck model. J Colloid Interface Sci. 215, 1–8 (1999)

    Article  Google Scholar 

  82. 82.

    Daus, A.D., Frind, E.O.: An alternating direction Galerkin technique for simulation of contaminant transport in complex groundwater systems. Water Resour. Res. 21.5, 653–664 (1985)

    Article  Google Scholar 

  83. 83.

    Courant, R., Friedrichs, K., Lewy, H.: ÜBer die partiellen Differenzengleichungen der mathematischen Physik. Mathematische Annalen 100.1, 32–74 (1928)

    Article  Google Scholar 

  84. 84.

    Isaacson, E., Keller, H.B.: Analysis of numerical methods dover books on mathematics. Dover Publications (1994)

  85. 85.

    Murdoch, J.R.: What is the rate-limiting step of a multistep reaction?. J. Chem. Educ. 58.1, 32 (1981). eprint: https://doi.org/10.1021/ed058p32

    Article  Google Scholar 

  86. 86.

    Zhang, Y.: Geochemical kinetics. Princeton University Press, pp. 631 (2008)

  87. 87.

    Arnold, D.N., et al.: Unified Analysis of Discontinuous Galerkin Methods for Elliptic Problems (2002)

  88. 88.

    Riviére, B.: Discontinuous Galerkin methods for solving elliptic and parabolic equations : theory and implementation. SIAM, Society for Industrial and Applied Mathematics, pp. 190 (2008)

  89. 89.

    Zhang, C., Zarrouk, S.J.: Rosalind Archer. A mixed finite element solver for natural convection in porous media using automated solution techniques. Comput. Geosci.-UK. 96, 181–192 (2016)

    Article  Google Scholar 

  90. 90.

    Houston, P., Sime, N.: Automatic symbolic computation for discontinuous Galerkin finite element methods. SIAM J. Sci Comput. 40.3, C327–C357 (2018)

    Article  Google Scholar 

  91. 91.

    Berner, U., Kulik, D.A., Kosakowski, G.: Geochemical impact of a low-pH cement liner on the near field of a repository for spent fuel and high-level radioactive waste. Phys. Chem. Earth 64, 46–56 (2013)

    Article  Google Scholar 

  92. 92.

    Steefel, C.I., Maher, K.: Fluid-rock interaction: a reactive transport approach. Rev. Mineral. Geochem. 70.1, 485–532 (2009)

    Article  Google Scholar 

  93. 93.

    Quintard, M., Whitaker, S.: Transport in ordered and disordered porous media: volume - averaged equations, closure problems, and comparison with experiment. Chem. Eng. Sci. 48.14, 2537–2564 (1993)

    Article  Google Scholar 

  94. 94.

    Lasaga, A.C.: Kinetic Theory in the Earth Sciences, pp. 811. arXiv:1011.1669v3 (1998)

  95. 95.

    Rumbaugh, J., Jacobson, I., Booch, G.: The unified modeling language reference manual. Addison-Wesley, pp. 550 (1999)

  96. 96.

    Rasouli, P., et al.: Benchmarks for multicomponent diffusion and electrochemical migration. Computat. Geosci. 19.3, 523–533 (2015)

    Article  Google Scholar 

  97. 97.

    Lichtner, P.C.: Principles and Practice of Reactive Transport Modeling (1994)

  98. 98.

    Martin, A., et al.: Seeming steady-state uphill diffusion of 22Na+ in compacted montmorillonite. Environ. Sci. Technol. 47.20, 11522–11527 (2013)

    Google Scholar 

  99. 99.

    Glaus, M.A., et al.: Cation diffusion in the electrical double layer enhances the mass transfer rates for Sr2+, Co2+ and Zn2+ in compacted illite. Geochim. Cosmochim. Acta 165, 376–388 (2015)

    Article  Google Scholar 

  100. 100.

    Massimo, R., et al.: Nernst-Planck-based description of transport, coulombic interactions, and geochemical reactions in porous media: modeling approach and benchmark experiments. Water Resour. Res. 54.4, 3176–3195 (2018)

    Google Scholar 

  101. 101.

    Maes, N., et al.: Determination of the diffusion coefficient of ionic species in boom clay by electromigration: feasibility study. Radiochim. Acta 82.s1, 183–190 (1998)

    Google Scholar 

  102. 102.

    Berner, U.: Radionuclide concentration limits in the cementitious near-field of an ILW repository (2003)

  103. 103.

    Jenni, A., et al.: In situ interaction between different concretes and Opalinus clay. Phys. Chem. Earth 70-71, 71–83 (2014)

    Article  Google Scholar 

  104. 104.

    Engesgaard, P., Kipp, L.K.: A geochemical transport model for redox-controlled movement of mineral fronts in groundwater ow systems: a case of nitrate removal by oxidation of pyrite. Water Resour. Res. 28.10, 2829–2843 (1992)

    Article  Google Scholar 

  105. 105.

    Prommer, H., Barry, D.A., Zheng, C.: MODFLOW/ MT3DMS - Based reactive multicomponent transport modeling. Ground Water 41.2, 247–257 (2002)

    Google Scholar 

  106. 106.

    Shao, H., et al.: Modeling reactive transport in non-ideal aqueous-solid solution system. Appl. Geochem. 24.7, 1287–1300 (2009)

    Article  Google Scholar 

  107. 107.

    He, W.: Code verification: Engesgaard benchmark. Open- GeoSys Tutorial: Computational Hydrology III: OGS # IPhreeqc Coupled Reactive Transport Modeling. Springer International Publishing, Berlin, pp. 31–35 (2018)

Download references

Acknowledgments

We thank Phillip Krejci, Dr. Thomas Gimmi, and Dr. Dmitrii Kulik for helpful discussions during the development of the FEniCS–Reaktoro framework. The opinions expressed and arguments employed herein do not necessarily reflect the official views of the Swiss Government.

Funding

This work was supported by the Swiss State Secretariat for Education, Research and Innovation (SERI) under contract number 15.0186-2.Authors receive partial financial support from Nagra. The research leading to these results has received funding from the European Union’s Horizon 2020 Research and Training Programme of the European Atomic Energy Community (EURATOM) (H2020 - NFRP - 2014 / 2015) under grant agreement no662147 (CEBAMA).

Author information

Affiliations

Authors

Corresponding author

Correspondence to Leonardo Hax Damiani.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix A

Appendix A

The core class of FEniCS–Reaktoro encapsulates two parts: (1) the initialization routine and (2) the reactive transport loop. The initialization routine prepares the underlying structure and defines multiple properties: temporal and spatial; initial conditions, boundary conditions, and constants; single diffusion coefficient or species-dependent diffusion coefficients; the equation system; and the chemical systems. The reactive transport loop is where the transport and chemical equations are solved within a one-time loop until total simulation time is reached.

The finite element mesh and the chemical system are defined during the initialization routine before the reactive transport loop. This process includes the definition of (1) all species and phases involved in the chemical reactions; (2) governing equations necessary to describe the transport of such species; and (3) initialization of the cells necessary for the domain representation using FE infrastructure provided by FEniCS.

Figures 7 and 8 present the class and sequence diagram, respectively, of the FEniCS–Reaktoro framework using the UML language.

Fig. 7
figure7

The UML class diagram description of FEniCS–Reaktoro framework

Fig. 8
figure8

The FEniCS–Reaktoro framework UML sequence diagram depicting the interaction between the components

The usage of FEniCS–Reaktoro coupled code to run a reactive transport simulations requires the generation of the following:

  • The chemical system file: the chemical system file can be generated using (a) the GEM-Selektor v.3 graphical user interface, (b) the Phreeqc graphical user interface, or (c) Reaktoro’s manual chemical system editor

  • The mesh file: the mesh file can be generated using (a) GMSH or (b) FEniCS, depending on the complexity of the geometry

  • The 4 files included in the user-defined input package: main input file, transport file, boundary conditions file and diffusion coefficients file

The detailed composition of the 4 files from the user-defined input package is as follows:

  • Main input file: contains the temporal and spatial properties, finite element family and degree, type of transport equation used, chemical composition (composed by external chemical definition files), and constants (optional)

  • Transport file: contains the description of the physical processes, through the definition of the weak formulation of the PDE

  • The boundary conditions file: defines the boundary conditions of the simulation

  • Diffusion coefficients file: defines the diffusion coefficient of the species (single or multicomponent diffusion are supported).

We point to the framework’s repository located at bitbucket.org/lhdamiani/fenics-reaktoro, where one can find instructions, licensing information, documentation, and demos.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Damiani, L.H., Kosakowski, G., Glaus, M.A. et al. A framework for reactive transport modeling using FEniCS–Reaktoro: governing equations and benchmarking results. Comput Geosci 24, 1071–1085 (2020). https://doi.org/10.1007/s10596-019-09919-3

Download citation

Keywords

  • Reactive transport
  • Electrochemical transport
  • Multicomponent diffusion
  • Finite element method
  • Porous media
  • Gibbs energy minimization
  • Operator splitting approach