summaryrefslogtreecommitdiff
path: root/Fluidization_Engineering_by_K_Daizo_And_O_Levenspiel/ch17.ipynb
blob: 77951e94bb7ec8e79f8f2c7252913d4bd1e8a329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
{
 "metadata": {
  "name": "",
  "signature": "sha256:82e0373b19da96ab8fd50304caf9cd3e08cf8bad10412b0998bf9110f7a5ae63"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 17 : Design of Catalytic Reactors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 434\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "dt=[0.081,0.205,3.6]; #Reactor diameter for the three reactors in m\n",
      "dte=[0.04,0.12,0.70]; #Equivalent diameters for the three reactors in m\n",
      "db=[0.05,0.057,0.07]; #Estimated bubble size in the three reactors in m\n",
      "Kr1=1.3889;           #Kinet1ic constant for Reaction 1 in s**-1\n",
      "Kr2=0.6111;           #Kinetic constant for Reaction 2 in s**-1\n",
      "Kr3=0.022;            #Kinetic constant for Reaction 3 in s**-1\n",
      "dp=60.;               #Particle size in micrometer\n",
      "ephsilonm=0.50;       #Void fraction of fixed bed\n",
      "ephsilonmf=0.55;      #Void fraction at minimum fluidized condition\n",
      "umf=0.006;            #Velocity at minimum fluidization condition in m/s\n",
      "D=2E-5;               #Diffusion coefficient of gas in m**2/s\n",
      "gammab=0.005;         #Ratio of volume of dispersed solids to that of bubble phase\n",
      "uo=0.2;               #Superficial gas velocity in m/s\n",
      "XA=0.9;               #Conversion\n",
      "g=9.81;               #Acceleration due to gravity in square m/s**2\n",
      "\n",
      "#CALCULATION\n",
      "Kr12=Kr1+Kr2;\n",
      "n=len(dt);\n",
      "i=0;\n",
      "ubr = [0,0,0]\n",
      "ub = [0,0,0]\n",
      "delta = [0,0,0]\n",
      "ephsilonf = [0,0,0]\n",
      "gammac = [0,0,0]\n",
      "gammae = [0,0,0]\n",
      "Kbc = [0,0,0]\n",
      "Kce = [0,0,0]\n",
      "Kf12 = [0,0,0]\n",
      "Kf3 = [0,0,0]\n",
      "KfA = [0,0,0]\n",
      "KfAR = [0,0,0]\n",
      "KfAR1 = [0,0,0]\n",
      "tou = [0,0,0]\n",
      "y = [0,0,0]\n",
      "SR = [0,0,0]\n",
      "XA1 = [0,0,0]\n",
      "y1 = [0,0,0]\n",
      "y2 = [0,0,0]\n",
      "tou2 = [0,0,0]\n",
      "Lf = [0,0,0]\n",
      "Lm = [0,0,0]\n",
      "XA2 = [0,0,0]\n",
      "\n",
      "import math\n",
      "while i<n:\n",
      "    #Preliminary Calcualtions\n",
      "    ubr[i]=0.711*(g*db[i])**0.5;#Rise velocity of bubble from Eqn.(6.7)\n",
      "    ub[i]=1.55*((uo-umf)+14.1*(db[i]+0.005))*dte[i]**0.32+ubr[i];#Bubble velocity for Geldart A particles from Equation from Eqn.(6.11)\n",
      "    delta[i]=uo/ub[i];#Fraction of bed in bubbles from Eqn.(6.29)\n",
      "    ephsilonf[i]=1-(1-delta[i])*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n",
      "    fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n",
      "    gammac[i]=(1-ephsilonmf)*((3/(ubr[i]*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n",
      "    gammae[i]=((1-ephsilonmf)*((1-delta[i])/delta[i]))-gammab-gammac[i];#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\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.(10.27)\n",
      "    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.(10.34)\n",
      "    #Effective rate constant from Eqn.(12.32)\n",
      "    Kf12[i]=(gammab*Kr12+1/((1/Kbc[i])+(1/(gammac[i]*Kr12+1/((1/Kce[i])+(1/(gammae[i]*Kr12)))))))*(delta[i]/(1-ephsilonf[i]));\n",
      "    #Rate of reaction 2 for fluidized bed from Eqn.(12.14)\n",
      "    Kf3[i]=(gammab*Kr3+1/((1/Kbc[i])+(1/(gammac[i]*Kr3+1/((1/Kce[i])+(1/(gammae[i]*Kr3)))))))*(delta[i]/(1-ephsilonf[i]));\n",
      "    #Rate of raection with respect to A from Eqn.(12.35)\n",
      "    KfA[i]=((Kbc[i]*Kce[i]/gammac[i]**2+(Kr12+Kce[i]/gammac[i]+Kce[i]/ \\\n",
      "    gammae[i])*(Kr3+Kce[i]/gammac[i]+Kce[i]/gammae[i]))*delta[i]*Kbc[i] \\\n",
      "    *Kr12*Kr3/(1-ephsilonf[i]))/(((Kr12+Kbc[i]/gammac[i])* \\\n",
      "    (Kr12+Kce[i]/gammae[i])+Kr12*Kce[i]/gammac[i])*((Kr3+Kbc[i]/gammac[i])* \\\n",
      "    (Kr3+Kce[i]/gammae[i])+Kr3*Kce[i]/gammac[i]));\n",
      "    KfAR[i]=((Kr1/Kr12)*Kf12[i])-KfA[i];#Rate of reaction from Eqn.(12.34)\n",
      "    KfAR1[i]=((Kr1/Kr12)*Kf12[i]);#Since KfA is small\n",
      "    #(b)Relate Selectivity with conversion in three reactors\n",
      "    x=-math.log(1-XA);#The term Kf12*tou in Eqn.(12.26)\n",
      "    tou[i]=x/Kf12[i];#Residence time from Eqn.(12.26)\n",
      "    y[i]=(KfAR1[i]/(Kf3[i]-Kf12[i]))*(math.exp(-x)-math.exp(-tou[i]*Kf3[i]));#CR/CAi from Eqn.(12.27)\n",
      "    SR[i]=y[i]/XA;#Selectivity of R\n",
      "    #(c)Relate exit composition to space time\n",
      "    tou1=5;#Space time in s\n",
      "    XA1[i]=1-math.exp(-Kf12[i]*tou1);#Conversion from Eqn.(12.26)\n",
      "    y1[i]=((KfAR1[i]/(Kf12[i]-Kf3[i]))*(math.exp(-Kf3[i]*tou1)-math.exp(-Kf12[i]*tou1)));#CR/CAi R from Eqn.(12.27)\n",
      "    #(d)Calculate height of bed needed to maximize production\n",
      "    y2[i]=(KfAR1[i]/Kf12[i])*(Kf12[i]/Kf3[i])**(Kf3[i]/(Kf3[i]-Kf12[i]));#CRmax/CAi R from Eqn.(12.37)\n",
      "    tou2[i]=math.log(Kf3[i]/Kf12[i])/(Kf3[i]-Kf12[i]);#Space time from Eqn.(38)\n",
      "    Lf[i]=(uo/(1-ephsilonf[i]))*tou2[i];#Length of bed at fully fluidized condition from Eqn.(12.5)\n",
      "    Lm[i]=Lf[i]*(1-ephsilonf[i])/(1-ephsilonm);#Length of bed when settled\n",
      "    XA2[i]=1-math.exp(-Kf12[i]*tou2[i]);#Conversion from Eqn.(12.26)\n",
      "    i=i+1;\n",
      "\n",
      "#OUTPUT\n",
      "print 'Let Laboratory, Pilot plant, Semicommercial unit be Reactor 1,2 & 3 respectively'\n",
      "print '(a)Relation between effective rate constant(Kf12) to the gas flow rate(uo)',\n",
      "print '\\tReactor No.\\tKf12(s**-1)\\tuo(m/s)'\n",
      "i=0;\n",
      "while i<n:\n",
      "     print '\\t%1.0f'%i\n",
      "     print '\\t\\t%f'%Kf12[i],\n",
      "     print '\\t%f'%uo\n",
      "     i=i+1;\n",
      "\n",
      "print '\\n(b)Relation between selectivity with conversion'\n",
      "print '\\n\\tReactor No.\\tKf12(s**-1)\\tSR(mol R formed/mol A reacted)'\n",
      "i=0\n",
      "while i<n:\n",
      "     print '\\t%1.0f'%i,\n",
      "     print '\\t\\t%f'%Kf12[i],\n",
      "     print '\\t%f'%SR[i]\n",
      "     i=i+1;\n",
      "\n",
      "print '(c)Relation between exit compostion and space time',\n",
      "print '\\tReactor No.\\tXA\\t\\tCR/CAi'\n",
      "i=0;\n",
      "while i<n:\n",
      "     print '\\t%1.0f'%i,\n",
      "     print '\\t\\t%f'%XA1[i],\n",
      "     print '\\t%f'%y1[i]\n",
      "     i=i+1;\n",
      "\n",
      "print '(d)Height of bed needed to maximize the production of acrylonitrile',\n",
      "print '\\tReactor No.\\tLm(m)\\t\\tXA'\n",
      "i=0;\n",
      "while i<n:\n",
      "     print '\\t%1.0f'%i,\n",
      "     print '\\t\\t%f'%Lm[i],\n",
      "     print '\\t%f'%XA2[i]\n",
      "     i=i+1;\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Let Laboratory, Pilot plant, Semicommercial unit be Reactor 1,2 & 3 respectively\n",
        "(a)Relation between effective rate constant(Kf12) to the gas flow rate(uo) \tReactor No.\tKf12(s**-1)\tuo(m/s)\n",
        "\t0\n",
        "\t\t0.410042 \t0.200000\n",
        "\t1\n",
        "\t\t0.270620 \t0.200000\n",
        "\t2\n",
        "\t\t0.128980 \t0.200000\n",
        "\n",
        "(b)Relation between selectivity with conversion\n",
        "\n",
        "\tReactor No.\tKf12(s**-1)\tSR(mol R formed/mol A reacted)\n",
        "\t0 \t\t0.410042 \t0.641507\n",
        "\t1 \t\t0.270620 \t0.618358\n",
        "\t2 \t\t0.128980 \t0.558283\n",
        "(c)Relation between exit compostion and space time \tReactor No.\tXA\t\tCR/CAi\n",
        "\t0 \t\t0.871292 \t0.564802\n",
        "\t1 \t\t0.741562 \t0.484243\n",
        "\t2 \t\t0.475286 \t0.313823\n",
        "(d)Height of bed needed to maximize the production of acrylonitrile \tReactor No.\tLm(m)\t\tXA\n",
        "\t0 \t\t3.056064 \t0.956404\n",
        "\t1 \t\t4.137401 \t0.939139\n",
        "\t2 \t\t7.049378 \t0.897005\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, Page 438\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "deltaHr=5.15E8; #Heat of reaction in J/k mol\n",
      "W=5E4;          #Weight of acrylonitirle produced per 334-day year in tonnes\n",
      "db=0.07;        #Estimated bubble size in m\n",
      "dte=0.7;        #Equivalent diameter in m\n",
      "Kf12=0.35;      #Effective rate constant in s**-1 from Example 1\n",
      "dp=60;          #Particle size in micrometer\n",
      "ephsilonm=0.50; #Void fraction of fixed bed\n",
      "ephsilonmf=0.55;#Void fraction at minimum fluidized condition\n",
      "T=460;          #Temperature in reactor in degree C\n",
      "Pr=2.5;         #Pressure inside reactor in bar\n",
      "#Feed gas composition\n",
      "x1=1;           #Propylene\n",
      "x2=1.1;         #Ammonia\n",
      "x3=11;          #Air\n",
      "do1=0.08;       #OD of heat exchanger tubes in m\\\n",
      "L=7;            #Length of tubes in m\n",
      "ho=300;         #Outside heat transfer coefficient in W/m**2 K\n",
      "hi=1800;        #Inside heat transfer coefficient in W/m**2 K\n",
      "Tc=253.4;       #Temperature of coolant in degree C\n",
      "pi=3.14;\n",
      "\n",
      "#CALCULATION\n",
      "#Preliminary calculation\n",
      "uo=0.46;#Superficial gas velocity from Fig.E1(a) for the value of Kf12 & db\n",
      "tou=8;#Space time from Fig.E2(b) for highest concentraion of product R\n",
      "Lm=uo*tou/(1-ephsilonm);\n",
      "y=0.58;#CR/CAi from Fig.E1(c) for the value of tou & Kf12\n",
      "XA=0.95#From Fig.E1(c) for the value of tou & Kf12\n",
      "SR=y/XA;#Selectivity of R\n",
      "\n",
      "#Cross-sectional area of the reactor\n",
      "P=W*10**3/(334*24*3600);#Production rate of acrylonitrile\n",
      "F=(P/0.053)/(SR*XA/0.042);#Feed rate of propylene\n",
      "V=((F*22.4*(T+273)*(x1+x2+x3))/(42*273*Pr));\n",
      "At=V/uo;#Cross-sectional area of reactor needed for the fluidized bed\n",
      "\n",
      "#Heat exchanger calculation\n",
      "q=F*XA*deltaHr/42;#Rate of heat liberation in the reactor\n",
      "U=(ho**-1+hi**-1)**-1;#Overall heat transfer coefficient\n",
      "deltaT=T-Tc;#Driving force for heat transfer\n",
      "Aw=q/(U*deltaT);#Heat exchanger area required to remove q\n",
      "Nt=Aw/(pi*do1*L);\n",
      "li1=(At/Nt)**0.5;#Pitch for square pitch arrangement\n",
      "dte1=4*(li1**2-(pi/4)*do1**2)/(pi*do1);\n",
      "if dte1>dte:\n",
      "    li=(pi/4*dte*do1+pi/4*do1**2)**0.5;#Pitch if we add dummy tubes\n",
      "import math\n",
      "f=li**2-pi/4*do1**2;#Fraction of bed cross section taken up by tubes\n",
      "dt1=math.sqrt(4/pi*At/(1-f));#Reactor diameter including all its tubes\n",
      "\n",
      "#OUTPUT\n",
      "print 'Superficial gas velocity=%fm/s'%uo\n",
      "print 'No. of %1.0fm tubes required=%1.0f'%(L,Nt);\n",
      "print 'Reactor diameter=%fm'%dt1\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Superficial gas velocity=0.460000m/s\n",
        "No. of 7m tubes required=295\n",
        "Reactor diameter=7.173176m\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3, Page 444\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "db=0.08;       #Estimated bubble size in m\n",
      "dte=2;         #Equivalent diameter in m\n",
      "F1=55.6;       #Feed rate of oil in kg/s\n",
      "XA=0.63;       #Conversion\n",
      "uo=0.6;        #Superficial gas velocity in m/s\n",
      "T1=500.0;      #Temperature of reactor in degree C\n",
      "T2=580.0;      #Temperature of regenerator in degree C\n",
      "Fs=F1*23.3;    #Solid circulation rate from Ex.(15.2)\n",
      "rhos=1200.0;   #Density of catalyst in kg/m**3\n",
      "dpbar=60.0;    #Average particle size in micrometer\n",
      "ephsilonm=0.50;#Void fraction of fixed bed\n",
      "ephsilonmf=0.55;#Void fraction at minimum fluidized condition\n",
      "umf=0.006;      #Velocity at minimum fluidization condition in m/s\n",
      "dt=8.0;         #Diameter of reactor in m\n",
      "D=2E-5;         #Diffusion coefficient of gas in m**2/s\n",
      "Kr=8.6;         #Rate constant for reaction at 500 degree C in s**-1\n",
      "Ka1=0.06;       #Rate constant for deactivatiion at 500 degree C in s**-1\n",
      "Ka2=0.012;      #Rate constant for regeneration at 580 degree C in s**-1\n",
      "gammab=0.005;   #Ratio of volume of dispersed solids to that of bubble phase\n",
      "g=9.81;         #Acceleration due to gravity in square m/s**2\n",
      "pi=3.14;\n",
      "\n",
      "#CALCULATION\n",
      "#Parameters for the fluidized reactor\n",
      "ubr=0.711*(g*db)**0.5;#Rise velocity of bubble from Eqn.(6.7)\n",
      "ub=1.55*((uo-umf)+14.1*(db+0.005))*dte**0.32+ubr;#Bubble velocity for Geldart A particles from Equation from Eqn.(6.11)\n",
      "delta=uo/ub;#Fraction of bed in bubbles from Eqn.(6.29)\n",
      "ephsilonf=1-(1-delta)*(1-ephsilonmf);#Void fraction of fixed bed from Eqn.(6.20)\n",
      "fw=0.6;#Wake volume to bubble volume from Fig.(5.8)\n",
      "gammac=(1-ephsilonmf)*((3/(ubr*ephsilonmf/umf-1))+fw);#Volume of solids in cloud to that of the bubble from Eqn.(6.36)\n",
      "gammae=((1-ephsilonmf)*((1-delta)/delta))-gammab-gammac;#Volume of solids in emulsion to that of the bubble from Eqn.(6.35)\n",
      "Kbc=4.5*(umf/db)+5.85*((D**0.5*g**0.25)/db**(5.0/4));#Gas interchange coefficient between bubble and cloud from Eqn.(10.27)\n",
      "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)\n",
      "import math\n",
      "#Bed height versus catalyst activity in reactor\n",
      "a1bar=0.07;#Guess value for average activity in reactor\n",
      "x=Kr*a1bar;#Value of Kra1 to be used in the following equation\n",
      "Kf=(gammab*x+1/((1/Kbc)+(1/(gammac*x+1/((1/Kce)+(1/(gammae*x)))))))*(delta/(1-ephsilonf));#Effective rate constant from Eqn.(12.14)\n",
      "tou=-math.log(1-XA)/Kf;#Space time from Eqn.(12.16)\n",
      "Lm=tou*uo/(1-ephsilonm);#Length of fixed bed for guess value of a1bar\n",
      "a1bar1=[0.0233,0.0465,0.0698,0.0930,0.116,0.140];#Various activity values to find Lm\n",
      "x1 = [0,0,0,0,0,0]\n",
      "Kf1 = [0,0,0,0,0,0]\n",
      "tou1 = [0,0,0,0,0,0]\n",
      "Lm1 = [0,0,0,0,0,0]\n",
      "\n",
      "n=len(a1bar1);\n",
      "i=0;\n",
      "while i<n:\n",
      "    x1[i]=Kr*a1bar1[i];\n",
      "    Kf1[i]=(gammab*x1[i]+1/((1/Kbc)+(1/(gammac*x1[i]+1/((1/Kce)+ \\\n",
      "    (1/(gammae*x1[i])))))))*(delta/(1-ephsilonf));\n",
      "    #Effective rate constant from Eqn.(12.14)\n",
      "    \n",
      "    tou1[i]=-math.log(1-XA)/Kf1[i];#Space time from Eqn.(12.16)\n",
      "    Lm1[i]=tou1[i]*uo/(1-ephsilonm);\n",
      "    #Length of fixed bed for guess value of a1bar...Condition [i]\n",
      "    i=i+1;\n",
      "\n",
      "#Find the optimum size ratio for various a1bar\n",
      "Lm=[5,6,7,8,10,12];\n",
      "W1 = [0,0,0,0,0,0]\n",
      "t1bar = [0,0,0,0,0,0]\n",
      "t2bar = [0,0,0,0,0,0]\n",
      "a1bar2 = [0,0,0,0,0,0]\n",
      "m=len(Lm);\n",
      "i=0;\n",
      "while i<m:\n",
      "    W1[i]=(pi/4)*dt**2*rhos*(1-ephsilonm)*Lm[i];#Bed weight\n",
      "    t1bar[i]=W1[i]/Fs;#Mean residence time of solids in reactor\n",
      "    t2bar[i]=t1bar[i]*(Ka1/Ka2)**0.5;#Mean residence time of soilds at optimum from Eqn.(16)\n",
      "    a1bar2[i]=(Ka2*t2bar[i])/(Ka1*t1bar[i]+Ka1*t1bar[i]*Ka2*t2bar[i]+Ka2*t2bar[i]);#From Eqn.(15)...Condition (ii)\n",
      "    i=i+1;\n",
      "\n",
      "#Final design values\n",
      "Lm4=7.3;#For satisfying condition [i] & (ii)\n",
      "a1bar3=0.0744;#By interpolation\n",
      "x2=a1bar3*Kr;\n",
      "W11=(pi/4)*dt**2*rhos*(1-ephsilonm)*Lm4;#Bed weight for reactor\n",
      "t1bar1=W11/Fs;#Mean residence time of solids in reactor\n",
      "a2bar=(1+Ka1*t1bar1)*a1bar3;#Average activity in regenrator from Eqn.(10)\n",
      "t2bar1=t1bar1*(Ka1/Ka2)**0.5;#Mean residence time of solids in regenerator from Eqn.(16)\n",
      "W2=W11*(t2bar1/t1bar1);#Bed weight for regenerator\n",
      "dt2=dt*(W2/W11)**0.5;#Diameter of regenerator assuming same static bed height for reactor and regerator\n",
      "\n",
      "#OUTPUT\n",
      "print 'Bed height versus catalyst activity in reactor'\n",
      "print '\\tAverage activity',\n",
      "print '\\tLength of fixed bed(m)'\n",
      "i=0;\n",
      "while i<n:\n",
      "    print '\\t%f'%a1bar1[i],\n",
      "    print '\\t\\t%f'%Lm1[i];\n",
      "    i=i+1;\n",
      "\n",
      "print 'Optimum size ratio for various activity in reactor'\n",
      "print '\\tLength of fixed bed(m)',\n",
      "print '\\tAverage activity'\n",
      "i=0\n",
      "while i<m:\n",
      "    print '\\t%f'%Lm[i],\n",
      "    print '\\t\\t%f'%a1bar2[i]\n",
      "    i=i+1;\n",
      "\n",
      "print 'Final design values'\n",
      "print '\\tDiameter of reactor(m):%.0f'%dt\n",
      "print '\\tBed weight for reactor(tons):%.0f'%(W11/10**3)\n",
      "print '\\tBed weight for regenerator(tons):%.0f'%(W2/10**3)\n",
      "print '\\tDiameter of regenerator(m):%.0f'%(dt2);\n",
      "print '\\tSolid circulation rate(tons/hr):%f'%(Fs*3.6);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Bed height versus catalyst activity in reactor\n",
        "\tAverage activity \tLength of fixed bed(m)\n",
        "\t0.023300 \t\t11.059747\n",
        "\t0.046500 \t\t7.911053\n",
        "\t0.069800 \t\t6.756202\n",
        "\t0.093000 \t\t6.118750\n",
        "\t0.116000 \t\t5.696470\n",
        "\t0.140000 \t\t5.372072\n",
        "Optimum size ratio for various activity in reactor\n",
        "\tLength of fixed bed(m) \tAverage activity\n",
        "\t5.000000 \t\t0.097879\n",
        "\t6.000000 \t\t0.086112\n",
        "\t7.000000 \t\t0.076871\n",
        "\t8.000000 \t\t0.069420\n",
        "\t10.000000 \t\t0.058149\n",
        "\t12.000000 \t\t0.050026\n",
        "Final design values\n",
        "\tDiameter of reactor(m):8\n",
        "\tBed weight for reactor(tons):220\n",
        "\tBed weight for regenerator(tons):492\n",
        "\tDiameter of regenerator(m):12\n",
        "\tSolid circulation rate(tons/hr):4663.728000\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}