summaryrefslogtreecommitdiff
path: root/Principles_of_Power_System/chapter2.ipynb
blob: daf8974b6d58f55f48d35d575ecccabc22dd4745 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:a62a0cfa22010723ae84accbfbc8f3f3c553c1279f7bb65e42ceaaad44de0807"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2:Generating Stations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.1, Page Number: 16"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "n=20                        #overall efficiency of plant\n",
      "h=860                       #kcal\n",
      "m=0.6           #Mass of fuel burnt(kg) per KW of electrical energy generated\n",
      "\n",
      "#Calculations:\n",
      "x=h*100/(m*n)           #Calorific value of fuel(kcal/kg)\n",
      "\n",
      "#Results:\n",
      "print \"Calorific value of fuel =\",round(x,2),\"kcal/kg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Calorific value of fuel = 7166.67 kcal/kg\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.2, Page Number: 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "M = 20000                           #maximum demand(kW)\n",
      "n_b= 85                             #boiler efficiency(%)\n",
      "m=0.9                             #coal consumption(kg/kWh)\n",
      "LF=40                             #load factor(%)\n",
      "n_t=90                          #turbine efficiency(%)\n",
      "c=300                           #cost of 1 tonne of coal(Rs)\n",
      "\n",
      "#Calculations:\n",
      "n_th = n_b * n_t/100            #in %\n",
      "cb = LF*M*m*c*24*365/(1000*100)\n",
      "\n",
      "#Results:\n",
      "print \"Thermal efficiency = \",n_th,\"%\"\n",
      "print \"Coal bill per annum = Rs\",cb"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thermal efficiency =  76.5 %\n",
        "Coal bill per annum = Rs 18921600.0\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.3, Page Number: 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "ct=3000000                     #annul cost of coal(Rs)\n",
      "cv=5000                         #Calorific value of coal(kcal/kg)\n",
      "c=300                          #cost of coal per tonne(Rs)\n",
      "n_th=33                        #thermal efficiency(%)\n",
      "n_elec=90                      #electrical efficiency(%)\n",
      "\n",
      "#Calculations:\n",
      "n_t=n_th*n_elec/100                 #overall efficiency(%)\n",
      "h=ct*cv*1000/c                  #heat of combustion(kcal)\n",
      "ho=n_t*h/(100*860)             #heat output(kWh)\n",
      "L=ho/8760                      #kW\n",
      "\n",
      "\n",
      "#Results:\n",
      "print \"Avg load on the station=\",round(L),\"kW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Avg load on the station= 1971.0 kW\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.4, Page Number: 17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from sympy import *\n",
      "\n",
      "\n",
      "#Variable declaration:\n",
      "kWh= symbols('kWh')\n",
      "W = 13500 + 7.5 * kWh               #Water evaporated in kg\n",
      "C = 5000 + 2.9 * kWh                #coal cumsumption in kg\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "#part (i):\n",
      "#As the station output (i.e., kWh) increases towards infinity,\n",
      "#the limiting value of W/C approaches\n",
      "L1= 7.5/2.9                        #in kg\n",
      "\n",
      "#part (ii):\n",
      "#at no load\n",
      "kWh=0\n",
      "c=(5000+2.9*kWh)/8                             #coal per hour in kg\n",
      "#Results:\n",
      "print \"Limiting value of water/kg of coal=\",round(L1,1),\"kg\"\n",
      "print \"Required Coal per hour\",c,\"kg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Limiting value of water/kg of coal= 2.6 kg\n",
        "Required Coal per hour 625.0 kg\n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.5, Page Number: 18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "C=100                            #Capacity of station in MW\n",
      "cv=6400                          #kcal/kg\n",
      "n_th=0.3                         #thermal efficiency\n",
      "n_elec=0.92                      #electrical efficiency\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "n_t=n_th*n_elec                   #overall efficiency\n",
      "U=C*1*10**3                      #units generated/hr in kWh\n",
      "H=U*860/n_t                    #total heat of combustion(kcal)\n",
      "w=H/cv                          #Coal consumption in kg\n",
      "\n",
      "#Results:\n",
      "print \"The coal consumption per hour =\",round(w),\"kg\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The coal consumption per hour = 48687.0 kg\n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.6, Page Number: 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "C=5*10**6                   #reservoir capacity in m^3\n",
      "H=200                       #water head in m\n",
      "n_t=0.75                    #overall efficiency\n",
      "d=1000                      #density of water in kg/m^3\n",
      "\n",
      "#Calculations:\n",
      "W=C*d*9.81                   #weight of water in Newton\n",
      "E=W*H*n_t/(3600*1000)        #electrical energy available(kWh)\n",
      "\n",
      "\n",
      "#Results:\n",
      "print \"The total energy available=\",round(E/10**6,3),\"* 10^6 kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total energy available= 2.044 * 10^6 kWh\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.7, Page Number: 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "V=94                    #volume of water in m^3/sec\n",
      "d=1000                  #density of water in kg/m^3\n",
      "H=39                    #head of water in m\n",
      "nt=0.80                 #overall efficiency\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "W=V*d                   #weight of water in kg/sec\n",
      "w=W*H*9.81/1000         #work done per sec in kW\n",
      "FC=nt*w                 #firm capacity in kW\n",
      "YGO=FC*8760             #yearly gross capacity in kWh\n",
      "\n",
      "\n",
      "#Results:\n",
      "print \"Firm capacity=\",FC,\"kW\"\n",
      "print \"Yearly gross output\",round(YGO/10**6),\"* 10^6 kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Firm capacity= 28770.768 kW\n",
        "Yearly gross output 252.0 * 10^6 kWh\n"
       ]
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.8, Page Number: 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable Declaration:\n",
      "H=100                      #Water head in m\n",
      "Q=1                        #discharge, m^3/sec\n",
      "nh=0.86                    #hydraulc efficiency\n",
      "nelec=0.92                 #electrical efficiency\n",
      "d=1000                     #density of water, kg/m^3\n",
      "\n",
      "#Calculations:\n",
      "W=Q*d*9.81                 #weight of water in N\n",
      "Po=W*H*nh*nelec/1000        #power produced, kW\n",
      "E=Po*1                     #in kWh\n",
      "\n",
      "#Results:\n",
      "print \"Electrical energy generated per hr=\",round(E),\"kWh\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electrical energy generated per hr= 776.0 kWh\n"
       ]
      }
     ],
     "prompt_number": 38
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.9, Page Number: 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "CA=5*10**9                      #Catchment area in m^2\n",
      "H=30                            #head in m\n",
      "F=1.25                          #Annual rainfall in m\n",
      "K=0.80                          #yeild factor\n",
      "n=0.70                          #overall efficiency\n",
      "LF=0.40                         #Load factor\n",
      "d=1000                          #density of water(kg/m^3)\n",
      "\n",
      "#Calculations:\n",
      "V=CA*F*K                              #volume of water utilised per annum(m^3)\n",
      "W=V*d*9.81                                   #Weight of water available per annum (N)\n",
      "E=round(W*H*n/(10**11*3600),2)*10**8         #Electrical energy available per annum(kWh)\n",
      "Pav=E/8760                                   #average power(kW)\n",
      "Dmax=Pav/LF                                 #Maximum demand\n",
      "\n",
      "#Results:\n",
      "print \"Average power generated is \",round(Pav),\"kW\"\n",
      "print \"Rating of generators is\",round(Dmax),\"kW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Average power generated is  32648.0 kW\n",
        "Rating of generators is 81621.0 kW\n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.10, Page Number: 24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable Declaration:\n",
      "A=2.4                    #Area of reservoir(km^2)\n",
      "V=5*10**6                #Capacity of reservoir(m^3)\n",
      "H=100                    #in m\n",
      "np=0.95                  #penstock efficiency\n",
      "nt=0.90                  #turbine efficiency\n",
      "ng=0.85                  #generation efficiency\n",
      "L=15000                 #load supplied in kW\n",
      "\n",
      "#Calculations:\n",
      "W=V*1000*9.81             #in Newton\n",
      "n=int(np*nt*ng*1000)/1000               #overall efficiency\n",
      "E=W*H*n/(1000*3600)       #Elecctrical energy generated(kWh)\n",
      "x=L*3*3600/(A*10**6*9.81*H*n)\n",
      "\n",
      "#Results:\n",
      "print \"Total electrical energy generated is \",round(E),\"kWh\"\n",
      "print \"Fall in reservoir level is\",round(x*100,3),\"cm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total electrical energy generated is  989175.0 kWh\n",
        "Fall in reservoir level is 9.478 cm\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.11, Page Number: 25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "H=25                       #head of reservoir in m\n",
      "Pr=400                    #power required by factory(kW)\n",
      "n=0.80                    #overall efficiency of plant\n",
      "\n",
      "#Calculations:\n",
      "#part (i):\n",
      "#(a):\n",
      "d1 = 10                     #discharge in m^3/sec\n",
      "w1 = d1*1000*9.81           #weight of water in N\n",
      "P1 = w1*H*n/1000             #power developed(kW)\n",
      "\n",
      "#(b)\n",
      "d2 = 6                      #in m^3/sec\n",
      "P2 = P1*d2/d1               #kW\n",
      "\n",
      "#(c)\n",
      "d3 = 1.5                    #in m^3/sec\n",
      "P3 = P1*d3/d1               #kW\n",
      "\n",
      "Ps = Pr-P3                  #standby power(kW)\n",
      "\n",
      "#part(ii):\n",
      "Dav = (d1*4+d2*2+d3*6)/12   #avg discharge(m^3/sec)\n",
      "P = P1*Dav/d1               #power developed(kW)\n",
      "Pex = P-Pr                  #Excess power available(kW)\n",
      "\n",
      "\n",
      "#Results:\n",
      "print \"(i) Standby power is \",round(Ps),\"kW\"\n",
      "print \"(ii) Excess power available is \",round(Pex,1),\"kW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) Standby power is  106.0 kW\n",
        "(ii) Excess power available is  597.4 kW\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {
      "slideshow": {
       "slide_type": "-"
      }
     },
     "source": [
      "Example 2.12, Page Number: 25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "#for part (i):\n",
      "C = 10                          #Installed capacity(MW)\n",
      "H = 20                          #head of reservoir(m)\n",
      "n = 0.80                        #overall efficiency\n",
      "LF = 0.40                       #load factor\n",
      "#for part (ii):\n",
      "Q2 = 20                         #discharge\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "#for part(i):\n",
      "U = C*LF*24*7*10**3             #units generated per week(kWh)\n",
      "Q = U/(H*n*9.81*24*7)           #Discharge in m^3/sec\n",
      "\n",
      "#for part(ii):\n",
      "U2 = Q2*9.81*1000*n*H*24/1000     #units generated per day(kWh)\n",
      "LF2 = U2/(C*10**3*24)\n",
      "\n",
      "#Results:\n",
      "print \"(i) The river discharge is \",round(Q,2),\"m^3/sec\"\n",
      "print \"(ii) The load factor is \", round(LF2*100,1),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) The river discharge is  25.48 m^3/sec\n",
        "(ii) The load factor is  31.4 %\n"
       ]
      }
     ],
     "prompt_number": 42
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.13, Page Number: 26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration:\n",
      "H = 15                            #head of reservoir(m)\n",
      "n = 0.85                          #efficiency\n",
      "L = 0.40                          #load factor\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Qavg = (500+520+850+800+875+900+546)/7    #in m^3/sec\n",
      "\n",
      "#It is clear from graph that on three dyas \n",
      "#(viz., Sun, Mon. and Sat.), the discharge is less than\n",
      "#the average discharge.\n",
      "\n",
      "V1 = (500+520+546)*24*3600  #Actual volume available in these 3 days(m^3/s)\n",
      "V2 = 3*Qavg*24*3600         #Vol. of water required in these 3 days(m^3/s)\n",
      "Pr = V2-V1                  #Pondage required(m^3/sec)\n",
      "Po = Qavg*9.81*1000*H*n     #Avg output produced(W)\n",
      "C = Po/L                    #Capacity of plant(W)\n",
      "\n",
      "#Results:\n",
      "print \"(i) The average daily discharge is \",Qavg,\"m^3/sec\"\n",
      "print \"(ii) Pondage required is (\",round(Pr/10**5),\"* 10^5)  m^3\"\n",
      "print \"(iii)Installed capacity of plant is \",round(C/10**6),\"MW\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) The average daily discharge is  713.0 m^3/sec\n",
        "(ii) Pondage required is ( 495.0 * 10^5)  m^3\n",
        "(iii)Installed capacity of plant is  223.0 MW\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.14, Page Number: 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "w = 0.28                        #fuel consumption in kg/kWh\n",
      "C = 10000                       #calorific value of fuel(kcal/kWh)\n",
      "na = 0.95                        #efficiency of alternator\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "H = w*C/860                     #heat produced by 0.28 kg/kWh of fuel\n",
      "\n",
      "no = 1/H                        #Overall efficiency\n",
      "ne = no/na                      #Efficiency of engine\n",
      "\n",
      "#Results:\n",
      "print \"(i) The overall efficiency is \",round(no*100,1),\"%\"\n",
      "print \"(ii)The efficiency of the engine\",round(ne*100,1),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i) The overall efficiency is  30.7 %\n",
        "(ii)The efficiency of the engine 32.3 %\n"
       ]
      }
     ],
     "prompt_number": 44
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.15, Page Number: 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "\n",
      "#Variable declaration:\n",
      "w = 1000                      #fuel consumption in kg/day\n",
      "E = 4000                      #Units generated in kWh/day\n",
      "C = 10000                     #calorific value in kcal/kg\n",
      "na = 0.96                     #Alternator efficiency\n",
      "nem = 0.95                     #engine mechanical efficiency\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "s = w/E                       #specific fuel consumption(kg/kWh)\n",
      "E2 = w*C                      #energy input per day(kcal/day)\n",
      "no = E*860/E2                 #overall efficiency\n",
      "ne = no/na                    #engine efficiency\n",
      "net = ne/nem                  #engine thermal efficiency\n",
      "\n",
      "#Results:\n",
      "print \"Specific fuel consumption is \",s,\"kg/kWh\"\n",
      "print \"Overall efficiency is \",round(no*100,1),\"%\"\n",
      "print \"Thermal efficiency of the engine is \",round(net*100,2),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Specific fuel consumption is  0.25 kg/kWh\n",
        "Overall efficiency is  34.4 %\n",
        "Thermal efficiency of the engine is  37.72 %\n"
       ]
      }
     ],
     "prompt_number": 45
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.16, Page Number: 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "C1 = 700                   #capacity of plant 1(kW)\n",
      "C2 = 2*500                 #capacity of plant 2(kW)\n",
      "pcf = 0.40                 #plant capacity factor\n",
      "w = 0.28                   #fuel cunsumption in kg/kWh\n",
      "H = 10200                  #specific heat of fuel in kcal/kg\n",
      "\n",
      "#Calculatios:\n",
      "M = (C1+C2)*30*24          #max energy can be produced in 30 days(kWh)\n",
      "E = pcf*M                  #Actual energy produced in 30 days(kWh)\n",
      "W = E*w                    #actual fuel consumption in kg\n",
      "\n",
      "Po = E*860                 #output energy in kWh\n",
      "Pin = W*H                  #Input energy in kWh\n",
      "n = Po/Pin                 #Overall efficiency\n",
      "\n",
      "#Results:\n",
      "print \"The fuel oil required is \",W,\"kg\"\n",
      "print \"Ovreall efficiency is\",round(n*100),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fuel oil required is  137088.0 kg\n",
        "Ovreall efficiency is 30.0 %\n"
       ]
      }
     ],
     "prompt_number": 46
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.17, Page Number: 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "M = 300                   #Energy received from reactor(MW)\n",
      "E1 = 200                  #Energy released fron each atom(MeV)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "E2 = M*10**6*3600            #Energy released per hour(J)\n",
      "E3 = E1*1.6*10**-19*10**6      #Energy released per fission(J)\n",
      "N = E2/E3                    #No of atoms fissioned\n",
      "m = N*235/(6.022*10**23)    #mass of uranium fissioned per hr(g)\n",
      "\n",
      "#Results:\n",
      "print \"Mass of Uranium fissioned per hour is\",round(m,2),\"g\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mass of Uranium fissioned per hour is 13.17 g\n"
       ]
      }
     ],
     "prompt_number": 47
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 2.18, Page Number: 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "\n",
      "#Variable declaration:\n",
      "t = 30                         #days\n",
      "w = 2                          #weight of uranium(kg)\n",
      "Eo = 200                     #energy released per fission(MeV)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "N = 2*1000*6.022*10**23/235     #No of atoms fissioned in 2kg of fuel\n",
      "Po = N*Eo*(1.6*10**-19)*10**6/(24*60*60*30)    #Watt\n",
      "\n",
      "\n",
      "#Results:\n",
      "print \"Power output is\",round(Po*10**-6,1),\"MW\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power output is 63.3 MW\n"
       ]
      }
     ],
     "prompt_number": 48
    }
   ],
   "metadata": {}
  }
 ]
}