summaryrefslogtreecommitdiff
path: root/Internal_Combustion_Engines_by_H._B._Keswani/ch8.ipynb
blob: 8b06bc6c2e3ef17b7627fdbdf5f89b5b1245c45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
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
{
 "metadata": {
  "name": "",
  "signature": "sha256:7c5208566983a3bf0265db0a9aa25ba16788dd1d05e4302b35a36cac87f7afae"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chatper 8 : Combustion"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1  Page no :  143"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 88.6\t\t\t\t\t#Composition of C in percent\n",
      "H2 = 11.4\t\t\t\t\t#Composition of H2 in percent\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "w1 = (C/100)\t\t\t\t\t#Weight per kg of fuel of C in kg\n",
      "w2 = (H2/100)\t\t\t\t\t#Weight per kg of fuel of H2 in kg\n",
      "O1 = (8./3)\t\t\t\t\t#Oxygen required per kg of constituent for C in kg\n",
      "O2 = 8.\t\t\t\t\t#Oxygen required per kg of constituent for H2 in kg\n",
      "O11 = (w1*O1)\t\t\t\t\t#Oxygen required per kg of fuel for C in kg\n",
      "O22 = (w2*O2)\t\t\t\t\t#Oxygen required per kg of fuel for H2 in kg\n",
      "T = (O11+O22)\t\t\t\t\t#Total Oxygen required per kg of fuel in kg\n",
      "P1 = (w1+O11)\t\t\t\t\t#Composition of CO2 in kg\n",
      "P2 = (w2+O22)\t\t\t\t\t#Composition of H2O in kg\n",
      "w = (T*(100./23))\t\t\t\t\t#Weight of air required in kg per kg of fuel\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The weight of air required for complete combustion of liquid fuel is %3.2f kg per kg of fuel   \\\n",
      "\\nThe composition of CO2 is %3.3f kg  \\\n",
      "\\nThe composition of H2O is %3.3f kg'%(w,P1,P2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The weight of air required for complete combustion of liquid fuel is 14.24 kg per kg of fuel   \n",
        "The composition of CO2 is 3.249 kg  \n",
        "The composition of H2O is 1.026 kg\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2  Page no :  147"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#Input data\n",
      "C = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "H2 = 2.\t\t\t\t\t#Molecular weght of H2\n",
      "O2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "\n",
      "\n",
      "#Calculations\n",
      "C7H16 = (7*C+8*H2)\t\t\t\t\t#Molecular weight of C7H16\n",
      "O2x = (11*O2)\t\t\t\t\t#Molecular weight of 22O2\n",
      "wt = (O2x/C7H16)*(100/23.2)\t\t\t\t\t#Weight of air in kg per kg of fuel\n",
      "#Now in actual experiment, we have\n",
      "#1[C7H16] +x[O2] +...[N2]  =  a[CO2] +8[H2O] +a[O2] +...[N2]\n",
      "#This is the new equation written in volumes. The volumes of CO2 and O2 being equal, with no CO present, and the usual assumption that all the hydrogen is burnt to H2O\n",
      "#Now, if all the carbon is burnt, we must have 7 mols of CO2\n",
      "x = (7+4+7)\t\t\t\t\t#Total number of mols from CO2,H2O and O2 terms respectively\n",
      "W = ((x*O2)/100)*(100/23.2)\t\t\t\t\t#Weight of air in kg per kg of fuel\n",
      "\n",
      "\n",
      "#Output\n",
      "print 'The weight of air is %3.1f kg per kg of fuel which would just suffice for theoretically complete combustion  \\\n",
      "\\nThe ratio of air to fuel by weight as actually supplied is %3.1f kg of air per kg of fuel'%(wt,W)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The weight of air is 15.2 kg per kg of fuel which would just suffice for theoretically complete combustion  \n",
        "The ratio of air to fuel by weight as actually supplied is 24.8 kg of air per kg of fuel\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3  Page no :  151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "H = 15.\t\t\t\t\t#Percentage of Hydrogen by volume\n",
      "CO = 25.\t\t\t\t\t#Percentage of carbon monoxide by volume\n",
      "CH4 = 4.\t\t\t\t\t#Percentage of methane by volume\n",
      "CO2 = 4.\t\t\t\t\t#Percentage of carbon dioxide by volume\n",
      "O2 = 2.\t\t\t\t\t#Percentage of oxygen by volume. In textbook it is given wrong as 25\n",
      "N2 = 50.\t\t\t\t\t#Percentage of nitrogen  by volume\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "O21 = (H/100)*(1./2)\t\t\t\t\t#Volume of oxygen required in m**3 by 15 percent of H2\n",
      "O22 = (CO/100)*(1./2)\t\t\t\t\t#Volume of oxygen required in m**3 by 25 percent of CO\n",
      "CO21 = (CO/100)*1\t\t\t\t\t#Volume of CO2 produced in m**3 by 25 percent of CO\n",
      "O23 = (CH4/100)*2\t\t\t\t\t#Volume of oxygen required in m**3 by 4 percent of CH4\n",
      "CO22 = (CH4/100)*1\t\t\t\t\t#Volume of CO2 produced in m**3 by 4 percent of CH4\n",
      "H201 = (CO/100)*2\t\t\t\t\t#Volume of H2O produced in m**3 by 4 percent of CH4\n",
      "TO2 = (O21+O22+O23-(O2/100))\t\t\t\t\t#Total vol. of oxygen in m**3\n",
      "wa = (TO2*(100./21))\t\t\t\t\t#Theoretical volume of air required in m**3\n",
      "vN2 = (wa*(79./100))\t\t\t\t\t#Volume of N2 present in air in m**3\n",
      "TvN2 = (vN2+(N2/100))\t\t\t\t\t#Total volume of N2 after combustion of 1 m**3 of fuel in m**3\n",
      "xCO2 = (CO21+CO22)\t\t\t\t\t#CO2 produced due to combustion of fuel in m**3\n",
      "TCO2 = (xCO2+(CO2/100))\t\t\t\t\t#Total volume of CO2 in the flue gas in m**3\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The air required for complete combustion of one m**3 of the fuel is %3.3f cu.m  \\\n",
      "\\nThe dry flue gas contains %3.3f cu.m volume of N2 and %3.2f cu.m volume of CO2'%(wa,TvN2,TCO2)  \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The air required for complete combustion of one m**3 of the fuel is 1.238 cu.m  \n",
        "The dry flue gas contains 1.478 cu.m volume of N2 and 0.33 cu.m volume of CO2\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4  Page no :  155"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 88.1\t\t\t\t\t#Composition of C in percent\n",
      "H2 = 10.7\t\t\t\t\t#Composition of H2 in percent\n",
      "O2 = 1.2\t\t\t\t\t#Composition of O2 in percent\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "w1 = (C/100)\t\t\t\t\t#Weight per kg of fuel of C in kg\n",
      "w2 = (H2/100)\t\t\t\t\t#Weight per kg of fuel of H2 in kg\n",
      "w3 = (O2/100)\t\t\t\t\t#Weight per kg of fuel of O2 in kg\n",
      "O1 = (8/3)\t\t\t\t\t#Oxygen required per kg of constituent for C in kg\n",
      "O2 = 8\t\t\t\t\t#Oxygen required per kg of constituent for H2 in kg\n",
      "O11 = (w1*O1)\t\t\t\t\t#Oxygen required per kg of fuel for C in kg\n",
      "O22 = (w2*O2)\t\t\t\t\t#Oxygen required per kg of fuel for H2 in kg\n",
      "T = (O11+O22-w3)\t\t\t\t\t#Total Oxygen required per kg of fuel in kg\n",
      "P1 = (w1+O11)\t\t\t\t\t#Composition of CO2 in kg\n",
      "P2 = (w2+O22)\t\t\t\t\t#Composition of H2O in kg\n",
      "w = (T*(100/23))\t\t\t\t\t#Weight of air required in kg per kg of fuel\n",
      "wN2 = (w*(77/100))\t\t\t\t\t#Weight of N2 in 'w' kg of fuel in kg\n",
      "T1 = (P1+P2+wN2)\t\t\t\t\t#Total weight of all products of combustion in kg\n",
      "pCO2 = (P1/T1)*100\t\t\t\t\t#Percentage composition of CO2 by weight\n",
      "pH2O = (P2/T1)*100\t\t\t\t\t#Percentage composition of H2O by weight\n",
      "pN2 = (wN2/T1)*100\t\t\t\t\t#Percentage composition of N2 by weight\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The weight of air required to burn one kg of the fuel is %3.1f kg  \\\n",
      "\\nThe composition of products of combustion by weight is %3.2f percent of CO2, %3.2f percent of H2O and %3.2f percent of N2'%(w,pCO2,pH2O,pN2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The weight of air required to burn one kg of the fuel is 10.4 kg  \n",
        "The composition of products of combustion by weight is 73.29 percent of CO2, 26.71 percent of H2O and 0.00 percent of N2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5  Page no :  156"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 85.\t\t\t\t\t#Composition of C in percent\n",
      "H2 = 15.\t\t\t\t\t#Composition of H2 in percent\n",
      "CV = 10600.\t\t\t\t\t#Calorific value in kcal/kg\n",
      "eO2 = 60.\t\t\t\t\t#Percentage of air in excess\n",
      "bhp = 240.\t\t\t\t\t#Brake horse power in h.p\n",
      "nth = 30.\t\t\t\t\t#Thermal efficiency in percent\n",
      "O2 = 23.\t\t\t\t\t#Percentage of oxygen contained in air by weight\n",
      "wC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "wH2 = 2.\t\t\t\t\t#Molecular weght of H2\n",
      "wO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "mma = (100./23)*(((C/100)*(wO2/wC))+((H2/100)*(wO2/(wH2*2))))\t\t\t\t\t#Minimum air in kg per kg oil\n",
      "aa = ((100+eO2)/100)*mma\t\t\t\t\t#Actual air supplied in kg per kg oil\n",
      "q = ((bhp*(4500./427))/(nth/100))\t\t\t\t\t#Heat supplied in kcal/min\n",
      "mf = (q/CV)\t\t\t\t\t\t#Mass of fuel supplied in kg/min\n",
      "ma = (aa*mf)\t\t\t\t\t#Mass of air supplied in kg/min\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The weight of air is %3.2f kg/min'%(ma)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The weight of air is 19.18 kg/min\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6  Page no :  157"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "#C + O2 -> CO2\n",
      "# 12 + 32 -> 44\n",
      "C = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "O2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "CO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "N2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "wair = (O2/C)*(100./23)\t\t\t\t\t#Air required per kg of C in kg\n",
      "wN2 = (O2/C)*(77./23)\t\t\t\t\t#N2 associated with the air in kg\n",
      "pCO2 = (CO2/C)/CO2\t\t\t\t\t#Parts by volume/k for CO2\n",
      "pN2 = (wN2/N2)\t\t\t\t\t#Parts by volume/k for N2\n",
      "Tv = (pCO2+pN2)\t\t\t\t\t#Total parts by volume\n",
      "ppCO2 = (pCO2/Tv)*100\t\t\t\t\t#Percentage volume of CO2\n",
      "ppN2 = (pN2/Tv)*100\t\t\t\t\t#Percentage volume of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The volumetric analysis of the flue gas when pure carbon is burnt with \\\n",
      " a minimum quantity of air is given by  CO2 -> %3.1f percent  N2 -> %3.1f percent'%(ppCO2,ppN2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The volumetric analysis of the flue gas when pure carbon is burnt with  a minimum quantity of air is given by  CO2 -> 20.7 percent  N2 -> 79.3 percent\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7  Page no :  157"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 90.\t\t\t\t\t#Percentage composition of C \n",
      "H2 = 3.3\t\t\t\t\t#Percentage composition of H2\n",
      "O2 = 3\t\t\t\t\t#Percentage composition of O2\n",
      "N2 = 0.8\t\t\t\t\t#Percentage composition of N2\n",
      "S = 0.9\t\t\t\t\t#Percentage composition of S\n",
      "Ash = 2.\t\t\t\t\t#Percentage composition of Ash\n",
      "eO2 = 50.\t\t\t\t\t#Percentage of excess air\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mS = 32.\t\t\t\t\t#Molecular weight of sulphur\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mSO2 = 64.\t\t\t\t\t#Molecular weight of SO2\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "w1 = (C/100)\t\t\t\t\t#Weight per kg of fuel of C in kg\n",
      "w2 = (H2/100)\t\t\t\t\t#Weight per kg of fuel of H2 in kg\n",
      "w3 = (S/100)\t\t\t\t\t#Weight per kg of fuel of S in kg\n",
      "O1 = (8./3)\t\t\t\t\t#Oxygen required per kg of constituent for C in kg\n",
      "O2 = 8.\t\t\t\t\t#Oxygen required per kg of constituent for H2 in kg\n",
      "O3 = 1.\t\t\t\t\t#Oxygen requred per kg of constituent for S in kg\n",
      "O11 = (w1*O1)\t\t\t\t\t#Oxygen required per kg of fuel for C in kg\n",
      "O22 = (w2*O2)\t\t\t\t\t#Oxygen required per kg of fuel for H2 in kg\n",
      "O33 = (w3*O3)\t\t\t\t\t#Oxygen required per kg of fuel for S in kg\n",
      "T = (O11+O22+O33-(O2/100))\t\t\t\t\t#Total Oxygen required per kg of fuel in kg\n",
      "ma = (T*(100./23))\t\t\t\t\t#Minimum air required in kg\n",
      "aN2 = (ma*((100+eO2)/100)*(77/100))\t\t\t\t\t#N2 in actual air supply in kg\n",
      "TN2 = (aN2+(N2/100))\t\t\t\t\t#Total N2 in kg\n",
      "wt = (ma*(eO2/100)*(23./100))\t\t\t\t\t#Weight of air due to excess O2 in kg\n",
      "TSO2 = (w3*(mSO2/mS))\t\t\t\t\t#Total SO2 in kg\n",
      "TCO2 = (w1*(mCO2/mC))\t\t\t\t\t#Total CO2 in kg\n",
      "pCO2 = (TCO2/mCO2)\t\t\t\t\t#Parts by volume of CO2\n",
      "pSO2 = (TSO2/mSO2)\t\t\t\t\t#Parts by volume of SO2\n",
      "pO2 = (wt/mO2)\t\t\t\t\t#Parts by volume of O2\n",
      "pN2 = (TN2/mN2)\t\t\t\t\t#Parts by volume of N2\n",
      "Tv = (pCO2+pSO2+pN2+pO2)\t\t\t\t\t#Total parts by volume\n",
      "ppCO2 = (pCO2/Tv)*100\t\t\t\t\t#Percentage volume of CO2\n",
      "ppSO2 = (pSO2/Tv)*100\t\t\t\t\t#Percenatge volume of SO2\n",
      "ppO2 = (pO2/Tv)*100\t\t\t\t\t#Percentage volume of O2\n",
      "ppN2 = (pN2/Tv)*100\t\t\t\t\t#Percentage volume of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Percentage combustion of the dry flue gases by volume is  CO2 %3.2f percent  SO2 %3.2f percent  O2 %3.1f percent  N2 %3.2f percent'%(ppCO2,ppSO2,ppO2,ppN2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Percentage combustion of the dry flue gases by volume is  CO2 64.61 percent  SO2 0.24 percent  O2 34.9 percent  N2 0.25 percent\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8  Page no :  158"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 85.\t\t\t\t\t#Composition of C in percent\n",
      "H2 = 12.3\t\t\t\t\t#Composition of H2 in percent\n",
      "i = 2.7\t\t\t\t\t#Incombustible residue composition in percent\n",
      "ma = 25.\t\t\t\t\t#Mass of air supplied in kg of air per kg of fuel\n",
      "pO2 = 23.\t\t\t\t\t#Percentage of oxygen in gemetric analysis of air\n",
      "pN2 = 77.\t\t\t\t\t#Percentage of nitrogen in gemetric analysis of air\n",
      "p = 1.03\t\t\t\t\t#Total pressure of the exhaust gases in kg/cm**2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weght of H2\n",
      "mH2O = 18.\t\t\t\t\t#Molecular weight of H2O\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "xCO2 = ((C/100)*(mCO2/mC))\t\t\t\t\t#per kg of fuel, the products formed in kg\n",
      "xH2O = ((H2/100)*((2*mH2O)/(2*mH2)))\t\t\t\t\t#per kg of fuel, the products formed in kg\n",
      "xO2 = (((C/100)*(mO2/mC))+((H2/100)*(mO2/(2*mH2))))\t\t\t\t\t#Oxygen used in kg\n",
      "xN2 = (pN2/pO2)*xO2\t\t\t\t\t#Associated nitrogen in kg\n",
      "mma = (xO2+xN2)\t\t\t\t\t#Minimum air required in kg\n",
      "ea = (ma-mma)\t\t\t\t\t#Excess air supplied in kg\n",
      "XO2 = ((pO2/100)*ea)\t\t\t\t\t#Mass of O2 in excess air in kg\n",
      "XN2 = ((pN2/100)*ea)\t\t\t\t\t#Mass of N2 in excess air in kg\n",
      "wCO2 = xCO2/mCO2\t\t\t\t\t#Parts by volume for CO2\n",
      "wO2 = XO2/mO2\t\t\t\t\t#Parts by volume for O2\n",
      "wN2 = ((XN2+xN2)/mN2)\t\t\t\t\t#Parts by volume for N2\n",
      "wH2O = (xH2O/mH2O)\t\t\t\t\t#Parts by volume for H2)\n",
      "Tv = (wCO2+wO2+wN2+wH2O)\t\t\t\t\t#Total parts by volume\n",
      "ppCO2 = (wCO2/Tv)*100\t\t\t\t\t#Percentage volume of CO2\n",
      "ppO2 = (wO2/Tv)*100\t\t\t\t\t#Percentage volume of O2\n",
      "ppN2 = (wN2/Tv)*100\t\t\t\t\t#Percentage volume of N2\n",
      "ppH2O = (wH2O/Tv)*100\t\t\t\t\t#Percenatage volume of H2O\n",
      "Tv1 = (wCO2+wO2+wN2)\t\t\t\t\t#Total parts by volume for dry products\n",
      "pp1CO2 = (wCO2/Tv1)*100\t\t\t\t\t#Percentage volume of CO2 for dry analysis\n",
      "pp1O2 = (wO2/Tv1)*100\t\t\t\t\t#Percentage volume of O2 for dry analysis\n",
      "pp1N2 = (wN2/Tv1)*100\t\t\t\t\t#Percentage volume of N2 for dry analysis\n",
      "papH2O = (ppH2O/100)*p\t\t\t\t\t#Partial pressure of H2O in kg/cm**2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'The volumetric analysis for wet products gives in percent  CO2 -> %3.1f  O2 -> %3.1f  N2 -> %3.1f  H2O -> %3.1f  \\\n",
      "\\nThe volumetric analysis for dry products gives in percent  CO2 -> %3.1f  O2 -> %3.1f  N2 -> %3.1f  \\\n",
      "\\nThe partial pressure of the vapour is %3.4f kg/cm**2'%(ppCO2,ppO2,ppN2,ppH2O,pp1CO2,pp1O2,pp1N2,papH2O) \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The volumetric analysis for wet products gives in percent  CO2 -> 7.9  O2 -> 8.7  N2 -> 76.6  H2O -> 6.8  \n",
        "The volumetric analysis for dry products gives in percent  CO2 -> 8.5  O2 -> 9.3  N2 -> 82.2  \n",
        "The partial pressure of the vapour is 0.0705 kg/cm**2\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.9  Page no :  162"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "CO2 = 15.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "CO = 2.2\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "O2 = 1.6\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "N2 = 81.2\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO2\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "pCO2 = (CO2/100)*mCO2\t\t\t\t\t#Proportional weight for CO2\n",
      "pCO = (CO/100)*mCO\t\t\t\t\t#Proportional weight for CO\n",
      "pO2 = (O2/100)*mO2\t\t\t\t\t#Proportional weight for O2\n",
      "pN2 = (N2/100)*mN2\t\t\t\t\t#Proportional weight for N2\n",
      "T = (pCO2+pCO+pO2+pN2)\t\t\t\t\t#Total proportional weight\n",
      "ppCO2 = (pCO2/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for CO2\n",
      "ppCO = (pCO/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for CO\n",
      "ppO2 = (pO2/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for O2\n",
      "ppN2 = (pN2/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for N2\n",
      "\n",
      "print 'The analysis by weight is given by in percent  CO2 -> %3.1f  CO -> %3.1f  O2 -> %3.1f  N2 -> %3.1f'%(ppCO2,ppCO,ppO2,ppN2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The analysis by weight is given by in percent  CO2 -> 21.7  CO -> 2.0  O2 -> 1.7  N2 -> 74.6\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.10  Page no :  167"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# variables\n",
      "CO2 = 10.9\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "CO = 1.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "O2 = 7.1\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "N2 = 81.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "pCO2 = (CO2/100)*mCO2\t\t\t\t\t#Proportional weight for CO2\n",
      "pCO = (CO/100)*mCO\t\t\t\t\t#Proportional weight for CO\n",
      "pO2 = (O2/100)*mO2\t\t\t\t\t#Proportional weight for O2\n",
      "pN2 = (N2/100)*mN2\t\t\t\t\t#Proportional weight for N2\n",
      "T = (pCO2+pCO+pO2+pN2)\t\t\t\t\t#Total proportional weight\n",
      "ppCO2 = (pCO2/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for CO2\n",
      "ppCO = (pCO/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for CO\n",
      "ppO2 = (pO2/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for O2\n",
      "ppN2 = (pN2/T)*100\t\t\t\t\t#Weight per kg of exhaust gas for N2\n",
      "\n",
      "print 'The gravimetric analysis is given by in percent  CO2 -> %3.2f  CO -> %3.2f  O2 -> %3.2f  N2 -> %3.2f'%(ppCO2,ppCO,ppO2,ppN2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The gravimetric analysis is given by in percent  CO2 -> 15.97  CO -> 0.93  O2 -> 7.57  N2 -> 75.53\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.11  Page no :  168"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "CO2 = 10.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "N2 = 80.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "C = 80.\t\t\t\t\t#Carbon content of the fuel in percent\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "O2 = 100-(N2+CO2)\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "pCO2 = (CO2/100)*mCO2\t\t\t\t\t#Proportional weight for CO2\n",
      "pO2 = (O2/100)*mO2\t\t\t\t\t#Proportional weight for O2\n",
      "pN2 = (N2/100)*mN2\t\t\t\t\t#Proportional weight for N2\n",
      "T = (pCO2+pO2+pN2)\t\t\t\t\t#Total proportional weight\n",
      "ppCO2 = (pCO2/T)\t\t\t\t\t#Weight per kg of exhaust gas for CO2\n",
      "ppO2 = (pO2/T)\t\t\t\t\t#Weight per kg of exhaust gas for O2\n",
      "ppN2 = (pN2/T)\t\t\t\t\t#Weight per kg of exhaust gas for N2\n",
      "wC = (ppCO2*(mC/mCO2))\t\t\t\t\t#Weight of carbon per kg of exhaust gases in kg\n",
      "WC = ((C/100)/wC)\t\t\t\t\t#Weight of exhaust gases per kg of fuel burned in kg\n",
      "wa = (WC-(ppCO2+ppO2+ppN2))\t\t\t\t\t#Weight of air supplied per kg fuel in kg\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Weight of air supplied per kg of fuel is %i kg'%(wa)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Weight of air supplied per kg of fuel is 19 kg\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.12  Page no :  168"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "CO2 = 12.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "CO = 4.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "N2 = 84.\t\t\t\t\t#Volumetric analysis composition in percent\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "pCO2 = (CO2/100)*mCO2\t\t\t\t\t#Proportional weight for CO2\n",
      "pCO = (CO/100)*mCO\t\t\t\t\t#Proportional weight for CO\n",
      "pN2 = (N2/100)*mN2\t\t\t\t\t#Proportional weight for N2\n",
      "T = (pCO2+pCO+pN2)\t\t\t\t\t#Total proportional weight\n",
      "ppCO2 = (pCO2/T)\t\t\t\t\t#Weight per kg of exhaust gas for CO2\n",
      "ppCO = (pCO/T)\t\t\t\t\t#Weight per kg of exhaust gas for CO\n",
      "ppN2 = (pN2/T)\t\t\t\t\t#Weight per kg of exhaust gas for N2\n",
      "wC = ((ppCO2*(mC/mCO2))+(ppCO*(mC/mCO)))\t\t\t\t\t#Weight of carbon per kg of flue gases\n",
      "pC = ((6*mC)/(6*mC+7*mH2))\t\t\t\t\t#Percentage by weight of carbon in C6H14\n",
      "we = (pC/wC)\t\t\t\t\t#Weight of exhaust gases per kg of fuel in kg\n",
      "wa = (we-(ppCO2+ppCO+ppN2))\t\t\t\t\t#Weight of air supplied per kg of fuel in kg\n",
      "tw = ((100./23)*(((mO2/mC)*pC)+((mO2/(2*mH2))*0.163)))\t\t\t\t\t#Theoretical amount of air required for complete combustion of C6H14 in kg\n",
      "exc = (wa-tw)\t\t\t\t\t#Excess air supplied per kg of fuel in kg\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Excess air supplied per kg of fuel is %3.1f kgdeficient)'%(exc)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Excess air supplied per kg of fuel is -3.3 kgdeficient)\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.13  Page no :  171"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 84.\t\t\t\t\t#Gravimetric analysis composition in percent\n",
      "H2 = 12.\t\t\t\t\t#Gravimetric analysis composition in percent\n",
      "S = 1.5\t\t\t\t\t#Gravimetric analysis composition in percent\n",
      "O2 = 1.5\t\t\t\t\t#Gravimetric analysis composition in percent\n",
      "ma = 20.\t\t\t\t\t#Mass of air in kg\n",
      "pC = 4.\t\t\t\t\t#Percent of carbon in the fuel which is burnt to form CO\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "mS = 32.\t\t\t\t\t#Molecular weight of S\n",
      "mSO2 = 64.\t\t\t\t\t#Molecular weight of SO2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "mm = ((100./23)*((C/100)*(mO2/mC)+(H2/100)*(mO2/(2*mH2))+(S/100)*(mO2/mS)-(O2/100)))\t\t\t\t\t#Minimum air in kg/kg of fuel \n",
      "#When 20 kg of air is supplied\n",
      "xCO2 = ((C/100)*(mCO2/mC))\t\t\t\t\t#Mass of CO2 in kg\n",
      "xSO2 = ((S/100)*(mSO2/mS))\t\t\t\t\t#Mass of SO2 in kg\n",
      "xO2 = ((23/100)*(ma-mm))\t\t\t\t\t#Mass of O2 in kg\n",
      "xN2 = ((77/100)*ma)\t\t\t\t\t#Mass of N2 in kg\n",
      "nCO2 = (xCO2/mCO2)\t\t\t\t\t#Parts by volume of CO2\n",
      "nSO2 = (xSO2/mSO2)\t\t\t\t\t#Parts by volume of SO2\n",
      "nO2 = (xO2/mO2)\t\t\t\t\t#Parts by volume of O2\n",
      "nN2 = (xN2/mN2)\t\t\t\t\t#Parts by volume of N2\n",
      "T = (nCO2+nSO2+nO2+nN2)\t\t\t\t\t#Total parts by volume\n",
      "pCO2 = (nCO2/T)*100\t\t\t\t\t#Percentage volume of CO2\n",
      "pSO2 = (nSO2/T)*100\t\t\t\t\t#Percentage volume of SO2\n",
      "pO2 = (nO2/T)*100\t\t\t\t\t#Percentage volume of O2\n",
      "pN2 = (nN2/T)*100\t\t\t\t\t#Percentage volume of N2\n",
      "\t\t\t\t\t#4% of available carbon is burnt to CO then per kg of fuel\n",
      "yCO2 = ((C/100)/(1+(pC/100)))*(mCO2/mC)\t\t\t\t\t#Mass of CO2 in kg\n",
      "yCO = (((C/100)-((C/100)/(1+(pC/100))))*(mCO/mC))\t\t\t\t\t#Mass of CO in kg\n",
      "yO2 = ((C/100)*(mO2/mC))\t\t\t\t\t#Mass of O2 in kg\n",
      "eO2 = (yO2-(((C/100)/(1+(pC/100)))*(mO2/mC)+(((C/100)-((C/100)/(1+(pC/100))))*(mO2/(2*mC)))))\n",
      "nnCO2 = (yCO2/mCO2)\t\t\t\t\t#Parts by volume of CO2\n",
      "nnCO = (yCO/mCO)\t\t\t\t\t#Parts by volume of CO\n",
      "nnSO2 = (xSO2/mSO2)\t\t\t\t\t#Parts by volume of SO2\n",
      "nnO2 = ((xO2+eO2)/mO2)\t\t\t\t\t#Parts by volume of O2\n",
      "nnN2 = (xN2/mN2)\t\t\t\t\t#Parts by volume of N2\n",
      "TT = (nnCO2+nnCO+nnSO2+nnO2+nnN2)\t\t\t\t\t#Total parts by volume\n",
      "ppCO2 = (nnCO2/TT)*100\t\t\t\t\t#Percentage volume of CO2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Minimum weight of air required for complete combustion of 1 kg of the fuel is %3.1f kg/kg of fuel  \\\n",
      "\\nPercentage composition by volume when %i kg of air is supplied in percent)  CO2 -> %3.1f  SO2 -> %3.1f  O2 -> %3.1f  N2 -> %3.1f  \\\n",
      "\\nThe percentage volume of CO2 when %i percent of the carbon in the fuel is burnt to form CO is %3.1f percent'%(mm,ma,pCO2,pSO2,pO2,pN2,pC,ppCO2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum weight of air required for complete combustion of 1 kg of the fuel is 13.9 kg/kg of fuel  \n",
        "Percentage composition by volume when 20 kg of air is supplied in percent)  CO2 -> 99.3  SO2 -> 0.7  O2 -> 0.0  N2 -> 0.0  \n",
        "The percentage volume of CO2 when 4 percent of the carbon in the fuel is burnt to form CO is 93.7 percent\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.14  Page no :  173"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 85.\t\t\t\t\t#Composition by weight in percent\n",
      "H2 = 14.\t\t\t\t\t#Composition by weight in percent\n",
      "x = 50.\t\t\t\t\t#Percentage of excess air\n",
      "Ta = [70.+273,500+273]\t\t\t\t\t#Temperature of air entering and leaving in K\n",
      "Cp = 0.24\t\t\t\t\t#Mean specific heat of air in kJ/kg.K\n",
      "qC = 8080.\t\t\t\t\t#Heat liberated in kcal/kg\n",
      "qH2 = 34250.\t\t\t\t\t#Heat liberated in kcal/kg\n",
      "a = 23.\t\t\t\t\t#Air contains 23% by weight of O2\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "mm = ((100/a)*((C/100)*(mO2/mC)+(H2/100)*(mO2/(2*mH2))))\t\t\t\t\t#Minimum air required in kg/kg of fuel\n",
      "Q1 = ((C/100)*qC+(H2/100)*qH2)\t\t\t\t\t#Heat in kcal/kg fuel\n",
      "ea = ((x/100)*mm)\t\t\t\t\t#Excess air supplied in kg/kg fuel\n",
      "Q2 = ((mm/2)*Cp*(Ta[1]-Ta[0]))\t\t\t\t\t#Heat in kcal/kg fuel\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'a) Minimum quantity of air necessary for the complete combustion of 1 kg of fuel is %3.2f kg/kg of fuel  \\\n",
      "\\nb) Heat released per kg of fuel when the carbon is burnt to CO2 and hydrogen is burnt to H2O is %3.0f kcal/kg fuel  \\\n",
      "\\nc) Heat carried away by the excess air is %3.0f kcal/kg fuel'%(mm,Q1,Q2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) Minimum quantity of air necessary for the complete combustion of 1 kg of fuel is 14.72 kg/kg of fuel  \n",
        "b) Heat released per kg of fuel when the carbon is burnt to CO2 and hydrogen is burnt to H2O is 11663 kcal/kg fuel  \n",
        "c) Heat carried away by the excess air is 760 kcal/kg fuel\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.15  Page no :  173"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "CO = 17.\t\t\t\t\t#Percentage composition by volume\n",
      "H2 = 53.4\t\t\t\t\t#Percentage composition by volume\n",
      "CH2 = 28.8\t\t\t\t\t#Percentage composition by volume\n",
      "O2 = 0.8\t\t\t\t\t#Percentage composition by volume\n",
      "ea = 30.\t\t\t\t\t#Percentage of excess air\n",
      "v = 1.\t\t\t\t\t#Volume in m**3\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "ta = ((100./21)*((CO/100)/2+(H2/100)/2+(CH2/100)*2-(O2/100)))\t\t\t\t\t#Theoretical air in m**3/m**3 of gas\n",
      "aa = ((1+(ea/100))*ta)\t\t\t\t\t#Actual air in m**3/m**3 of gas\n",
      "Vg = (v+aa)\t\t\t\t\t#Volume of gas air mixture in m**3/m**3 of gas\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Total quantity of air required is %3.2f m**3/m**3 of gas  \\\n",
      "\\nThe volume of gas air mixture is %3.2f m**3/m**3 of gas'%(ta,Vg)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total quantity of air required is 4.38 m**3/m**3 of gas  \n",
        "The volume of gas air mixture is 6.70 m**3/m**3 of gas\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.16  Page no :  178"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "CH4 = 20.\t\t\t\t\t#Percentage volumetric analysis\n",
      "C2H4 = 2.\t\t\t\t\t#Percentage volumetric analysis\n",
      "H2 = 50.\t\t\t\t\t#Percentage volumetric analysis\n",
      "CO = 16.\t\t\t\t\t#Percentage volumetric analysis\n",
      "CO2 = 4.\t\t\t\t\t#Percentage volumetric analysis\n",
      "O2 = 1.5\t\t\t\t\t#Percentage volumetric analysis\n",
      "N2 = 6.5\t\t\t\t\t#Percentage volumetric analysis\n",
      "v = 6.8\t\t\t\t\t#Volume of air supplied in m**3 per m**3 of coal gas\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "mmO2 = ((2*CH4)+(3*C2H4)+(H2/2)+(CO/2))-O2\t\t\t\t\t#Minimum moles of O2\n",
      "mCO2 = (CH4+(2*C2H4)+CO+CO2)\t\t\t\t\t#Moles of CO2\n",
      "mH2O = ((2*CH4)+(2*C2H4)+H2)\t\t\t\t\t#Moles of H2O\n",
      "mN2 = (N2+(79./21)*mmO2)\t\t\t\t\t#Moles of N2\n",
      "ma = ((100./21)*(mmO2/100))\t\t\t\t\t#Minimum air in m**3/m**3 of gas\n",
      "ea = (v-ma)\t\t\t\t\t#Excess air in m**3/m**3 of gas\n",
      "tm = (mCO2+mN2+ea)*2\t\t\t\t\t#Total moles of dry products per 100 moles of gas\n",
      "pCO2 = (mCO2/tm)*100\t\t\t\t\t#Percentage of CO2 by volume in dry flue gases\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Minimum volume of air necessary for the complete combustion of 1 m**3 of coal gas is %3.2f m**3/m**3 of gas  \\\n",
      "\\nPercentage volume of CO2 in dry flue gases is %3.2f percent'%(ma,pCO2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum volume of air necessary for the complete combustion of 1 m**3 of coal gas is 3.69 m**3/m**3 of gas  \n",
        "Percentage volume of CO2 in dry flue gases is 6.37 percent\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.17  Page no :  179"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "C = 86.\t\t\t\t\t#Percentage of carbon\n",
      "H2 = 14.\t\t\t\t\t#Percentage of Hydrogen\n",
      "ea = 20.\t\t\t\t\t#Percentage of excess air\n",
      "O2 = 23.\t\t\t\t\t#Weight of oxygen in air in percent\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "mH2O = 18.\t\t\t\t\t#Molecular weight of H2O\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "ma = ((100/O2)*((C/100)*(mO2/mC)+(H2/100)*(mO2/(2*mH2))))\t\t\t\t\t#Minimum weight of air required in kg/kg petrol\n",
      "\t\t\t\t\t#Products of combustion by weight per kg- petrol \n",
      "XCO2 = (C/100)*(mCO2/mC)\t\t\t\t\t#CO2 in kg\n",
      "XH2O = (H2/100)*(mH2O/mH2)\t\t\t\t\t#H2O in kg\n",
      "XO2 = (XCO2+XH2O-1)*(ea/100)\t\t\t\t\t#O2 in kg\n",
      "XN2 = (ma*(1+(ea/100))*((100-O2)/100))\t\t\t\t\t#N2 in kg\n",
      "XT = (XCO2+XH2O+XO2+XN2)\t\t\t\t\t#Total weight in kg\n",
      "\t\t\t\t\t#Percentage analysis by weight\n",
      "xCO2 = (XCO2/XT)*100\t\t\t\t\t#CO2\n",
      "xH2O = (XH2O/XT)*100\t\t\t\t\t#H2O\n",
      "xO2 = (XO2/XT)*100\t\t\t\t\t#O2\n",
      "xN2 = (XN2/XT)*100\t\t\t\t\t#N2\n",
      "\t\t\t\t\t#Percentage by weight to molecular weight\n",
      "xxCO2 = (xCO2/mCO2)\t\t\t\t\t#CO2\n",
      "xxH2O = (xH2O/mH2O)\t\t\t\t\t#H2O\n",
      "xxO2 = (xO2/mO2)\t\t\t\t\t#O2\n",
      "xxN2 = (xN2/mN2)\t\t\t\t\t#N2\n",
      "xxt = (xxCO2+xxH2O+xxO2+xxN2)\t\t\t\t\t#Total percentage by weight to molecular weight\n",
      "\t\t\t\t\t#Percentage by volume\n",
      "pCO2 = (xxCO2/xxt)*100\t\t\t\t\t#CO2\n",
      "pH2O = (xxH2O/xxt)*100\t\t\t\t\t#H2O\n",
      "pO2 = (xxO2/xxt)*100\t\t\t\t\t#O2\n",
      "pN2 = (xxN2/xxt)*100\t\t\t\t\t#N2\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Volumetric composition of the products of combustion in percent)  CO2 -> %3.1f  H2O -> %3.1f  O2  -> %3.2f  N2  -> %3.2f'%(pCO2,pH2O,pO2,pN2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Volumetric composition of the products of combustion in percent)  CO2 -> 11.0  H2O -> 10.7  O2  -> 3.27  N2  -> 75.03\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.18  Page no :  179"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "bhp = 20.\t\t\t\t\t#Brake horse in h.p\n",
      "N = 320.\t\t\t\t\t#Speed in r.p.m\n",
      "C = 84.\t\t\t\t\t#Percentage of carbon\n",
      "H2 = 16.\t\t\t\t\t#Percentage of hydrogen\n",
      "CV = 10800.\t\t\t\t\t#Calorific value in kcal/kg\n",
      "bth = 30.\t\t\t\t\t#Brake thermal efficiency in percent\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "mH2O = 18.\t\t\t\t\t#Molecular weight of H2O\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "W = (bhp*4500)/427\t\t\t\t\t#Work done in kcal\n",
      "Wc = (W*2)/N\t\t\t\t\t#Work done per cycle in kcal\n",
      "qs = (Wc/(bth/100))\t\t\t\t\t#Heat supplied per cycle in kcal\n",
      "wf = (qs/CV)\t\t\t\t\t#Weight of fuel used per cycle in kg\n",
      "tO2 = ((C/100)*(mO2/mC)+(H2/100)*(mO2/(2*mH2)))\t\t\t\t\t#Total O2/kg fuel in kg\n",
      "mw = (tO2/(23./100))\t\t\t\t\t#Minimum weight of air required in kg/kg fuel\n",
      "aw = (mw*2)\t\t\t\t\t#Actual weight of air supplied in kg/kg fuel\n",
      "wac = (aw*wf)\t\t\t\t\t#Wt. of air supplied/ cycle in kg. In textbook, it is given wrong as 0.1245 kg\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'a) the weight of fuel used per cycle is %3.6f kg  \\\n",
      "\\nb) the actual weight of air taken in per cycle is %3.4f kg'%(wf,wac)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a) the weight of fuel used per cycle is 0.000407 kg  \n",
        "b) the actual weight of air taken in per cycle is 0.0124 kg\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.19  Page no :  179"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\t\t\n",
      "#Input data\n",
      "CO2 = 8.85\t\t\t\t\t#Percentage composition by volume\n",
      "CO = 1.2\t\t\t\t\t#Percentage composition by volume\n",
      "O2 = 6.8\t\t\t\t\t#Percentage composition by volume\n",
      "N2 = 83.15\t\t\t\t\t#Percentage composition by volume\n",
      "C = 84.\t\t\t\t\t#Percentage composition by weight\n",
      "H2 = 14.\t\t\t\t\t#Percentage composition by weight\n",
      "aO2 = 2.\t\t\t\t\t#Percentage composition by weight\n",
      "mO2 = 32.\t\t\t\t\t#Molecular weight of O2\n",
      "mCO2 = 44.\t\t\t\t\t#Molecular weight of CO2\n",
      "mCO = 28.\t\t\t\t\t#Molecular weight of CO\n",
      "mN2 = 28.\t\t\t\t\t#Molecular weight of N2\n",
      "mC = 12.\t\t\t\t\t#Molecular weight of carbon\n",
      "mH2 = 2.\t\t\t\t\t#Molecular weight of H2\n",
      "mH2O = 18.\t\t\t\t\t#Molecular weight of H2O\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Calculations\n",
      "\t\t\t\t\t#O2 required per kg of fuel\n",
      "xC = ((C/100)*(mO2/mC))\t\t\t\t\t#C\n",
      "xH2 = ((H2/100)*(mO2/(2*mH2)))\t\t\t\t\t#H2\n",
      "xO2 = -(aO2/100)\t\t\t\t\t#O2\n",
      "ttO2 = (xC+xH2-xO2)\t\t\t\t\t#Theoretical total oxygen required in kg/kg fuel\n",
      "twa = (ttO2/(23./100))\t\t\t\t\t#Theoretical weight of air in kg/kg fuel\n",
      "\t\t\t\t\t#Conversion of volumetric analysis of the flue gas into a weight analysis\n",
      "\t\t\t\t\t#Percenatge by volume * mol. wt\n",
      "xxCO2 = (CO2*mCO2)\t\t\t\t\t#CO2\n",
      "xxCO = (CO*mCO)\t\t\t\t\t#CO\n",
      "xxO2 = (O2*mO2)\t\t\t\t\t#O2\n",
      "xxN2 = (N2*mN2)\t\t\t\t\t#N2\n",
      "xxt = (xxCO2+xxCO+xxO2+xxN2)\t\t\t\t\t#Total\n",
      "\t\t\t\t\t#Percentage by weight\n",
      "yCO2 = (xxCO2/xxt)*100\t\t\t\t\t#CO2\n",
      "yCO = (xxCO/xxt)*100\t\t\t\t\t#CO\n",
      "yO2 = (xxO2/xxt)*100\t\t\t\t\t#O2\n",
      "yN2 = (xxN2/xxt)*100\t\t\t\t\t#N2\n",
      "wcd = ((yCO2/100)*(mC/mCO2))+((yCO/100)*(mC/mCO))\t\t\t\t\t#Weight of carbon/ kg of dry flue gas in kg\n",
      "wdf = ((C/100)/wcd)\t\t\t\t\t#Wt. of dry flue gas/kg fuel in kg\n",
      "wxf = (wdf*(yO2/100))\t\t\t\t\t#Weight of excess O2/kg fuel in kg\n",
      "weO2 = (wxf/(23./100))\t\t\t\t\t#Weight of excess air in kg/kg fuel\n",
      "was = (twa+weO2)\t\t\t\t\t#Weight of air supplied/kg fuel in kg\n",
      "\n",
      "\t\t\t\t\t\n",
      "#Output\n",
      "print 'Weight of air supplied per kg fuel burnt is %3.2f kg'%(was)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Weight of air supplied per kg fuel burnt is 21.29 kg\n"
       ]
      }
     ],
     "prompt_number": 21
    }
   ],
   "metadata": {}
  }
 ]
}