Figure 7.8:

Effectiveness factor versus Thiele modulus for the sphere, cylinder and slab.

Figure 7.8

Code for Figure 7.8

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 etasymmetric.m - eta for slab, cylinder, sphere
import numpy as np
from scipy.special import iv as besseli
from misc import save_ascii

phi = np.logspace(-2, 2, 50).reshape(-1, 1)

# scaled Bessel functions to prevent overflow
bessel0 = besseli(0, 2*phi) * np.exp(-2*phi)
bessel1 = besseli(1, 2*phi) * np.exp(-2*phi)

eta1 = (1./np.tanh(3*phi) - 1./(3*phi)) / phi   # sphere
eta2 = bessel1 / phi / bessel0                    # cylinder (scaled)
eta3 = np.tanh(phi) / phi                         # slab

tmp = np.column_stack([phi, eta1, eta2, eta3])

save_ascii('etasymmetric.dat', tmp)