In [4]:

```
#Evaluation of Filtration Constants for Constant-Pressure Filtration
#Variable declaration
A = 0.0439 #Filter area of the plate and frame press (m2)
P = -338000. #Pressure applied accross yhe plates (N/m2)
Cs = 23.47 #Slurry concentration (kg/m3)
mu = 0.0008937 #Viscosity of water in SI units (kg/m.s)
#Calculation
from numpy import arange,array,ones,linalg, divide
from pylab import plot,show
xi = arange(0.0,0.00501,0.00005)
t = [4.4,9.5,16.3,24.6,34.7,46.1,59.0,73.6,89.4,107.3]
# linearly generated sequence
y = [0.498e-3,1.0e-3,1.501e-3,2.0e-3,2.498e-3,3.002e-3,3.506e-3,4.004e-3,4.502e-3,5.009e-3]
yy = divide(t,y)
Aa = array([y, ones(10)])
w = linalg.lstsq(Aa.T,yy)[0] # obtaining the parameters
# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook
# plotting the line
line = w[0]*xi+w[1] # regression line
plot(xi,line,'r-',y,yy,'o')
ylabel('$t/V^2$')
xlabel('$V$')
xlim(0.0,5.1e-3)
ylim(0.0,22e3)
show()
Kp = 2.0*w[0]
B = w[1]
alpha = (Kp*(A**2*(-P)))/(mu*Cs)
Rm = (B*(A*(-P)))/(mu)
#Result
print 'The value of constant alpha: %4.2e m/kg'%(alpha)
print 'The value of constant Rm: %4.3e 1/m'%(Rm)
print 'The values of alpha and Rm are more accurate than book the code utilises built in function'
print 'for regression, which gives better results than from graphical slope and intercept estimates'
```

In [6]:

```
#Time Required to perform a Filtration
from numpy import arange,array,ones,linalg, divide
from pylab import plot,show
#Variable declaration
A = 0.873 #Filter area of each frame (m2)
C = 0.0439 #Proportionality constant
V = 3.37 #Volume of filtrate (m3)
xi = arange(0.0,0.00501,0.00005)
t = [4.4,9.5,16.3,24.6,34.7,46.1,59.0,73.6,89.4,107.3]
y = [0.498e-3,1.0e-3,1.501e-3,2.0e-3,2.498e-3,3.002e-3,3.506e-3,4.004e-3,4.502e-3,5.009e-3]
#Calculation
# linearly generated sequence
yy = divide(t,y)
Aa = array([y, ones(10)])
w = linalg.lstsq(Aa.T,yy)[0] # obtaining the parameters
# Use w[0] and w[1] for your calculations and give good structure to this ipython notebook
# plotting the line
line = w[0]*xi+w[1] # regression line
plot(xi,line,'r-',y,yy,'o')
ylabel('$t/V^2$')
xlabel('$V$')
xlim(0.0,5.1e-3)
ylim(0.0,22e3)
show()
Kp = 2.0*w[0]
B = w[1]
At = A*20. #Total area of the 20 frames (m2)
Kpc = Kp*(C/At)**2 #Corrected slope (s/m6)
Bc = B*(C/At) #Corrected intercept (s/m3)
#t = Kpc*V**2/2 + Bc*V
t = Kpc*V**2/2 + Bc*V
#Result
print 'The time required to recover the filtrate is %5.2f s'%t
print 'The values slope and intercept of plot of t/v2 vs V is more accurate than book the code utilises '
print 'built in function for regression, which gives better results than from graphical estimates; Hence'
print 'time required to recover 3.37 m3 is different than given in book'
```

In [7]:

