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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 4 : Ideal Gases and Gas Mixtures"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.1 page no : 79"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"import math \n",
"\n",
"# Variables \n",
"P1 = 760. #mmHg standard conditions\n",
"T1 = 273.15; #K\n",
"\n",
"# Calculation and Result \n",
"V1 = 22.4143 * 10**-3; #m**3/mol\n",
"R1 = P1 * V1 / T1;\n",
"print \"Gas constant R = %.4e m**3 mmHg / (molK)\"%R1\n",
"P2 = 101325; #N/m**2\n",
"T2 = 273.15; #K\n",
"V2 = 22.4143 * 10**-3; #m**3/mol\n",
"R2 = P2 * V2 / T2; #J/molK\n",
"R3 = R2 / 4.184; #cal/molK\n",
"print \"Gas constant R in MKS system = %.3f cal/molK\"%R3\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Gas constant R = 6.2365e-02 m**3 mmHg / (molK)\n",
"Gas constant R in MKS system = 1.987 cal/molK\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.2 page no : 80"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables \n",
"T = 350. #K\n",
"P = 1; #bar\n",
"\n",
"# Calculation \n",
"V1 = 22.4143 * 10**-3; #m**3 (suffix 1 represents at STD)\n",
"P1 = 1.01325; #bar\n",
"T1 = 273.15; #K\n",
"V = P1 * V1 * T/(T1 * P);\n",
"\n",
"# Result \n",
"print \"Molar volume = %.2e m**3/mol\"%V\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Molar volume = 2.91e-02 m**3/mol\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.3 page no : 80"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables \n",
"P = 10. #bar oxygen cylinder gas\n",
"T = 300.; #K\n",
"V = 150.; #L\n",
"P1 = 1.01325; #bar ( \\suffix 1 represents at STD)\n",
"T1 = 273.15; #K\n",
"\n",
"# Calculation \n",
"V2 = T1 * P * V /(T * P1); #m**3\n",
"V1 = 22.4143; #m**3/mol\n",
"N = V2 / V1; #mol\n",
"MO2 = 32.;\n",
"m = N * MO2/1000;\n",
"\n",
"# Result \n",
"print \"Mass of oxygen in the cylinder = %.4f kg\"%m\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Mass of oxygen in the cylinder = 1.9243 kg\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.4 page no: 81"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"P = 195. #kPa pressure\n",
"T = 273. #K automobile tyre\n",
"P1 = 250 #kPa pressure\n",
"\n",
"# Calculation \n",
"T1 = P1 * T / P;\n",
"\n",
"# Result\n",
"print \"Maximum temperature to which tyre may be heated = \",T1,\"K\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Maximum temperature to which tyre may be heated = 350.0 K\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.5 page no : 81\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"# variables \n",
"V = 250. #L carbon dioxide\n",
"T = 300. #K temperature\n",
"V1 = 1000. #L \n",
"P1 = 100. #kPa cylinder\n",
"T1 = 310. #K temperature\n",
"\n",
"# Calculation \n",
"P = T * P1 * V1 /(T1 * V);\n",
"\n",
"# Result\n",
"print \"Original pressure in the cylinder = %.1f kPa\"%P\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Original pressure in the cylinder = 387.1 kPa\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.6 pageno : 85"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"Vper1 = 70. #% ( 1 = HCl) rubber showed\n",
"Vper2 = 20. #% ( 2 = Cl2) volume\n",
"Vper3 = 10. #% ( 3 = CCl4)\n",
"M1 = 36.45 # molecular weights\n",
"M2 = 70.90\n",
"M3 = 153.8\n",
"\n",
"# Calculation \n",
"m1 = Vper1 * M1\n",
"m2 = Vper2 * M2\n",
"m3 = Vper3 * M3\n",
"mper1 = m1 * 100/(m1+ m2 + m3);\n",
"mper2 = m2 * 100/(m1+ m2 + m3);\n",
"mper3 = m3 * 100/(m1+ m2 + m3);\n",
"\n",
"# Result\n",
"print \" (a) weight percent of HCl= %.2f%%\"%mper1\n",
"print \"weight percent of Cl2 = %.2f %%\"%mper2\n",
"print \"weight percent of CCl4 = %.2f %%\"%mper3\n",
"\n",
"m = (m1 + m2 + m3)/(Vper1 + Vper2 + Vper3);\n",
"print \"(b)average molecular weight = %.3f kg\"%m\n",
"v = 22.4143; #m**3/kmol\n",
"Vtotal = v * (Vper1 + Vper2 + Vper3);\n",
"D = (m1 + m2 + m3)/Vtotal;\n",
"print \"(c)Density at standard condiions = %.4f kg/m**3\"%D\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" (a) weight percent of HCl= 46.33%\n",
"weight percent of Cl2 = 25.75 %\n",
"weight percent of CCl4 = 27.93 %\n",
"(b)average molecular weight = 55.075 kg\n",
"(c)Density at standard condiions = 2.4571 kg/m**3\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.7 page no : 85"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"per1 = 93. #% ( 1 = methane)\n",
"per2 = 4.5; #% (2 = ethane)\n",
"per3 = 100 - (per1 + per2); #% ( 3 = N2);\n",
"T = 300. #K natural gas \n",
"p = 400. #kPa\n",
"P3 = p * per3 / 100;\n",
"v = 10. #m**3\n",
"V2 = per2 * v / 100;\n",
"M1 = 16.032;\n",
"M2 = 30.048;\n",
"M3 = 28;\n",
"N1 = per1;\n",
"N2 = per2;\n",
"N3 = per3;\n",
"\n",
"# Calculation \n",
"m1 = M1 * N1;\n",
"m2 = M2 * N2;\n",
"m3 = M3 * N3;\n",
"m = m1 + m2 + m3;\n",
"Vstp = 100 * 22.4143 * 10**-3; #m3 at STP\n",
"D = m /(1000 * Vstp);\n",
"Pstp = 101.325; #kPa\n",
"T1 = 273.15; #K\n",
"V = T * Pstp * Vstp / ( T1 * p);\n",
"D1 = m /(1000 * V);\n",
"Mavg = m /100;\n",
"mper1 = m1 * 100 / (m1 + m2 + m3);\n",
"mper2 = m2 * 100 / (m1 + m2 + m3);\n",
"mper3 = m3 * 100 / (m1 + m2 + m3);\n",
"\n",
"# Result\n",
"print \"(a) Partial pressure of nitrogen = \",P3,\"kPa\"\n",
"print \"(b) pure-component volume of ethane = \",V2,\"m**3\"\n",
"print \"(c) Density at standard conditions = %.4f kg/m**3\"%D\n",
"print \"(d) Density at given condition = %.4f kg/m**3\"%D1\n",
"print \"(e) Average molecular weight = %.2f\"%Mavg\n",
"print \"(f) weight percent of Methane = %.2f %%\"%mper1\n",
"print \"weight percent of Ethane = %.2f %%\"%mper2\n",
"print \"weight percent of Nitrogen = %.2f %%\"%mper3\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a) Partial pressure of nitrogen = 10.0 kPa\n",
"(b) pure-component volume of ethane = 0.45 m**3\n",
"(c) Density at standard conditions = 0.7567 kg/m**3\n",
"(d) Density at given condition = 2.7200 kg/m**3\n",
"(e) Average molecular weight = 16.96\n",
"(f) weight percent of Methane = 87.90 %\n",
"weight percent of Ethane = 7.97 %\n",
"weight percent of Nitrogen = 4.13 %\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.8 pageno : 87"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"per1 = 20. #% ( 1 = ammonia) \n",
"Vstp = 22.4143; #m**3/kmol\n",
"Pstp = 101.325; #kPa\n",
"Tstp = 273.15; #K\n",
"V1 = 100. #m**3 ammonia air\n",
"P1 = 120. #kPa absorption column\n",
"T1 = 300. #K\n",
"P2 = 100. #kPa gas leaves\n",
"T2 = 280. #K gas leaves\n",
"per2 = 90. #% (absorbed)\n",
"\n",
"# Calculation \n",
"N = V1 * P1 * Tstp / (Vstp * Pstp * T1); #kmol\n",
"Nair = (1 - per1 / 100) * N;\n",
"N1 = per1 * N/100;\n",
"Nabs = per2 * N1 / 100;\n",
"N2 = N1 - Nabs; #leaving\n",
"Ntotal = Nair + N2;\n",
"Vstp1 = Ntotal * Vstp; #m**3\n",
"V2 = Vstp1 * Pstp * T2 / (Tstp * P2);\n",
"\n",
"# Result\n",
"print \"Volume of gas leaving = \",V2, \"m**3\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Volume of gas leaving = 91.84 m**3\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.9 pageno : 89"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"V = 100. #m**3 air\n",
"Ptotal = 100. #kPa air\n",
"Pwater = 4. #kPa pressure\n",
"Pair = Ptotal - Pwater; \n",
"T = 300. #K air\n",
"T1 = 275. #K air cooled\n",
"Vstp = 22.4143; #m**3/kmol\n",
"Tstp = 273.15; #K\n",
"Pstp = 101.325; #kPa\n",
"Pwater1 = 1.8; #kPa\n",
"\n",
"# Calculation \n",
"Pair1 = Ptotal - Pwater1;\n",
"V1 = V * Pair * T1 / ( T * Pair1);\n",
"Nwater = V * Pwater * Tstp/ (Vstp * Pstp * T);\n",
"Nwater1 = V1 * Pwater1 * Tstp/ (Vstp * Pstp * T1);\n",
"m = (Nwater - Nwater1) * 18.02;\n",
"\n",
"# Result\n",
"print \"(a) volume of air after dehumidification = %.2f m**3\"%V1\n",
"print \"(b) Mass of water vapour removed = %.3f kg\"%m\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a) volume of air after dehumidification = 89.61 m**3\n",
"(b) Mass of water vapour removed = 1.618 kg\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.10 pageno : 90"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# variables \n",
"V = 100. #m**3 rate \n",
"P = 600. #kPa gas\n",
"T = 310. #K gas\n",
"per1 = 20. #% ( H2S entering )\n",
"per2 = 2. #% ( H2S leaving )\n",
"Pstp = 101.325; #kPa\n",
"Tstp = 273.15; #K\n",
"Vstp = 22.414; #m**3/kmol\n",
"\n",
"# Calculation \n",
"Vstp1 = V * P * Tstp / ( T * Pstp)\n",
"N = Vstp1 / Vstp;\n",
"N1 = N * per1 / 100;\n",
"N2 = N - N1; # ( 2 = inerts)\n",
"Nleaving = N2 / ( 1 - per2 / 100);\n",
"N1leaving = per2 * Nleaving / 100;\n",
"mabsorbed = (N1 - N1leaving) * 34.08; #( molecular wt. = 34.08)\n",
"mgiven = 100. #kg/h\n",
"Vactual = mgiven * V / mabsorbed;\n",
"Nactual = Nleaving * Vactual / V; # actual moles leaving\n",
"Vstpl = Nactual * Vstp; # volume leaving at STP\n",
"P2 = 500. #kPa\n",
"T2 = 290. #K\n",
"V2 = Vstpl * Pstp * T2 / ( P2 * Tstp);\n",
"Precovery = (N1 - N1leaving)*100 / N1;\n",
"\n",
"# Result\n",
"print \"(a)Volume of gas entering per hour %.2f m**3/h\"%Vactual\n",
"print \"(b)Volume of gas leaving per hour %.2f m**3/h\"%V2\n",
"print \"(c)Percentage recovery of H2S %.2f %%\"%Precovery\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Volume of gas entering per hour 68.63 m**3/h\n",
"(b)Volume of gas leaving per hour 62.89 m**3/h\n",
"(c)Percentage recovery of H2S 91.84 %\n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.11 pageno : 92"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"#N2 + 3H2 = 2NH3\n",
"V1 = 100. #m**3 ( 1 = N2) cubic metres\n",
"V2 = V1 * 3 # ( According to Avagadros principle, equal\n",
" #volumes of all gases under similar condition\n",
" # contains same no. of moles)\n",
" \n",
"print \"(a)Volume of hydrogen required at same condition = \",V2,\"m**3\"\n",
"P1 = 20. #bar \n",
"T1 = 350. #K nitrogen\n",
"P2 = 5. #bar\n",
"T2 = 290. #K hydrogen\n",
"\n",
"# Calculation and Result\n",
"V3 = 3 * V1 * P1 * T2 / ( P2 * T1)\n",
"print \"(b)Volume required at 50 bar and 290K = %.3f m**3\"%V3\n",
"m = 1000 #kg ( ammonia )\n",
"N = m / 17.03 #kmol\n",
"N1 = N/2. # ( nitrogen)\n",
"N2 = N * 3 / 2. #(hydrogen)\n",
"P3 = 50. #bar\n",
"T3 = 600. #K\n",
"Pstp = 1.01325 #bar\n",
"Tstp = 273.15 #K\n",
"Vstp = 22.414 #m**3/kmol\n",
"V1stp = N1 * Vstp\n",
"V4 = V1stp * Pstp * T3 / (P3 * Tstp) # ( nitrogen at 50 bar and 600K)\n",
"V5 = V4 * 2 # ( ammonia at 50 bar and 600K)\n",
"V6 = V4 * 3 # ( hydrogen at 50 bar and 600K)\n",
"print \"(c)Volume of nitrogen at 50 bar and 600K = %.1f m**3\"%V4\n",
"print \" Volume of hydrogen at 50 bar and 600K = %.1f m**3\"%V6\n",
"print \" Volume of ammonia at 50 bar and 600K = %.1f m**3\"%V5\n",
"\n",
"\n",
"# note : answers may vary because of rounding error."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Volume of hydrogen required at same condition = 300.0 m**3\n",
"(b)Volume required at 50 bar and 290K = 994.286 m**3\n",
"(c)Volume of nitrogen at 50 bar and 600K = 29.3 m**3\n",
" Volume of hydrogen at 50 bar and 600K = 87.9 m**3\n",
" Volume of ammonia at 50 bar and 600K = 58.6 m**3\n"
]
}
],
"prompt_number": 21
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.12 pageno : 92"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"N = 100. #kmol producer gas\n",
"P1 = 25. #% ( Carbon monoxide )\n",
"P2 = 4. #% ( Carbon Dioxide )\n",
"P3 = 3. #% ( Oxygen )\n",
"P4 = 68. #% ( Nitrogen )\n",
"\n",
"# Calculation \n",
"N1 = N * P1/100 \n",
"N2 = N * P2/100 \n",
"N3 = N * P3/100 \n",
"N4 = N * P4/100 \n",
"NC = N1 + N2 \n",
"m = NC * 12 \n",
"Ngas = N / m #moles of gas for 1 kg of Carbon\n",
"Vstp = 22.4143 #m**3/kmol\n",
"Vstp1 = Vstp * Ngas \n",
"P = 1. #bar\n",
"T = 290. #k\n",
"Pstp = 1.01325 #bar\n",
"Tstp = 273.15 #K\n",
"V = T * Vstp1 * Pstp / (Tstp * P ) \n",
"print \"(a)Volume of gas at 1 bar and 290 K per kg Carbon = %.2f m**3\"%V\n",
"\n",
"#CO + 1/2 * O2 = CO2\n",
"Nrequired = N1/2 - N3 #(oxygen required)\n",
"Nsupplied = Nrequired * 1.2 \n",
"PO1 = 21. #% ( Oxygen percent in air)\n",
"Nair = Nsupplied * 100/PO1 \n",
"V1 = 100. #m**3 \n",
"Vair = V1 * Nair / N \n",
"print \"(b)Volume of air required = %.2f m**3\"%Vair\n",
"NCO2 = N2 + N1 \n",
"NO2 = Nsupplied - Nrequired \n",
"NN2 = N4 + (Vair * (1 - PO1/ 100)) \n",
"Ntotal = NCO2 + NO2 + NN2 \n",
"PCO2 = NCO2 * 100 / Ntotal \n",
"PO2 = NO2 * 100 / Ntotal \n",
"PN2 = NN2 * 100 / Ntotal \n",
"\n",
"# Result\n",
"print \"Percent composition of Carbon Dioxide = %.2f %%\"%PCO2\n",
"print \"Percent composition of Oxygen = %.2f %%\"%PO2\n",
"print \"Percent composition of Nitrogen = %.2f %%\"%PN2\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Volume of gas at 1 bar and 290 K per kg Carbon = 6.93 m**3\n",
"(b)Volume of air required = 54.29 m**3\n",
"Percent composition of Carbon Dioxide = 20.45 %\n",
"Percent composition of Oxygen = 1.34 %\n",
"Percent composition of Nitrogen = 78.21 %\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.13 pageno : 94"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"#4HCl + O2 = 2Cl2 + 2H2O\n",
"n = 1. #mol ( Basis 1 mol of HCl )\n",
"NO2 = n / 4 \n",
"NO2supp = 1.5 * NO2 \n",
"Nair = NO2supp * 100 / 21 \n",
"V = 100. #m**3\n",
"Vair = V * Nair / n \n",
"print \"(a)Volume of air admitted = %.1f m**3\"%Vair\n",
"\n",
"# Calculation \n",
"P1 = 80. #% ( HCl converted)\n",
"Ncon = n * P1 /100 \n",
"N2 = Ncon/4 # oxygen required\n",
"NH2O = Ncon / 2 \n",
"NCl2 = Ncon / 2 \n",
"nHCl = n - Ncon \n",
"nO2 = NO2supp - N2 \n",
"Nnitro = Nair - NO2supp \n",
"Ntotal = nHCl + nO2 + NH2O + NCl2 + Nnitro \n",
"V1 = V * Ntotal \n",
"P1 = 1. #bar\n",
"T1 = 290. #K\n",
"P2 = 1.2 #bar\n",
"T2 = 400. #K\n",
"V2 = V1 * P1 * T2 / ( P2 * T1) \n",
"print \"(b)Volume of gas leaving = %.2f m**3\"%V2\n",
"VCl2 = NCl2 * V \n",
"Pstp = 1.01325 #bar\n",
"Tstp = 273. #K\n",
"Vstp = 22.4143 #m**3/kmol\n",
"Vstp1 = Tstp * P1 * VCl2 / (T1 * Pstp) \n",
"Nstp = Vstp1/Vstp \n",
"m = Nstp * 70.90 \n",
"print \"(c)Kilograms of Chlorine produced = %.1f kg\"%m\n",
"Ntotaldry = nHCl + nO2 + NCl2 + Nnitro #dry basis\n",
"p1 = nHCl*100/Ntotaldry \n",
"p2 = nO2*100/Ntotaldry \n",
"p3 = NCl2*100/Ntotaldry \n",
"p4 = Nnitro*100/Ntotaldry \n",
"\n",
"# Result\n",
"print \"(d)Percent composition of HCl in exit stream = %.2f %%\"%p1\n",
"print \" Percent composition of Oxygen in exit stream = %.1f %%\"%p2\n",
"print \" Percent composition of Chlorine in exit stream = %.2f %%\"%p3\n",
"print \" Percent composition of nitrogen in exit stream = %.2f %%\"%p4\n",
"\n",
"# note : answers may vary because of rouding error."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Volume of air admitted = 178.6 m**3\n",
"(b)Volume of gas leaving = 297.21 m**3\n",
"(c)Kilograms of Chlorine produced = 117.6 kg\n",
"(d)Percent composition of HCl in exit stream = 9.15 %\n",
" Percent composition of Oxygen in exit stream = 8.0 %\n",
" Percent composition of Chlorine in exit stream = 18.30 %\n",
" Percent composition of nitrogen in exit stream = 64.54 %\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 4.14 pageno: 95"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# variables \n",
"# CO2 = CO + 1/2 * O2\n",
"P1 = 1. #bar \n",
"T1 = 3500. #K pressure\n",
"P2 = 1. #bar \n",
"T2 = 300. #K heated\n",
"V2 = 25. #L CO2\n",
"\n",
"# Calculation \n",
"V1 = V2 * P2 * T1 / ( P1 * T2 ) \n",
"\n",
"# Result\n",
"print \"(a)Final volume of gas if no dissociation occured = %.3f m**3\"%(V1/1000)\n",
"Pstp = 1.01325 #bar\n",
"Tstp = 273. #K\n",
"Vstp = 22.4143 #m**3\n",
"N2 = V2 * P2 * Tstp / ( Vstp * Pstp * T2) \n",
"\n",
"# let x be the fraction dissociated, then after dissociation,\n",
"# CO2 = (1 - x)mol, CO = xmol, O2 = (0.5*x)mol\n",
"#total moles = 1 - x + x + o.5 * x = 1 + 0.5 * x \n",
"V = 350. #L\n",
"N1 = V * P1 * Tstp / (Vstp * Pstp * T1) \n",
"\n",
"# 1 + 0.5 * x = N1, therefore\n",
"x = (N1 - 1) / 0.5 \n",
"p = x*100 \n",
"print \"(b)CO2 converted = %.f %%\"%p\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Final volume of gas if no dissociation occured = 0.292 m**3\n",
"(b)CO2 converted = 40 %\n"
]
}
],
"prompt_number": 28
}
],
"metadata": {}
}
]
}
|