%matplotlib inline
from numpy import *
%matplotlib inline
#Variable declaration
umf=[0.01,0.045]; #Velocity at minimum fluidization condition in m/s
ephsilonmf=[0.5,0.5]; #Void fraction at minimum fluidization condition
D=[2E-5,7E-5]; #Diffusion coefficient of gas in m**2/s
g=9.81; #Acceleration due to gravity in m/s**2
#CALCULATION
db=[5.,10.,15.,20.];
n=len(umf);
m=len(db)
Kbc = zeros((n,m))
Kce = zeros((n,m))
Kbe = zeros((n,m))
for i in range(n):
for j in range(m):
Kbc[i][j]=4.5*(umf[i]/db[j])+5.85*((D[i]**0.5*g**0.25)/db[j]**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(27)
Kce[i][j]=6.77*((D[i]*ephsilonmf[i]*0.711*(g*db[j])**0.5)/db[j]**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(34)
Kbe[i][j]=(Kbc[i][j]*Kce[i][j])/(Kbc[i][j]+Kce[i][j]);#Gas interchange coefficient between bubble and emulsion from Eqn.(14)
#OUTPUT
i=0;
j=0;
k=0;
while k<m*n:
print '\t\tKbc for fine particles and He',
print '\tKbc for coarse particles and ozone',
print '\tKbe for fine particles and He',
print '\tKbe for coarse particles and ozone'
j = 0
while j<m:
print 'db=%fm'%(db[j]*10**-2);
while i<n:
print '\t%f'%Kbc[i][j],
print '\t\t\t%f'%Kbe[i][j],
i=i+1;
k=k+1;
print '\t\t\t',
i=0;
j=j+1;
import numpy
import matplotlib.pyplot as plt
a = numpy.matrix(Kbe)
b = numpy.matrix(Kbc)
db = array(db).T
Kbe=a.T
Kbc=b.T
plt.plot(db,Kbc,db,Kbe)
#plt.plot(db,Kbe);
#Note : Python does not have plot2d function. so we can plot it
#plt.title('Plot of Kbc,Kbe vs db','db');
plt.show()
print 'Comparing the points with the plot of Kbc,Kbe vs db in Fig.(12), we can conlcude the following:'
print 'Kbc for fine particles and helium: line 2 in Fig.(12)'
print 'Kbc for coarser particles and ozone: line 3 in Fig.(12)'
print 'Kbe for fine particles and helium: line 4 in Fig.(12)'
print 'Kbe for coarser particles and ozone: line 5 in Fig.(12)'
D=0.69; #Diffusion coefficient of gas in cm**2/s
umf=1.0; #Velocity at minimum fluidization condition in cm/s
ephsilonmf=0.5; #Void fraction at minimum fluidization condition
db=[5,15]; #Equilibrium bubble size in cm
g=980; #Acceleration due to gravity in cm/s**2
#CALCULATION
n=len(db);
i=0;
Kbc = [0.,0.]
Kce = [0.,0.]
Kbe = [0.,0.]
e = [0.,0.]
while i<n:
Kbc[i]=4.5*(umf/db[i])+5.85*((D**0.5*g**0.25)/db[i]**(5/4));#Gas interchange coefficient between bubble and cloud from Eqn.(27)
Kce[i]=6.77*((D*ephsilonmf*0.711*(g*db[i])**0.5)/db[i]**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(34)
Kbe[i]=(Kbc[i]*Kce[i])/(Kbc[i]+Kce[i]);#Gas interchange coefficient between bubble and emulsion from Eqn.(14)
e[i]=(Kce[i]-Kbe[i])/Kbe[i];#Error when minor resistance is ignored
i=i+1;
#OUTPUT
print 'db(cm)',
print '\t\tCalculated Kbc',
print '\tCalculated Kce',
print '\t\tKbe from Eqn.(14)',
print '\tErron when minor resistance is ignored (in percentage)'
i=0;
while i<n:
print '%f'%db[i],
print '\t%f'%Kbc[i],
print '\t%f'%Kce[i],
print '\t\t%f'%Kbe[i],
print '\t\t%f'%(e[i]*100);
i=i+1;
Kbe=[0.028,0.05]; #Reported range for gas interchange coefficient between bubble and emulsion
uo=0.30; #Superficial gas velocity in m/s
db=0.13; #Equilibrium bubble size in m
m=7;
ephsilonmf=0.5; #Void fraction at minimum fluidization condition
umf=0.0018; #Velocity at minimum fluidization condition in m/s
D=[9E-6,22E-6]; #Diffusion coefficient of gas in m**2/s
g=9.81; #Acceleration due to gravity in m/s**2
#CALCULATION
n=len(Kbe);
i=0;
Kbem = [0,0]
Kbc = [0,0]
Kce = [0,0]
#Kbe = [0,0]
c = [0,0]
while i<n:
Kbem[i]=(6.0/db)*Kbe[i];#Gas interchange coefficient between bubble and emulsion from Eqn.(19)
Kbc[i]=4.5*(umf/db)+5.85*((D[i]**0.5*g**0.25)/db**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(27)
Kce[i]=6.77*((D[i]*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5;#Gas interchange coefficient between emulsion and cloud from Eqn.(34)
Kbe[i]=(Kbc[i]*Kce[i])/(Kbc[i]+Kce[i]);#Gas interchange coefficient between bubble and emulsion from Eqn.(14)
c[i]=(Kbem[i]/Kbe[i]);
i=i+1;
#OUTPUT
print 'Kbe from Eqn.(19)',
print '\tKbc from Eqn.(27)',
print '\tKce from Eqn.(34)',
print '\tKbe from Eqn.(14)',
print '\tComparison of Kbe from Eqn.(19) and that from Eqn.(14)'
i=0
while i<n:
print '%f'%Kbem[i],
print '\t\t%f'%Kbc[i],
print '\t\t%f'%Kce[i],
print '\t\t%f'%Kbe[i],
print '\t\t%f'%c[i]
i=i+1;