In [8]:

```
T = 310 # [K]
# Since the solubility of oxygen in water at 310 K is extremely low, we are dealing with dilute solutions
k_L = 3.3*10**-5 # [coefficient based on the oxygen concentration difference in the water, m/s]
row = 993 # [kg/cubic m]
M_b = 18 # [gram/mole]
#Calculation
# Since we are dealing with very dilute solutions
# Therefore, c = (row/M_avg) = row/M_b
c = row/M_b # [kmole/cubic m]
# Using equation 2.10
k_x = k_L*c # [kmole/square m.s]
#Result
print"The mass-transfer coefficient based on the mole fraction of oxygen in the liquid is",round(k_x,5)," kmole/square m.s"
```

In [4]:

```
#Variable declaration
# a-ammonia b-air
T = 300 # [K]
P = 1 # [atm]
y_a1 = 0.8 # [ammonia mole fraction in the bulk of the gas phase]
y_a2 = 0.732 # [ammonia gas-phase mole fraction on interface]
N_a = 4.3*10**-4 # [ammonia flux, kmole/square m.s]
#Calculations
import math
# Using equation 2.2
F_g = N_a/math.log10((1-y_a2)/(1-y_a1)) # [kmole/square m.s]
#Result
print"The mass-transfer coefficient in the gas phase at that point where flux is 4.3*10**-4 is",round(F_g,5)," kmole/square m.s"
print"\n\nNOTE:Calculation mistake in book:\nAnswer written as 1.47*10^-4,Actually,,...it is 1.47*10^-3.Please REDO last calculation manually to check"
```

In [10]:

```
#Variable declaration
# a-methanol b-water
P = 101.3 # [kPa]
y_a1 = 0.707 # [mole fraction at interface]
y_a2 = 0.656 # [mole fraction at bulk of the gas]
k_g = 1.62*10**-5 # [mass-transfer coefficient at a point in the column, kmole/square m.s.kPa]
#Calculations
# Using equation 2.14
k_y = k_g*P # [kmole/square m.s]
# Using equation 2.12
N_a = k_y*(y_a1-y_a2) # [kmole/square m.s]
#Result
print"The methanol flux at the point of given mass transfer coefficient is",round(N_a,7),"kmole/square m.s"
```

In [11]:

```
n = 6 # [number of variables]
#Calculations
from scipy.optimize import fsolve
from numpy import *
import math
# To determine the number of dimensionless parameters to be formed, we must know the rank, r, of the dimensional matrix.
# The dimensional matrix is
DM =matrix([[0,0,1,1,0,0],[1,1,-3,-1,2,1],[-1,-1,0,0,-1,-1]])
rk= linalg.matrix_rank(DM)
print"Rank of matrix is ",rk
#The numbers in the table represent the exponent of M, L, and t in the dimensional expression of each of the six variables involved. For example, the dimensional expression of p is M/Lt hence the exponents are 1, -1, and -1
# From equation 2.16
i = n-rk # [number of dimensional groups]
# Let the dimensional groups are pi1, pi2 and pi3
# Therefore pi1 = (D_AB)**a*(row)**b*(D)**c*kc
# pi2 = (D_AB)**d*(row)**e*(D)**f*v
# pi3 = (D_AB)**g*(row)**h*(D)**i*u
# Solving for pi1
# M**0*L**0*t**0 = 1 = (L**2/t)**a*(M/L**3)**b*(L)**c*(L/t)
# Solution of simultaneous equation
def F(e):
f1 = 2*e[0]-3*e[1]+e[2]+1
f2 = -e[0]-1
f3 = -e[1]
return(f1,f2,f3)
# Initial guess:
e = [0.1,0.8,0.5]
y = fsolve(F,e)
a = y[0]
b = y[1]
c = y[2]
print"The coefficients of pi1 are",a,round(b),c
# Similarly the coefficients of pi2 and pi3 are calculated
# Therefore we get pi1 = kc*D/D_AB = Sh i.e. Sherwood Number
# pi2 = v*D/D_AB = P_ed i.e. Peclet Number
# pi3 = u/(row*D_AB) = Sc i.e. Schmidt Number
# Dividing pi2 by pi3 gives
# pi2/pi3 = D*v*row/u = Re i.e. Renoylds number
print"The result of the dimensional analysis of forced-convection mass transfer in a circular conduit indicates that a correlating relation could be of the form\n Sh = function(Re,Sc)\n which is analogous to the heat transfer correlation \n Nu = function(Re,Pr)"
```

