z=0.5; #Height of bed in m
dt=0.5; #ID of tube in m
rhos=1.6; #Density of catalyst in g/cm**3
dpbar=60.; #Averge catalyst diameter in micrometer
umf=0.002; #Velocity at minimum fluidization condition in m/s
uo=0.2; #Superficial velocity in m/s
dor=2.; #Diameter of orifice in mm
lor=20.; #Pitch of perforated plate in mm
g=9.80; #g=980;#Acceleration due to gravity in m/s**2
#CALCULATION
#Method 1. Procedure using Eqn.(10) & Eqn.(11)
db=(0.035+0.040)/2.;#Bubble size at z=0.5m from Fig.7(a) & Fig.7(b)
ub1=1+1.55*((uo-umf)+14.1*(db+0.005))*(dt**0.32)*0.711*(g*db)**0.5;#Bubble velocity using Eqn.(10) & Eqn.(11)
#Method 2. Werther's procedure
si=0.8;#From Fig.6 for Geldart A solids
ub2=si*(uo-umf)+(3.2*(dt**(1./3)))*(0.711*(g*db)**0.5);#Bubble velocity using Eqn.(9)
#OUTPUT
print 'Method 1. Procedure using Eqn.(10) & Eqn.(11)'
print '\tDiameter of the bubble=%.4fm'%db
print '\tRise velocity of the bubble=%.4fm/s'%ub1
print 'Method 2. Werthers procedure'
print '\tDiameter of the bubble=%fm'%db
print '\tRise velocity of the bubble=%fm/s'%ub2
import math
#Variable declaration
z=0.5; #Height of bed in m
dt=0.5; #ID of tube in m
rhos=2.6; #Density of catalyst in g/cm**3
dpbar=100.; #Averge catalyst diameter in micrometer
umf=0.01; #Velocity at minimum fluidization condition in m/s
uo=0.45; #Superficial velocity in m/s
dor=2.; #Diameter of orifice in mm
lor=30.; #Pitch of perforated plate in mm
g=9.80; #Acceleration due to gravity in m/s**2
pi=3.142857;
#CALCULATION
#Part(a).Bubble Size
Nor=(2/math.sqrt(3))*(1/lor**2);
dbo=5.5;
#Method 1.Werther's procedure for finding bubble size
z1=[0,5,10,20,30,50,70]
db = [0.,0.,0.,0.,0.,0.,0.]
n=len(z1);
i=0;
while i<n:
db[i]=0.853*((1+0.272*(uo-umf)*100)**(1/3.0))*(1+0.0684*z1[i])**1.21;
i=i+1;
db1=0.163;#Since bubble size starts at dbo=5.5cm at z=0, we shift the curve accordingly to z=0.5m
#Method 2.Mori and Wen's procedure for finding bubble size
dbm=0.65*((math.pi/4.0)*((dt*100)**2)*(uo-umf)*100)**0.4;
db2=dbm-(dbm-dbo)*math.exp(-0.3**(z/dt));
#Part(b).Bubble Velocity
#Method 1.Procedure using Eqn.(12)
ub1=1.6*((uo-umf)+1.13*db1**0.5)*(dt**1.35)+(0.711*(g*db1)**0.5);
#Method 2.Werther's Procedure
si=0.65;
ub2=si*(uo-umf)+2*(dt**0.5)*(0.711*(g*db1)**0.5);
#Using Eqn.(7) & Eqn.(8)
ubr1=0.711*(g*db1)**0.5;
ubr2=0.711*(g*db2/100.0)**0.5
ub3=uo-umf+ubr1;
ub4=uo-umf+ubr2;
#OUTPUT
print 'Bubble Size'
print 'Initial bubble size from Fig.5.14 for %.2fm/s = %.2fcm'%(uo-umf,dbo)
print '\tMethod 1.Werthers procedure for finding bubble size'
print '\t\tHeight of bed(cm)'
print '\t\t\tBubble size(cm)'
m=len(z1);
j=0;
while j<m:
print '\t\t%d'%z1[j],
print '\t\t\t\t%.2f'%db[j]
j=j+1;
print '\tMethod 2.Mori and Wens procedure for finding bubble size'
print '\t\tMaximum expected bubble size=%.2fcm'%dbm
print '\t\tBubble size=%.0fcm'%db2
print 'Bubble Velocity'
print '\tMethod 1.Procedure using Eqn.(12)'
print '\t\tBubble velocity=%.2fm/s'%ub1
print '\tMethod 2.Werthers procedure'
print '\t\tBubble velocity=%.2fm/s'%ub2
print 'Comparing the above results with the expressions of the simple two-phase theory'
print '\tWerthers bubble size'
print '\tBubble rise velocity=%.2fm/s\tBubble velocity=%.2fm/s'%(ubr1,ub3)
print '\tMori & Wens bubble size'
print '\tBubble rise velocity=%.1fm/s\tBubble velocity=%.2fm/s'%(ubr2,ub4)
dpbar=53.; #Average particle size in micrometer
s=[1,2]; #Size of Bermuda rock in cm
rhosbar=3200.; #Average solid density of the coke-zircon mixture in kg/m**3
ephsilonm=0.5; #Void fraction for fixed bed
ephsilonf=0.75; #Void fraction for bubbling bed
rhogbar=0.64; #Average density of gas in kg/m**3
uo=14.; #Superficial gas velocity in cm/s
myu=5E-5; #Viscosity of gas in kg/m s
T=1000.; #Temperature in degree C
P=1.; #Pressure in atm
dt=91.5; #ID of bed in cm
sh=150.; #Slumped height in cm
#CALCULATION
rhog2=1.2; #Density of ambient air
myu2=1.8E-5; #Viscosity of ambient air
rhos2=rhog2*(rhosbar/rhogbar);#For the requirement of constant density ratio
m=((rhogbar*myu2)/(rhog2*myu))**(2./3);#Scale factor by usin Eqn.(16)
u2=(m**0.5)*uo; #Superficial gas velocity by using Eqn.(17)
#OUTPUT
print 'For the model use'
print '\tBed of ID %.2fcm\tSlumped bed height of %.2fcm\tPacked bed distributor consisting of %.2f-%.2fmm rock'%(m*dt,m*sh,m*s[0],m*s[1])
print 'Fluidizing gas: ambient air at %.2fatm'%P
print 'Solids: \tzirconia, Average particle size=%.2fmicrometers'%(m*dpbar)
print 'Entering gas:\tSuperficial velocity=%.2fcm/s'%u2
import math
#Variable declaration
dtb=20; #ID of bench-scale reactor
dtp=1; #ID of pilot reactor
dpbar=52; #Average particle size in micrometer
ephsilonm=0.45; #Void fraction for fixed bed
ephsilonmf=0.50; #Void fraction at minimum fluidization condition
ephsilonmb=0.60; #Void fraction
uo=30; #Superficial gas velocity in cm/s
Lmb=2; #Length of fixed bed in m
umf=0.33; #Velocity at minimum fluidization condition in cm/s
umb=1; #Velocity at in cm/s
db=3; #Equilibrium bubble size in cm
g=9.80; #Acceleration due to gravity in m/s**2
pi=3.142857;
#CALCULATION
ubr=0.711*(g*db/100)**0.5;#Rise velocity of bubble using Eqn.(7)
#Bubble velocity for the bench unit
ubb1=1.55*(((uo-umf)/100.0)+14.1*((db/100.0)+0.005))*((dtb/100.0)**0.32)+ubr;#Bubble velocity using Eqn.(11)
si=1;
ubb2=si*((uo-umf)/100.0)+(3.2*((dtb/100.0)**(1/3.0)))*ubr;#Bubble velocity using Eqn.(9)
ubb=(ubb1+ubb2)/2;#Average bubble velocity
#Bubble velocity for the pilot unit
ubp1=1.55*(((uo-umf)/100.0)+14.1*((db/100.0)+0.005))*(dtp**0.32)+ubr;#Bubble velocity using Eqn.(11)
si=1;
ubp2=si*((uo-umf)/100)+(3.2*(dtp**(1/3)))*ubr;#Bubble velocity using Eqn.(9)
ubp=(ubp1+ubp2)/2;#Average bubble velocity
#Rise velocity of upflowing emulsion
ueb=ubb-ubr;#For the bench unit
uep=ubp-ubr;#For the pilot unit
#Scale-Up Alternative 1.
dteb=20;#Effective bubble diameter
dib=[5,10,15,20];#Different outside diameters
n=len(dib);
li = [0.,0.,0.,0.]
i=0;
while i<n:
li[i]=math.sqrt(((pi*dib[i]*dteb)/4)+((pi/4)*(dib[i])**2));#Pitch using Eqn.(13)
i=i+1;
#Scale-Up Alternative 2.
Lmp=Lmb*(ubp/ubb);#Static bed height of commercial unit
dtep=100.0;#Effective bubble diameter
dip=[10,15,20,25];#Different outside diameters
m=len(dip);
i=0;
lip = [0.,0.,0.,0.]
while i<m:
lip[i]=math.sqrt(((math.pi*dip[i]*dtep)/4.0)+(math.pi/4.0)*dip[i]);#Pitch using Eqn.(13)
i=i+1;
#Height of Bubbling beds
#For bench unit
deltab=((uo/100.0)-(umb/100.0))/(ubb-(umb/100.0));#Fraction of bed in bubbles using Eqn.(28)
ephsilonfb=deltab+(1-deltab)*ephsilonmb;#Void fraction of bubbling bed using Eqn.(20)
Lfb=Lmb*(1-ephsilonm)/(1-ephsilonfb);#Hieght of bubbling bed usnig Eqn.(19)
#For pilot unit
deltap=((uo/100.0)-(umb/100.0))/(ubp-(umb/100.0));#Fraction of bed in bubbles using Eqn.(28)
ephsilonfp=deltap+(1-deltap)*ephsilonmb;#Void fraction of bubbling bed using Eqn.(20)
Lfp=Lmp*(1-ephsilonm)/(1-ephsilonfp);#Hieght of bubbling bed usnig Eqn.(19)
#OUTPUT
print 'Rise velocity of bubble=%.3fm/s'%ubr
print 'For the bench unit'
print '\tWith Eqn.(11), Rise velocity=%.3fm/s'%ubb1
print '\tWith Werthers procedure, Rise velocity=%.2fm/s'%ubb2
print '\tAverage rise velocity=%.2fm/s'%ubb
print '\tRise velocity of upflowing emulsion=%.2fm/s'%ueb
print 'For the pilot unit'
print '\tWith Eqn.(11), Rise velocity=%.2fm/s'%ubp1
print '\tWith Werthers procedure, Rise velocity=%.2fm/s'%ubp2
print '\tAverage rise velocity=%.2fm/s'%ubp
print '\tRise velocity of upflowing emulsion=%.2fm/s'%uep
print 'Scale-Up Alternative 1.'
print '\tOuter diameter of tube(cm)'
print '\tPitch(cm)'
n=len(dib);
j=0;
while j<n:
print '\t\t%d'%dib[j],
print '\t\t\t%.2f'%li[j]
j=j+1;
print '\tSuitable arrangement'
print '\t\tOuter Diameter=%dcm\tPitch:Diameter ratio=%.2f'%(dib[1],(li[1]/dib[1]))
print 'Scale-Up Alternative 2.'
print '\tStatic bed height for commercial unit=%fm'%Lmp
print '\tOuter diameter of tube(cm)'
print '\tPitch(cm)'
n=len(dip);
j=0;
while j<n:
print '\t\t%d'%dip[j],
print '\t\t\t%.2f'%lip[j]
j=j+1;
print '\tSuitable arrangement'
print '\t\tOuter Diameter=%dcm\tPitch:Diameter ratio=%.2f'%(dip[2],(lip[2]/dip[2]))
print '\t\t\t\tFraction of bed in bubbles\tVoid fraction of bed\tStatic bed height(m)\tHeight of bubbling bed(m)'
print '\t\t\t\t---------------------------------------------------------------------------------------------------------'
print 'Bench unit\tID=%fm\t%f\t\t\t%f\t\t%f\t\t%f'%(dtb/100.,deltab,ephsilonfb,Lmb,Lfb)
print 'Commercial unit\tID=%fm\t%f\t\t\t%f\t\t%f\t\t%f'%(dtp,deltap,ephsilonfp,Lmp,Lfp)
dtb=20; #ID of bench-scale reactor
dtp=1; #ID of pilot reactor
dpbar=200; #Average particle size in micrometer
ephsilonmf=0.50; #Void fraction at minimum fluidization condition
ephsilonmb=0.50; #Void fraction
uo=30; #Superficial gas velocity in cm/s
Lmb=2; #Length of fixed bed in m
umf=3; #Velocity at minimum fluidization condition in cm/s
umb=3; #Velocity at in cm/s
g=9.80; #Acceleration due to gravity in m/s**2
pi=3.142857;
#CALCULATION
#In the small bench unit
c=1;
ubb=c*((uo-umf)/100.0)+0.35*(g*(dtb/100.0))**0.5;#Velocity using Eqn.(5.22)
zsb=60*(dtb)**0.175;#Height using Eqn.(5.24)
#In the large pilot unit
ubp=c*((uo-umf)/100.0)+0.35*(g*dtp)**0.5;#Velocity using Eqn.(5.22)
zsp=60*(dtp*100)**0.175;#Height using Eqn.(5.24)
#OUTPUT
print 'Condition at which bubbles transform into slugs'
print 'For tha small bench unit\t\tVelocity=%fm/s\t\tHeight above distributor plate=%fm'%(ubb,zsb/100.)
print 'For tha large pilot unit\t\tVelocity=%fm/s\t\tHeight above distributor plate=%fm'%(ubp,zsp/100.);