Reaction formula-unit conservation (source code)

= Reaction formula-unit conservation

For $A\rightleftharpoons2B$, the conserved amount is $M=N_A+N_B/2$. The total particle count $N_A+N_B$ changes during reaction. Defining a dissociated fraction by $\alpha=N_B/(2M)$ gives $N_A=M(1-\alpha)$.