Learning Scientific Programming with Python (2nd edition)

P8.2.6: The Chapman cycle

Question P8.2.6

A simple mechanism for the formation of ozone in the stratosphere consists of the following four reactions (known as the Chapman cycle): $$ \begin{align*} \mathrm{O_2} + h\nu & \rightarrow 2\mathrm{O} & k_1 = 3 \times 10^{-12}\;\mathrm{s^{-1}}\\ \mathrm{O_2} + \mathrm{O} + \mathrm{M} & \rightarrow \mathrm{O_3} + \mathrm{M} & k_2 = 1.2\times 10^{-33}\;\mathrm{cm^6\,molec^{-2}\,s^{-1}}\\ \mathrm{O_3} + h\nu' & \rightarrow \mathrm{O} + \mathrm{O_2} & k_3 = 5.5 \times 10^{-4}\;\mathrm{s^{-1}}\\ \mathrm{O} + \mathrm{O_3} & \rightarrow 2\mathrm{O_2} & k_4 = 6.9\times 10^{-16}\;\mathrm{cm^3\,molec^{-1}\,s^{-1}} \end{align*} $$ where M is a non-reacting third-body taken to be at the total air molecule concentration for the altitude being considered. The above reactions lead to the following rate equations for $\mathrm{[O]}$, $\mathrm{[O_3]}$ and $\mathrm{[O_2]}$: $$ \begin{align*} \frac{\mathrm{d[O_2]}}{\mathrm{d}t} &= -k_1\mathrm{[O_2]} - k_2\mathrm{[O_2]}\mathrm{[O]}\mathrm{[M]} + k_3\mathrm{[O_3]} + 2k_4\mathrm{[O]}\mathrm{[O_3]}\\ \frac{\mathrm{d[O]}}{\mathrm{d}t} &= 2k_1\mathrm{[O_2]} - k_2\mathrm{[O_2]}\mathrm{[O]}\mathrm{[M]} + k_3\mathrm{[O_3]} - k_4\mathrm{[O]}\mathrm{[O_3]}\\ \frac{\mathrm{d[O_3]}}{\mathrm{d}t} &= k_2\mathrm{[O_2]}\mathrm{[O]}\mathrm{[M]} - k_3\mathrm{[O_3]} - k_4\mathrm{[O]}\mathrm{[O_3]} \end{align*} $$ The above rate constants apply at an altitude of 25 km, where $\mathrm{[M]} = 9\times 10^{17}\;\mathrm{molec\,cm^{-3}}$. Write a program to determine the concentrations of $\mathrm{O_3}$ and $\mathrm{O}$ as a function of time at this altitude (you should find the $\mathrm{[O_2]}$ remains pretty much constant). Start with initial conditions $\mathrm{[O_2]_0} = 0.21\mathrm{[M]}$, $\mathrm{[O]_0} = \mathrm{[O_3]_0} = 0$ and integrate for $10^8\;\mathrm{s}$ (starting from scratch it takes about 3 years to build an ozone layer with this mechanism). Compare the equilibrium concentrations with the approximate analytical result obtained using the steady-state approximation: $$ \mathrm{[O_3]} = \sqrt{\frac{k_1k_2}{k_3k_4}}\mathrm{[O_2]}\mathrm{[M]}^\frac{1}{2}, \quad \frac{\mathrm{[O]}}{\mathrm{[O_3]}} = \frac{k_3}{k_2\mathrm{[O_2]}\mathrm{[M]}}. $$