Figure 4.3:

First-order, irreversible kinetics in a batch reactor.

Figure 4.3

Code for Figure 4.3

Text of the GNU GPL.

main.py


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Converted from kca.m
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.dat', table)