In [7]:

```
#initialization of variables
tE = 33 # Time taken for ferric ion to exhaust the bed in min
tB = 23 # Time taken for nickel to break through ferric in min
l = 120 #bed length in cm
#Calculations
Theta = 2*tB/(tB+tE)
lunused = (1-Theta)*120*(0.2) # cm
#Results
print"the length of the bed unused is cm",lunused
```

In [8]:

```
#initialization of variables
tB = 10. # min
tE = 14. # min
l = 0.12 #m
l2 = 10. # m
c = 10000
A = 1./10000. # m**2
from math import pi
#Calculations
theta = 2*tB/(tB+tE)
l1 = l*(1-theta)# m , length of bed unused in first case
V1 = c*A*l # m**3
l3 = l2-l1 # length of bed unused in second case
d = (V1*4/(l3*pi))**0.5# m
V2 = c*(l-l1)*A*l2/l3 # volume needed for second case
#Results
print"The volume of adsorbent needed if the bed is kept 12 cm deep is m**3",round(V1,1)
print"\nThe volume of adsorbent needed if the bed length is 10 m long is m**3",round(V2,4)
```

In [9]:

```
#intialization of variables
tB1 = 38. # days , breakthrough time
tE1 = 46. # days, exhaustion time
c = 2. # number of times flow doubled
#Calculations
theta1 = 2*tB1/(tB1+tE1)# in the first case
ratio1 = 1-theta1 # ratio of unused bed length to total bed length
ratio2 = ratio1*c
tB2 = ((1/c)*(tB1 + 0.5*(tE1-tB1)))*ratio2#breakthrough time for second case
tE2 = (c-ratio2)*tB2/ratio2#exhaustion time for second case
#Results
#answwer slightly wrong in textbook
print"The breakthrough time for this case is days",tB2
```

In [10]:

```
#initialization of variables
slope = 0.93/3600. # sec**-1
q0 = 300. # 300 times y0
E = 0.4 # void fraction
d = 310*10**-4 #cm
v = 1./60. #cm/sec
Nu = 0.01 #cm**2/sec
D = 5*10**-6 #cm**2/sec
#Calculations
ka1 = slope*q0*(1-E)#sec**-1
k = (D/d)*1.17*((d*v/Nu)**0.58)*((Nu/D)**0.33)# cm/sec
a = (6/d)*(1-E)#cm**2/cm**3
ka2 = k*a#sec**-1
#Results
print"The rate constant is sec**-1l \t",round(ka1,2)
print"\nThe rate constant of literature is sec**-1 \t",round(ka2,3)
```