Figure 7.18:

Asymptotic behavior of the effectiveness factor versus Thiele modulus; first-order reaction in spherical pellet.

Figure 7.18

Code for Figure 7.18

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
19
20
21
22
23
24
25
26
27
28
29
30
31
# Converted from biotasy.m - Biot number asymptotic analysis
import numpy as np
from misc import octave_save

Bbig   = 100.
Bsmall = 0.01
nphi   = 100
phismall = 1e-2
phibig   = 1e4
phi    = np.logspace(np.log10(phismall), np.log10(phibig), nphi).reshape(-1, 1)

B = Bbig
etabig = (1./phi * (1./np.tanh(3*phi) - 1./(3*phi)) /
          (1 + (phi/np.tanh(3*phi) - 1./3) / B))
B = Bsmall
etasmall = (1./phi * (1./np.tanh(3*phi) - 1./(3*phi)) /
            (1 + (phi/np.tanh(3*phi) - 1./3) / B))

tmp = np.column_stack([phi, etabig, etasmall])

horiz       = np.array([[phismall,       1.],
                         [np.sqrt(Bbig), 1.]])
minus1      = np.array([[1.,    1.],
                         [phibig, 1./phibig]])
minus2small = np.array([[np.sqrt(Bsmall), 1.],
                         [phibig, 1./(phibig**2/Bsmall)]])
minus2big   = np.array([[np.sqrt(Bbig),  1.],
                         [phibig, 1./(phibig**2/Bbig)]])
auxvbl = np.column_stack([horiz, minus1, minus2small, minus2big])

octave_save('biotasy.dat', ('tmp', tmp), ('auxvbl', auxvbl))