Modelling pH as function of time and position I already posted this on the Engineering Stack Exchange under Chemical Engineering as I don't know where it's a better fit.
I have a system whose initial state consists of three different sections with different chemical composition. All sections are aqueous solutions of different $\mathrm{pH}$ that are brought into contact for $t \gt 0$. The system is isothermal in each section and is of equal temperature in all sections and is assumed to remain isothermal, as heat generation is not considered. Section 1 (the leftmost section) is basic and contains reagent 1, section 2, the middle section, contains just water at a $\textrm{pH}$ of 7 and section 3, the rightmost section, is acidic. Section 1 and 3 are of equal size, whereas section 2 is larger. The system is three-dimensional, but can be reduced to one dimension due to symmetry (it is a tube in which angular and radial coordinates are assumed to not play a role). All sections can be considered equal in terms of physical properties (viscosity, density, etc.). I would like to model the $\mathrm{pH}$ as a function of time and position as there are reactions occurring whose reaction rate is a function of $\mathrm{pH}$. There is no convection, only diffusion. I already tried setting up a PDE system using
$$
\frac{\partial c_i}{\partial t}= D\nabla^2 c_i + r_i(\mathrm{pH},T)
$$
and solving it in Matlab, while setting a very high rate constant for the recombination of $\ce{H+}$ and $\ce{OH-}$. The Matlab solver fails as the recombination kinetics are too fast, but lowering them is not an option, as this wouldn't represent reality anymore (acid-base reactions are thought of the be instantaneous). How could I rewrite my PDE system to model the evolution of the $\mathrm{pH}$ at every position as well as calculate the concentrations of products and educts of reactions that depend on $\mathrm{pH}$ (but are only catalysed by it), without using reaction kinetics for the recombination of $\ce{H+}$ and $\ce{OH-}$ to make use of the fact that this reaction is instantaneous?
To answer my own question:
Using either the diffusion limited or the literature values of the acid-base neutralisation (Baldyga et al., Non-isothermal Micromixing in Turbulent Liquids: Theory and Experiment), I was able to simulate the $\mathrm{pH}$ as a function of time by making the simplifying assumption of equal diffusion coefficients of proton and hydroxide ions. I re-expressed the proton concentration in terms of $\mathrm{pH}$:
$$
\frac{\textrm{d} c_{\textrm{H$^+$}}}{\textrm{d} \mathrm{pH}} = -\ln (10) \cdot 10^{-\mathrm{pH}}
$$
plugged this into my original equation and made everything dimensionless.