Figure 4.6:

Second-order and first-order kinetics in a batch reactor; for second-order, kc_{A0}=1, and for first order, k=1, so the rates are equal initially.

Figure 4.6

Code for Figure 4.6

Text of the GNU GPL.

main.py


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Converted from kca2.m
import numpy as np
from misc import save_ascii

npts = 100
xplot = np.linspace(0, 5, npts)
yplot = np.column_stack([
    np.exp(-xplot),
    1.0/(1.0 + xplot)
])
table = np.column_stack([xplot, yplot])
save_ascii('kca2.dat', table)