Figure 7.16:
Dimensionless concentration versus radius for different values of the Biot number; first-order reaction in a spherical pellet with \Phi =1.
Code for Figure 7.16
Text of the GNU GPL.
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | # Converted from biotcvsr.m - concentration vs radius, varying Biot number
import numpy as np
from misc import save_ascii
phi = 1.
Binv = [0., 0.5, 2., 10.]
small = 1e-6
npts = 100
r = np.linspace(small, 3., npts).reshape(-1, 1)
tmp = r.copy()
for k in range(len(Binv)):
ca = (3./r * np.sinh(phi*r) /
(np.sinh(3*phi) + Binv[k]*(phi*np.cosh(3*phi) - 1./3*np.sinh(3*phi))))
tmp = np.column_stack([tmp, ca])
save_ascii('biotcvsr.dat', tmp)
|