In [12]:

```
M_a = 352 # [molecular weight of UF6, gram/mole]
M_b = 29 # [gram/mole]
d = 0.01 # [diameter, m]
x = 0.1 # [length exposed to air stream, m]
v = 1 # [m/s]
Ts = 303 # [surface temperature of solid, K]
P_a = 27 # [vapor pressure of UF6, kPa]
Tb = 325 # [bulk temperature of solid ,K]
P = 101.3 # [kPa]
R = 8.314 # [cubic m.Pa/mole.K]
import math
y_a1 = P_a/P # [mole fraction at point 1]
y_a2 = 0 # [mole fraction at point 2]
# Along the mass-transfer path-cylinder surface (point 1) to bulk air (point 2)
Tavg = (Ts+Tb)/2 # [K]
# At point 1, the gas is saturated with UF6 vapor, while at point 2 the gas is virtually free of UF6
# Therefore
Pavg = (P_a+0)/2 # [average partial pressure, kPa]
y_a = Pavg/P # [mole fraction of UF6]
Mavg = M_a*y_a+M_b*(1-y_a) # [gram/mole]
row_avg = P*Mavg/(R*Tavg) # [kg/cubic m]
# Parameter for c-O2, d-N2 and a-UF6
yi_c = 0.182
yi_d = 0.685
yi_a = 0.133
Tc_c = 154.6 # [K]
Tc_d = 126.2 # [K]
Tc_a = 505.8 # [K]
Pc_c = 50.4 # [bar]
Pc_d = 33.9 # [bar]
Pc_a = 46.6 # [bar]
M_c = 32 # [gram/mole]
M_d = 28 # [gram/mole]
M_a = 352 # [gram/mole]
V_c = 73.4 # [cubic cm/mole]
V_d = 89.8 # [cubic cm/mole]
V_a = 250 # [cubic cm/mole]
Z_c = 0.288
Z_d = 0.290
Z_a = 0.277
#Calculations
# From equation 2.52 and 2.53
Tcm = yi_c*Tc_c+yi_d*Tc_d+yi_a*Tc_a # [K]
Pcm = 10**6*R*Tcm*(yi_c*Z_c+yi_d*Z_d+yi_a*Z_a)/((yi_c*V_c+yi_d*V_d+yi_a*V_a)*100000) # [bar]
M_avg = yi_c*M_c+yi_d*M_d+yi_a*M_a # [gram/mole]
# From equation 2.50
Em = 0.176*(Tcm/(M_avg**3*Pcm**4))**(1.0/6.0) # [uP]**-1
# From equation 2.51
Trm = Tavg/Tcm
f_Trm = (0.807*Trm**0.618)-(0.357*math.exp(-0.449*Trm))+(0.340*math.exp(-4.058*Trm))+0.018
# From equation 2.49
u = f_Trm/Em # [uP]
u = u*10**-7 # [viscosity, kg/m.s]
Re = d*v*row_avg/u # [Renoylds number]
# Diffusivity of UF6 vapors in air at 314 K and 1 atm from equation 1.49
D_ab = 0.0904 # [square cm/s]
Sc = u/(row_avg*D_ab*10**-4) # [Schmidt number]
Sh_avg = 0.43 + 0.532*Re**0.5*Sc**0.31 # [Sherwood number]
# From equation 1.7
c = P/(R*Tavg) # [kmole/cubic m]
# From Table 2.1
F_av = Sh_avg*D_ab*c*10**-4/d # [kmole/square m.s]
# From equation 2.2
N_avg = F_av*math.log((1-y_a2)/(1-y_a1)) # [kmole/square m.s]
S = 2*math.pi*d**2/4 +math.pi*d*x # [total surface area of the cylinder, square m]
w_a = N_avg*S*M_a # [rate of sublimation of the solid, kg/s]
#Result
print"Rate of sublimation of a cylinder of UF6 is",round(w_a,5),"kg/s\n\n"
```