```
#Rate of Washing and Total Filter Cycle time
#Variable declaration
Kp = 37.93 #Slope of the line multiplied by 2 (s/m6)
B = 16.10 #Determined Intercept from data plotted (s/m3)
Vf = 3.37 #Volume of the Flitrate (m3)
Vw = 0.337 #Volume of wash water (m3)
Tc = 20. #Filter cleaning time (min)
Tr = 269.7 #Filtrate recovry time (s)
#Calculation
#(dV/dt) = (1/4)*(1/(Kp*Vf + B))
R = (1./4.)*(1./((Kp*Vf) + B))
#Tw = (Volume of wash water)/(Rate of washing)
#Tw = Vw/(R)
Tw = Vw/(R)
#Total filtration cycle = Filtrate recovry time + Time of washing + Filter cleaning time
#Tt = Tr/60 + Tw/60 + Tc
Tt = Tr/60. + Tw/60. + 20.
#Result
print "The time of washing is",round(Tw,1),"s"
print "The total filtration cycle is",round(Tt,2),"min"
```

In [8]:

```
#Filtration in a continuous Rotary drumn
#Variable declaration
Rho = 996.9 #Density of water (kg/m3)
Cx = 0.191 #Solids concentration in slurry (kg)
m = 2.
P = -67.e3 #Pressure drop in Filter (Pa)
M = 0.778 #Mass of slurry (kg)
tc = 250. #Filter cycle time (s)
mu = 0.8937e-3 #Viscosity of slurry (Pa.s)
f = 0.33 #Fraction of drum submerged
#Calculation
#Cs = (Rho*Cx)/(1-m*Cx)
Cs = (Rho*Cx)/(1-m*Cx)
alpha = (4.37e9)*(-P)**0.3
R = M*Cx/Cs
A = R*((tc*mu*alpha*Cs)/(2*f*(-P)))**0.5
#Result
print "The Filter Area needed to filter the slurry is ",round(A,2),"m2"
```

In [11]:

```
#Filtration in a continuous Rotary drumn
#Variable declaration
Dp = 2.0e-5 #Diameter of the oil droplet (m)
rhooil = 900. #Density of oil (kg/m3)
rhoair = 1.137 #Density of air (kg/m3)
muair = 1.9e-5 #Viscosity of air (Pa.s)
vt = 0.305 #Assumed terminal settling velocity (m/s)
#Calculation
eR = 1.
i = 0
while eR>=0.00001:
i= i+1
Nre = Dp*vt*rhoair/muair
Cd = 24./Nre
vtnew = sqrt(4.*(rhooil-rhoair)*9.81*Dp/(3*Cd*rhoair))
eR = abs((vt-vtnew)/vt)
vt = vtnew
#Result
print 'Reynolds number %4.3f'%Nre
print "The calculated terminal settling velocity is",round(vt,4),"m/s"
```

In [12]:

```
#Hindered Settling of Spheres
#Variable declaration
D = 1.554e-4 #Diameter of the glass sphere (m)
rhoglass = 2467. #Density of glass (kg/m3)
rhowater = 998. #Density of water (kg/m3)
muwater = 1.005e-3 #Viscosity of water (Pa.s)
P_w = 40. #Percentage of water in mixture
P_s = 60. #Percentage of solids in mixture
g = 9.807 #Gravitational acceleration (m/s2)
#Calculation
e = (P_w/rhowater)/(P_w/rhowater + P_s/rhoglass)
rho_m = e*rhowater + (1 - e)*rhoglass
fi = 1/10**(1.82*(1-e))
vt = (g*D**2*(rhoglass - rhowater)*e**2*fi)/(18.*muwater)
N_re = (D*vt*rho_m*fi)/(muwater*e)
#Result
print 'The terminal velocity of the glass ball is %6.3e'%(vt),"m/s"
print "The Reynolds number is",round(N_re,3)
if N_re <= 1.:
print 'Hence, the settling is in laminar range'
```

In [12]:

