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
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 9: Distillation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.10: Optimum_Reflux_Ratio_McCabe_Thiele_Method.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.10\n",
"// Page: 412\n",
"\n",
"printf('Illustration 9.10 - Page: 412\n\n');\n",
"\n",
"// solution\n",
"\n",
"// a:methanol b:water\n",
"Ma = 32.04;// [kg/kmol]\n",
"Mb = 18.02;// [kg/kmol]\n",
"// Feed:\n",
"F1 = 5000;// [kg/h]\n",
"F = 216.8;// [kmol/h]\n",
"Tempo = 19.7;// [OC]\n",
"zF = 0.360;// [mole fraction methanol]\n",
"MavF = 23.1;// [kg/kmol]\n",
"Tempf = 58.3;// [OC]\n",
"// Distillate:\n",
"D1 = 2620;// [kg/h]\n",
"D = 84.4;// [kkmol/h]\n",
"xD = 0.915;// [mole fraction methanol]\n",
"// Residue:\n",
"R1 = 2380;// [kg/h]\n",
"R = 132.4;// [kmol/h]\n",
"xW = 0.00565;// [mole fraction methanol]\n",
"\n",
"// From Fig. 9.42 (Pg 413):\n",
"BtF = 76.0;// [Bubble point if the feed, OC]\n",
"DtF = 89.7;// [Dew point of the feed, OC]\n",
"// Latent heat of vaporisation at 76 OC\n",
"lambda_a = 1046.7;// [kJ/kg]\n",
"lambda_b = 2284;// [kJ/kg]\n",
"ha = 2.721;// [kJ/kg K]\n",
"hb = 4.187;// [kJ/kg K]\n",
"hF = 3.852;// [kJ/kg K]\n",
"// If heats of solution is ignaored:\n",
"// Enthalpy of the feed at the bubble point referred to the feed temp.\n",
"HF = hF*MavF*(BtF-Tempf);// [kJ/kmol]\n",
"// enthalpy of the saturated vapour at dew point referred to the liquid at feed temp.\n",
"HL = (zF*((ha*Ma*(DtF-Tempf))+(lambda_a*Ma)))+((1-zF)*((hb*Mb*(DtF-Tempf))+(lambda_b*Mb)));// [kJ/kmol]\n",
"q = HL/(HL-HF);\n",
"slope = q/(q-1);\n",
"// In fig. 9.42: xD,xW & zF are located on the 45 degree diagonal & the q line is drawn with slope = 'slope' .\n",
"// The operating line for minimum reflux ratio in this case pass through the intersection of the q line and the equilibrium curve.\n",
"ordinate = 0.57;\n",
"deff('[y] = f62(Rm)','y = ordinate-(xD/(Rm+1))');\n",
"Rm = fsolve(0,f62);// [mole reflux/mole distillate]\n",
"// from fig. 9.42 (Pg 413):\n",
"// The minimum number of theoretical trays is determied using the 45 degree diagonal as operating line.\n",
"Np = 4.9;// [including the reboiler]\n",
"R = 1.5*Rm;// [mole reflux/mole distillate]\n",
"// From Eqn. 9.49:\n",
"L = R*D;// [kmol/h]\n",
"// From Eqn. 9.115:\n",
"G = D*(R+1);// [kmol/h]\n",
"// From Eqn. 9.126:\n",
"L_bar = (q*F)+L;// [kmol/h]\n",
"// From Eqn. 9.127:\n",
"G_bar = (F*(q-1))+G;// [kmol/h]\n",
"ordinateN = xD/(R+1);\n",
"// As in Fig. 9.43:\n",
"// The y-intercept = ordinateN and enriching and exhausting operating lines are plotted.\n",
"// Number of theoretical stages are determined.\n",
"NpN = 8.8;// [including the reboiler]\n",
"printf('Number of theoretical stages is %f\n',NpN-1);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.11: Suitable_Reflux_Ratio.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.11\n",
"// Page: 423\n",
"\n",
"printf('Illustration 9.11 - Page: 423\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// a:ethanol b:water\n",
"zF = 0.3;\n",
"xa = 0.3;// [mole fraction of ethanol]\n",
"Temp = 78.2;// [OC]\n",
"Ao = 0.0462;// [Area of perforations,square m]\n",
"t = 0.450;// [m]\n",
"//******//\n",
"\n",
"Ma = 46.05;// [kg/kmol]\n",
"Mb = 18.02;// [kg/kmol]\n",
"xb = 1-xa;// [mole fraction of water]\n",
"ma = 0.3*Ma/((0.3*Ma)+(xb*Mb));// [mass fraction of ethanol]\n",
"mb = 1-ma;// [mass fraction of water]\n",
"\n",
"\n",
"// Feed:\n",
"F1 = 910;// [kg/h]\n",
"Xa = F1*ma/Ma;// [moles of ethanol]\n",
"Xb = F1*mb/Mb;// [moles of water]\n",
"F = Xa+Xb;// [Total moles]\n",
"// Distillate:\n",
"xD = 0.80;// [mole fraction of ethanol]\n",
"// If essentially all the ethanol is removed from the residue:\n",
"D = Xa/xD;// [kmol/h]\n",
"MavD = (xD*Ma)+((1-xD)*Mb);// [kg/kmol]\n",
"D1 = D*MavD;// [kg/h]\n",
"Density_G = (MavD/22.41)*(273/(273+Temp));// [kg/cubic meter]\n",
"Density_L = 744.9;// [kg/cubic meter]\n",
"sigma = 0.021;// [N/m]\n",
"\n",
"// From Table 6.2,Pg 169:\n",
"alpha = (0.0744*t)+0.01173;\n",
"beeta = (0.0304*t)+0.015;\n",
"At = %pi*(0.760^2)/4;// [Tower cross sectional Area, square m]\n",
"WByT = 530/760;// [Table 6.1, Pg 162]\n",
"Ad = 0.0808*At;// [Downspout area,square m]\n",
"Aa = At-(2*Ad);// [Active area,square m]\n",
"// abcissa = (L/G)*(density_G/Density_L)^0.5\n",
"// Assume:\n",
"abcissa = 0.1;\n",
"// From Eqn.6.30:\n",
"Cf = (alpha*log10(1/abcissa)+beeta)*(sigma/0.020)^0.2;\n",
"// From Eqn. 6.29:\n",
"Vf = Cf*((Density_L-Density_G)/Density_G)^(1/2);// [m/s]\n",
"An = At-Ad;// [square m]\n",
"R = 3;// [Reflux Ratio]\n",
"G = D*(R+1);\n",
"G1 = (G*22.41/3600)*((273+Temp)/273);// [cubic meter/s]\n",
"V = G1/An;// [Vapour velocity,m/s]\n",
"percent = (V/Vf)*100;\n",
"// Vapour velocity is 58 percent of flooding velocity (amply safe)\n",
"L = R*D;// [kmol/h]\n",
"L1 = L*MavD;// [kg/h]\n",
"abcissa = (L1/(G1*3600*Density_G))*(Density_G/Density_L)^0.5;\n",
"// Since the value of abcissa is less than0.1, the calculaed value of Cf is correct.\n",
"// Since the feed is at the buubble point.\n",
"q = 1;\n",
"// From Eqn. 9.126:\n",
"L_bar = L+(q*F);// [kmol/h]\n",
"// From Eqn. 9.127:\n",
"G_bar = G+F*(q-1);// [kmol/h]\n",
"// The enthalpy of saturated steam,referred to 0 OC,69 kN/square m:\n",
"HGNpPlus1 = 2699;// [kN m/kg]\n",
"// This will be the enthalpy as it enters the tower if expanded adiabatically to the tower pressure\n",
"// The enthalpy of steam at 1 std. atm:\n",
"HGsat = 2676;// [kN m/kg]\n",
"lambda = 2257;// [kN m/kg]\n",
"// From Eqn. 9.140:\n",
"deff('[y] = f63(GNpPlus1_bar)','y = G_bar-(GNpPlus1_bar*(1+((HGNpPlus1-HGsat)*Mb/(lambda*Mb))))');\n",
"GNpPlus1_bar = fsolve(7,f63);\n",
"// From Eqn. 9.141:\n",
"LNp_bar = L_bar-(G_bar-GNpPlus1_bar);\n",
"\n",
"// Tray Efficiencies:\n",
"// Consider the situation:\n",
"x = 0.5;\n",
"y_star = 0.962;\n",
"Temp = 79.8;// [OC]\n",
"// This is in the enriching section.\n",
"Density_L = 791;// [kg/cubic meter]\n",
"Density_G = 1.253;// [kg/cubic meter]\n",
"// From equilibrium data:\n",
"m = 0.42;\n",
"A = L/(m*G);\n",
"// From chapter 2:\n",
"ScG = 0.930;\n",
"Dl = 2.065*10^(-9);// [square m/s]\n",
"// For L = 38.73 kmol/h\n",
"q = 4.36*10^(-4);// [cubic meter/s]\n",
"// For G = 51.64 kmol/h\n",
"Va = 1.046;// [m/s]\n",
"// From tray dimensions:\n",
"z = 0.647;// [m]\n",
"Z = 0.542;// [m]\n",
"hW = 0.06;// [m]\n",
"// From Eqn. 6.61:\n",
"NtG = (0.776+(4.57*hW)-(0.238*Va*Density_G^0.5)+(104.6*q/Z))/(ScG^0.5);\n",
"// From Eqn. 6.38\n",
"hL = 6.10*10^(-3)+(0.725*hW)-(0.238*hW*Va*(Density_G)^0.5)+(1.225*q/z);// [m]\n",
"// From Eqn. 6.64:\n",
"thetha_L = hL*z*Z/q;// [s]\n",
"// From Eqn. 6.62:\n",
"NtL = 40000*(Dl^0.5)*((0.213*Va*Density_G^0.5)+0.15)*thetha_L;\n",
"// From Eqn. 6.52:\n",
"NtoG = 1/((1/NtG)+(1/(A*NtL)));\n",
"// From Eqn. 6.51:\n",
"EoG = 1-exp(-NtoG);\n",
"// From Eqn. 6.63:\n",
"DE = ((3.93*10^(-3))+(0.0171*Va)+(3.67*q/Z)+(0.1800*hW))^2;\n",
"// From Eqn. 6.59:\n",
"Pe = Z^2/(DE*thetha_L);\n",
"// From Eqn. 6.58:\n",
"eta = (Pe/2)*((1+(4*m*G1*EoG/(L1*Pe)))^0.5-1);\n",
"// From Eqn. 6.57:\n",
"EMG = EoG*(((1-exp(-(eta+Pe)))/((eta+Pe)*(1+(eta+Pe)/eta)))+((exp(eta)-1)/(eta*(1+(eta/(eta+Pe))))));\n",
"// Entrainment is neglible:\n",
"// Similarly for other x\n",
"// Value = [x Entrainment]\n",
"Value = [0 0.48;0.1 .543;0.3 0.74;0.5 EMG;0.7 0.72];\n",
"\n",
"// Tray Calculation:\n",
"op_intercept = xD/(R+1);\n",
"// From Fig. 9.48:\n",
"// The exhausting section operating line, on this scale plot, for all practical purposes passes through the origin.\n",
"// The broken curve is located so that, at each concentration, vertical distances corresponding to lines BC and AC are in the ratio of EMG.\n",
"// This curve is used instead of equilibrium trays to locate the ideal trays.\n",
"// The feed tray is thirteenth.\n",
"x14 = 0.0150;\n",
"alpha = 8.95;\n",
"EMG = 0.48;\n",
"A_bar = L_bar/(alpha*G_bar);\n",
"// From Eqn. 8.16:\n",
"Eo = log(1+(EMG*((1/A_bar)-1)))/log(1/A_bar);\n",
"// The 6 real trays corresponds to: \n",
"NRp = 6*Eo;\n",
"xW = 0.015/((exp(NRp*log(1/A_bar))-A_bar)/(1-A_bar));// [mole fraction ethanol]\n",
"// This corresponds to ethanol loss of 0.5 kg/day.\n",
"printf('The Reflux ratio of %d will cause the ethanol loss of 0.5 kg/day\n',R);\n",
"printf('Larger reflux ratios would reduce this, but the cost of additional steam will probaby make them not worthwile.\n');\n",
"printf('Smaller values of R, with corresponding reduced steam cost and larger ethanol loss, should be considered, but care must be taken to ensure vapour velocities above the weeping velocities.');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.12: Dimension_of_Packed_Section.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.12\n",
"// Page: 429\n",
"\n",
"printf('Illustration 9.12 - Page: 429\n\n');\n",
"\n",
"// solution\n",
"\n",
"// a:methanol b:water\n",
"// Vapour and liquid quantities throughout the tower, as in Illustration 9.8, with the Eqn. 9.62, 9.64, 9.72, 9.74:\n",
"// Data = [x tL(OC) y tG(OC) Vapor(kmol/h) Vapor(kg/h) Liquid(kmol/h) Liquid(kg/h)]\n",
"Ma = 34.02;// [kg/kmol]\n",
"Mb = 18.02;// [kg/kmol]\n",
"Temp = 78.7;// [OC]\n",
"x = [0.915 0.600 0.370 0.370 0.200 0.100 0.02];\n",
"y = [0.915 0.762 0.656 0.656 0.360 0.178 0.032];\n",
"scf(17);\n",
"plot(x,y);\n",
"xgrid();\n",
"xlabel('mole fraction of methanol in liquid');\n",
"ylabel('mole fraction of methanol in vapour');\n",
"title('Operating Line curve');\n",
"//x = 0.370: the dividing point between stripping and enriching section\n",
"tL = [66 71 76 76 82 87 96.3];// [Bubble point, OC]\n",
"tG = [68.2 74.3 78.7 78.7 89.7 94.7 99.3];// [Dew Point, OC]\n",
"Vapor = [171.3 164.0 160.9 168.6 161.6 160.6 127.6];// [kmol/h]\n",
"Vapor1 = [5303 4684 4378 4585 3721 3296 2360];// [kg/h]\n",
"Liquid = [86.7 79.6 76.5 301 294 293 260];// [kmol/h]\n",
"Liquid1 = [2723 2104 1779 7000 6138 5690 4767];// [kg/h]\n",
"Data = zeros(7,8);\n",
"for j = 1:7\n",
" Data(j,1) = x(j);\n",
" Data(j,2) = tL(j);\n",
" Data(j,3) = y(j);\n",
" Data(j,4) = tG(j);\n",
" Data(j,5) = Vapor(j); \n",
" Data(j,6) = Vapor1(j);\n",
" Data(j,7) = Liquid(j);\n",
" Data(j,8) = Liquid1(j);\n",
"end\n",
"// The tower diameter will be set by the conditions at the top of the stripping section because of the large liquid flow at this point.\n",
"// From Illustration 9.8:\n",
"G = Data(4,6);\n",
"L = Data(4,8);\n",
"Density_G = (Data(4,6)/(22.41*Data(4,5)))*(273/(273+Temp));// [kg/cubic m]\n",
"Density_L = 905;// [kg/cubic m]\n",
"// abcissa = (L/G)*(Density_L/Density_G)^0.5\n",
"abcissa = (Data(4,8)/Data(4,6))*(Density_G/Density_L)^0.5;\n",
"// From Fig. 6.34, choose a gas pressure drop of 450 N/square m/m\n",
"ordinate = 0.0825;\n",
"// From Table 6.3 (Pg 196):\n",
"Cf = 95;\n",
"viscosity_L = 4.5*10^(-4);// [kg/m.s]\n",
"sigma = 0.029;// [N/m]\n",
"J = 1;\n",
"G_prime = (ordinate*Density_G*(Density_L-Density_G)/(Cf*viscosity_L^0.1))^0.5;// [kg/square m.s]\n",
"A = G/(3600*G_prime);// [Tower ,cross section area,square m]\n",
"L_prime = L/(A*3600);// [kg/square m.s]\n",
"// Mass transfer will be computed for the same location:\n",
"// From Table 6.4 (Pg 205):\n",
"m = 36.4;\n",
"n = (0.0498*L_prime)-0.1013;\n",
"p = 0.274;\n",
"aAW = m*((808*G_prime/Density_G^0.5)^n)*L_prime^p;// [square m/cubic m]\n",
"// From Table 6.5 (Pg 206):\n",
"dS = 0.0530;// [m]\n",
"beeta = 1.508*dS^0.376;\n",
"shi_LsW = 2.47*10^(-4)/dS^1.21;\n",
"shi_LtW = ((2.09*10^(-6))*(737.5*L_prime)^beeta)/dS^2;\n",
"shi_LOW = shi_LtW-shi_LsW; \n",
"shi_Ls = (0.0486*viscosity_L^0.02*sigma^0.99)/(dS^1.21*Density_L^0.37);\n",
"H = ((975.7*L_prime^0.57*viscosity_L^0.13)/(Density_L^0.84*((2.024*L_prime^0.430)-1)))*(sigma/0.073)^(0.1737-0.262*log10(L_prime));// [m]\n",
"shi_Lo = shi_LOW*H;\n",
"shi_Lt = shi_Lo+shi_Ls;\n",
"// From Eqn. 6.73:\n",
"aA = aAW*(shi_Lo/shi_LOW);// [square m/cubic m]\n",
"// From Table 6.3 (Pg 196):\n",
"e = 0.71;\n",
"// From Eqn. 6.71:\n",
"eLo = e-shi_Lt;\n",
"// From Chapter 2:\n",
"ScG = 1;\n",
"MavG = 0.656*Ma+(1-0.656)*Mb;// [kg/kmol]\n",
"G = G_prime/MavG;\n",
"viscosity_G = 2.96*10^(-5);// [kg/m.s]\n",
"// From Eqn. 6.70:\n",
"Fg = (1.195*G/ScG^(2/3))*((dS*G_prime/(viscosity_G*(1-eLo)))^(-0.36));// [kmol/square m s (mole fraction)]\n",
"kY_prime = Fg;// [kmol/square m s (mole fraction)]\n",
"DL = 4.80*10^(-9);// [square m/s]\n",
"ScL = viscosity_L/(Density_L*DL);\n",
"// From Eqn. 6.72:\n",
"kL = (25.1*DL/dS)*((dS*L_prime/viscosity_L)^0.45)*ScL^0.5;// [kmol/square m s (kmol/cubic m)]\n",
"// At 588.33 OC\n",
"Density_W = 53.82;// [kg/cubic m]\n",
"kx_prime = Density_W*kL;// [kmol/square m s (mole fraction)]\n",
"// Value1 = [x G a ky_prime*10^3 kx_prime]\n",
"Value1 = [0.915 0.0474 20.18 1.525 0.01055;0.6 0.0454 21.56 1.542 0.00865;0.370 0.0444 21.92 1.545 0.00776;0.370 0.0466 38 1.640 0.0143;0.2 0.0447 32.82 1.692 0.0149;0.1 0.0443 31.99 1.766 0.0146;0.02 0.0352 22.25 1.586 0.0150];\n",
"// From Fig: 9.50\n",
"// At x = 0.2:\n",
"y = 0.36;\n",
"slope = -(Value1(5,5)/(Value1(5,4)*10^(-3)));\n",
"// The operating line drawn from(x,y) with slope. The point where it cuts the eqb. line gives yi.\n",
"// K = ky_prime*a(yi-y)\n",
"// For the enriching section:\n",
"// En = [y yi 1/K Gy]\n",
"En = [0.915 0.960 634 0.0433;0.85 0.906 532.8 0.0394;0.8 0.862 481.1 0.0366;0.70 0.760 499.1 0.0314;0.656 0.702 786.9 0.0292];\n",
"// For the Stripping section:\n",
"// St = [y yi 1/K Gy]\n",
"St = [0.656 0.707 314.7 0.0306;0.50 0.639 124.6 0.0225;0.40 0.580 99.6 0.01787;0.3 0.5 89 0.0134;0.2 0.390 92.6 0.00888;0.10 0.232 154.5 0.00416;0.032 0.091 481 0.00124];\n",
"// Graphical Integration, according to Eqn.9.52::\n",
"scf(18);\n",
"plot(En(:,4),En(:,3));\n",
"xgrid();\n",
"xlabel('Gy');\n",
"ylabel('1 / (ky_prime*a*(yi-y))');\n",
"title('Graphical Integration for Enriching section');\n",
"// From Area under the curve:\n",
"Ze = 7.53;// [m]\n",
"// Graphical Integration:\n",
"scf(19);\n",
"plot(St(:,4),St(:,3));\n",
"xgrid();\n",
"xlabel('Gy');\n",
"ylabel('1 / (ky_prime*a*(yi-y))');\n",
"title('Graphical Integration for Stripping section');\n",
"// From Area under the curve:\n",
"Zs = 4.54;// [m]\n",
"// Since the equlibrium curve slope varies so greatly that the use of overall mass transfer coeffecient is not recommended:\n",
"printf('Height of Tower for enriching Section is %f m\n',Ze);\n",
"printf('Height of Tower for Stripping Section is %f m\n',Zs);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.13: Multicomponent_Systems.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.13:\n",
"\n",
"printf('Illustration 9.13\n\n');\n",
"\n",
"//**************************Calculation Of Minimum Reflux ratio************************//\n",
"// Page: 436\n",
"printf('Page: 436\n\n');\n",
"\n",
"//***Data***//\n",
"// C1:CH4 C2:C2H6 C3:n-C3H8 C4:n-C4H10 C5:n-C5H12 C6:n-C6H14\n",
"// zF = [zF(C1) zF(C2) zF(C3) zF(C4) zF(C5) zF(C6)]\n",
"zF = [0.03 0.07 0.15 0.33 0.30 0.12];// [mole fraction]\n",
"LF_By_F = 0.667;\n",
"Temp = 82;// [OC]\n",
"ylk = 0.98;\n",
"yhk = 0.01;\n",
"//**********//\n",
"\n",
"// Data = [m HG HL(30 OC);m HG HL(60 OC);m HG HL(90 OC);m HG HL(120 OC);]\n",
"Data1 = [16.1 12790 9770;19.3 13910 11160;21.8 15000 12790;24.0 16240 14370];// [For C1]\n",
"Data2 = [3.45 22440 16280;4.90 24300 18140;6.25 26240 19890;8.15 28140 21630];// [For C2]\n",
"Data3 = [1.10 31170 16510;2.00 33000 20590;2.90 35800 25600;4.00 39000 30900];// [For C3]\n",
"Data4 = [0.35 41200 20350;0.70 43850 25120;1.16 46500 30000;1.78 50400 35400];// [For C4]\n",
"Data5 = [0.085 50500 24200;0.26 54000 32450;0.50 57800 35600;0.84 61200 41400];// [For C5]\n",
"Data6 = [0.0300 58800 27700;0.130 63500 34200;0.239 68150 40900;0.448 72700 48150];// [For C6]\n",
"\n",
"// T = [Temparature]\n",
"T = [30;60;90;120];\n",
"\n",
"// Flash vaporisation of the Feed:\n",
"// Basis: 1 kmol feed throughout\n",
"// After Several trials, assume:\n",
"F = 1;// [kmol]\n",
"GF_By_F = 0.333;\n",
"LF_By_GF = LF_By_F/GF_By_F;\n",
"m82 = zeros(6);\n",
"y = zeros(6);\n",
"m82(1) = interpln([T';Data1(:,1)'],Temp);// [For C1]\n",
"m82(2) = interpln([T';Data2(:,1)'],Temp);// [For C2]\n",
"m82(3) = interpln([T';Data3(:,1)'],Temp);// [For C3]\n",
"m82(4) = interpln([T';Data4(:,1)'],Temp);// [For C4]\n",
"m82(5) = interpln([T';Data5(:,1)'],Temp);// [For C5]\n",
"m82(6) = interpln([T';Data6(:,1)'],Temp);// [For C6]\n",
"for i = 1:6\n",
" y(i) = zF(i)*(LF_By_GF+1)/(1+(2/m82(i)));\n",
"end\n",
"Sum = sum(y);\n",
"// Since Sum is sufficiently close to 1.0, therefore:\n",
"q = 0.67;// [LF_By_F]\n",
"// Assume:\n",
"// C3: light key\n",
"// C5: heavy key\n",
"zlkF = zF(3);// [mole fraction]\n",
"zhkF = zF(5);// [mole fraction]\n",
"ylkD = ylk*zF(3);// [kmol]\n",
"yhkD = yhk*zF(5);// [kmol]\n",
"\n",
"// Estimate average Temp to be 80 OC\n",
"m80 = zeros(6);\n",
"alpha80 = zeros(6);\n",
"m80(1) = interpln([T';Data1(:,1)'],80);// [For C1]\n",
"m80(2) = interpln([T';Data2(:,1)'],80);// [For C2]\n",
"m80(3) = interpln([T';Data3(:,1)'],80);// [For C3]\n",
"m80(4) = interpln([T';Data4(:,1)'],80);// [For C4]\n",
"m80(5) = interpln([T';Data5(:,1)'],80);// [For C5]\n",
"m80(6) = interpln([T';Data6(:,1)'],80);// [For C6]\n",
"for i = 1:6\n",
" alpha80(i) = m80(i)/m80(5);\n",
"end\n",
"// By Eqn. 9.164:\n",
"yD_By_zF1 = (((alpha80(1)-1)/(alpha80(3)-1))*(ylkD/zF(3)))+(((alpha80(3)-alpha80(1))/(alpha80(3)-1))*(yhkD/zF(5)));// [For C1]\n",
"yD_By_zF2 = (((alpha80(2)-1)/(alpha80(3)-1))*(ylkD/zF(3)))+(((alpha80(3)-alpha80(2))/(alpha80(3)-1))*(yhkD/zF(5)));// [For C2]\n",
"yD_By_zF6 = (((alpha80(6)-1)/(alpha80(3)-1))*(ylkD/zF(3)))+(((alpha80(3)-alpha80(6))/(alpha80(3)-1))*(yhkD/zF(5)));// [For C6]\n",
"// The distillate contains:\n",
"yC1 = 0.03;// [kmol C1]\n",
"yC2 = 0.07;// [kmol C2]\n",
"yC6 = 0;// [kmol C6]\n",
"// By Eqn 9.165:\n",
"deff('[y] = g1(phi)','y = (((alpha80(1)*zF(1))/(alpha80(1)-phi))+((alpha80(2)*zF(2))/(alpha80(2)-phi))+((alpha80(3)*zF(3))/(alpha80(3)-phi))+((alpha80(4)*zF(4))/(alpha80(4)-phi))+((alpha80(5)*zF(5))/(alpha80(5)-phi))+((alpha80(6)*zF(6))/(alpha80(6)-phi)))-(F*(1-q))');\n",
"// Between alphaC3 & alphaC4:\n",
"phi1 = fsolve(3,g1);\n",
"// Between alphaC4 & alphaC5:\n",
"phi2 = fsolve(1.5,g1);\n",
"// From Eqn. 9.166:\n",
"// Val = D*(Rm+1)\n",
"// (alpha80(1)*yC1/(alpha80(1)-phi1))+(alpha80(2)*yC2/(alpha80(2)-phi1))+(alpha80(3)*ylkD/(alpha80(3)-phi1))+(alpha80(4)*yD/(alpha80(4)-phi1))+(alpha80(i)*yhkD/(alpha80(5)-phi1))+(alpha80(6)*yC6/(alpha80(6)-phi1)) = Val.....................(1)\n",
"// (alpha80(1)*yC1/(alpha80(1)-phi2))+(alpha80(2)*yC2/(alpha80(2)-phi2))+(alpha80(3)*ylkD/(alpha80(3)-phi2))+(alpha80(4)*yD/(alpha80(4)-phi2))+(alpha80(i)*yhkD/(alpha80(5)-phi2))+(alpha80(6)*yC6/(alpha80(6)-phi2)) = Val ....................(2)\n",
"// Solving simultaneously:\n",
"a = [-alpha80(4)/(alpha80(4)-phi1) 1;-alpha80(4)/(alpha80(4)-phi2) 1];\n",
"b = [(alpha80(1)*yC1/(alpha80(1)-phi1))+(alpha80(2)*yC2/(alpha80(2)-phi1))+(alpha80(3)*ylkD/(alpha80(3)-phi1))+(alpha80(i)*yhkD/(alpha80(5)-phi1))+(alpha80(6)*yC6/(alpha80(6)-phi1));(alpha80(1)*yC1/(alpha80(1)-phi2))+(alpha80(2)*yC2/(alpha80(2)-phi2))+(alpha80(3)*ylkD/(alpha80(3)-phi2))+(alpha80(i)*yhkD/(alpha80(5)-phi2))+(alpha80(6)*yC6/(alpha80(6)-phi2))];\n",
"soln = a\b;\n",
"yC4 = soln(1);// [kmol C4 in the distillate]\n",
"Val = soln(2);\n",
"// For the distillate, at a dew point of 46 OC\n",
"ydD = [yC1 yC2 ylkD yC4 yhkD yC6];\n",
"D = sum(ydD);\n",
"yD = zeros(6);\n",
"m46 = zeros(6);\n",
"alpha46 = zeros(6);\n",
"m46(1) = interpln([T';Data1(:,1)'],46);// [For C1]\n",
"m46(2) = interpln([T';Data2(:,1)'],46);// [For C2]\n",
"m46(3) = interpln([T';Data3(:,1)'],46);// [For C3]\n",
"m46(4) = interpln([T';Data4(:,1)'],46);// [For C4]\n",
"m46(5) = interpln([T';Data5(:,1)'],46);// [For C5]\n",
"m46(6) = interpln([T';Data6(:,1)'],46);// [For C6]\n",
"for i = 1:6\n",
" alpha46(i) = m46(i)/m46(5);\n",
" yD(i) = ydD(i)/D;\n",
" // Ratio = yD/alpha46\n",
" Ratio1(i) = yD(i)/alpha46(i);\n",
"end\n",
"// mhk = mC5 at 46.6 OC, the assumed 46 OC is satisfactory.\n",
"\n",
"// For the residue, at a dew point of 46 OC\n",
"xwW = [zF(1)-yC1 zF(2)-yC2 zF(3)-ylkD zF(4)-yC4 zF(5)-yhkD zF(6)-yC6];\n",
"W = sum(xwW);\n",
"xW = zeros(6);\n",
"m113 = zeros(6);\n",
"alpha113 = zeros(6);\n",
"m113(1) = interpln([T';Data1(:,1)'],113);// [For C1]\n",
"m113(2) = interpln([T';Data2(:,1)'],113);// [For C2]\n",
"m113(3) = interpln([T';Data3(:,1)'],113);// [For C3]\n",
"m113(4) = interpln([T';Data4(:,1)'],113);// [For C4]\n",
"m113(5) = interpln([T';Data5(:,1)'],113);// [For C5]\n",
"m113(6) = interpln([T';Data6(:,1)'],113);// [For C6]\n",
"for i = 1:6\n",
" alpha113(i) = m113(i)/m113(5);\n",
" xW(i) = xwW(i)/W;\n",
" // Ratio = yD/alpha46\n",
" Value(i) = alpha113(i)*xW(i);\n",
"end\n",
"// mhk = mC5 at 114 OC, the assumed 113 OC is satisfactory.\n",
"Temp_Avg = (114+46.6)/2;// [OC]\n",
"// Temp_avg is very close to the assumed 80 OC\n",
"Rm = (Val/D)-1;\n",
"printf('Minimum Reflux Ratio is %f mol reflux/mol distillate\n \n',Rm);\n",
"printf('*****************Distillate Composition*********************\n');\n",
"printf('C1\t \t \t \t: %f\n',yD(1));\n",
"printf('C2\t \t \t \t: %f\n',yD(2));\n",
"printf('C3\t \t \t \t: %f\n',yD(3));\n",
"printf('C4\t \t \t \t: %f\n',yD(4));\n",
"printf('C5\t \t \t \t: %f\n',yD(5));\n",
"printf('C6\t \t \t \t: %f\n',yD(6));\n",
"printf('\n');\n",
"printf('*****************Residue Composition*********************\n');\n",
"printf('C1\t \t \t \t: %f\n',xW(1));\n",
"printf('C2\t \t \t \t: %f\n',xW(2));\n",
"printf('C3\t \t \t \t: %f\n',xW(3));\n",
"printf('C4\t \t \t \t: %f\n',xW(4));\n",
"printf('C5\t \t \t \t: %f\n',xW(5));\n",
"printf('C6\t \t \t \t: %f\n',xW(6));\n",
"printf('\n');\n",
"\n",
"//**********************Number of Theoretical stage***********************//\n",
"// Page:440\n",
"printf('Page: 440\n\n');\n",
"\n",
"for i = 1:6\n",
" alpha_av(i) = (alpha46(i)*alpha113(i))^0.5;\n",
"end\n",
"alphalk_av = alpha_av(3);\n",
"// By Eqn. 9.167:\n",
"xhkW = xwW(5);\n",
"xlkW = xwW(3);\n",
"Nm = log10((ylkD/yhkD)*(xhkW/xlkW))/log10(alphalk_av)-1;\n",
"// Ratio = yD/xW\n",
"for i = 1:6\n",
" Ratio2(i) = (alpha_av(i)^(Nm+1))*yhkD/xhkW;\n",
"end\n",
"// For C1:\n",
"// yC1D-Ratio(1)*xC1W = 0\n",
"// yC1D+xC1W = zF(1)\n",
"// Similarly for others\n",
"for i = 1:6\n",
" a = [1 -Ratio2(i);1 1];\n",
" b = [0;zF(i)];\n",
" soln = a\b;\n",
" yD2(i) = soln(1);// [kmol]\n",
" xW2(i) = soln(2);// [kmol]\n",
"end\n",
"D = sum(yD2);// [kmol]\n",
"W = sum(xW2);// [kmol]\n",
"// The distillate dew point computes to 46.6 OC and the residue bubble point computes to 113 OC, which is significantly close to the assumed.\n",
"printf('Minimum number of theoretical stage is: %f\n',Nm);\n",
"printf('\n');\n",
"\n",
"//***************Product composition at R = 0.8***********************//\n",
"// Page:441\n",
"printf('Page: 441\n\n');\n",
"\n",
"// Since C1 and C2 do not enter in the residue nor C6 in the distillate, appreciably at total reflux or minimum reflux ratio, it will be assumed that they will not enter R = 0.8. C3 and C5 distribution are fixed by specifications. Only that C4 remains to be estimated.\n",
"// R = [Infinte 0.8 0.58] [Reflux ratios For C4]\n",
"R = [%inf 0.8 0.58];\n",
"// Val = R/(R+1)\n",
"Val = R./R+1;\n",
"// ydD = [Inf 0.58] \n",
"y4D = [0.1255 0.1306];\n",
"yC4D = (((1-Val(2))/(1-Val(3)))*(y4D(2)-y4D(1)))+y4D(1);// Linear Interpolation\n",
"// For Distillate:\n",
"Sum1 = sum(Ratio1);\n",
"x0 = Ratio1./Sum1;\n",
"printf('For the reflux ratio of 0.8\n');\n",
"printf('*****************Distillate Composition*********************\n');\n",
"printf('\t\t\t Liquid reflux in equilibrium with the distillate vapour\n');\n",
"for i = 1:6\n",
" printf('C%d\t \t \t \t: %f\n',i,x0(i));\n",
"end\n",
"// For boiler:\n",
"Sum2 = sum(Value);\n",
"yNpPlus1 = Value./Sum2;\n",
"printf('*****************Distillate Composition*********************\n');\n",
"printf('\t\t\t Reboiler vapour in equilibrium with the residue\n');\n",
"for i = 1:6\n",
" printf('C%d\t \t \t \t: %f\n',i,yNpPlus1(i));\n",
"end\n",
"printf('\n');\n",
"\n",
"//**********Number Of Theoretical Trays***************//\n",
"// Page: 443\n",
"printf('Page: 443\n\n');\n",
"\n",
"R = 0.8;// [reflux ratio]\n",
"// From Eqn. 9.175\n",
"intersection = (zlkF-(ylkD/D)*(1-q)/(R+1))/(zhkF-(yhkD/D)*(1-q)/(R+1));\n",
"// Enriching Section:\n",
"y1 = zeros(5);\n",
"L = R*D;// [kmol]\n",
"G = L+D;// [kmol]\n",
"// Assume: Temp1 = 57 OC\n",
"// alpha57 = [C1 C2 C3 C4 C5]\n",
"alpha57 = [79.1 19.6 7.50 2.66 1];\n",
"// From Eqn. 9.177, n = 0:\n",
"for i = 1:5\n",
" y1(i) = (L/G)*x0(i)+((D/G)*yD(i));\n",
" Val57(i) = y1(i)/alpha57(i);\n",
"end\n",
"x1 = Val57/sum(Val57);\n",
"mC5 = sum(Val57);\n",
"Temp1 = 58.4; // [OC]\n",
"// Liquid x1's is in equilibrium with y1's.\n",
"xlk_By_xhk1 = x1(3)/x1(5);\n",
"// Tray 1 is not the feed tray.\n",
"// Assume: Temp2 = 63 OC\n",
"// alpha63 = [C1 C2 C3 C4 C5]\n",
"alpha63 = [68.9 17.85 6.95 2.53 1.00];\n",
"// From Eqn. 9.177, n = 1:\n",
"for i = 1:5\n",
" y2(i) = (L/G)*x1(i)+((D/G)*yD(i));\n",
" Val63(i) = y1(i)/alpha63(i);\n",
"end\n",
"mC5 = sum(Val63);\n",
"x2 = Val63/sum(Val63);\n",
"xlk_By_xhk2 = x2(3)/x2(5);\n",
"// The tray calculation are continued downward in this manner.\n",
"// Results for trays 5 & 6 are:\n",
"// Temp 75.4 [OC]\n",
"// x5 = [C1 C2 C3 C4 C5]\n",
"x5 = [0.00240 0.0195 0.1125 0.4800 0.3859];\n",
"xlk_By_xhk5 = x5(3)/x5(5);\n",
"// Temp6 = 79.2 OC\n",
"// x6 = [C1 C2 C3 C4 C5]\n",
"x6 = [0.00204 0.0187 0.1045 0.4247 0.4500];\n",
"xlk_By_xhk6 = x6(3)/x6(5);\n",
"// From Eqn. 9.176:\n",
"// Tray 6 is the feed tray\n",
"Np1 = 6;\n",
"\n",
"// Exhausting section:\n",
"// Assume Temp = 110 OC\n",
"L_bar = L+(q*F);// [kmol]\n",
"G_bar = L_bar-W;// [kmol]\n",
"// alpha57 = [C3 C4 C5 C6]\n",
"alpha110 = [5 2.2 1 0.501];\n",
"// From Eqn. 9.178:\n",
"xNp = zeros(4);\n",
"k = 1;\n",
"for i = 3:6\n",
" xNp(k) = ((G_bar/L_bar)*yNpPlus1(i))+((W/L_bar)*xW(i));\n",
" Val110(k) = alpha110(k)*xNp(k);\n",
" k = k+1;\n",
"end\n",
"yNp = Val110/sum(Val110);\n",
"mC5 = 1/sum(Val110);\n",
"// yNp is in Eqb. with xNp:\n",
"xlk_By_xhkNp = xNp(1)/xNp(4);\n",
"// Results for Np-7 to Np-9 trays:\n",
"// For Np-7\n",
"// Temp = 95.7 OC\n",
"// xNpMinus7 = [C3 C4 C5 C6]\n",
"xNpMinus7 = [0.0790 0.3944 0.3850 0.1366];\n",
"xlk_By_xhkNpMinus7 = xNpMinus7(1)/xNpMinus7(3);\n",
"// For Np-8\n",
"// Temp = 94.1 OC\n",
"// xNpMinus8 = [C3 C4 C5 C6]\n",
"xNpMinus8 = [0.0915 0.3897 0.3826 0.1362];\n",
"xlk_By_xhkNpMinus8 = xNpMinus8(1)/xNpMinus8(3);\n",
"// For Np-9\n",
"// Temp = 93.6 OC\n",
"// xNpMinus9 = [C3 C4 C5 C6]\n",
"xNpMinus9 = [0.1032 0.3812 0.3801 0.1355];\n",
"xlk_By_xhkNpMinus9 = xNpMinus9(1)/xNpMinus9(3);\n",
"// From Eqn. 9.176:\n",
"// Np-8 is the feed tray.\n",
"deff('[y] = g2(Np)','y = Np-8-Np1');\n",
"Np = fsolve(7,g2);\n",
"printf('Number of theoretical Trays required for R = 0.8: %d\n',Np);\n",
"printf('\n');\n",
"\n",
"//**************Composition Correction*****************//\n",
"// Page: 446\n",
"printf('Page: 446\n\n');\n",
"\n",
"// New Bubble Point:\n",
"// Temp = 86.4 OC\n",
"x6_new = x6*(1-xNpMinus8(4));\n",
"x6_new(6) = xNpMinus8(4);\n",
"// alpha86 = [C1 C2 C3 C4 C5 C6]\n",
"alpha86 = [46.5 13.5 5.87 2.39 1.00 0.467];\n",
"// From Eqn. 9.181:\n",
"xhkn = x5(5);\n",
"xhknPlus1 = x6_new(5);\n",
"xC65 = alpha86(6)*x6_new(6)*xhkn/xhknPlus1;\n",
"x5_new = x5*(1-xC65);\n",
"x5_new(6) = 1-sum(x5_new);\n",
"// Tray 5 has a bubble point of 80 OC\n",
"// Similarly , the calculations are continued upward:\n",
"// x2_new = [C1 C2 C3 C4 C5 C6]\n",
"x2_new = [0.0021 0.0214 0.1418 0.6786 0.1553 0.00262];\n",
"// y2_new = [C1 C2 C3 C4 C5 C6]\n",
"y2_new = [0.0444 0.111 0.2885 0.5099 0.0458 0.00034];\n",
"// x1_new = [C1 C2 C3 C4 C5 C6]\n",
"x1_new = [0.00226 0.0241 0.1697 0.7100 0.0932 0.00079];\n",
"// y1_new = [C1 C2 C3 C4 C5 C6]\n",
"y1_new = [0.0451 0.1209 0.3259 0.4840 0.0239 0.000090];\n",
"// x0_new = [C1 C2 C3 C4 C5 C6]\n",
"x0_new = [0.00425 0.0425 0.2495 0.6611 0.0425 0.00015];\n",
"// yD_new = [C1 C2 C3 C4 C5 C6]\n",
"yD_new = [0.0789 0.1842 0.3870 0.3420 0.0079 0.00001];\n",
"// From Eqn. 9.184:\n",
"// For C1 & C2\n",
"alphalkm = alpha86(3);\n",
"xlkmPlus1 = xNpMinus7(1);\n",
"xlkm = x6_new(3);\n",
"xC17 = x6_new(1)*alpha86(3)*xlkmPlus1/(alpha86(1)*xlkm);\n",
"xC27 = x6_new(2)*alpha86(3)*xlkmPlus1/(alpha86(2)*xlkm);\n",
"// Since xC17 = 1-xC27\n",
"// The adjusted value above constitute x7's.\n",
"// The new bubbl point is 94 OC\n",
"// The calculations are continued down in the same fashion.\n",
"// The new tray 6 has:\n",
"// xC1 = 0.000023 & xC2 = 0.00236\n",
"// It is clear that the conc. of these components are reducing so rapidly that there is no need to go an further.\n",
"printf('******Corrected Composition***********\n');\n",
"printf('Component\t \tx2\t \t \t y2\t \t \t x1\t \t \t y1\t \t \tx0\t \t \tyD\n');\n",
"for i = 1:6\n",
" printf('C%d\t \t \t%f\t \t %f\t \t %f\t \t %f\t \t%f\t \t%f\n',i,x2_new(i),y2_new(i),x1_new(i),y1_new(i),x0_new(i),yD_new(i));\n",
"end\n",
"printf('\n');\n",
"\n",
"//*************Heat Load of Condensor & Boiler & L/G ratio**********//\n",
"// Page 448\n",
"printf('Page: 448\n\n');\n",
"\n",
"// Values of x0, yD & y1 are taken from the corrected concentration.\n",
"// HD46 = [C1 C2 C3 C4 C5 C6]\n",
"HD46 = [13490 23380 32100 42330 52570 61480];// [kJ/kmol]\n",
"for i = 1:6\n",
" yDHD(i) = yD_new(i)*HD46(i);\n",
"end\n",
"HD = sum(yDHD);// [kJ]\n",
"// HL46 = [C1 C2 C3 C4 C5 C6]\n",
"HL46 = [10470 17210 18610 22790 27100 31050];// [kJ/kmol]\n",
"for i = 1:6\n",
" xHL(i) = x0_new(i)*HL46(i);\n",
"end\n",
"HL0 = sum(xHL);// [kJ]\n",
"// HG58 = [C1 C2 C3 C4 C5 C6]\n",
"HG58 = [13960 24190 37260 43500 53900 63500];// [kJ/kmol]\n",
"for i = 1:6\n",
" yHG1(i) = y1_new(i)*HG58(i);\n",
"end\n",
"HG1 = sum(yHG1);// [kJ]\n",
"// From Eqn. 9.54:\n",
"Qc = D*((R+1)*HG1-(R*HL0)-HD);// [kJ/kmol feed]\n",
"// Similarly:\n",
"HW = 39220;// [kJ]\n",
"HF = 34260;// [kJ]\n",
"// From Eqn. 9.55:\n",
"Qb = (D*HD)+(W*HW)+Qc-(F*HF);// [kJ/kmol feed]\n",
"// For tray n = 1\n",
"G1 = D*(R+1);// [kmol]\n",
"// With x1 & y2 from corrected composition;\n",
"// HG66 = [C1 C2 C3 C4 C5 C6]\n",
"HG66 = [14070 24610 33800 44100 54780 64430];// [kJ/kmol feed]\n",
"for i = 1:6\n",
" yHG2(i) = y2_new(i)*HG66(i);\n",
"end\n",
"HG2 = sum(yHG2);// [kJ]\n",
"// HL58 = [C1 C2 C3 C4 C5 C6]\n",
"HL58 = [11610 17910 20470 24900 29500 33840];// [kJ/kmol feed]\n",
"for i = 1:6\n",
" xHL1(i) = x1_new(i)*HL58(i);\n",
"end\n",
"HL1 = sum(xHL1);// [kJ]\n",
"// From Eqn. 9.185:\n",
"G2 = (Qc+D*(HD-HL1))/(HG2-HL1);// [kmol]\n",
"L2 = G2-D;// [kmol]\n",
"L2_By_G2 = L2/G2;\n",
"// Similarly, the calculations are made for other trays in enriching section.\n",
"// For tray, Np = 14:\n",
"// C1 & C2 are absent.\n",
"// HG113 = [C3 C4 C5 C6]\n",
"HG113 = [38260 49310 60240 71640];// [kJ/kmol feed]\n",
"k = 3;\n",
"for i = 1:4\n",
" yHG15(i) = yNpPlus1(k)*HG113(i);\n",
" k = k+1;\n",
"end\n",
"HG15 = sum(yHG15);\n",
"// HL107 = [C3 C4 C5 C6]\n",
"HL107 = [29310 31870 37680 43500];// [kJ/kmol feed]\n",
"for i = 1:4\n",
" xHL14(i) = xNp(i)*HL107(i);\n",
"end\n",
"HL14 = sum(xHL14);// [kJ]\n",
"// Similarly:\n",
"HL13 = 36790;// [kJ]\n",
"HG14 = 52610;// [kJ]\n",
"// From Eqn. 9.186:\n",
"G15_bar = (Qb+(W*(HL14-HW)))/(HG15-HL14);// [kmol]\n",
"L14_bar = W+G15_bar;// [kmol]\n",
"G14_bar = (Qb+(W*(HL13-HW)))/(HG14-HL13);// [kmol]\n",
"L14_By_G14 = L14_bar/G14_bar;\n",
"printf('Condensor eat Load %f kJ:\n',HL0);\n",
"printf('Reboiler eat Load %f kJ:\n',HG15);\n",
"// For other Exhausting Section Trays:\n",
"// Result = [Tray No. L_By_G Temp(OC)]\n",
"// Tray 0: Condensor\n",
"// Tray 15: Reboiler\n",
"Result = [0,0.80 46.6;1 0.432 58.4;2 0.437 66;3 0.369 70.4;4 0.305 74;5 0.310 80.3;6 1.53 86.4;7 4.05 94.1;8 3.25 96.3;9 2.88 97.7;10 2.58 99;11 2.48 100;12 2.47 102.9;13 2.42 104.6;14 2.18 107.9;15 1.73 113.5];\n",
"printf('**************L/G*************\n')\n",
"printf('Tray No. \t\t L/G\t\t\t\t Temp(OC)\n');\n",
"for i = 1:16\n",
" printf('%d\t \t \t%f\t \t \t%2.2f\n',Result(i,1),Result(i,2),Result(i,3));\n",
"end\n",
"// These values are not final.\n",
"// They scatter eratically because they are based on the temp. and conc. computed with the assumption of constant L/G\n",
"printf('\n');\n",
"\n",
"//**************Thiele Geddes Method******************//\n",
"// Page:452\n",
"printf('Page: 452\n\n');\n",
"\n",
"// Use the tray Temperature to obtain m.\n",
"// For C4:\n",
"// m = [0(Condensor) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15(Reboiler)]\n",
"m = [0.50 0.66 0.75 0.81 0.86 0.95 1.07 1.22 1.27 1.29 1.30 1.32 1.40 1.45 1.51 1.65];\n",
"for i = 1:7\n",
" A(i) = Result(i,2)/m(i);\n",
"end\n",
"for j = 1:9\n",
" i = i+1;\n",
" S(j) = 1/(Result(i,2)/m(i));\n",
"end\n",
"// f = Tray No. 6\n",
"f = 7;\n",
"// From Eqn. 9.196:\n",
"// Value1 = Gf*yf/(D*zD)\n",
"Sum = 0;\n",
"for i = 1:f-1\n",
" Val = 1;\n",
" for j = i:f-1\n",
" Val = Val*A(j);\n",
" end\n",
" Sum = Sum+Val;\n",
"end\n",
"Value1 = 1+Sum;\n",
"// From Eqn. 9.206:\n",
"// Value2 = Lf_bar*xf/(W*xW);\n",
"Sum = 0;\n",
"for i = 9:-1:1\n",
" Val = 1;\n",
" for j = i:-1:1\n",
" Val = Val*S(j);\n",
" end\n",
" Sum = Sum+Val;\n",
"end\n",
"Value2 = 1+Sum;\n",
"// From Eqn. 9.208:\n",
"// Value3 = W*xW/(D*zD)\n",
"Value3 = A(f)*Value1/Value2;\n",
"// From Eqn. 9.210:\n",
"DyD = F*zF(4)/(Value3+1);// [kmol,C4]\n",
"// From Eqn. 9.209:\n",
"WxW = (F*zF(4))-(DyD);// [kmol, C4]\n",
"// Similarly:\n",
"// For [C1; C2; C3; C4; C5; C6]\n",
"// Result2 = [Value1 Value2 Value3 DyD WxW]\n",
"Result2 = [1.0150 254*10^6 288*10^(-10) 0.03 0;1.0567 8750 298*10^(-5) 0.07 0;1.440 17.241 0.0376 0.1447 0.0053;1.5778 1.5306 1.475 0.1335 0.1965;15580 1.1595 45.7 0.00643 0.29357;1080 1.0687 7230 0.0000166 0.1198];\n",
"D = sum(Result2(:,4));// [kmol]\n",
"W = sum(Result2(:,5));// [kmol]\n",
"// In the Distillate:\n",
"DyD_C3 = Result2(3,4);// [kmol]\n",
"zFC3 = zF(3);// [kmol]\n",
"percentC3 = (DyD_C3/zFC3)*100;\n",
"DyD_C5 = Result2(5,4);// [kmol]\n",
"zFC5 = zF(5);// [kmol]\n",
"percentC5 = (DyD_C5/zFC5)*100;\n",
"// These do not quite meet the original speification.\n",
"// For Tray 2 & C4\n",
"// From Eqn. 9.195:\n",
"// Value4 = G2*y2/(D*zD)\n",
"n = 2;\n",
"Sum = 0;\n",
"for i = 1:n\n",
" Val = 1;\n",
" for j = i:n\n",
" Val = Val*A(j);\n",
" end\n",
" Sum = Sum+Val;\n",
"end\n",
"Value4 = 1+Sum;\n",
"// From The enthalpy Balnce:\n",
"G2 = 0.675;\n",
"// From Eqn. 9.211:\n",
"y2 = Value4*DyD/G2;\n",
"// Similarly:\n",
"// Value4 = [C1 C2 C3 C4 C5 C6]\n",
"Value4 = [1.0235 1.1062 1.351 2.705 10.18 46.9];\n",
"for i = 1:6\n",
" y2(i) = Result2(i,4)*Value4(i)/G2;\n",
"end\n",
"Y2 = sum(y2);\n",
"// Since Y2 is not equal to 1. THerefore the original temperature is incorrect. By adjusting y2 to unity.\n",
"// The dew point is 77 OC instead of 66 OC\n",
"// y2_adjusted = [C1 C2 C3 C4 C5 C6]\n",
"y2_adjusted = [0.0419 0.1059 0.2675 0.4939 0.0896 0.00106];\n",
"printf('*****************Composition By Thiele Geddes Method*****************\n');\n",
"printf('Component\t \t \t y2\n')\n",
"for i = 1:6\n",
" printf('C%d\t \t \t \t%f\n',i,y2_adjusted(i));\n",
"end"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.1: Raoults_law.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.1\n",
"// Page: 349\n",
"\n",
"printf('Illustration 9.1 - Page: 349\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// a:n-heptane b:n-octane\n",
"Pt = 760; // [mm Hg]\n",
"//*****//\n",
"\n",
"Tempa = 98.4;// [boiling point of A,OC]\n",
"Tempb = 125.6;// [boiling point of B,OC]\n",
"x = zeros(6);\n",
"y_star = zeros(6);\n",
"alpha = zeros(6);\n",
"// Data = [Temp Pa (mm Hg) Pb(mm Hg)]\n",
"Data = [98.4 760 333;105 940 417;110 1050 484;115 1200 561;120 1350 650;125.6 1540 760];\n",
"for i = 1:6\n",
" x(i) = (Pt-Data(i,3))/(Data(i,2)-Data(i,3));// [mole fraction of heptane in liquid]\n",
" y_star(i) = (Data(i,2)/Pt)*x(i);\n",
" alpha(i) = Data(i,2)/Data(i,3);\n",
"end\n",
"printf('T(OC)\t\t\t Pa(mm Hg)\t\t\t Pb(mm Hg)\t\t\t x\t\t\t\t y*\t\t\t alpha\n');\n",
"for i = 1:6\n",
" printf('%f\t \t %d\t \t \t \t %d\t \t \t \t %f\t \t \t %3f\t \t %f\t \t\n',Data(i,1),Data(i,2),Data(i,3),x(i),y_star(i),alpha(i));\n",
"end"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.2: Azeotropes.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.2\n",
"// Page: 354\n",
"\n",
"printf('Illustration 9.2 - Page: 354\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// a:water b:ethylaniline\n",
"Pt = 760; // [mm Hg]\n",
"ma1 = 50;// [g]\n",
"mb1 = 50;// [g]\n",
"//*******//\n",
"\n",
"// Data = [Temp Pa(mm Hg) Pb(mm Hg)]\n",
"Data = [38.5 51.1 1;64.4 199.7 5;80.6 363.9 10;96.0 657.6 20;99.15 737.2 22.8;113.2 1225 40];\n",
"Ma = 18.02;// [kg/kmol]\n",
"Mb = 121.1;// [kg/kmol]\n",
"\n",
"for i = 1:6\n",
" p = Data(i,2)+Data(i,3);\n",
" if p = = Pt\n",
" pa = Data(5,2);// [mm Hg]\n",
" pb = Data(i,3);// [mm Hg]\n",
" T = Data(i,1);// [OC]\n",
" end\n",
"end\n",
"ya_star = pa/Pt;\n",
"yb_star = pb/Pt;\n",
"ya1 = ma1/Ma;// [g mol water]\n",
"yb1 = mb1/Mb;// [g mol ethylalinine]\n",
"Y = ya1*(yb_star/ya_star);// [g mol ethylalinine]\n",
"printf('The original mixture contained %f g mol water and %f g mol ethylalinine\n',ya1,yb1);\n",
"printf('The mixture will continue to boil at %f OC, where the equilibrium vapour of the indicated composition,until all the water evaporated together with %f g mol ethylalinine\n',T,Y);\n",
"printf('The temparature will then rise to 204 OC, and the equilibrium vapour will be of pure ethylalinine');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.3: Multicomponent_Sysems.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.3\n",
"// Page: 362\n",
"\n",
"printf('Illustration 9.3 - Page: 362\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// a:n-C3H8 b:n-C4H10 c:n-C5H12 d:n-C6H14\n",
"// Bubble Point Calculation\n",
"xa = 0.05;\n",
"xb = 0.30;\n",
"xc = 0.40;\n",
"xd = 0.25;\n",
"P = 350;// [kN/square m]\n",
"//******//\n",
"\n",
"// Assume:\n",
"Temp = 60;// [OC]\n",
"x = [0.05 0.30 0.40 0.25];\n",
"m = [4.70 1.70 0.62 0.25];// [At 60 OC]\n",
"// Reference: C5H12\n",
"mref = m(3);\n",
"Sum = 0;\n",
"alpha = zeros(4)\n",
"alpha_x = zeros(4);\n",
"for i = 1:4\n",
" alpha(i) = m(i)/m(3);\n",
" alpha_x(i) = alpha(i)*x(i);\n",
" Sum = Sum+alpha_x(i);\n",
"end\n",
"// From Eqn. 9.23:\n",
"SumF = Sum;\n",
"Sum = 0;\n",
"mref = 1/SumF;\n",
"// Corresponding Temparature from the nomograph:\n",
"Temp = 56.8;// [OC]\n",
"m = [4.60 1.60 0.588 0.235];// [At 56.8 OC]\n",
"for i = 1:4\n",
" alpha(i) = m(i)/m(3);\n",
" alpha_x(i) = alpha(i)*x(i);\n",
" Sum = Sum+alpha_x(i);\n",
"end\n",
"SumF = Sum;\n",
"mref = 1/SumF;\n",
"// Corresponding Temparature from the nomograph:\n",
"Temp = 56.7;// [OC]\n",
"Bt = 56.8;// [OC]\n",
"yi = zeros(4);\n",
"for i = 1:4\n",
" yi(i) = alpha_x(i)/Sum;\n",
"end\n",
"printf('The Bubble Point is %f OC\n',Bt);\n",
"printf('Bubble point vapour composition \n');\n",
"printf('\t yi\n');\n",
"printf('n-C3\t %f\n',yi(1));\n",
"printf('n-C4\t %f\n',yi(2));\n",
"printf('n-C5\t %f\n',yi(3));\n",
"printf('n-C6\t %f\n',yi(4));\n",
"\n",
"printf('\n \n \n');\n",
"\n",
"// Dew Point Calculation\n",
"// Asume:\n",
"ya = 0.05;\n",
"yb = 0.30;\n",
"yc = 0.40;\n",
"yd = 0.25;\n",
"Temp = 80;// [OC]\n",
"y = [0.05 0.30 0.40 0.25];\n",
"m = [6.30 2.50 0.96 0.43];// [At 60 OC]\n",
"// Reference: C5H12\n",
"mref = m(3);\n",
"Sum = 0;\n",
"alpha = zeros(4)\n",
"alpha_y = zeros(4);\n",
"for i = 1:4\n",
" alpha(i) = m(i)/m(3);\n",
" alpha_y(i) = y(i)/alpha(i);\n",
" Sum = Sum+alpha_y(i);\n",
"end\n",
"\n",
"// From Eqn. 9.29:\n",
"SumF = Sum;\n",
"Sum = 0;\n",
"mref = SumF;\n",
"// Corresponding Temparature from the nomograph:\n",
"Temp = 83.7;// [OC]\n",
"m = [6.60 2.70 1.08 0.47];// [At 56.8 OC]\n",
"for i = 1:4\n",
" alpha(i) = m(i)/m(3);\n",
" alpha_y(i) = y(i)/alpha(i);\n",
" Sum = Sum+alpha_y(i);\n",
"end\n",
"SumF = Sum;\n",
"mref = 1/SumF;\n",
"// Corresponding Temparature from the nomograph:\n",
"Temp = 84;// [OC]\n",
"Dt = 84;// [OC]\n",
"xi = zeros(4);\n",
"for i = 1:4\n",
" xi(i) = alpha_y(i)/Sum;\n",
"end\n",
"printf('The Dew Point is %f OC\n',Dt);\n",
"printf('Dew point liquid composition \n');\n",
"printf('\t xi\n');\n",
"printf('n-C3\t %f\n',xi(1));\n",
"printf('n-C4\t %f\n',xi(2));\n",
"printf('n-C5\t %f\n',xi(3));\n",
"printf('n-C6\t %f\n',xi(4));"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.4: Partial_Condensation.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.4\n",
"// Page: 365\n",
"\n",
"printf('Illustration 9.4 - Page: 365\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// Basis:\n",
"F = 100;// [mol feed]\n",
"zF = 0.5;\n",
"D = 60;// [mol]\n",
"W = 40;// [mol]\n",
"//*******//\n",
"\n",
"// From Illustration 9.1, Equilibrium data:\n",
"Data = [1 1;0.655 0.810;0.487 0.674;0.312 0.492;0.1571 0.279;0 0];\n",
"Feed = [0 0;1 1];\n",
"// The operating line is drawn with a slope -(W/D) to cut the equilibrium line.\n",
"deff('[y] = f44(x)','y = -((W/D)*(x-zF))+zF');\n",
"x = 0.2:0.1:0.6;\n",
"scf(16);\n",
"plot(Data(:,1),Data(:,2),Feed(:,1),Feed(:,2),x,f44);\n",
"xgrid();\n",
"xlabel('Mole fraction of heptane in liquid');\n",
"ylabel('Mole fraction of heptane in vapour');\n",
"legend('Equilibrium Line','Feed Line','Operating Line');\n",
"// The point at which the operating line cuts the equilibrium line has the following composition* temparature:\n",
"yd = 0.575;// [mole fraction heptane in vapour phase]\n",
"xW = 0.387;// [mole fraction heptane in liquid phase]\n",
"Temp = 113;// [OC]\n",
"printf('mole fraction of heptane in vapour phase %f \n',yd);\n",
"printf('mole fraction of heptane in liquid phase %f\n',xW);\n",
"printf('Temparature is %d OC\n',Temp);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.5: Multicomponent_Systems_Ideal_Solution.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.5\n",
"// Page: 366\n",
"\n",
"printf('Illustration 9.5 - Page: 366\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"Pt = 760;// [mm Hg]\n",
"zFa = 0.5;// [mol fraction benzene]\n",
"zFb = 0.25;// [mol fraction toulene]\n",
"zFc = 0.25;// [mol fraction o-xylene]\n",
"//********//\n",
"\n",
"// Basis:\n",
"F = 100;// [mol feed]\n",
"// For Summtion of Yd_star to be unity, W/D = 2.08 \n",
"// The Eqn.are \n",
"// (1): W+D = F \n",
"// (2): W-2.08D = 0\n",
"a = [1 1;1 -2.08];\n",
"b = [F;0];\n",
"soln = a\b;\n",
"W = soln(1);\n",
"D = soln(2);\n",
"Sub = ['A','B','C'];\n",
"p = [1370 550 200];// [mm Hg]\n",
"m = zeros(3);\n",
"zF = [zFa zFb zFc];// [Given]\n",
"yd_star = zeros(3);\n",
"xW = zeros(3);\n",
"for i = 1:3\n",
" m(i) = p(i)/Pt;\n",
" yd_star(i) = zF(i)*((W/D)+1)/(1+(W/(D*m(i))));\n",
" xW(i) = yd_star(i)/m(i);\n",
"end\n",
"printf('\t \t \t \t \t \t \t \t At W/D = 2.08\n\n\n');\n",
"printf('Substance \t \t p(mm Hg)\t \t m\t \t \t \t zF\t \t \t \t yd*\t\t\t\txW\n');\n",
"for i = 1:3\n",
" printf('%c\t \t \t %d\t \t \t %f\t \t \t %f\t \t \t %f \t \t \t%f\n',Sub(i),p(i),m(i),zF(i),yd_star(i),xW(i));\n",
"end"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.6: Differential_Distillation.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.6\n",
"// Page: 370\n",
"\n",
"printf('Illustration 9.6 - Page: 370\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// Basis:\n",
"F = 100;// [mol]\n",
"xF = 0.5;\n",
"D = 0.6*100;// [mol]\n",
"//******//\n",
"\n",
"W = F-D;// [mol]\n",
"// From Illustration 9.1:\n",
"alpha = 2.16;// [average value of alpha]\n",
"// From Eqn.9.46;\n",
"deff('[y] = f45(xW)','y = log(F*xF/(W*xW))-(alpha*log(F*(1-xF)/(W*(1-xW))))');\n",
"xW = fsolve(0.5,f45);// [mole fraction heptane]\n",
"deff('[y] = f46(yD)','y = F*xF-((D*yD)+(W*xW))');\n",
"yD = fsolve(100,f46);// [mole fraction heptane]\n",
"printf('Mole Fraction of heptane in the distillate is %f \n',yD);\n",
"printf('Mole Fraction of heptane in the residue is %f \n',xW);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.7: Multicomponent_Systems_Ideal_Solution.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.7\n",
"// Page: 371\n",
"\n",
"printf('Illustration 9.7 - Page: 371\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"// a:benzene b:toulene c:o-xylene\n",
"// Assume:\n",
"Bt = 100;//[OC]\n",
"pa = 1370;// [mm Hg]\n",
"pb = 550;// [mm Hg]\n",
"pc = 200;// [mm Hg]\n",
"xFa = 0.5;// [mole fraction]\n",
"xFb = 0.25;// [mole fraction]\n",
"xFc = 0.25;// [mole fraction]\n",
"// Basis:\n",
"F = 100;// [mol]\n",
"D = 32.5;// [mol]\n",
"//*******//\n",
"\n",
"ref = pb;\n",
"alpha_a = pa/ref;\n",
"alpha_b = pb/ref;\n",
"alpha_c = pc/ref;\n",
"W = F-D;// [mol]\n",
"xbW = 0.3;// [mol]\n",
"xaW = 0.4;// [mol]\n",
"xcW = 0.3;// [mol]\n",
"err = 1;\n",
"while(err>(10^(-1)))\n",
" // From Eqn. 9.47:\n",
" deff('[y] = f47(xaW)','y = log(F*xFa/(W*xaW))-(alpha_a*log(F*xFb/(W*xbW)))');\n",
" xaW = fsolve(xbW,f47);\n",
" deff('[y] = f48(xcW)','y = log(F*xFc/(W*xcW))-(alpha_c*log(F*xFb/(W*xbW)))');\n",
" xcW = fsolve(xbW,f48);\n",
" xbW_n = 1-(xaW+xcW);\n",
" err = abs(xbW-xbW_n);\n",
" xbw = xbW_n;\n",
"end\n",
"// Material balance:\n",
"// for A:\n",
"deff('[y] = f49(yaD)','y = F*xFa-((D*yaD)+(W*xaW))');\n",
"yaD = fsolve(100,f49);// [mole fraction benzene]\n",
"// For B:\n",
"deff('[y] = f50(ybD)','y = F*xFb-((D*ybD)+(W*xbW))');\n",
"ybD = fsolve(100,f50);// [mole fraction toulene]\n",
"// For C:\n",
"deff('[y] = f51(ycD)','y = F*xFc-((D*ycD)+(W*xcW))');\n",
"ycD = fsolve(100,f51);// [mole fraction o-xylene]\n",
"printf('The residual compositions are:\n');\n",
"printf('Benzene:%f\n',xaW);\n",
"printf('Toulene:%f\n',xbW);\n",
"printf('o-xylene:%f\n',xcW);\n",
"printf('The composited distillate compositions are:\n');\n",
"printf('Benzene:%f\n',yaD);\n",
"printf('Toulene:%f\n',ybD);\n",
"printf('o-xylene:%f\n',ycD);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.8: Optimum_Reflux_Ratio.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.8\n",
"// Page: 388\n",
"\n",
"printf('Illustration 9.8 - Page: 388\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data*****//\n",
"// a:methanol b:water\n",
"Xa = 0.5;// [Wt fraction]\n",
"Temp1 = 26.7;// [OC]\n",
"Temp2 = 37.8;// [OC]\n",
"F1 = 5000;// [kg/hr]\n",
"//******//\n",
"\n",
"//(a)\n",
"Ma = 32.04;// [kg/kmol]\n",
"Mb = 18.02;// [kg/kmol]\n",
"Xa = 0.5;// [Wt fraction]\n",
"Xb = 1-Xa;// [Wt fraction]\n",
"Temp1 = 26.7;// [OC]\n",
"Temp2 = 37.8;// [OC]\n",
"F1 = 5000;// [kg/hr];\n",
"// Basis: 1hr\n",
"F = (F1*Xa/Ma)+(F1*Xb/Mb);// [kmol/hr]\n",
"// For feed:\n",
"zF = (F1*Xa/Ma)/F;// [mole fracton methanol]\n",
"MavF = F1/F;// [kg/kmol]\n",
"// For distillate:\n",
"xD = (95/Ma)/((95/Ma)+(5/Mb));// [mole fraction methanol]\n",
"MavD = 100/((95/Ma)+(5/Mb));// [kg/kmol]\n",
"// For residue:\n",
"xW = (1/Ma)/((1/Ma)+(99/Mb));// [mole fraction methanol]\n",
"MavR = 100/((1/Ma)+(99/Mb));// [kg/kmol]\n",
"// (1): D+W = F [Eqn.9.75]\n",
"// (2): D*xD+W*xW = F*zF [Eqn. 9.76]\n",
"// Solvving simultaneously:\n",
"a = [1 1;xD xW];\n",
"b = [F;F*zF];\n",
"soln = a\b;\n",
"D = soln(1);// [kmol/h]\n",
"W = soln(2);// [kmol/h]\n",
"printf('Quantity of Distillate is %f kg/hr\n',D*MavD);\n",
"printf('Quantity of Residue is %f kg/hr\n',W*MavR);\n",
"printf('\n');\n",
"\n",
"// (b)\n",
"// For the vapour-liquid equilibria:\n",
"Tempo = 19.69;// [Base Temp. according to 'International Critical Tables']\n",
"BtR = 99;// [Bubble point of the residue, OC]\n",
"hR = 4179;// [J/kg K]\n",
"hF = 3852;// [J/kg K]\n",
"deff('[y] = f52(tF)','y = (F1*hF*(tF-Temp1))-((W*MavR)*hR*(BtR-Temp2))');\n",
"tF = fsolve(Temp1,f52);// [OC]\n",
"BtF = 76;// [Bubble point of feed, OC]\n",
"// For the feed:\n",
"delta_Hs = -902.5;// [kJ/kmol]\n",
"Hf = ((hF/1000)*MavF*(tF-Tempo))+delta_Hs;// [kJ/kmol]\n",
"// From Fig 9.27:\n",
"HD = 6000;// [kJ/kmol]\n",
"HLo = 3640;// [kJ/kmol]\n",
"HW = 6000;// [kJ/kmol]\n",
"printf('The enthalpy of feed is %f kJ/kmol\n',Hf);\n",
"printf('The enthalpy of the residue is %f kJ/kmol\n',HW);\n",
"printf('\n');\n",
"\n",
"// (c)\n",
"// From Fig.9.27:\n",
"// The miium reflux ratio is established by the tie line (x = 0.37 y = 0.71), which extended pass through F,the feed.\n",
"// At Dm:\n",
"Qm = 62570;// [kJ/kmol]\n",
"Hg1 = 38610;// [kJ/kmol]\n",
"// From Eqn. 9.65:\n",
"Rm = (Qm-Hg1)/(Hg1-HLo);\n",
"printf('The minimum reflux ratio is %f\n',Rm);\n",
"printf('\n');\n",
"\n",
"// (d)\n",
"// From Fig. 9.28:\n",
"Np = 4.9;\n",
"// But it include the reboiler.\n",
"Nm = Np-1;\n",
"printf('The minimum number of theoretical trys required is %f \n',Nm);\n",
"printf('\n');\n",
"\n",
"// (e)\n",
"R = 1.5*Rm;\n",
"// Eqn. 9.65:\n",
"deff('[y] = f53(Q_prime)','y = R-((Q_prime-Hg1)/(Hg1-HLo))');\n",
"Q_prime = fsolve(2,f53);// [kJ/kmol]\n",
"deff('[y] = f54(Qc)','y = Q_prime-(HD+(Qc/D))');\n",
"Qc = fsolve(2,f54);// [kJ/hr]\n",
"Qc = Qc/3600;// [kW]\n",
"printf('The Condensor heat load is %f kW\n',Qc);\n",
"// From Eqn. 9.77:\n",
"deff('[y] = f55(Q_dprime)','y = (F*Hf)-((D*Q_prime)+(W*Q_dprime))');\n",
"Q_dprime = fsolve(2,f55);\n",
"deff('[y] = f56(Qb)','y = Q_dprime-(HW-(Qb/W))');\n",
"Qb = fsolve(2,f56);// [kJ/hr]\n",
"Qb = Qb/3600;// [kW]\n",
"printf('The Reboiler heat load is %f kW\n',Qb);\n",
"printf('\n');\n",
"\n",
"// (f)\n",
"// From Fig: 9.28\n",
"Np = 9;\n",
"// But it is including the reboiler\n",
"printf('No. of theoretical trays in tower is %d\n',Np-1);\n",
"G1 = D*(R+1);// [kmol/hr]\n",
"Lo = D*R;// [kmol/hr]\n",
"// From Fig. 9.28:\n",
"// At the feed tray:\n",
"x4 = 0.415;\n",
"y5 = 0.676;\n",
"x5 = 0.318;\n",
"y6 = 0.554;\n",
"// From Eqn. 9.64:\n",
"deff('[y] = f57(L4)','y = (L4/D)-((xD-y5)/(y5-x4))');\n",
"L4 = fsolve(2,f57);// [kmol/hr]\n",
"// From Eqn. 9.62:\n",
"deff('[y] = f58(G5)','y = (L4/G5)-((xD-y5)/(xD-x4))');\n",
"G5 = fsolve(2,f58);// [kmol/hr]\n",
"// From Eqn. 9.74:\n",
"deff('[y] = f59(L5_bar)','y = (L5_bar/W)-((y6-xW)/(y6-x5))');\n",
"L5_bar = fsolve(2,f59);// [kmol/hr]\n",
"// From Eqn. 9.72:\n",
"deff('[y] = f60(G6_bar)','y = (L5_bar/G6_bar)-((y6-xW)/(x5-xW))');\n",
"G6_bar = fsolve(2,f60);// [kmol/hr]\n",
"// At the bottom:\n",
"// Material Balance:\n",
"// Eqn. 9.66:\n",
"// (1): L8_bar-GW_bar = W;\n",
"// From Fig. 9.28:\n",
"yW = 0.035;\n",
"x8 = 0.02;\n",
"// From Eqn. 9.72:\n",
"L8ByGW_bar = (yW-xW)/(x8-xW);\n",
"// (2): L8_bar-(L8ByGW_bar*Gw_bar) = 0\n",
"a = [1 -1;1 -L8ByGW_bar];\n",
"b = [W;0];\n",
"soln = a\b;\n",
"L8_bar = soln(1);// [kmol/h]\n",
"GW_bar = soln(2);// [kmol/h]\n",
"printf('The Liquid quantity inside the tower is %f kmol/hr\n',L8_bar);\n",
"printf('The vapour quantity inside the tower is %f kmol/hr\n',GW_bar);\n",
"printf('\n');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.9: Use_of_Open_Steam.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"// Illustration 9.9\n",
"// Page: 395\n",
"\n",
"printf('Illustration 9.9 - Page: 395\n\n');\n",
"\n",
"// solution\n",
"\n",
"//****Data****//\n",
"P = 695;// [kN/square m]\n",
"//********//\n",
"\n",
"// a:methanol b:water\n",
"// From Illustration 9.8:\n",
"Ma = 32.04;// [kg/kmol]\n",
"Mb = 18.02;// [kg/kmol]\n",
"F = 216.8;// [kmol/h]\n",
"Tempo = 19.7;// [OC]\n",
"zF = 0.360;// [mole fraction methanol]\n",
"HF = 2533;// [kJ/kmol]\n",
"D = 84.4;// [kkmol/h]\n",
"zD = 0.915;// [mole fraction methanol]\n",
"HD = 3640;// [kJ/kmol]\n",
"Qc = 5990000;// [kJ/h]\n",
"// Since the bottom will essentially be pure water:\n",
"HW = 6094;// [kJ/kmol]\n",
"// From Steam tables:\n",
"Hs = 2699;// [enthalpy of saturated steam, kJ/kg]\n",
"hW = 4.2*(Tempo-0);// [enthalpy of water, kJ/kg]\n",
"HgNpPlus1 = (Hs-hW)*Mb;// [kJ/kmol]\n",
"// (1): GNpPlus1-W = D-F [From Eqn. 9.86]\n",
"// (2): (GNpPlus1*HgNpPlus1)-(W*HW) = (D*HD)+Qc-(F*HF) [From Eqn. 9.88]\n",
"a = [1 -1;HgNpPlus1 -HW];\n",
"b = [D-F;(D*HD)+Qc-(F*HF)];\n",
"soln = a\b;\n",
"GNpPlus1 = soln(1);// [kmol/h]\n",
"W = soln(2);// [kmol/h]\n",
"// From Eqn. 9.87:\n",
"deff('[y] = f61(xW)','y = (F*zF)-((D*zD)+(W*xW))');\n",
"xW = fsolve(2,f61);\n",
"// The enthalpy of the solution at its bubble point is 6048 kJ/kmol, sufficiently closed to 6094 assumed earlier.\n",
"// For delta_w:\n",
"xdelta_w = W*xW/(W-GNpPlus1);\n",
"Q_dprime = ((W*HW)-(GNpPlus1*HgNpPlus1))/(W-GNpPlus1);// [kJ/kmol]\n",
"// From Fig 9.27 ad Fig. 9.28, and for the stripping section:\n",
"Np = 9.5;\n",
"printf('Steam Rate: %f kmol/h\n',GNpPlus1);\n",
"printf('Bottom Composition: xW: %f\n',xW);\n",
"printf('Number of theoretical stages: %f\n',Np);"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|