In [13]:

```
import math
#Variable declaration
# a-benzene b-nitrogen
T = 300 # [K]
P = 101.3 # [kPa]
v =10 # [m/s]
R = 8.314 # [cubic m.Pa/mole.K]
n = -0.5
# Data on the properties of C02 at 300 K and 1 bar
u = 1.5*10**-5 # [viscosity, P]
Pr = 0.77 # [Prandtl number]
Cp = 853 # [J/kg.K]
# Therefore
# b = 5.086*l**0.5
# j_D = j_H = f(Re) = 5.086*(l**0.5)*Re**-0.5
# From Table 2.1
# F = j_D*c*v/Sc**(2/3) = 5.086*(l**0.5)*c*v/(Re**0.5*Sc**(2/3)) = 5.086*(row*v*u)**0.5/(Mavg*Sc**(2.0/3.0))
#Calculations
# Vapor pressure of benzene
P_a = math.exp(15.9008-(2788.51/(T-52.36))) # [mm of Hg]
P_a = P_a*101.3/760 # [kPa]
# Parameter for a-benzene, b-nitrogen
yi_a = 0.07
yi_b = 0.93
Tc_a = 562.2
Tc_b = 126.2 # [K]
Pc_a = 48.9
Pc_b = 33.9 # [bar]
M_a = 78.1
M_b = 28 # [gram/mole]
V_a = 259
V_b = 89.8 # [cubic cm/mole]
Z_a = 0.271
Z_b = 0.290
sigma_a = 5.349
sigma_b = 3.798 # [Angstrom]
ek_a = 412.3
ek_b = 71.4 # [E/k, K]
# From equation 2.52 and 2.53
Tcm = yi_b*Tc_b+yi_a*Tc_a # [K]
Pcm = 10**6*R*Tcm*(yi_b*Z_b+yi_a*Z_a)/((yi_b*V_b+yi_a*V_a)*100000) # [bar]
M_avg = yi_b*M_b+yi_a*M_a # [kg/kmole]
#RESULT
print"Average molecular weight is",round(M_avg,1),"kg/kmole"
row = P*M_avg/(R*T) # [kg/cubic m]
#RESULT
print"Density of mixture is",round(row,2),"kg/cubic"
# From equation 2.50
Em = 0.176*(Tcm/(M_avg**3*Pcm**4))**(1.0/6.0) # [uP]**-1
# From equation 2.51
Trm = T/Tcm
f_Trm = (0.807*Trm**0.618)-(0.357*math.exp(-0.449*Trm))+(0.340*math.exp(-4.058*Trm))+0.018
# From equation 2.49
u = f_Trm/Em # [uP]
u = u*10**-7 # [viscosity, kg/m.s]
print"Average viscosity of mixture is ",round(u,7),"kg/m.s\n\n"
# Calculating diffusivity of benzene using equation 1.49
D_ab = 0.0986 # [square cm/s]
Sc = u/(row*D_ab*10**-4) # [Schmidt number]
F = 5.086*(row*v*u)**0.5/(M_avg*Sc**(2.0/3.0)) # [kmole/square m.s]
#RESULT
print"The required mass transfer coefficient is",round(F,5),"kmole/square m.s"
```

In [14]:

