Figure 8.5:

CSTR residence-time distribution.

Figure 8.5

Code for Figure 8.5

Text of the GNU GPL.

main.py


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Converted from cstr_rtd.m - CSTR RTD density for various tau
import numpy as np
from misc import save_ascii

npts = 100
x    = np.linspace(0., 5., npts)
y    = np.column_stack([
    np.exp(-x/0.5)/0.5,
    np.exp(-x/1.)/1.,
    np.exp(-x/2.)/2.,
    np.exp(-x/5.)/5.,
])

table = np.column_stack([x, y])
save_ascii('cstr_rtd.dat', table)