LIB4RT: Automated generation of reactive-transport formulations from PHREEQC databases for implementation in multiphysics platforms
Abstract
Reactive transport simulations in multiphysics platforms require accurate geochemical reaction and transport flux terms derived from thermodynamic databases and equilibrium speciation calculations. In practice, building these definitions manually from databases is time-consuming, error-prone, and difficult to reproduce when the chemical system is modified. This paper presents LIB4RT, an engineering software tool that parses PHREEQC-format thermodynamic databases and generates traceable sets of variable definitions, equilibrium expressions, mass variables, and transport-related terms for implementation in multiphysics platforms. The current implementation is demonstrated in COMSOL Multiphysics, where the generated definitions can be transferred through text-based input. LIB4RT includes a robust equilibrium speciation solver based on a Levenberg–Marquardt scheme and supports large geochemical systems, redox conditions, and multiple activity-coefficient formulations across common database conventions. The tool is verified against PHREEQC for speciation at equilibrium and reactive transport benchmarks under the same databases and modelling assumptions. The results show that LIB4RT reduces implementation overhead, improves traceability, and facilitates reproducible development of reactive transport formulations in multiphysics environments.
// Source
Authors: Adrián Sánchez-Migallón, Rubén López-Vizcaíno, Xiaojuan Yang, Arianna Pucci, Vicente Navarro, Ángel Yustres
Institutions: Zhejiang University of Technology, University of Castilla-La Mancha