```
import math
T = 300 # [K]
l = 3 # [length of vertical plate, m]
b = 1.5 # [width of vertical plate, m]
P = 101.3 # [kPa]
v = 5 # [velocity across the width of plate, m/s]
row_a = 0.88 # [gram/cubic cm]
y_a1 = 0.139 # [mole fraction of benzene at inner edge]
y_a2 = 0
# The film conditions, and average properties, are identical to those in Example 2.7, only the geometry is different
# Therefore
M_avg = 31.4 # [kg/kmole]
row = 1.2 # [kg/cubic m]
u = 161*10**-7 # [kg/m.s]
D_ab = 0.0986 # [square cm/s]
Sc = 1.3 # [Schmidt Number]
Re = row*v*b/u # [Renoylds Number]
if Re > 4000:
print"The flow across the plate is turbulent\n"
elif Re<2000:
print"The flow across the plate is laminar\n"
#Using equation 2.57
Sh_l = 0.036*Re**0.8*Sc**(1.0/3.0)
# Nitrogen (component B) does not react with benzene (component A), neither dissolves in the liquid therefore, NB = 0 and siA = 1. The F-form of the mass-transfer coefficient should be used
F = Sh_l*1.26*D_ab*10**-4/(M_avg*b) # [kmole/square m.s]
N_a = F*math.log((1-y_a2)/(1-y_a1)) # [kmole/square m.s]
# The total mass rate of evaporation over the surface of the plate
S = 1.5*3 # [square m]
M_a = 78.1 # [gram/mole]
wa = N_a*S*M_a*60*1000 # [gram/min]
V = wa/row_a # [volumetric flow rate, ml/min]
print"Liquid benzene should be supplied at the top of the plate at the rate ",round(V),"ml/min\nso that evaporation will just prevent it from reaching the bottom of the plate."
```

In [15]:

```
dp1 = 10**-3 # [diameter of spherical drop of water, m]
Tair = 323 # [K]
P = 101.3 # [kPa]
Twater = 293 # [K]
R = 8.314 # [cubic m.Pa/mole.K]
M_a = 18.0 # [gram/mole]
M_b = 29.0 # [gram/mole]
import math
#Calculation
dp2 = (1.0/2.0)**(1.0/3.0)*dp1 # [m]
dp = (dp1+dp2)/2 # [m]
row_p = 995 # [density of water, kg/cubic m]
row1b = 1.094 # [density of air, kg/cubic m]
u = 1.95*10**-5 # [kg/m.s]
row_pr = row_p-row1b # [kg/cubic m]
g = 9.8 # [accleration due to gravity, square m/s]
# Combining equation 2.68 and 2.69
Ga = 4*dp**3*row1b*row_pr*g/(3*u**2) # [Galileo Number]
# Relationship between Re and Cd
# Re/Cd = Re**3/Ga = 3*row**2*vt**3/(4*g*u*row_pr)
# The following correlation is used to relate Re/Cd, to Ga
# ln(Re/Cd)**(1/3) = -3.194 + 2.153*ln(Ga)**(1/3) - 0.238*(ln(Ga)**(1/3))**2 + 0.01068*(ln(Ga)**(1/3))**3
# Therefore let A = (Re/Cd)
A = math.exp(-3.194 + 2.153*math.log(Ga**(1.0/3.0)) - 0.238*(math.log(Ga**(1.0/3.0)))**2 + 0.01068*(math.log(Ga**(1.0/3.0)))**3)
# Therefore 'vt' will be
vt = A*(4*g*row_pr*u/(3*row1b**2))**(1.0/3.0) # [Terminal velocity of particle, m/s]
#Result
print"Terminal velocity of particle is",round(vt,2),"m/s"
#Calculation
P_w = 2.34 # [vapor pressure of water, kPa]
y_w = P_w/P # [mole fraction of water at the inner edge of the gas film]
M_avg = 18*y_w+29*(1-y_w) # [gram/mole]
row2b = P*M_avg/(R*Twater) # [kg/cubic.m]
delta_row = row2b - row1b # [kg/cubic.m]
Tavg = (Tair+Twater)/2 # [K]
# At Temperature equal to Tavg density and viscosity are
row3 = 1.14 # [kg/cubic.m]
u1 = 1.92*10**-5 # [kg/m.s]
Grd = g*row3*delta_row*(dp**3)/(u1**2)
# Diffusivity of water at Tavg and 1 atm is
D_ab = 0.242*10**-4 # [square m/s]
Sc = u1/(row3*D_ab) # [Schmidt Number]
Re = dp*row3*vt/u1 # [Renoylds Number]
# From equation 2.65 Re is greater than 0.4*Grd**0.5*Sc**(-1/6)
# Therfore equation 2.64 can be used to calculate mass transfer coefficient
Sh = 2+0.552*(Re**0.5)*Sc**(1.0/3.0) # [Sherwood Number]
# From Table 2.1
# Sh = kc*P_bm*dp/(P*D_ab), since P_bm is almost equal to P
# Therefore
# Sh = kc*dp/D_ab
kc = Sh*D_ab/dp # [m/s]
ca2 = 0 # [dry air concentration]
ca1 = P_w/(R*Twater) # [interface concentration, kmole/cubic.m]
# Average rate of evaporation
wa = math.pi*dp**2*M_a*kc*(ca1-ca2)*1000 # [g/s]
# Amount of water evaporated
m = row_p*math.pi*dp1**3/12*1000 # [g]
# Time necessary to reduce the volume by 50%
t = m/wa # [s]
D = t*vt # [distance of fall, m]
#Result
print"The distance of fall is",round(D),"m"
```

