I am programming a small model to simulate diffusion of $\ce{H+}$ ions in human tissue. It's quite a simplistic model based on a naive algorithm, and I'm mostly doing it to familiarize with the concept of agent-based models.
My space is an $n\times n$ grid where each position $(x;y)$ hosts $h$ $\ce{H+}$ ions.
I understand that $\ce{pH}$ can be calculated based on $h$ as $-\log(h)$. As I want my initial $\ce{pH}$ to be stable at average human $\ce{pH}$, I'd set $h$ across the matrix to be $10^{7.5}$. (In fact, as I don't want to simulate $10^{7.5}$ protons I decided each particle will represent a bulk of $10^5$ protons and made my equation $-\log(10^5\cdot h)$. )
However, I do not understand the equation, wouldn't it at some point yield a negative $\ce{pH}$ as $-\log(x) < 0$ for $x > 1$?
No comments:
Post a Comment