xA=0.08; #Fraction of oxygen in stream
dp=[2,0.1]; #Particle diameter in mm
rhos=4130; #Density of catalyst in kg/m**3
Ds=8E-6; #Diffusion coefficient of solid in m**2/s
kc=0.02; #Reaction rate constant in m/s
P=10**5; #Pressure in bar\
R=8.314; #Universal gas constant
T=900; #Temperature in degree C
mB=0.09745; #Molecular weight of ZnS in kg/mol
#CALCULATION
b=2.0/3;#Stoichiometric coefficient of ZnS in the reaction equation
CA=xA*P/(R*(T+273));#Concentration of Oxygen
rhob=rhos/mB; #Molar density of pure solid
n=len(dp);
i=0;
kbar = [0,0]
tou = [0,0]
while i<n:
kbar[i]=(kc**-1+(dp[i]*10**-3/(12.0*Ds)))**-1;#Average reaction rate constant from Eqn.(11)
tou[i]=rhob*dp[i]*10**-3/(2*b*kbar[i]*CA);#Time for complete reaction in seconds from Eqn.(9)
i=i+1;
#OUTPUT
print 'Particle Size(mm)\tAverage rate constant(m/s)\tTime for complete reaction(min)'
i=0;
while i<n:
print '%f\t\t%f\t\t\t%.2f'%(dp[i],kbar[i],tou[i]/60.0);
i=i+1;
xA=0.08; #Fraction of oxygen in stream
dp=1; #Particle diameter in mm
rhos=2200; #Density of catalyst in kg/m**3
kc=0.2; #Reaction rate constant in m/s
mC=0.012; #Molecular weight of carbon in kg/mol
P=10**5; #Pressure in bar\
R=8.314; #Universal gas constant
T=900; #Temperature in degree C
#CALCULATION
b=1;#Stoichiometric coefficient of C in the reaction equation
CA=xA*P/(R*(T+273));#Concentration of Oxygen
rhob=rhos/mC;#Molar density of pure solid reactant
tou=rhob*10**-3/(2*b*kc*CA);#Time required for complete reaction in seconds
#OUTPUT
print 'The time required for complete combustion:%.1fmins'%(tou/60);
from scipy.optimize import fsolve
import math
from numpy import zeros
#INPUT
dp = 110.;#Particle size in micrometer
T = 900.;#Temperature of roaster in degree C
tbar1 = [3.,10.,30.,50.];#Reported average time in min
XBbarr = [0.840,0.940,0.985,0.990];#Reported value of average conversion
tbar = 3.;
XBbar = 0.840;#Average conversion for tbar = 3 mins
#CALCULATION
#Uniform-Reaction Model
x = (1./tbar)*(1./(1-XBbar)-1);#Term KrCA of Eqn.(20)
n = len(tbar1);
i = 0;
XBbar1 = zeros(n)
while i< n:
XBbar1[i] = 1-1./(1+x*tbar1[i]);#Average conversion umath.sing calculated value of KrCA from Eqn.(20)
i = i+1;
#Shrinking-Core, Rection Control
touguess = 2;#Guess value of tou
def solver_func(tou):#Function defined for solving the system
return (1-XBbar)-(0.25*tou/tbar)+(0.05*(tou/tbar)**2)-((1./120)*(tou/tbar)**3);
tou = fsolve(solver_func,touguess)
i = 0;
XBbar2 = zeros(n)
while i<n:
XBbar2[i] = 1-(0.25*tou/tbar1[i])+(0.05*(tou/tbar1[i])**2)-((1./120)*(tou/tbar1[i])**3);#Average conversion umath.sing calculated value of tou from Eqn.(23)
i = i+1;
#Shrinking-Core, Diffusion Control
touguess1 = 2;#Guess value of tou
def solver_func1(tou): #Function defined for solving the system
fn = (1-XBbar)-(1./5*tou/tbar)+(19./420*(tou/tbar)**2)-(41./4620*(tou/tbar)**3)+(0.00149*(tou/tbar)**4);
tou1 = fsolve(solver_func1,touguess1)
i = 0;
XBbar3 = zeros(n)
while i< n:
#Average conversion umath.sing calculated value of tou from Eqn.(23)
XBbar3[i] = 1-(1./5*tou1/tbar1[i])+(19./420*(tou1/tbar1[i])**2)-(41./4620*(tou1/tbar1[i])**3)+(0.00149*(tou1/tbar)**4);
i = i+1;
#OUTPUT
print '\t\t\t\tXBbar calculated for Models';
print 'Reported Data';
print 'tbarmin)\tXBbar\tUniform Reaction\tShrinking-Core%( Rection Control\t\tShrinking-Core, Diffusion Control'
i = 0
while i< n:
print '%f\t%f\t%f\t\t%f\t\t\t\t%f'%(tbar1[i],XBbarr[i],XBbar1[i],XBbar2[i],XBbar3[i]);
i = i+1;
from scipy.optimize import fsolve
import math
from numpy import zeros
#INPUT
W = 1; #Bed weight in kg
F1 = 0.01; #Solid feed rate in kg/min
dp = [200.,600.]; #Particle size in micrometer
XBbar = [0.85,0.64]; #Average conversion for corresponding particle sizes
rhos = 2500.; #Density of solid in kg/m**3
ephsilonm = 0.4; #Void fracton of fixed bed
F11 = 4.; #Feed rate of solids in tons/hr
XBbar1 = 0.98;
dp1 = 600.;
pi = 3.14;
#CALCULATION
#Shrinking-Core, Rection Control
n = len(dp);
i = 0;
touguess = 2;#Guess value of tou
tou = zeros(n)
while i< n:
def solver_func2(t): #Function defined for solving the system
return (1-XBbar[i])-(0.25*t/107)+(0.05*(t/107.)**2)-((1./120)*(t/107.)**3)
tou[i] = fsolve(solver_func2,touguess)
i = i+1;
tou1 = tou[1];
#For a math.single stage fluidized roaster
tbar1 = 0.25*(tou1/(1-XBbar1))/60.; #Mean residence time of solids in reactor in hr from Eqn.(24)
W1 = F11*tbar1;
dtguess = 2.; #Guess value of tou
def solver_func3(dt): #Function defined for solving the system
return W1*10**3-(pi/4.)*dt**2*0.5*dt*rhos*(1-ephsilonm);#Since Lm = 0.5dt
dt = fsolve(solver_func3,dtguess)
Lm = dt/2.;#Length of bed required
#For a two-stage fluidized roaster
tbar2 = tou1*math.sqrt(1./(20*(1-XBbar1)))/60; #Mean residence time of solids in reactor in hr from Eqn.(30)
W2 = F11*tbar2;
dtguess1 = 2; #Guess value of tou
def solver_func4(dt): #Function defined for solving the system
return W2*10**3-(pi/4.)*dt**2*0.5*dt*rhos*(1-ephsilonm); #Since Lm = 0.5dt
dt1 = fsolve(solver_func4,dtguess)
Lm1 = dt1/2.; #Length of bed required
#OUTPUT
print 'Single stage fluidized roaster';
print '\tWeight of bed needed:%ftons'%(W1);
print '\tDiameter of reactor:%fm'%(dt);
print '\tLength of bed:%fm'%(Lm);
print 'Two-stage fluidized roaster';
print '\tWeight of bed needed:%ftons'%(W2);
print '\tDiameter of reactor:%fm'%(dt1);
print '\tLength of bed:%fm'%(Lm1);
print 'These results show that this operation can be accomplished in a math.single bed of %ftons or in two beds of %f tons each.'%(W1,W2);
from scipy.optimize import fsolve
import math
from numpy import zeros
#INPUT
T = 900; #Temperature in roaster in degree C
P = 101325; #Pressure in Pa
R = 8.314; #Universal gas consmath.tant
dpbar = 150; #Average particle size in micrometer
rhosbar = 4130; #Average particle density in kg/m**3
kc = 0.015 #Rate consmath.tant in m/s for reaction which follows shrinking core model
Ds = 8E-6; #Diffusion coefficient of solid in m**2/s
uo = 0.6; #Superficial gas velocity in m/s
D = 2.3E-4; #Diffusion coefficient of gas in m**2/s
Lm = 1; #Length of fixed bed in m
dte = 0.4; #Equivalent diameter of bed
umf = 0.025; #Velocity at minimum fluidization condition in m/s
ephsilonm = 0.45; #Void fraction of fixed bed
ephsilonmf = 0.50; #Void fraction at minimum fluidized condition
db = 0.2; #Estimated bubble size in m
gammab = 0.005; #Ratio of volume of print ersed solids to that of bubble phase
Fo = 2; #Feed rate of solids in kg/s
XA = 0.6677; #Conversion of Oxygen
xA = 0.21; #Mole fraction of oxygen in feed
mB = 0.09744; #Molecular weight of ZnS
F = 0.85; #Fraction of open area
g = 9.81; #Acceleration due to gravity in square m/s**2
pi = 3.14;
#CALCULATION
#(a)Extreme Calculation
a = 3./2;#Stoichiometric coefficient of Oxygen in the reaction equation
At = (Fo/mB)*(a)/(uo*(273./(T+273))*(XA*xA)/0.0224);
dt = math.sqrt(At/F*4/pi);
#(b)The Three-Step Procedure
#Step 1. Conversion of gas
ubr = 0.711*(g*db)**0.5; #Rise velocity of bubble from Eqn.(6.7)
ub = 1.6*((uo-umf)+1.13*db**0.5)*dte**1.35+ubr; #Bubble rise velocity for Geldart B particle
delta = uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)
ephsilonf = 1-(1-delta)*(1-ephsilonmf); #Void fraction of fixed bed from Eqn.(6.20)
fw = 0.15;#Wake volume to bubble volume from Fig.(5.8)
gammac = (1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw); #Volume of solids in cloud to that of the bubble from Eqn.(6.36)
gammae = ((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac; #Volume of solids in emulsion to that of the bubble from Eqn.(6.35)
Kbc = 4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5./4)); #Gas interchange coefficient between bubble and cloud from Eqn.(10.27)
Kce = 6.77*((D*ephsilonmf*0.711*(g*db)**0.5)/db**3)**0.5; #Gas interchange coefficient between emulsion and cloud from Eqn.(10.34)
x = delta*Lm*(1-ephsilonm)/((1-ephsilonf)*uo); #Term Lf/ub of Eqn.(12.16) from Eqn.(6.19)
CAi = xA*P/(R*(T+273)); #Initial concentration of oxygen
#Step 2.Conversion of solids
rhob = rhosbar/mB; #Density of ZnS
kbar = (kc**-1+(dpbar*10**-6/(12*Ds))**-1)**-1; #Modified rate consmath.tant from Eqn.(11)
tbar = At*Lm*(1-ephsilonm)*rhosbar/Fo; #Mean residence time of solids
Krguess = 2; #Guess value of Kr
def solver_func(Kr): #Function defined for solving the system
Kf = gammab*Kr+1/((1./Kbc)+(1./(gammac*Kr+1/((1./Kce)+(1./(gammae*Kr)))))); #Reaction rate for fluidized bed from Eqn.(14)
XA = 1-math.exp(-x*Kf); #Conversion of oxygen from Eqn.(42)
CAbar = (CAi*XA*uo)/(Kr*Lm*(1-ephsilonm)); #Average concentration of oxygen from Eqn.(43)
tou = rhob*dpbar*10**-6*a/(2*kbar*CAbar); #Time for complete reaction from Eqn.(9)
y = tbar/tou;#Term tbar/tou
XBbar = 3*y-6*y**2+6*y**3*(1-math.exp(-1/y)); #Average conversion of ZnS from Eqn.(22)
#Step 3. Material balance of both streams
return (Fo/mB)*XBbar-(At*uo*CAi*XA/a); #From Eqn.(44b)
Kr = fsolve(solver_func,Krguess)
Kf = gammab*Kr+1/((1/Kbc)+(1/(gammac*Kr+1/((1/Kce)+(1/(gammae*Kr)))))); #Reaction rate for fluidized bed from Eqn.(14)
XA = 1-math.exp(-x*Kf); #Conversion of oxygen from Eqn.(42)
CAbar = (CAi*XA*uo)/(Kr*Lm*(1-ephsilonmf)); #Average concentration of oxygen from Eqn.(43)
tou = rhob*dpbar*10**-6*a/(2*kbar*CAbar); #Time for complete reaction from Eqn.(9)
y = tbar/tou; #Term tbar/tou
XBbar = 3*y-6*y**2+6*y**3*(1-math.exp(-1/y)); #Average conversion of ZnS from Eqn.(22)
#(c) For other feed rates of solids
F1 = [2,2.5,3,3.5];#Various feed rates of solids in kg/s
n = len(F1)
i = 0;
tbar1 = zeros(n)
Kr1 = zeros(n)
XA1 = zeros(n)
y1 = zeros(n)
tou1 = zeros(n)
XBbar1 = zeros(n)
Kf1 = zeros(n)
CAbar1 = zeros(n)
Krguess1 = 2; #Guess value of Kr
while i< n:
tbar1[i] = At*Lm*(1-ephsilonm)*rhosbar/F1[i];#Mean residence time of solids
def solver_func1(Kr): #Function defined for solving the system
Kf1 = gammab*Kr+1/((1/Kbc)+(1/(gammac*Kr+1/((1/Kce)+(1/(gammae*Kr))))));#Reaction rate for fluidized bed from Eqn.(14)
XA1 = 1-math.exp(-x*Kf1);#Conversion of oxygen from Eqn.(42)
CAbar1 = (CAi*XA1*uo)/(Kr*Lm*(1-ephsilonm));#Average concentration of oxygen from Eqn.(43)
tou1 = rhob*dpbar*10**-6*a/(2*kbar*CAbar1);#Time for complete reaction from Eqn.(9)
y1[i] = tbar1[i]/tou1;#Term tbar/tou
XBbar1[i] = 3*y1[i]-6*y1[i]**2+6*y1[i]**3*(1-math.exp(-1/y1[i]));#Average conversion of ZnS from Eqn.(22)
#Step 3. Material balance of both streams
return (F1[i]/mB)*XBbar1[i]-(At*uo*CAi*XA1/a);#From Eqn.(44b)
Kr1[i] = fsolve(solver_func1,Krguess1)
Kf1[i] = gammab*Kr1[i]+1/((1/Kbc)+(1/(gammac*Kr1[i]+1/((1/Kce)+(1/(gammae*Kr1[i]))))));#Reaction rate for fluidized bed from Eqn.(14)
XA1[i] = 1-math.exp(-x*Kf1[i]);#Conversion of oxygen from Eqn.(42)
CAbar1[i] = (CAi*XA1[i]*uo)/(Kr1[i]*Lm*(1-ephsilonmf));#Average concentration of oxygen from Eqn.(43)
tou1[i] = rhob*dpbar*10**-6*a/(2*kbar*CAbar1[i]);#Time for complete reaction from Eqn.(9)
y1[i] = tbar1[i]/tou1[i];#Term tbar/tou
XBbar1[i] = 3*y1[i]-6*y1[i]**2+6*y1[i]**3*(1-math.exp(-1/y1[i]));#Average conversion of ZnS from Eqn.(22)
i = i+1;
#OUTPUT
print 'Extreme Calculation';
print '\tDiameter of tube with all its internals:%fm'%(dt);
print 'Three step procedure';
print '\tConversion of ZnS:%f'%(XBbar);
print 'For other feed rates of solids';
print '\tFeedkg/s\ttbars\t\tXBbar/XA\tKrbars**-1\tCAbar/CAi\ttous\t\tXA\t\tXB';
i = 0;
while i< n:
print '\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f'%(F1[i],tbar1[i],XBbar1[i]/XA1[i],Kr1[i],CAbar1[i]/CAi,tou1[i],XA1[i],XBbar1[i]);
i = i+1;
from scipy.optimize import fsolve
import math
#INPUT
T = 900; #Temperature in roaster in degree C
P = 101325; #Pressure in Pa
R = 8.314; #Universal gas consmath.tant
dp = 750; #Particle size in micrometer5
Fo = 2.5; #Feed rate of solids in kg/s
uo = 0.6; #Superficial gas velocity in m/s
W = 80140; #Weight of bed in kg
ephsilonmf = 0.50; #Void fraction at minimum fluidized condition
umf = 0.5; #Velocity at minimum fluidization condition in m/s
db = 0.2; #Estimated bubble size in m
g = 9.81; #Acceleration due to gravity in square m/s**2
Lm = 1; #Length of fixed bed in m
ephsilonm = 0.45; #Void fraction of fixed bed
xA = 0.21; #Mole fraction of oxygen in feed
kc = 0.015 #Rate consmath.tant in m/s for reaction which follows shrinking core model
Ds = 8E-6; #Diffusion coefficient of solid in m**2/s
rhosbar = 4130; #Average particle density in kg/m**3
mB = 0.09744; #Molecular weight of ZnS
a = 3./2; #Stoichiometric coefficient of Oxygen in the reaction equation
#CALCULATION
#Selection of models to represent reactor
ubr = 0.711*(g*db)**0.5; #Rise velocity of bubble from Eqn.(6.7)
f = ubr/(umf/ephsilonmf);
#Step 1.
ub = uo-umf+ubr; #Rise velocity of bubbles from Eqn.(6.8)
delta = (uo-umf)/(ub+2*umf); #Fraction of the bed in bubbles from Eqn.(6.26)
Krguess = 2; #Guess value of Kr
x = Lm*(1-ephsilonm)*umf*(1-delta)/uo**2;
CAi = xA*P/(R*(T+273)); #Initial concentration of oxygen
#Step 2.
kbar = (kc**-1+(dp*10**-6/(12*Ds))**-1)**-1; #Modified rate consmath.tant from Eqn.(11)
tbar = W/Fo; #Mean residence time of solids from Eqn.(14.2)
rhob = rhosbar/mB; #Density of ZnS
def solver_func1(Kr): #Function defined for solving the system
XA = 1-math.exp(-x*Kr); #Conversion from Eqn.(42)
CAbar = (CAi*XA*uo**2)/(Kr*Lm*(1-ephsilonm)*umf*(1-delta)); #Average concentration of oxygen from Eqn.(43)
tou = rhob*dp*10**-6*a/(2*kbar*CAbar); #Time for complete reaction from Eqn.(9)
y = tbar/tou; #Term tbar/tou
XBbar = 3*y-6*y**2+6*y**3*(1-math.exp(-1./y)); #Average conversion of ZnS from Eqn.(22)
return XBbar-1.2*XA; #From Table E5, for Fo = 2.5kg/s
Kr = fsolve(solver_func1,Krguess)
XA = 1-math.exp(-x*Kr); #Conversion from Eqn.(42)
CAbar = (CAi*XA*uo**2)/(Kr*Lm*(1-ephsilonm)*umf*(1-delta)) #Average concentration of oxygen from Eqn.(43)
tou = rhob*dp*10**-6*a/(2*kbar*CAbar); #Time for complete reaction from Eqn.(9)
y = tbar/tou; #Term tbar/tou
XBbar = 3*y-6*y**2+6*y**3*(1-math.exp(-1./y)); #Average conversion of ZnS from Eqn.(22)
#OUTPUT
print 'Selection of models to represent reactor';
print '\tSince ratio ubr/umf/ephsilonmf) = %f <1 the reactor is operating in slow bubble regime'%(f);
print '\tSince particle size = %f micrometer they react according to shrinking-core model'%(dp);
print '\tConversion obtained for %f micrometer particle:%f'%(dp,XBbar);