GEMS3K

GEM-selektor geochemical modeling package: revised algorithm and GEMS3K numerical kernel for coupled simulation codes, Reactive mass transport (RMT) simulation is a powerful numerical tool to advance our understanding of complex geochemical processes and their feedbacks in relevant subsurface systems. Thermodynamic equilibrium defines the baseline for solubility, chemical kinetics, and RMT in general. Efficient RMT simulations can be based on the operator-splitting approach, where the solver of chemical equilibria is called by the mass transport part for each control volume whose composition, temperature, or pressure has changed. Modeling of complex natural systems requires consideration of multiphase-multicomponent geochemical models that include nonideal solutions (aqueous electrolytes, fluids, gases, solid solutions, and melts). Direct Gibbs energy minimization (GEM) methods have numerous advantages for the realistic geochemical modeling of such fluid-rock systems. Substantial improvements and extensions to the revised GEM interior point method algorithm based on Karpov’s convex programming approach are described, as implemented in the GEMS3K C/C++ code, which is also the numerical kernel of GEM-Selektor v.3 package (url{http://gems.web.psi.ch}). GEMS3K is presented in the context of the essential criteria of chemical plausibility, robustness of results, mass balance accuracy, numerical stability, speed, and portability to high-performance computing systems. The stand-alone GEMS3K code can treat very complex chemical systems with many nonideal solution phases accurately. It is fast, delivering chemically plausible and accurate results with the same or better mass balance precision as that of conventional speciation codes. GEMS3K is already used in several coupled RMT codes (e.g., OpenGeoSys-GEMS) capable of high-performance computing.