Python and MATLAB implementations of a fast numerical method for the solution of multiple chemical equilibria

08 March 2024, Version 1
This content is a preprint and has not undergone peer review at the time of posting.

Abstract

Determining the distribution of multiple chemical species at equilibrium for a given system is a common problem that must be routinely addressed by scholars. While simple systems consisting of a few species and reactions can be solved manually, most of these problems require the definition and solution of higher-order equations and are intractable without reliable numerical methods, that can be slow and inefficient. In this work, we introduce straightforward Python and MATLAB implementations of the geometric-programming algorithm developed by Thomas Wayne Wall (1984) and we provide clear and easy-to-use scripts and examples for researchers approaching the problem. The code is readily available online in a package called equpy. The performance and stability of the algorithm are tested versus out-of-the-box MATLAB numerical solver (vpasolve) and the solver employed in chempy - one of the most complete opensource chemistry packages available to this date - showing an execution time reduced by as much as two orders of magnitudes.

Keywords

Multiple Equilibria
Numerical Methods
Reaction Network

Supplementary weblinks

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.