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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 24 : Fluid-Fluid Reactors: Design"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.1 pageno : 551"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"import math \n",
"from scipy.integrate import quad \n",
"\n",
"# Variables\n",
"kag_a = 0.32; # mol/hr.m**3 Pa\n",
"kal_a = 0.1 # hr\n",
"HA = 12.5 # Pa.m**3/mol\n",
"Fg = 10.**5 # mol/hr.m**2\n",
"Fl = 7.*10**5 # mol/hr.m**2\n",
"Ct = 56000.; #mol/m3\n",
"P = 10.**5; #Pa\n",
"\n",
"# Calculations\n",
"inv_Kag_a = 3.125+HA/(kal_a);\n",
"Gfilm_res = (3.125)/inv_Kag_a;\n",
"Lfilm_res = (HA/(kal_a))/inv_Kag_a;\n",
"Kag_a = 1/inv_Kag_a;\n",
"d = 20;\n",
"def f9(dp): \n",
"\t return 1./20\n",
"\n",
"h = (Fg/(P*Kag_a))* quad(f9,20,100)[0]\n",
"\n",
"# Results\n",
"print \" The height of the tower required for countercurrent operartions is %.1f \"%(h),\n",
"print \"m\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The height of the tower required for countercurrent operartions is 512.5 m\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.2 pageno : 554"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from scipy.integrate import quad \n",
"\n",
"# Variables\n",
"Fg = 10.**5; \n",
"P = 10.**5;\n",
"Fg_by_Acs = 10.**5 #(Fg/Acs)\n",
"PA1 = 20;PA2 = 100.;\n",
"kag_a = 0.32;\n",
"\n",
"# Calculations\n",
"def f10(PA): \n",
"\t return 1./(0.32*PA)\n",
"\n",
"h = (Fg_by_Acs/P)* quad(f10,PA1,PA2)[0]\n",
"\n",
"# Results\n",
"print \" The height of the tower is %.2f \"%(h),\n",
"print \"m\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The height of the tower is 5.03 m\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.3 pageno : 555"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from scipy.integrate import quad \n",
"\n",
"# Variables\n",
"\n",
"# from example 24.2\n",
"Fg = 10.**5;\n",
"P = 10.**5;\n",
"PA1 = 20.\n",
"PA2 = 100.;\n",
"HA = 12.5;\n",
"kaga = 0.32\n",
"kla = 0.1;\n",
"\n",
"# Calculations\n",
"rA = 420./((1./kaga)+(HA/kla));\n",
"\n",
"def f8(PA): \n",
"\t return 1./rA\n",
"\n",
"h = (Fg/P)* quad(f8,PA1,PA2)[0]\n",
"\n",
"# Results\n",
"print \"The height of the tower is %.1f\"%(h),\n",
"print \"m\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The height of the tower is 24.4 m\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.4 page no : 557"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from scipy.integrate import quad \n",
"\n",
"# Variables\n",
"\n",
"# from example 24.2\n",
"PA1 = 20.\n",
"PA2 = 100. #Pa\n",
"Fg_by_Acs = 10.**5;\n",
"P = 10.**5;\n",
"HA = 12.5;\n",
"kaga = 0.32\n",
"kla = 0.1;\n",
"PA = 39.5 #Pa\n",
"\n",
"# Calculations\n",
"def f11(P): \n",
"\t return 1./(kaga*P)\n",
"\n",
"def f22(P):\n",
" return (1/kaga+HA/kla)/1620\n",
"\n",
"h = (Fg_by_Acs/P)*( quad(f11,PA1,PA)[0] + quad(f22,PA,PA2)[0])\n",
"\n",
"# Results\n",
"print \"The height of the tower is %.2f\"%(h),\n",
"print \"m\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The height of the tower is 6.91 m\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.5 pageno : 558"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from scipy.integrate import quad \n",
"\n",
"# Variables\n",
"\n",
"# from 24.2\n",
"Fg = 10.**5;\n",
"P = 10.**5;\n",
"Fg_by_Acs = 10.**5 #(Fg/Acs)\n",
"PA1 = 20.\n",
"PA2 = 100.\n",
"kag_a = 0.32;\n",
"\n",
"# Calculations\n",
"def f0(PA): \n",
"\t return 1./(PA/3.125)\n",
"\n",
"h = (Fg_by_Acs/P)* quad(f0,PA1,PA2)[0]\n",
"\n",
"# Results\n",
"print \" The height of the tower is %.2f \"%(h),\n",
"print \"m\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The height of the tower is 5.03 m\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.6 pageno : 560"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"from scipy.integrate import quad \n",
"\n",
"# Variables\n",
"kag_a = 0.72; # mol/hr.m**3 Pa\n",
"kal_a = 144.; # hr**-1\n",
"HA = 1000.; # Pa m**3/mol\n",
"Fg = 9000. #mol/hr\n",
"fl = 0.9\n",
"b = 1\n",
"Vr = 1.62 #m3\n",
"DA = 3.6*10**-6 #m2/hr\n",
"a = 100. #m2/m3\n",
"k = 2.6*10**5; #m3/mol.hr\n",
"DB = DA\n",
"P = 10**5\n",
"PA = 1000. #Pa\n",
"kal = kal_a/a;\n",
"#At the start\n",
"CBo = 555.6;\n",
"\n",
"# Calculations\n",
"Mh = (math.sqrt(DB*k*CBo))/kal;\n",
"#Min value of EAi\n",
"Ei = 1+(CBo*HA/PA);\n",
"if Ei>Mh:\n",
" E = Mh;\n",
"\n",
"rA1 = PA/((P*Vr/Fg)+(1/kag_a)+(HA/(kal_a*E))+(HA/(k*fl*CBo)));\n",
"#At the end\n",
"CBf = 55.6;\n",
"Mh = (math.sqrt(DB*k*CBf))/kal;\n",
"#Min value of EAi\n",
"Ei = 1+(CBf*HA/PA);\n",
"if Ei>Mh:\n",
" E = Mh;\n",
"\n",
"rA2 = PA/((P*Vr/Fg)+(1/kag_a)+(HA/(kal_a*E))+(HA/(k*fl*CBf)));\n",
"#Average rate of reaction\n",
"rA_avg = (rA1+rA2)/2;\n",
"\n",
"def f7(CB): \n",
"\t return 1./rA_avg\n",
"\n",
"t = (fl/b)* quad(f7,CBf,CBo)[0]\n",
"\n",
"# Results\n",
"print \" Part a\"\n",
"print \" The run time needed is %.2f\"%t,\n",
"print \"hr\"\n",
"#The min time required is\n",
"tmin = Vr*(CBo-CBf)/(Fg*(PA/(P-PA)));\n",
"print \" The minimum time required is %.2f\"%(tmin),\n",
"print \"hr\"\n",
"#Fraction of reacmath.tant which passes through the math.tank unreacted is\n",
"f = (t-tmin)/tmin;\n",
"print \" Part b\"\n",
"print \" Fraction of reacmath.tant which passes through the math.tank unreacted is %.3f\"%(f)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Part a\n",
" The run time needed is 9.13 hr\n",
" The minimum time required is 8.91 hr\n",
" Part b\n",
" Fraction of reacmath.tant which passes through the math.tank unreacted is 0.025\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|