Upper-envelope stability for competing mineral dissolution reactions (source code)

= Upper-envelope stability for competing mineral dissolution reactions
{title2=$y=\max(\ell_G(x),\ell_K(x))$}

Suppose a reference <mineral> $C$ can dissolve to either $G$ or $K$, with the same conserved solid component, and normalized <Gibbs energies of reaction> $\Delta_rG_G/A=y-\ell_G(x)$ and $\Delta_rG_K/A=y-\ell_K(x)$ for $A>0$. Choose relative solid potentials $\Phi_C=0$, $\Phi_G=y-\ell_G$ and $\Phi_K=y-\ell_K$. The stable state minimizes $\Phi$. Thus $C$ is stable above $y=\max(\ell_G,\ell_K)$; $G$ is stable below $\ell_G$ where $\ell_G>\ell_K$; and $K$ is stable below $\ell_K$ where $\ell_K>\ell_G$. The $G$–$K$ coexistence line is stable below their triple intersection and <metastable> above it. These inequalities follow directly from the sign of each forward dissolution reaction. Reversing reaction directions reverses the corresponding sign convention, so one must establish the reaction direction before choosing an upper or lower envelope.