Figure 4.4:

First-order, irreversible kinetics in a batch reactor, log scale.

Figure 4.4

Code for Figure 4.4

Text of the GNU GPL.

main.py


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Converted from kca_log.m - likely same as kca.m with log scale
# (reusing same data)
import numpy as np
from misc import save_ascii

npts = 100
xplot = np.linspace(0, 5, npts)
yplot = np.column_stack([
    np.exp(-0.5*xplot),
    np.exp(-xplot),
    np.exp(-2*xplot),
    np.exp(-5*xplot)
])
table = np.column_stack([xplot, yplot])
save_ascii('kca_log.dat', table)