summaryrefslogtreecommitdiff
path: root/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter20.ipynb
blob: 41d4734fffcbaf9d02010513cf0cdaadd8c07523 (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
{

 "metadata": {

  "name": "",

  "signature": "sha256:6c08b023c55a26622d295a66797c942f394a0d06e61a13446845d2989d5e21c3"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter 20:Internal Combustion Engines"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.2:pg-852"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "# Four cylinder engine\n",

      "BP = 30.0 # Power developed by engine in kW\n",

      "N = 2500.0 # Speed in rpm\n",

      "P_m = 800.0 # Mean effective pressure for each cylinder in kN/m**2\n",

      "n_m = 0.8 # Mechanical efficiency\n",

      "r = 1.5 # Stroke to bore ratio\n",

      "n_b = 0.28 # Brake thermal efficiency\n",

      "c_v = 44.0 # Heating value of petrol in MJ/kg\n",

      "print \"\\n Example 20.2\\n\"\n",

      "IP = BP/n_m\n",

      "d = ((IP*1000*60)/(P_m*1000*r*(math.pi/4)*N*4))**(1.0/3.0)\n",

      "L = r*d\n",

      "m_f = BP/(c_v*1000*n_b)\n",

      "bsfc = m_f*3600/BP\n",

      "print \"\\n Diameter of cylinder = \",d*10**2 ,\" cm\\n Stroke of each cylinder = \",L*100 ,\" cm\\n Brake specific fuel consumption = \",bsfc ,\" kg/kWh\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.2\n",

        "\n",

        "\n",

        " Diameter of cylinder =  6.20350490899  cm\n",

        " Stroke of each cylinder =  9.30525736349  cm\n",

        " Brake specific fuel consumption =  0.292207792208  kg/kWh\n"

       ]

      }

     ],

     "prompt_number": 1

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.1:pg-851"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "d = 6.5# Diametre in cm\n",

      "L = 9.5 # Stroke in cm\n",

      "T = 64.0 # Torque in Nm\n",

      "N = 3000.0 # Speed in rpm\n",

      "V_c = 63.0 # Clearance volume in cm**3\n",

      "r = 0.5 # Brake efficiency ratio\n",

      "c_v = 42.0 # Calorific value of gasoline in MJ/kg\n",

      "print \"\\n Example 20.1\\n\"\n",

      "V_s = (math.pi/4)*(d**2)*(L)\n",

      "r_k = (V_s+V_c)/V_c\n",

      "n_as = 1- (1.0/(r_k**(0.4)))\n",

      "n_b = r*n_as\n",

      "BP = (2*math.pi*T*N)/60000\n",

      "m_f = (BP*3600)/(n_b*c_v*1000)# in kg/h\n",

      "BMEP = BP*60*2/((math.pi/4)*4*(d**2)*L*N*10**(-6))\n",

      "print \"\\n Fuel consumption of the engine = \",m_f ,\" Kg/h\\n BMEP=\",BMEP ,\" kN/m**2\"\n",

      "#The answers vary due to round off error\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.1\n",

        "\n",

        "\n",

        " Fuel consumption of the engine =  6.73508593048  Kg/h\n",

        " BMEP= 637.807536593  kN/m**2\n"

       ]

      }

     ],

     "prompt_number": 2

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.3:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "F = 680.0 # Net brake load in N\n",

      "N = 360.0 # \n",

      "d = 10.0# Bore in cm\n",

      "L = 15.0 # Stroke in cm\n",

      "T = 58.0 # Torque in Nm\n",

      "v = 300.0 # Speed in m/min\n",

      "n_m = 0.8 # Mechanical efficiency\n",

      "n_th = 0.4 # Indicated thermal efficiency\n",

      "c_v = 44.0 # Calorific value of gasoline in MJ/kg\n",

      "print \"\\n Example 20.3\\n\"\n",

      "N = v/(2*L*(10**(-2)))\n",

      "BP = (2*math.pi*T*N)/60000\n",

      "IP = BP/n_m\n",

      "p_m = (IP*60)/(L*(math.pi/4)*(d**2)*N*10**(-6))\n",

      "m_f = (IP*3600)/(n_th*c_v*1000)\n",

      "bsfc = m_f/BP\n",

      "print \"\\n Indicated power = \",IP ,\" kW\\n Indicate mean effective pressure = \",p_m ,\" kN/m**2\\n  Fuel consumption per kWh on brake power output = \",bsfc ,\" Kg/kWh\"\n",

      "\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.3\n",

        "\n",

        "\n",

        " Indicated power =  7.59218224618  kW\n",

        " Indicate mean effective pressure =  386.666666667  kN/m**2\n",

        "  Fuel consumption per kWh on brake power output =  0.255681818182  Kg/kWh\n"

       ]

      }

     ],

     "prompt_number": 3

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.4:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "T = 20.0 # Time in minute\n",

      "F = 680.0 # Net brake load in N\n",

      "N = 360.0 # Speed in rpm\n",

      "mep = 3.0 # Mean effective pressure in bar\n",

      "f = 1.56 # Fuel consumption in kg\n",

      "m_w = 160.0 # Cooling water in kg\n",

      "t = 57.0 # Water inlet temperature in degree centigrade\n",

      "r = 30.0 # Air used per kg of fuel\n",

      "t_r = 27.0 # Room temperature in degree centigrade\n",

      "t_e = 310.0 # Exhaust gas temperature in degree centigrade\n",

      "d = 210.0 # Bore in mm\n",

      "L = 290.0 # Stroke in mm\n",

      "D = 1.0 # Brake diameter in m\n",

      "cv = 44.0 # Calorific value in MJ/kg\n",

      "m_s = 1.3 # Steam formed per kg fuel in the exhaust in kg\n",

      "s = 2.093 # Specific heat of steam in the exhaust in kJ/kgK\n",

      "s_d = 1.01 # Specific heat of dry exhaust gases in kJ/kgK\n",

      "print \"\\n Example 20.4\\n\"\n",

      "i_p = mep*100*L*(10**-3)*(math.pi/4)*((d*(10**-3))**2)*N/60\n",

      "b_p = (2*math.pi*(F*(D/2))*N)/60000\n",

      "n_m = b_p / i_p\n",

      "h = f*cv*1000\n",

      "i_pe = i_p*T*60\n",

      "e_w = m_w * 4.187*(t-32)\n",

      "m_t = f*r + f\n",

      "m_s_ = m_s*f\n",

      "m_d = m_t - m_s_\n",

      "e_d = m_d * s_d * (t_e-t_r)\n",

      "e_s = m_s_*(4.187*(100-t_r) + 2257.9 +s*(t_e-100))\n",

      "e_t = e_s + e_d\n",

      "e_Un = h - (i_pe + e_w + e_t)\n",

      "print \"\\n Indicated power = \",i_p ,\" kW\\n Brake power = \",b_p ,\" kW\"\n",

      "print \"\\n Energy release by combustion of fuel is \",h ,\" kJ \\n 1. Energy equivalent of ip is \",i_pe ,\" kJ (\",(i_pe/h)*100 ,\" percent)\\n 2. Energy carried away by cooling water is \",e_w ,\" kJ (\",(e_w/h)*100 ,\" percent),\\n 3. Energy carried away by exhaust gases is \",e_t ,\" kJ (\",(e_t/h)*100 ,\" percent),\\n 4. Unaccounted energy loss (by difference) is \",e_Un ,\" kJ (\",(e_Un/h)*100 ,\" percent)\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.4\n",

        "\n",

        "\n",

        " Indicated power =  18.080022801  kW\n",

        " Brake power =  12.8176980266  kW\n",

        "\n",

        " Energy release by combustion of fuel is  68640.0  kJ \n",

        " 1. Energy equivalent of ip is  21696.0273613  kJ ( 31.6084314704  percent)\n",

        " 2. Energy carried away by cooling water is  16748.0  kJ ( 24.3997668998  percent),\n",

        " 3. Energy carried away by exhaust gases is  19333.323828  kJ ( 28.1662643182  percent),\n",

        " 4. Unaccounted energy loss (by difference) is  10862.6488107  kJ ( 15.8255373117  percent)\n"

       ]

      }

     ],

     "prompt_number": 5

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.5:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "F = 610.0 # Net brake load in N\n",

      "N = 350.0 # Speed in rpm\n",

      "d = 20.0 # Bore in cm\n",

      "L = 30.0 # Stroke in cm\n",

      "imep = 275.0 # Mean effective pressure in kN/m**2\n",

      "D = 1.0 # Brake diameter in m\n",

      "m_o = 4.25 # Oil consumption in kg/h\n",

      "cv = 44.0 # Calorific value in MJ/kg\n",

      "print \"\\n Example 20.5\\n\"\n",

      "i_p = imep*1000*L*(10**-2)*(math.pi/4)*((d*(10**-2))**2)*N/60000\n",

      "b_p = (2*math.pi*(F*(D/2))*N)/60000\n",

      "n_m = b_p / i_p\n",

      "n_th = i_p *3600/(m_o*cv*1000)\n",

      "n_br = n_th*n_m\n",

      "print \"\\n Indicated power = \",i_p ,\" kW\\n Brake power = \",b_p ,\" kW\\n Mechanical efficiency = \",n_m*100 ,\" percent,\\n Indicated thermal efficiency = \",n_th*100 ,\" percent,\\n Brake thermal efficiency = \",n_br*100 ,\" percent\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.5\n",

        "\n",

        "\n",

        " Indicated power =  15.1189146454  kW\n",

        " Brake power =  11.178833859  kW\n",

        " Mechanical efficiency =  73.9393939394  percent,\n",

        " Indicated thermal efficiency =  29.1059319377  percent,\n",

        " Brake thermal efficiency =  21.5207496751  percent\n"

       ]

      }

     ],

     "prompt_number": 6

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.6:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "no = 6.0 # No of cylinders\n",

      "Vs = 1.75 # Stroke volume in litres\n",

      "P = 26.25 # Power developed in kW\n",

      "N = 506.0 # Speed in rpm\n",

      "mep = 600.0 # Mean effectine pressure in kN/m**2\n",

      "print \"\\n Example 20.6\\n\"\n",

      "n = P*60000/(no*mep*1000*Vs*(10**-3))\n",

      "n_e = N/2\n",

      "n_m = n_e - n\n",

      "print \"\\nAvg no of misfire = \",n_m\n",

      "\n",

      "\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.6\n",

        "\n",

        "\n",

        "Avg no of misfire =  3.0\n"

       ]

      }

     ],

     "prompt_number": 8

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.7:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "Bp = 110 # Brake power in kW\n",

      "n_m = 0.8 # Mechanical efficiency of the engine\n",

      "m_f = 50 # Fuel required for engine in kg/h\n",

      "r_f = 5 # Reduced engine friction in kW\n",

      "print \"\\n Example 20.7\\n\"\n",

      "Ip = Bp/n_m\n",

      "Fp = Ip-Bp\n",

      "Fp_n = Fp-r_f\n",

      "Ip_new = Bp + Fp_n\n",

      "m_f_new = Ip_new * m_f/ Ip\n",

      "s_f = m_f- m_f_new\n",

      "print \"\\nSaving in fuel = \",s_f ,\" kg/h\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.7\n",

        "\n",

        "\n",

        "Saving in fuel =  1.81818181818  kg/h\n"

       ]

      }

     ],

     "prompt_number": 10

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.8:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "Bp = 14.7 # Brake power when all cylinder operating in kW\n",

      "Bp1 = 10.14 # Brake power with cylinder no. 1 cut out in kW\n",

      "Bp2 = 10.3 # Brake power with cylinder no. 2 cut out in kW\n",

      "Bp3 = 10.36 # Brake power with cylinder no. 3 cut out in kW\n",

      "Bp4 = 10.21 # Brake power with cylinder no. 4 cut out in kW\n",

      "m_f = 5.5 # Fuel consumption in kg/h\n",

      "cv = 42 # Calorific value MJ/kg\n",

      "d = 8 # Diameter of cylinder in cm\n",

      "L = 10 # Stroke of cylinder in cm\n",

      "Vc = 0.1 # Clearance volume in litre\n",

      "print \"\\n Example 20.8\\n\"\n",

      "Ip1 = Bp-Bp1\n",

      "Ip2 = Bp-Bp2\n",

      "Ip3 = Bp-Bp3\n",

      "Ip4 = Bp-Bp4\n",

      "Ip = Ip1+Ip2+Ip3+Ip4\n",

      "n_m = Bp/Ip\n",

      "Vs = (math.pi/4)*((d*(10**-2))**2)*(L*(10**-2))\n",

      "r_k = (Vs+(Vc*(10**-3)))/(Vc*(10**-3))\n",

      "n_ase = 1- (1/(r_k**(1.4-1)))\n",

      "n_th = Ip*3600/(m_f*cv*1000)\n",

      "R_e = n_th/n_ase\n",

      "print \"\\n Mechanical efficiency = \", ,\" percent,\\n Relative efficiency on indicated power basis = \", ,\" percent\",n_m*100,R_e*100)\n",

      "#The value of  answer is different because of round off error\n",

      "\n",

      "\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [],

     "prompt_number": 0

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.9:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "Bp = 28.35 # Brake power in kW\n",

      "N = 1500.0 # Speed in rpm\n",

      "x = 20.0 # Rich percent of mixture\n",

      "t = 15.5 # Temperature in degree centrigrde\n",

      "p = 760 # Pressure in mm of mercury\n",

      "f = 0.7 # Fraction of volume of air in th cylinder relative to swept volume\n",

      "R = 14.8 # Theoratical Air fuel ratio\n",

      "d = 82.0 # Diameter of cylinder in mm\n",

      "L = 130.0 # Stroke of cylinder in mm\n",

      "cv = 44.0 # Heating value of petrol in MJ/kg\n",

      "n_m = 0.9 # Mechanical efficiency of the engine\n",

      "print \"\\n Example 20.9\\n\"\n",

      "Ip = Bp/n_m\n",

      "p_ = 101.325 # In kN/m**2 as p = 760 mm mercury\n",

      "v_a = f*(math.pi/4)*((d*(10**-3))**2)*(L*(10**-3))*(N/2)*4\n",

      "m = p_*(v_a)/(0.287*(t+273))\n",

      "m_f = (m/R)*(1+x/100)\n",

      "n_th = Ip*3600/(m_f*cv*1000*60)\n",

      "bmep = Bp*60/((math.pi/4)*((d*(10**-3))**2)*(L*10**-3)*(N/2)*4)\n",

      "print \"\\n Indicated thermal efficiency = \",n_th*100 ,\" percent,\\n Brake mean effective preassure = \",bmep ,\" kN/m**2\"\n",

      "#The value of  answer is different because of round off error"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.9\n",

        "\n",

        "\n",

        " Indicated thermal efficiency =  30.0275891939  percent,\n",

        " Brake mean effective preassure =  825.889834193  kN/m**2\n"

       ]

      }

     ],

     "prompt_number": 15

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.10:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "d = 25.0 # Throat diameter in mm\n",

      "D = 1.2 # Main jet diameter in mm\n",

      "c_d = 0.85 # Cofficient of discharge for the venturi \n",

      "C_d = 0.65 # Cofficient of discharge for fuel jet\n",

      "h = 6.0 # Height of the throat from gasoline surface in mm\n",

      "p_1 = 1.0 # Ambient pressure in bar\n",

      "T = 300.0 # Ambient temperature in K\n",

      "Ro_f = 760.0 # Density in kg/m**3\n",

      "print \"\\n Example 20.10\\n\"\n",

      "delta_p = h*(10**-3)*Ro_f*9.81\n",

      "p_2 = p_1-delta_p*(10**-5)\n",

      "Ro_air = p_1*(10**5)/(287*T)\n",

      "v  = (2*delta_p/Ro_air)**(1.0/2.0)\n",

      "print \"\\n Minimum velocity of air required to start the flow = \",v ,\" m/s\"\n",

      "#The value of  answer is different because of round off error"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.10\n",

        "\n",

        "\n",

        " Minimum velocity of air required to start the flow =  8.77674536488  m/s\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.11:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "Bp = 40.0 # Brake power when all cylinder operating in kW\n",

      "N = 2000.0 # Speed in rpm\n",

      "Bp1 = 32.2 # Brake power with cylinder no. 1 cut out in kW\n",

      "Bp2 = 32.0 # Brake power with cylinder no. 2 cut out in kW\n",

      "Bp3 = 32.5 # Brake power with cylinder no. 3 cut out in kW\n",

      "Bp4 = 32.4 # Brake power with cylinder no. 4 cut out in kW\n",

      "Bp5 = 32.1 # Brake power with cylinder no. 5 cut out in kW\n",

      "Bp6 = 32.3 # Brake power with cylinder no. 6 cut out in kW\n",

      "d = 100.0 # Diameter of cylinder in mm\n",

      "L = 125.0 # Stroke of cylinder in mm\n",

      "Vc = 0.000123 # Clearance volume in m**3\n",

      "m_f = 9.0 # Fuel consumption in kg/h\n",

      "cv = 40.0 # Heating value in MJ/kg\n",

      "print \"\\n Example 20.11\\n\"\n",

      "Ip1 = Bp-Bp1\n",

      "Ip2 = Bp-Bp2\n",

      "Ip3 = Bp-Bp3\n",

      "Ip4 = Bp-Bp4\n",

      "Ip5 = Bp-Bp5\n",

      "Ip6 = Bp-Bp6\n",

      "Ip = Ip1+Ip2+Ip3+Ip4+Ip5+Ip6\n",

      "n_m = Bp/Ip\n",

      "bmep = Bp*2*60/(L*(10**-3)*((d*(10**-3))**2)*(math.pi/4)*N)\n",

      "Vs = (math.pi/4)*((d*(10**-3))**2)*(L*(10**-3))\n",

      "r_k = (Vs+Vc)/Vc\n",

      "n_ase = 1- (1/(r_k**(1.4-1)))\n",

      "n_th = Ip*3600/(m_f*cv*1000)\n",

      "R_e = n_th/n_ase\n",

      "print \"\\n Mechanical efficiency = \",n_m*100 ,\" percent,\\n Brake mean effective pressure = \",bmep*(10**-2) ,\" bar\\n Air standard ratio = \",n_ase*100 ,\" percent,\\n Brake thermal efficiency is \",n_th*100 ,\" percent,\\n Relative efficiency = \",R_e*100 ,\" percent\"\n",

      "#The value of  answer for air standard efficiency is different because of round off error\n",

      "# Answer given in the book for bmep is 3.055 bar which is wrong.\n",

      "# Answer given in the book for brake thermal efficiency is 40 percent which is wrong.\n",

      "# Answer given in the book for relative efficiency is 68.6 percent which is wrong.\n",

      "\n",

      "\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.11\n",

        "\n",

        "\n",

        " Mechanical efficiency =  86.0215053763  percent,\n",

        " Brake mean effective pressure =  24.4461992589  bar\n",

        " Air standard ratio =  58.4417930454  percent,\n",

        " Brake thermal efficiency is  46.5  percent,\n",

        " Relative efficiency =  79.5663472609  percent\n"

       ]

      }

     ],

     "prompt_number": 17

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.12:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "p1 = 0.95 # Pressure in bar\n",

      "t1 = 25 # Temperature in degree centigrade\n",

      "p2 = 2 # Delivery pressure in bar\n",

      "r = 18 # Air fuel ratio\n",

      "t3 = 600 # Temperature of gasses leaving the engine in degree centigrade\n",

      "p3 = 1.8 # Pressure of gasses leaving the engine in bar\n",

      "p4 = 1.04 # Pressure at the inlet of turbine in bar\n",

      "n_c = 0.75 # Efficiency of compresor\n",

      "n_t = 0.85 # Efficiency of turbine\n",

      "Cp = 1.005 # Heat capacity of air in kJ/kgK\n",

      "Cp_ = 1.15 # Heat capacity of gasses in kJ/kgK\n",

      "gama = 1.4 # Adiabatic index for air\n",

      "print \"\\n Example 20.12\\n\"\n",

      "T2_s = (t1+273)*(p2/p1)**((gama-1)/gama)\n",

      "T2 = (t1+273)+((T2_s-(t1+273))/n_c)\n",

      "Wc = Cp*(T2-(t1+273))\n",

      "T4_s = (t3+273)*((p4/p3)**((gama-1)/gama))\n",

      "T4 = (t3+273)-((t3+273)-T4_s)*n_t\n",

      "Wt = (1+(1/r))*Cp_*((t3+273)-T4)\n",

      "n = (Wt-Wc)/Wt\n",

      "print \"\\n Power lost as a percentage of the power produced by the turbine = \",n*100 ,\" percent\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.12\n",

        "\n",

        "\n",

        " Power lost as a percentage of the power produced by the turbine =  23.5485226573  percent\n"

       ]

      }

     ],

     "prompt_number": 18

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.13:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "Bp = 250.0 # Power developed by the engine in kW\n",

      "n = 6.0 # No of cylinders \n",

      "N = 2000.0 # Speed in rpm\n",

      "bsfc = 0.2 # Specific fuel consumption in kg/kWh\n",

      "P = 35.0 # Pressure at the begining of the injection in bar\n",

      "p_max = 55.0 # Maximum cylinder pressure in bar\n",

      "p = 180.0 # Expected pressure for injection in bar\n",

      "P_max = 520.0 # Maximum pressure at the injection in bar\n",

      "c_d = 0.78 # Cofficient of discharge\n",

      "s = 0.85 # Specific gravity of fuel oil\n",

      "p_atm = 1.0 # Atmospheric pressure in bar\n",

      "theta = 18.0 # Crank angle in degree\n",

      "print \"\\n Example 20.13\\n\"\n",

      "Bp_cy = Bp/n\n",

      "m_f = Bp_cy*bsfc/60 # in kg/min\n",

      "f_c = m_f*(2/N)\n",

      "T = theta/(360*(N/60))\n",

      "delta_p = p-P\n",

      "delta_p_ = P_max-p_max\n",

      "avg_delta_p = (delta_p+delta_p_)/2\n",

      "v = c_d*sqrt((2*(avg_delta_p)*(10**5))/(s*1000))\n",

      "V = m_f*(10**-3)/(s*1000)\n",

      "A = V/(v*T)\n",

      "print \"\\n Total orifice area per injector = \",A*10**6 ,\" mm**2\""

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.13\n",

        "\n",

        "\n",

        " Total orifice area per injector =  0.521323450963  mm**2\n"

       ]

      }

     ],

     "prompt_number": 19

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.14:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "n=1.3 # Polytropic index\n",

      "p1 = 140.0 # Pressure at point one in kN/m**2\n",

      "p2 = 360.0 # Pressure at point two in kN/m**2\n",

      "r_e = 0.4 # Relative efficiency\n",

      "cv = 18840 # Calorific value in kJ/m**2\n",

      "print \"\\n Example 20.14\\n\"\n",

      "r = (((p2/p1)**(1/n))-1)/((0.75-0.25*((p2/p1)**(1.0/n))))\n",

      "r_k  = r+1\n",

      "n_ase = 1.0-(1.0/((r_k)**(0.4)))\n",

      "n_th = r_e*n_ase\n",

      "V_f = n_th*cv/3600\n",

      "print \"\\n Thermal efficiency = \",n_th*100 ,\" percemt,\\n Gas consumption per kWh on indicated power basis = \",V_f ,\" m**3/kWh\"\n",

      "#The value of  answer is different because of round off error\n",

      "\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.14\n",

        "\n",

        "\n",

        " Thermal efficiency =  19.8935818353  percemt,\n",

        " Gas consumption per kWh on indicated power basis =  1.04109744938  m**3/kWh\n"

       ]

      }

     ],

     "prompt_number": 20

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.15:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "# Given that\n",

      "d = 180.0 # Bore in mm\n",

      "L = 200.0 # Stroke in mm\n",

      "Bp = 245.0 # Brake power in kW\n",

      "N = 1500.0 # Speed in rpm\n",

      "mep = 8.0 # Mean effective pressure in bar\n",

      "m_f = 70.0 # Fuel consumption in kg/h\n",

      "cv = 42.0 # Heating value of fuel in MJ/kg\n",

      "m_h = 0.12 # Fraction of hydrogen content by mass\n",

      "m_a = 26.0 # Air consumption in kg/min\n",

      "m_w = 82.0 # Mass of cooling water in kg/min\n",

      "delta_t = 44 # Cooling water temperature rise in degree centigrade\n",

      "m_o = 50.0 # Cooling oil circulated through the engine in kg/min\n",

      "delta_T = 24 # Cooling oil temperature rise in degree centigrade\n",

      "s_o = 2.1 # Specific heat of cooling oil in kJ/kgK\n",

      "t = 30.0 # Room temperature in degree centigrade\n",

      "t_e = 400.0 # Exhaust gas temperature on degree centigrade\n",

      "c_p_de = 1.045 # Heat capacity of dry exhaust gas in kJ/kgK\n",

      "p = 0.035 # Partial pressure of steam in exhaust gas in bar\n",

      "print \"\\n Example 20.15\\n\"\n",

      "h = m_f*cv*1000/3600\n",

      "Ip = mep*(10**5)*L*(10**-3)*(math.pi/4)*((d*(10**-3))**2)*N*6/(2*60000)\n",

      "n_m = Bp/Ip\n",

      "h_w = (m_w/60)*(4.187*delta_t)\n",

      "h_o = (m_o/60)*(s_o*delta_T)\n",

      "m_e = m_f/60 + m_a\n",

      "m_v = m_h*9*(m_f/60)\n",

      "m_de = (m_e-m_v)/60\n",

      "H = 3060 # From the steam table the enthalpy of steam at the exhaust contion(0.035 bar) in kJ/kg\n",

      "h_s = (m_v/60)*H\n",

      "h_de = (m_de)*(c_p_de)*(t_e-t)\n",

      "h_su = h - (Bp+h_w+h_s+h_o+h_de)\n",

      "print \"\\n Mechanical efficiency = \",n_m*100 ,\" percemt\"\n",

      "print \"\\n                  Energy Balance\"\n",

      "print \"\\n                                 Input          Output\"\n",

      "print \"\\n Heat supplied by fuel           \",h ,\" kW    -\"\n",

      "print \"\\n Useful work(BP)                   -            \",Bp ,\" kW\"\n",

      "print \"\\n Heat carried by cooling water     -            \",h_w ,\" kW\"\n",

      "print \"\\n Heat carried by steam             -            \",h_s ,\" kW\"\n",

      "print \"\\n Heat carried by cooling oil       -            \",h_o ,\" kW\"\n",

      "print \"\\n Heat carried by dry exhaust gas   -            \",h_de ,\" kW\"\n",

      "print \"\\n Heat transferred to surroundings  -            \",h_su ,\" kW\"\n",

      "\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.15\n",

        "\n",

        "\n",

        " Mechanical efficiency =  80.2324301595  percemt\n",

        "\n",

        "                  Energy Balance\n",

        "\n",

        "                                 Input          Output\n",

        "\n",

        " Heat supplied by fuel            816.666666667  kW    -\n",

        "\n",

        " Useful work(BP)                   -             245.0  kW\n",

        "\n",

        " Heat carried by cooling water     -             251.778266667  kW\n",

        "\n",

        " Heat carried by steam             -             64.26  kW\n",

        "\n",

        " Heat carried by cooling oil       -             42.0  kW\n",

        "\n",

        " Heat carried by dry exhaust gas   -             166.946877778  kW\n",

        "\n",

        " Heat transferred to surroundings  -             46.6815222222  kW\n"

       ]

      }

     ],

     "prompt_number": 22

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex20.16:pg-853"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "# Given that\n",

      "N = 3000 # Speed in rpm\n",

      "T = 66.5 # Torque in Nm\n",

      "d = 60 # Bore in mm\n",

      "L = 100 # Stroke in mm\n",

      "Vc = 60 # Clearance volume in cc\n",

      "r_e = 0.5 # Relative efficiency\n",

      "cv = 42 # Calorific value in MJ/kg\n",

      "print \"\\n Example 20.16\\n\"\n",

      "Vs = (math.pi/4)*((60*(10**-3))**2)*(L*(10**-3))\n",

      "r_k = (Vs+(Vc*(10**-6)))/(Vc*(10**-6))\n",

      "n_ase = 1-(1/(r_k**(0.4)))\n",

      "n_br = n_ase*r_e\n",

      "Bp = (2*(math.pi)*T*N)/(60000)\n",

      "m_f = Bp*3600/(cv*1000*n_br)\n",

      "bmep = Bp*60000/(Vs*(N/2))\n",

      "print \"\\n Fuel consumption = \",m_f ,\" kg/h,\\n Brake mean effective pressure = \",bmep*(10**-5) ,\" bar\"\n",

      "#The answer given in the book for bmep has calculation error\n",

      "# The answer has round off error for fuel consumption"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "\n",

        " Example 20.16\n",

        "\n",

        "\n",

        " Fuel consumption =  7.13500385939  kg/h,\n",

        " Brake mean effective pressure =  29.5555555556  bar\n"

       ]

      }

     ],

     "prompt_number": 23

    }

   ],

   "metadata": {}

  }

 ]

}