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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 24 : Applications of Energy Balances in the Absence of Chemical Reactions"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 24.1 page no. 720\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# simplification of the general energy balance\n",
"\n",
"# Solution Fig. E24.1\n",
"\n",
"# Assumptions to be made in eqn. 24.1 in following segment \n",
"print 'Assumptions to be made in eqn. 24.1 in following segments are:'\n",
"#(a)- 1 to 5\n",
"print '(a)- 1 to 5.'\n",
"print ' 1. Change in potential energy(del_PE) = 0(no change in level) .'\n",
"print ' 2. Probably change in kinetic energy(del_KE)=0 .'\n",
"print ' 3. Change in energy = 0 (process appears to be steady).'\n",
"print ' Result : Q + W = del_H.'\n",
"\n",
"#(b) 4 to 5\n",
"print '(b) 4 to 5.'\n",
"print ' 1. Q = W = 0 '\n",
"print ' 2. Probably change in kinetic energy(del_KE)=0.'\n",
"print ' 3. Change in energy = 0 (process appears to be steady).'\n",
"print ' Result : del_H = -del_PE . '\n",
"\n",
"#(c) 3 to 4\n",
"print '(c) 3 to 4.'\n",
"print ' 1. Q = W = 0 '\n",
"print ' 2. Probably change in kinetic energy(del_KE)=0.'\n",
"print ' 3. Change in energy = 0 (process appears to be steady).'\n",
"print ' Result : del_H = -del_PE . '\n",
"\n",
"#(d) 3 to 5\n",
"print '(d) 3 to 5.'\n",
"print ' 1. Q = W = 0 '\n",
"print ' 2. Probably change in kinetic energy(del_KE)=0.'\n",
"print ' 3. Change in energy = 0 (process appears to be steady).'\n",
"print ' 4. Change in potential energy(del_PE) = 0(no change in level) .'\n",
"print ' Result : del_H = 0 . '\n",
"\n",
"#(e)- 1 to 3\n",
"print '(e) 1 to 3.'\n",
"print ' 1. Change in potential energy(del_PE) = 0(no change in level) .'\n",
"print ' 2. Probably change in kinetic energy(del_KE)=0 .'\n",
"print ' 3. Change in energy = 0 (process appears to be steady).'\n",
"print ' Result : Q + W = del_H.'\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Assumptions to be made in eqn. 24.1 in following segments are:\n",
"(a)- 1 to 5.\n",
" 1. Change in potential energy(del_PE) = 0(no change in level) .\n",
" 2. Probably change in kinetic energy(del_KE)=0 .\n",
" 3. Change in energy = 0 (process appears to be steady).\n",
" Result : Q + W = del_H.\n",
"(b) 4 to 5.\n",
" 1. Q = W = 0 \n",
" 2. Probably change in kinetic energy(del_KE)=0.\n",
" 3. Change in energy = 0 (process appears to be steady).\n",
" Result : del_H = -del_PE . \n",
"(c) 3 to 4.\n",
" 1. Q = W = 0 \n",
" 2. Probably change in kinetic energy(del_KE)=0.\n",
" 3. Change in energy = 0 (process appears to be steady).\n",
" Result : del_H = -del_PE . \n",
"(d) 3 to 5.\n",
" 1. Q = W = 0 \n",
" 2. Probably change in kinetic energy(del_KE)=0.\n",
" 3. Change in energy = 0 (process appears to be steady).\n",
" 4. Change in potential energy(del_PE) = 0(no change in level) .\n",
" Result : del_H = 0 . \n",
"(e) 1 to 3.\n",
" 1. Change in potential energy(del_PE) = 0(no change in level) .\n",
" 2. Probably change in kinetic energy(del_KE)=0 .\n",
" 3. Change in energy = 0 (process appears to be steady).\n",
" Result : Q + W = del_H.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 24.3 page no. 728\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Application of the energy balance.\n",
"\n",
"# Variables\n",
"# Given\n",
"m_CO2 = 10. ;\t\t\t# mass of CO2 - [lb]\n",
"Ti_CO2 = 80. ;\t\t\t# Initial temperature of CO2 - [degree F]\n",
"Vi = 4.0 ;\t\t\t# Initial volume of CO2-[cubic feet]\n",
"f_CO2 = 40./100 ;\t\t\t# Fraction of CO2 that convert to liquid finally \n",
"s_Vi = Vi /m_CO2 ;\t\t\t# Initial specific volume of CO2 - [cubic feet/lb]\n",
"s_Vf = s_Vi ;\t\t\t# Constant volume -[cubic feet/lb]\n",
"Pi = 300. ;\t\t\t# Intial pressure - [psia]\n",
"del_Hi = 160. ;\t\t\t# Intial change in specific enthalpy - [Btu/lb]\n",
"# Now again use chart to get fnal condition fixed by constant volume line and quality 0.6 , according to book it is \n",
"del_Hf = 81. ;\t\t\t# Final change in specific enthalpy - [Btu/lb]\n",
"Pf = 140. ;\t\t\t#Final pressure - [psia]\n",
"\n",
"# Calculations\n",
"Q = ((del_Hf - del_Hi) - (Pf * s_Vf * 144/778.2 - Pi * s_Vi * 144/778.2))*m_CO2 ;\t\t\t# Heat removed from the extinguisher -[Btu]\n",
"\n",
"# Results\n",
"print ' Heat removed from the extinguisher is %i Btu .'%Q\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Heat removed from the extinguisher is -671 Btu .\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 24.4 page no. 730"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Application of the energy balance to plasma etching.\n",
"\n",
"from scipy.optimize import fsolve\n",
"\n",
"# Pick the system as gas plus heater \n",
"# Given\n",
"Pi = 1.5 ;\t\t\t# Intial pressure - [Pa]\n",
"Vi = 2*10**-3 ;\t\t\t# Initial volume of gas - [cubic metre]\n",
"Ti = 300 ;\t\t\t# Initial temperature - [K]\n",
"W = 480 ;\t\t\t# Work done by heater on system\n",
"t = 5 ;\t\t\t# Time for which current is supplied -[ min]\n",
"m_ht = 12 ;\t\t\t# Mass of the heater - [g]\n",
"C_ht = 0.35 ;\t\t\t# Heat capacity of heater - [ J/gK]\n",
"R = 8.314 ;\t\t\t# Ideal gas constant - [(Pa*cubic metre)/(g mol* K)]\n",
"\n",
"# It is assumed that heat transfer across system boundary for this short time is negligible , therefore Q = 0\n",
"# Using the above assumption the equation reduces to del_U = W, therefore \n",
"del_U = W ;\t\t\t# Change in nternal energy - [J]\n",
"\n",
"# Calculations\n",
"# Gas is assumed to be ideal, therefore get n by using pv = nRT\n",
"n = (Pi*Vi)/(R*Ti) ;\t\t\t# Number of moles of argon gas -[g mol]\n",
"Cp = (5./2)* R ;\t\t\t# Specific heat capacity of argon gas at constant pressure - [ J/gK]\n",
"Cv = Cp - R ;\t\t\t# Specific heat capacity of argon gas at constant volume - [ J/gK]\n",
"\n",
"def f(Tf):\n",
" return m_ht*C_ht*(Tf - Ti) + n*Cv*(Tf - Ti) - del_U\n",
" \n",
"Tf=fsolve(f,400) ;\t\t\t# Final temperature -[K] \n",
"\n",
"# Results\n",
"print ' Final temperature of gas is %.0f K .'%Tf\n",
" \n",
"Pf = (Tf/Ti)*Pi ;\t\t\t# Final pressure - [Pa]\n",
"print ' Final pressure in chamber is %.2f Pa .'%Pf\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Final temperature of gas is 414 K .\n",
" Final pressure in chamber is 2.07 Pa .\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 24.5 page no. 732\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Energy balance applied to a batch process\n",
"\n",
"# Variables\n",
"# Pick the system as shown in above figure of book\n",
"# Given\n",
"m_water = 10. ;\t\t\t# Mass of water - [lb]\n",
"T_water = 35. ;\t\t\t# Temperature of water - [degree F]\n",
"m_ice = 4. ;\t\t\t# Mass of ice - [lb]\n",
"T_ice = 32. ;\t\t\t# Temperature of ice - [degree F]\n",
"m_stm = 6. ;\t\t\t# Initial mass of steam -[lb]\n",
"T_stm = 250. ;\t\t\t# Temperature of stm - [degree F]\n",
"p = 20. ;\t\t\t# Pressure of system -[psia]\n",
"\n",
"m_total = m_water + m_ice + m_stm ;\t\t\t# Mass of H2O in three phases initially -[lb]\n",
"\n",
"U_ice = -143.6 ;\t\t\t# Specific internal energy of ice -[Btu/lb]\n",
"U_water = 3.025 ;\t\t\t# Specific internal energy of water -[Btu/lb]\n",
"U_stm = 1092.25 ;\t\t\t# Specific internal energy of steam -[Btu/lb]\n",
"V_water = 0.0162 ;\t\t\t# Specific volume of water -[cubic feet/lb]\n",
"V_stm = 20.80 ;\t\t\t# Specific volume of steam -[cubic feet/lb]\n",
"V_total = m_stm*V_stm ;\t\t\t#Total volume of container ignoring volume of water and ice as they are neglgible\n",
"\n",
"# Calculations\n",
"V_sys = V_total/m_total ;\t\t\t# Specific volume of system -[cubic feet/lb]\n",
"U_sys =(m_water*U_water + m_ice*U_ice + m_stm*U_stm)/m_total ;\t\t\t# Final specific internal energy of system -[Btu/lb]\n",
"\n",
"T1 = 190 ;\t\t\t# assumed temperature\n",
"U1 = [157.17,1071.83] ;\t\t\t#specific internal energy of liquid and vapour respetively -[Btu/lb]\n",
"V1 = [0.0165,41.01] ;\t\t\t# Specific volume of liquid and vapour respetively -[cubic feet/lb]\n",
"x1 = V_sys/V1[1] ;\t\t\t# Quality of vapour\n",
"U1_sys = (1-x1)*U1[0] + x1*U1[1] \t\t\t# Specific internal energy of system at T1-[Btu/lb] \n",
"\n",
"T2 = 200. ;\t\t\t# assumed temperature\n",
"U2 = [168.11, 1073.96];\t\t\t# specific internal energy of liquid and vapour respetively -[Btu/lb]\n",
"V2 = [0.017, 33.601] ;\t\t\t# Specific volume of liquid and vapour respetively -[cubic feet/lb]\n",
"x2 = V_sys/V2[1] ; \t\t\t# Quality of vapour\n",
"U2_sys = (1-x2)*U2[0] + x2*U2[1] ;\t\t\t# Specific internal energy of system at T2-[Btu/lb] \n",
"\n",
"# Results\n",
"# Check whether assumption is right\n",
"if (U_sys > U1_sys ):\n",
" if ( U_sys <U2_sys):\n",
" print 'Assumption is right, now find exact temperature by interpolation between 2 assumed temperatures.'\n",
" else:\n",
" print 'Assumption is wrong, assume different T2.'\n",
"else:\n",
" print 'Assumption is wrong,assume different T1.'\n",
"\n",
"# Interpolation, to get final temperature corresponding to U_sys\n",
"T_sys = T1 + ((T2 - T1)*(U_sys - U1_sys))/(U2_sys - U1_sys)\n",
"\n",
"print ' The final temperature obtained by interpolation between 2 assumed temperatures is %.2f degree F.'%T_sys\n",
" \n",
"# Now obtain specific volume of vapour data at final temperature from steam table and use it to calculate x(quality) , according to book it is\n",
"V_vap = 39.35 ;\t\t\t#specific volume of vapour data at final temperature -[cubic feet/lb]\n",
"x = V_sys /V_vap ;\t\t\t# Quality of gas at final temperature\n",
" \n",
" \t\t\t#Final state\n",
"Vap = m_total*x ;\t\t\t# Mass of vapour at final state - [lb]\n",
"stm_con = m_stm - Vap ;\t\t\t# Mass of steam condenses - [lb]\n",
"\n",
"print 'Therefore, mass of steam condenses is %.2f lb.'%stm_con\n",
"\n",
"print \"Answer is wrong in book.\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Assumption is right, now find exact temperature by interpolation between 2 assumed temperatures.\n",
" The final temperature obtained by interpolation between 2 assumed temperatures is 191.03 degree F.\n",
"Therefore, mass of steam condenses is 2.83 lb.\n",
"Answer is wrong in book.\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 24.6 page no : 736"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# application of the energy balance to pumping water\n",
"\n",
"from scipy.optimize import fsolve\n",
"\n",
"# Variables\n",
"# Pick the system as shown in above figure of book\n",
"# Given\n",
"h1 = -15 ;\t\t\t# Initial level of water from ground level -[ft]\n",
"h2 = 165 ;\t\t\t#Final level of water from ground level -[ft]\n",
"V_rate = 200 ;\t\t\t# Volume flow rate of water - [gal/hr]\n",
"Q1 = 30000 ;\t\t\t# Heat input by heater - [Btu/hr]\n",
"Q2 = 25000 ;\t\t\t# Heat lost by system -[Btu/hr]\n",
"T1 = 35 ;\t\t\t# Initial temperature of water - [degree F]\n",
"g = 32.2 ;\t\t\t# Acceleration due to gravity - [ft/ square second]\n",
"p_pump = 2 ;\t\t\t# Power of pump -[hp]\n",
"f_w = 55./100 ;\t\t\t# Fraction of rated horsepower that i used in pumping water \n",
"Cp = 1 ;\t\t\t# Specific heat capacity of water - [Btu/lb*F]\n",
"\n",
"# Calculations\n",
"m = V_rate * 8.33 ;\t\t\t# Total mass of water pumped -[lb]\n",
"del_PE = (m* g *(h2 - h1))/(32.2*778) ;\t\t\t# Change in PE - [Btu/hr]\n",
"Q = Q1 - Q2 ;\t\t\t# Net heat exchange -[Btu/hr]\n",
"W = 2* f_w * 60 * 33000/778 ;\t\t\t# Work on system - [Btu/hr]\n",
"del_H = Q + W - del_PE ;\t\t\t# By using reduced energy balance - [Btu/hr]\n",
"\t\t\t# Also del_H = m* Cp * (T2 - T1), all is known except T2 , solve for T2\n",
"def f(T2):\n",
" return m*Cp*(T2-T1) - del_H\n",
" \n",
"T2 = fsolve(f,40)[0] ;\t\t\t# Boiling point temperature \n",
"\n",
"# Results\n",
"print ' Final temperature of water that enters storage tank is %.1f degree F .'%T2\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Final temperature of water that enters storage tank is 39.5 degree F .\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"/usr/lib/python2.7/dist-packages/scipy/optimize/minpack.py:227: RuntimeWarning: The iteration is not making good progress, as measured by the \n",
" improvement from the last ten iterations.\n",
" warnings.warn(msg, RuntimeWarning)\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 24.7 page no. 738\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# application of the energy balance, to heat a biomass.\n",
"\n",
"# Variables\n",
"# Pick the system as shown in above figure of book\n",
"# Given\n",
"T_stm = 250 + 273 ;\t\t\t# Temperature of entering steam - [K ]\n",
"Q_loss = -1.5 ;\t\t\t# Rate of heat loss from system - [kJ/s ]\n",
"T_mi = 20 + 273 ;\t\t\t#Temperature of entering material -[K ]\n",
"T_mf = 100 + 273 ;\t\t\t# Temperature of material after heating - [K]\n",
"m_m = 150 ;\t\t\t# Mass of charged material - [kg]\n",
"Cp_m = 3.26 ;\t\t\t# Average heat capacity of material - [ J/(g*K)]\n",
"\n",
"# Calculations\n",
"del_U = m_m*Cp_m*(T_mf - T_mi) ;\t\t\t# Change in enthalpy of system , because del_(pV) = 0 for liquid and solid charge -[kJ]\n",
"Q_loss_total = Q_loss * 3600; \t\t\t# Total heat loss by system n 1 hour - [kJ]\n",
"# We need the value of specific change in enthalpy value of saturated steam(del_H_steam), according to book we can obtain this value from steam table, it's value is -1701 kJ/kg\n",
"del_H_steam = -1701 ;\t\t\t# Specific change in enthalpy value of saturated steam -[kJ/kg]\n",
"# Get mass of steam per kg charge from reduced energy balance(eqn. (b))\n",
"m_stm_total = (del_U - Q_loss_total)/(-del_H_steam) ;\t\t\t# Total mass of stea used - [kg]\n",
"m_stm = m_stm_total/m_m ;\t\t\t# Mass of steam used per kg of charge - [kg]\n",
"\n",
"# Results\n",
"print ' Mass of steam used per kg of charge is %.3f kg .'%m_stm\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Mass of steam used per kg of charge is 0.174 kg .\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 24.8 page no. 741\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Sterilization of a Fermentation Medium\n",
"\n",
"# Pick the system of whole process as shown in above figure of book\n",
"# Given\n",
"Q = 1.63 ;\t\t\t# Heat loss from the process - [ kW ]\n",
"m_bm = 150 ;\t\t\t# Mass flow rate of biological media into the sterlizer -[kg/min]\n",
"T_bm = 50 +273 ;\t\t\t# Temperature of biological media into the sterlizer - [K]\n",
"T_sm = 75 + 273 ;\t\t\t# Temperature of sterlize media out of the sterlizer - [K]\n",
"P_ss = 300 ;\t\t\t# Pressure of satureted steam entering the steam heater - [kPa]\n",
"P_sc = 300 ;\t\t\t# Pressure of satureted condensate exiting the steam heater - [kPa]\n",
"\n",
"H_w1 = 207.5 ;\t\t\t# Change in specific enthalpy of water at 50 degree C - [kJ/kg]\n",
"H_w2 = 310.3 ;\t\t\t# Change in specific enthalpy of water at 75 degree C - [kJ/kg]\n",
"H_ss = 2724.9 ;\t\t\t#Change in specific enthalpy of satureted steam entering the steam heater at 300 kPa - [kJ/kg]\n",
"H_sc = 561.2 ;\t\t\t#Change in specific enthalpy of satureted condensate exiting the steam heater at 300 kPa - [kJ/kg]\n",
"\n",
"# Calculations\n",
"m_sm = m_bm ;\t\t\t# By material balance -[kg/min]\n",
"m_stm = (Q*60 - m_sm*H_w2 + m_bm * H_w1 )/(H_sc - H_ss ) ;\t\t\t# Mass flow rate of steam entering the steam heater - [kg/min]\n",
"\n",
"# Results\n",
"print ' Mass flow rate of steam entering the steam heater is %.2f kg steam/min .'%m_stm\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Mass flow rate of steam entering the steam heater is 7.08 kg steam/min .\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 24.9 page no. 742\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Use of combined meterial and energy balances to solve a distillation problem.\n",
"\n",
"# Variables\n",
"F = 20000 ;\t\t\t# Feed rate of saturated liquid - [kg/h]\n",
"F_Bz = 0.5 ;\t\t\t# Fraction of benzene in feed\n",
"F_Tol = 0.5 ;\t\t\t# Fraction of toluene in feed\n",
"D_Bz = 0.98 ;\t\t\t# Fraction of benzene in distillate\n",
"D_Tol = 0.02 ;\t\t\t# Fraction of toluene in distillate\n",
"B_Bz = 0.04 ;\t\t\t# Fraction of benzene in bottoms\n",
"B_Tol = 0.96 ;\t\t\t# Fraction of toluene in bottoms\n",
"R_by_D = 4.0 ;\t\t\t# Recycle ratio \n",
"\n",
"# Calculations\n",
"from numpy import matrix\n",
"a = matrix([[1,1],[B_Bz,D_Bz]]) ;\t\t\t# Matrix formed by coefficients of unknown\n",
"b = matrix([[F],[F_Bz*F]]) ;\t\t\t# Matrix formed by contants\n",
"a = a.I\n",
"x = a*b ;\t\t\t# Matrix of solutions \n",
"B = x[0] ;\t\t\t# Bottoms - [kg/h]\n",
"D = x[1] ;\t\t\t#Distillate - [kg/h]\n",
"R = D * R_by_D ;\t\t\t# Recycle - [kg/h]\n",
"V = R + D ;\t\t\t# Overhead vapour - [kg/h]\n",
"\n",
"# For energy balance\n",
"# According to book additional data obtained from the fig.E24.9b are\n",
"H_F = 165 ;\t\t\t# Change in enthalpy of F - [kJ/kg]\n",
"H_B = 205 ;\t\t\t# Change in enthalpy of B - [kJ/kg]\n",
"H_D = 100 ;\t\t\t# Change in enthalpy of D - [kJ/kg]\n",
"H_R = 100 ;\t\t\t# Change in enthalpy of R - [kJ/kg]\n",
"H_V = 540 ;\t\t\t# Change in enthalpy of V - [kJ/kg]\n",
"\n",
"Qc = R*H_R + D*H_D - V*H_V ;\t\t\t# The heat duty in the condenser - [kJ]\n",
"Qr = D*H_D + B*H_B - F*H_F - Qc;\t\t\t# The heat duty to the reboiler - [kJ]\n",
"\n",
"# Results\n",
"print ' Ditillate (D) %.2e kg/h.'%D\n",
"print ' Bottoms (B) %.2e kg/h.'%B\n",
"print ' The heat duty in the condenser (Qc) %.2e kJ/h.'%Qc\n",
"print ' The heat duty to the reboiler (Qr) %.2e kJ/h.'%Qr\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Ditillate (D) 9.79e+03 kg/h.\n",
" Bottoms (B) 1.02e+04 kg/h.\n",
" The heat duty in the condenser (Qc) -2.15e+07 kJ/h.\n",
" The heat duty to the reboiler (Qr) 2.13e+07 kJ/h.\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|