Figure 4.7:

Reaction rate versus concentration for nth-order kinetics, r=kc_A^n, n\geq 0, k=1 for all orders.

Figure 4.7

Code for Figure 4.7

Text of the GNU GPL.

main.py


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Converted from reacrate.m
import numpy as np
from misc import save_ascii

npts = 100
cfin = 3.0
cmin = 0.001
k = 1.0
orders = np.array([3, 2, 1, 0.5, 0], dtype=float)
norders = len(orders)
store = np.empty((npts, 0))

for n in orders:
    c = np.linspace(cmin, cfin, npts)
    rate = k * c**n
    store = np.column_stack([store, c, rate]) if store.size > 0 else np.column_stack([c, rate])

save_ascii('reacrate.dat', store)