Abstract :
[en] SolveSAPHE, the Solver Suite for Alkalinity-PH Equations (Munhoven, 2013, DOI:10.5194/gmd-6-1367-2013), hereafter SolveSAPHE v.1, was the first carbonate chemistry speciation package that was able to securely and reliably calculate pH for any physically meaningful pair of total alkalinity (Alk_T) and dissolved inorganic carbon (C_T) values. We have now revised and extended the solution approach developed for SolveSAPHE v.1 so that Alk_T & CO2 , Alk_T & HCO3 and Alk_T & CO3 problems can be processed as well.
The mathematical analysis of the modified alkalinity-pH equations reveals that the Alk_T & CO2 and Alk_T & HCO3 problems have one and only one positive root for any physically sensible pair of data (i.e., such that, resp., [CO2] > 0 and [HCO3] > 0). For Alk_T & CO3 the situation is completely different: there are pairs of data values for which there is no solution, others for which there is one and still others for which there are two. Similarly to its predecessor, the new SolveSAPHE-r2 offers automatic root bracketing and efficient initialisation schemes for the iterative solvers. The Alk_T & CO3 problem is furthermore autonomously and completely characterised: for any given pair of data values, the number of solutions is determined and non-overlapping bracketing intervals are calculated.
The numerical solution of the alkalinity-pH equations for the three new pairs is far more difficult than for the Alk_T & C_T pair. The Newton-Raphson and the secant based solvers from SolveSAPHE v.1 had to be reworked in depth to reliably process the three additional data input pairs. The Alk_T & CO2 pair is computationally the most demanding. With the Newton-Raphson based solver, it takes about five times as long to solve as the companion Alk_T & C_T pair, while Alk_T & CO_3 requires about four times as much time. All in all, the secant based solver offers the best performances. It outperforms the Newton-Raphson based one by up to a factor of four and leads to equation residuals that are up to seven orders of magnitude lower. For carbonate speciation problems posed by Alk_T and either one of [CO2], [HCO3] or [CO3] the secant based routine from SolveSAPHE-r2 is clearly the method of choice; for calculations with Alk_T & C_T, the SolveSAPHE v.1 solvers will perform better, due to the mathematically favourable characteristics of the alkalinity-pH equation for that pair.