In [2]:

```
Re = 1223 # [Renoylds Number]
Sc = 0.905 # [Schmidt Number]
c = 0.039 # [molar density, kg/cubic m]
v = 1 # [gas velocity, m/s]
# Therefore
#Calculations
Gm = c*v # [kmole/square m.s]
# From equation 2.9
# Kg*P = ky
# Therefore substituting in equation 2.73 we obtain
ky = 0.281*Gm/(Re**0.4*Sc**0.56) # [kmole/square m.s]
# Now equation 2.73 were obtained under very dilute concentrations
# Therefore
y_bm = 1
# From equation 2.6
F = ky*y_bm # [kmole/square m.s]
#Result
print"Mass transfer coefficient is ",round(F,6),"kmol/m.^2-s"
```

In [17]:

```
D = 25.4*10**-3 # [diameter of wetted wall tower, m]
Gy = 10 # [mass velocity, kg/square m.s]
T1 = 308 # [K]
P = 101.3 # [kPa]
p_a1 = 1.95 # [partial pressure of water vapor, kPa]
R = 8.314 # [cubic m.Pa/mole.K]
M_a = 18 # [gram/mole]
Cpa = 1.88 # [kJ/kg.K]
# Properties of dry air at 308 K and 1 atm pressure are
u = 1.92*10**-5 # [kg/m.s]
row = 1.14 # [kg/cubic m]
D_ab = 0.242*10**-4 # [square m/s]
Sc = 0.696 # [Schmidt number]
Cp = 1.007 # [kJ/kg.K]
k = 0.027 # [W/m.K]
Pr = 0.7 # [Prandtl number]
#Calculations
import math
from scipy.optimize import fsolve
from numpy import *
Re = D*Gy/u # [Renoylds number]
# From equation 2,74
Sh = 0.023*Re**0.83*Sc**0.44 #[Sherwood number]
# From Table 2.1
kg = Sh*D_ab/(R*T1*D)*1000 # [mole/square m.s.kPa]
# To estimate the heat-transfer coefficient, we use the Dittus-Boelter equation for cooling, equation 2.80
Nu = 0.023*Re**0.8*Pr**0.3 # [Nusselt number]
# From Table 2.1
h = Nu*k/D # [W/square m.K]
T =373.15 # [K]
lambda_a = 40.63 # [kJ/mole]
Tc = 647.1 # [K]
# Solution of simultaneous equation 2.78 and 2.79
def F(e):
f1=kg*(p_a1 - math.exp(16.3872-(3885.7/(e[0]-42.98))))-e[1]
f2=e[1]*M_a*Cpa*(T1-e[0])/(1-exp(-e[1]*M_a*Cpa/h)) + 1000*e[1]*lambda_a*((1-(e[0]/Tc))/(1-(T/Tc)))**0.38
return(f1,f2)
# Initial guess
e = [292,-0.003]
y = fsolve(F,e)
Ti = y[0]
Na = y[1]
print"The temperature of the liquid water and the rate of water evaporation is",round(Ti),"K and",round(Na,3)," mole/square m.s respectively"
```