```
#Separation of a Mixture of Silica and Galena
#Variable declaration
Dpl = 5.21e-6 #Size of the smallest particle (m)
Dpb = 2.50e-5 #Size of the largest particle (m)
rhoA = 7500. #Density of Galena (kg/m3)
rhoB = 2650. #Densiy of Silica (kg/m3)
rhol = 998. #Density of Water (kg/m3)
mu = 1.005e-3 #Viscosity of Water (Pa.s)
g = 9.807 #Gravitational accelertion (m/s2)
#Calculation
vtA =g*Dpb**2*(rhoA-rhol)/(18*mu)
Nre = Dpb*vtA*rhol/mu
DpA3 = Dpb*((rhoB-rhol)/(rhoA-rhol))**0.5
DpB2 = Dpl/((rhoB-rhol)/(rhoA-rhol))**0.5
print 'The size range for first fraction of pure A Galena is as follows:\n%5.3e to %5.3e' %(DpA3,Dpb)
print 'The size range for first fraction of pure B Silica is as follows:\n%5.3e to %5.3e' %(Dpl,DpB2)
print 'The mixed fraction ranges is as follows:\n%5.3e to %5.3e and \n%5.3e to %5.3e' %(DpB2,Dpb,Dpl,DpA3)
```

In [14]:

```
#Force in a centrifuge
#Variable declaration
r1 = 0.1016 #Radius of the bowl in case A (m)
r2 = 0.2032 #Radius of the bowl in case B (m)
N = 1000. #Revolution per minute
g = 9.807 #Gravitational acceleration (m/s2)
#Calculation
FcbyFg1 = r1*(2*pi*N/60)**2/g
FcbyFg2 = r2*(2*pi*N/60)**2/g
print "Centrifugal force developed in case A:", round(FcbyFg1,1),"g's"
print "Centrifugal force developed in case B:", round(FcbyFg2,1),"g's"
```

In [4]:

```
#Settling in a centrifuge
#Variable declaration
rhop = 1461. #Density of the viscous solution (kg/m3)
rhol = 801. #Density of the solution (kg/m3)
mu = 100e-3 #Viscosity of the solution (Pa.s)
r1 = 0.00716 #Inner radius of the bowl (m)
r2 = 0.02225 #Outer radius of the bowl (m)
b = 0.1970 #Height of the bowl (m)
N = 23000 #Revolutions per minute
qc = 0.002832 #Flowrate of the particles (m3/h)
#Calculations
omegha = 2*pi*N/60
V = pi*b*(r2**2-r1**2)
qc = qc/3600
Dpc = sqrt(qc*18*mu*log(2*r2/(r1+r2))/(V*omegha**2*(rhop-rhol)))
vt = omegha**2*r2*Dpc**2*(rhop-rhol)/(18*mu)
Nre = Dpc*vt*rhol/mu
tT = V/qc
print "The critical particle diameter of the largest particle in the exit stream is %5.3e m or %4.4f um"%(Dpc,Dpc*1e6)
```

In [2]:

```
#Location of interface in a centriguge
#Variable declaration
rhooil = 919.5 #Density of oil phase (kg/m3)
rhoaqe = 980.1 #Density of aqueous phase (kg/m3)
r1 = 10.160 #Radius for the overflow Light liquid (mm)
bh = 10.414 #Radius for the overflow Heavy liquid (mm)
#Calculations
r2 = sqrt((rhoaqe*bh**2-rhooil*r1**2)/(rhoaqe-rhooil))
#Results
print "Location of interface:", round(r2,3),"mm"
```

In [19]:

```
#Power to Crust Iron Ore by Bond's Theory
#Variable Declaration
T = 10. #Feed Rate of Ore, ton/hr
Df = 3. #Size of Feed , in
Dp = 1./8 #Size of product, in
#Calculations
Ei = 12.68 #Work index for Iron Ore
T = T/60
Dp = Dp/12
Df = Df/12
P= 1.46*T*Ei*(1./sqrt(Dp) - 1./sqrt(Df))
#Result
print 'Power required %3.1f hp'%(P)
```