Chemical Engineering: Sequential batch Reaction
Lecture note of Dr. Hiroshi Yamamoto
The most simple Sequential batch Reaction can write like below.
K is reaction constant, C is concentration.
The differential equation become like below.
dCa/dt = -k1Ca
dCb/dt =k1Ca - k2Cb
dCc/dt = k2Cb
This program will run Safari, Mobile Safari, Chrome, Firefox (for Mac). I am not sure Windows browser, but except IE it may work.
Red line mean decreasing A concentration with time. As decreasing A, product B (Green line) increase. But B will convert to C (Blue line), so B will decrease at certain point. If you want to C product, it is easiy, but if you want to B product, you need stop at top of the curve. Or you need search experimental condition, such as temperature, pressure, pH that decease K2. Then as second picture, you will get better yield of B product. Please change K1, K2 and try.
This is the very good example for HTML5 Canvas.