In [18]:

```
D = 25.4*10**-3 # [Internal diameter of tower, m]
Z = 1.5 # [length of the wetted section, m]
Gy = 10 # [mass velocity of air, kg/square m.s]
Tair = 308 # [K]
Twater = 295 # [K]
P = 101.3 # [kPa]
M_a = 18.0 # [gram/mole]
M_b = 29.0 # [gram/mole]
R = 8.314 # [cubic m.Pa/mole.K]
#Calculations
import math
Pa = 2.64 # [kPa]
Gm = Gy/M_b # [Assuming that gas phase is basically dry air, kmole/square m.s]
# The properties of dry air at 308 K and 1 atm are (from example 2.9)
row = 1.14 # [kg/cubic m]
u = 1.92*10**-5 # [kg/m.s]
D_ab = 0.242*10**-4 # [square m/s]
Sc = 0.692 # [Schmidt number]
Re = Gy*D/u # [Renoylds number]
if Re<35000 and Re>2000:
Sh = 0.023*Re**0.83*Sc**0.44 # [Sherwood number]
print"Sherwood number is",round(Sh,1)
else:
print"We cannot use equation 2.74"
c = P/(R*Tair) # [kmole/cubic m]
# Now using equation 2.89
Pa_out = Pa*(1-math.exp((-4*Sh*Z*c*D_ab)/(Gm*D**2))) # [kPa]
#Result
print"The partial pressure of water in the air leaving the tower is",round(Pa_out,2),"kPa"
```

In [2]:

```
Gy = 10.0 # [kg/square m.s]
dp = 3.5*10**-3 # [diameter of spherical glass beads, m]
D = 25.4*10**-3 # [Internal diameter of tower, m]
Tair = 308 # [K]
Twater = 295 # [K]
P = 101.3 # [kPa]
M_a = 18 # [gram/mole]
M_b = 29 # [gram/mole]
R = 8.314 # [cubic m.Pa/mole.K]
#Calculation
import math
from scipy.optimize import fsolve
# The properties of dry air at 308 K and 1 atm are (from example 2.12)
row = 1.14 # [kg/cubic m]
u = 1.92*10**-5 # [kg/m.s]
D_ab = 0.242*10**-4 # [square m/s]
Sc = 0.692 # [Schmidt number]
c = 0.04 # [mole/cubic m]
Gm = 0.345 # [kmole/square m.s]
Re = Gy*dp/u # [Renoylds number]
if Re<2500 and Re>10:
# Subsituting in equation 2.90
jd = 1.17*Re**-0.415
print"Renoylds number is ",Re
else:
print " "
Std = 0.052/(Sc**(2.0/3.0))
# From Table 2.1
Sh = Std*Re*Sc # [Sherwood number]
# From equation 2.94
e = 0.406+0.571*(dp/D) # [bed porosity]
e=round(e,3)
#Illustration 2.13(a)
# Solution(a)
# Now Paout = 0.99*Pa
# Using equation 2.93 to calculate 'Z'
def f12(Z):
return(0.99 - 1 + math.exp(-6*(1-e)*Sh*c*Z*D_ab/(Gm*dp**2)))
Z = fsolve(f12,0.06)
#Result
Z=round(Z[0],3)
print"The depth of packing required is",Z,"m=",Z*100,"cm"
#Illustration 2.13(b)
# Solution(b)
# From equation 2.95
deltaP = (150*(1-e)/Re + 1.75)*((1-e)*(Gy**2)*Z)/(dp*row*e**3) # [Pa]
#Result
print"The gas pressure drop through the bed is",round(deltaP),"Pa (Approx) \nDUE TO LACK OF PRECISION IN CALCULATION IN BOOK.\niF DONE MANUALLY,THIS ANSWER STANDS CORRECT"
```

In [20]:

```
m = 40000.0 # [kg/hr]
Twater = 298 # [K]
v = 0.1 # [superficial velocity, m/s]
P = 101.3 # [kPa]
V = 40*10**-3 # [Flow rate of nitrogen, cubic m/min]
d = 2.90*10**-4 # [Outside diameter of fibres, m]
pf = 0.4 # [Packing factor]
a = 46.84*100 # [surface area per unit volume, m**-1]
R = 8.314 # [cubic m.Pa/mole.K]
#Calculation
import math
dw = 1000 # [density of water, kg/cubic m]
Ql = m/(3600*1000) # [volumetric water flow rate, cubic m/s]
# Shell diameter
D = (4*Ql/(math.pi*v))**0.5 # [Shell diameter, m]
# the properties of dilute mixtures of oxygen in water at 298 K
u = 0.9 # [cP]
# Diffusivity from equation 1.53
D_ab = 1.93*10**-9 # [square m/s]
Sc = 467 # [Schmidt number]
Re = d*v*dw/(u*10**-3) # [Renoylds number]
# Substituting in equation (2-97) gives
Sh = 0.53*(1-1.1*pf)*((1-pf)/pf)**-0.47*(Re**0.53*Sc**0.33)
kl = Sh*D_ab/d # [mass-transfer coefficient on the shell side, m/s]
# From the specified BFW flow rate
L = m/(3600*18) # [kmole/s]
# From ideal gas law
V1 = V*P/(Twater*R*60) # [kmole/s]
# From the solubility of oxygen in water at 298 K,
M = 4.5*10**4
A = L/(M*V1) # [Absorption factor]
#Result
print"Absorption factor is",round(A,3)
#Calculation
# For 99% removal of the dissolved oxygen
# x_in/x_out = b = 100
b = 100
c = 55.5 # [molar density, kmole/cubic m]
# Substituting in equation 2.99 yields
V_T = (L*math.log(b*(1-A)+A))/(kl*a*c*(1-A)) # [cubic m]
# The module length, Z is
Z = V_T/(math.pi*D**2.0/4.0)
#Result
print"The shell diameter and module length is",round(D,3),"m and",round(Z,2)," m respectively"
```

In [36]:

```
#Variable declaration
d=2.21/100 #[m]
mu=8.82*10**-6 #[kg/m-s]
rho=2.81 #[kg/m**3]
c=34.14 #[mol/m**3]
D=array([2.228/(10**6),2.065/(10**6),1.832/(10**6)]) #Velocities in [m**2/s]
#Calculation
#Gy=rho*v
#Re=Gy*d/mu #Reynolds number
Re=21750
print "Reynolds number=",Re
Sc=[]
Sh=[]
F=[]
for i in range(0, 3):
sc=mu/(rho*D[i]) #Schmidt number
Sc.append(sc)
sh=0.023*Re**(0.83)*sc**(0.44) #Sherwood number
Sh.append(sh)
f=sh*c*D[i]/d #Binary mass transfer coefficient in [mol/m^2-s]
F.append(f)
print "Schmidt number are:"
for i in range(0,3):
print round(Sc[i],3)
print "Sherwood number number are:"
for i in range(0,3):
print round(Sh[i],1)
print"Binary mass transfer coefficients are:"
for i in range(0,3):
print round(F[i],3)
#After modifying mathcad program of example 1.17,we have
N1=-0.0527 #[mol/m^2-s]
N2=0.0395 #[mol/m^2-s]
N3=0.0132 #[mol/m^2-s]
print"The program yields the following results:"
print "N1=",N1,"mol/m**2-s"
print "N2=",N2,"mol/m**2-s"
print "N3=",N3,"mol/m**2-s"
```