1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 1 - Gas Power Cycles"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1 - pg 1.29"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)The pressures at 1 is (bar) = 1.0\n",
"(b)The pressures at 2 is (bar) = 12.0\n",
"(c)The pressures at 3 is (bar) = 22.38\n",
"(d)The pressures at 4 is (bar) = 1.86\n",
"(e)Temperature at 1 is (K) = 300.0\n",
"(f)Temperature at 2 is (K) = 610.2\n",
"(g)Temperature at 3 is (K) = 1138.0\n",
"(h)Temperature at 4 is (K) = 559.0\n",
"(i)Volume at 1 is (m^3) = 0.5\n",
"(j)Volume at 1 is (m^3) = 0.08475\n",
"(h)Volume at 1 is (m^3) = 0.08475\n",
"(k)Volume at 1 is (m^3) = 0.5\n"
]
}
],
"source": [
"#pg 1.29\n",
"#calculate the pressure and temperature in all cases\n",
"import math\n",
"#Input data\n",
"V1=0.5;#Initial Volume before the commencement of compression in m**3\n",
"P1=1.;#Initial pressure before the commencement of compression in bar\n",
"T1=300.;#Initial temperature in K\n",
"P2=12.;#Final pressure at the end of compression stroke in bar\n",
"Q=220.;#Heat added during the constant volume process in kJ\n",
"r=1.4;#Isentropic constant for air\n",
"R=0.287;#Characteristic Gas constant in kJ/kg K\n",
"Cv=0.718;#Specific heat of mixture in kJ/kg K\n",
"\n",
"#Calculations\n",
"r1=(P2/P1)**(1/r);#Compression ratio\n",
"T2=T1*(r1)**(r-1);#Final temperature after the end of compression stroke in K\n",
"V2=(P1*T2*V1)/(P2*T1);#Final volume after the end of compression stroke in m**3\n",
"m=(P1*10**5*V1)/(R*T1*1000);#Mass of air flowing in kg\n",
"T3=(Q/(m*Cv))+T2;#Temperature after constant volume heat addition in K\n",
"P3=(P2*T3)/T2;#Pressure after constant volume heat addition in K\n",
"V3=V2;#Volume at 3\n",
"P4=P3*(1/r1)**(r);#Pressure after isentropic expansion in bar\n",
"V4=V1;#Volume after isentropic expansion in m**3\n",
"T4=T3*(1/r1)**(r-1);#Temperature at the end of isentropic expansion in K\n",
"\n",
"#Output\n",
"print '(a)The pressures at 1 is (bar) = ',round(P1,2)\n",
"print '(b)The pressures at 2 is (bar) = ',round(P2,2)\n",
"print '(c)The pressures at 3 is (bar) = ',round(P3,2)\n",
"print '(d)The pressures at 4 is (bar) = ',round(P4,2)\n",
"print '(e)Temperature at 1 is (K) = ',round(T1,2)\n",
"print '(f)Temperature at 2 is (K) = ',round(T2,1)\n",
"print '(g)Temperature at 3 is (K) = ',round(T3,0)\n",
"print '(h)Temperature at 4 is (K) = ',round(T4,0)\n",
"print '(i)Volume at 1 is (m^3) = ',round(V1,2)\n",
"print '(j)Volume at 1 is (m^3) = ',round(V2,5)\n",
"print '(h)Volume at 1 is (m^3) = ',round(V3,5)\n",
"print '(k)Volume at 1 is (m^3) = ',round(V4,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2 - pg 1.31"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The increase in efficiency due to change in compression ratio from 6 to 7 is (percent) = 2.9\n"
]
}
],
"source": [
"#pg 1.31\n",
"#calculate the increase in efficiency\n",
"#Input data\n",
"r1=6.;#Initial compression ratio\n",
"r2=7.;#Final compression ratio\n",
"r=1.4;#Isentropic coefficient of air\n",
"\n",
"#Calculations\n",
"nr1=(1-(1/r1)**(r-1))*100;#Otto cycle efficiency when compression ratio is 6 in percentage\n",
"nr2=(1-(1/r2)**(r-1))*100;#Otto cycle efficiency when compression ratio is 7 in percentage\n",
"n=nr2-nr1;#Increase in efficiency in percentage\n",
"\n",
"#Output\n",
"print 'The increase in efficiency due to change in compression ratio from 6 to 7 is (percent) = ',round(n,1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 - pg 1.31"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)The compression ratio is 5.007 \n",
"(b)Efficiency of the Otto cycle is (percent) = 47.5\n"
]
}
],
"source": [
"#pg 1.31\n",
"#calculate the compression ratio and Efficiency of Otto cycle\n",
"#Input data\n",
"T1=315.;#Temperature at the beginning of isentropic compression in K\n",
"T2=600.;#Temperature at the end of isentropic compression in K\n",
"r=1.4;#Isentropic constant of air\n",
"\n",
"#Calculations\n",
"r1=(T2/T1)**(1/(r-1));#Compression ratio\n",
"n=(1-(1/r1**(r-1)))*100;#Efficiency of Otto cycle in percent\n",
"\n",
"#Output\n",
"print '(a)The compression ratio is ',round(r1,3),'\\n(b)Efficiency of the Otto cycle is (percent) = ',n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4 - pg 1.32"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The air standard efficiency of air is (percent) = 47.43\n"
]
}
],
"source": [
"#pg 1.32\n",
"#calculate the standard efficiency of air\n",
"#Input data\n",
"D=0.1;#Diameter of the cylinder in m\n",
"L=0.15;#Stroke length in m\n",
"Vc=0.295*10**-3;#Clearance volume in m**3\n",
"r=1.4;#Isentropic constant of air\n",
"\n",
"#Calculations\n",
"Vs=(3.14/4)*(D**2*L);#Swept volume in m**3\n",
"r1=(Vc+Vs)/Vc;#Compression ratio\n",
"n=(1-(1/r1)**(r-1))*100.;#Otto cycle efficiency in percentage\n",
"\n",
"#Output\n",
"print 'The air standard efficiency of air is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 5 - pg 1.33"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Compression ratio is 7.56\n",
"(b)The air standard efficiency is (percent) = 55.5\n",
"(c)Mean effective pressure is (bar) = 4.86\n"
]
}
],
"source": [
"#pg 1.33\n",
"#calculate the compression ratio, standard air efficiency and Mean effective pressure\n",
"#Input data\n",
"P1=1.;#Initial pressure of air in bar\n",
"T1=300.;#Initial temperature in K\n",
"P2=17.;#Pressure at the end of isentropic compression in bar\n",
"P3=40.;#Pressure at the end of constant volume heat addition in bar\n",
"Cv=0.717;#Specific heat of mixture in kJ/kg K\n",
"M=28.97;#Molecular weight in kg\n",
"Ru=8.314;#Universial gas constant in kJ/kg mole K\n",
"m=1.;#Mass from which heat is extracted in kg\n",
"W=363.;#Work done in kN m\n",
"\n",
"#Calculations\n",
"Rc=Ru/M;#Characteristic gas constant in kJ/kg K\n",
"Cp=Rc+Cv;#Specific heat at constant pressure in kJ/kg K\n",
"r=Cp/Cv;#Isentropic gas constant\n",
"r1=(P2/P1)**(1/r);#Compression ratio\n",
"na=(1-(1/r1)**(r-1))*100;#Air standard efficiency in percentage\n",
"T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of isentropic compression process in K\n",
"T3=(P3/P2)*T2;#Temperature at the end of constant volume heat addition in K\n",
"Q=m*Cv*(T3-T2);#Heat supplied in kJ/kg\n",
"V1=(m*Rc*T1*1000)/(P1*10**5);#Initial volume before compression in m**3\n",
"V2=V1/r1;#Volume at the end of compression stroke in m**3\n",
"Vs=V1-V2;#Stroke volume in m**3\n",
"MEP=(W/Vs)/100;#Mean effective pressure in bar\n",
"\n",
"#Output\n",
"print '(a)Compression ratio is',round(r1,2)\n",
"print '(b)The air standard efficiency is (percent) = ',round(na,1)\n",
"print '(c)Mean effective pressure is (bar) = ',round(MEP,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6 - pg 1.34"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Clearance volume as percentage of stroke volume is (percent) = 23.93\n",
"(b)Compression ratio is = 5.18\n",
"(c)Air standard efficiency is (percent) = 48.2\n",
"(d)Work done per cycle is (kJ) = 101.23\n"
]
}
],
"source": [
"#pg 1.34\n",
"#calculate the clearance volume, compression ratio, standard efficiency, work done\n",
"#Input data\n",
"V1=0.6;#Initial volume of an engine working on otto cycle in m**3\n",
"P1=1.;#Initial pressure in bar\n",
"T1=308.;#Initial temperature in K\n",
"P2=10.;#Pressure at the end of compression stroke in bar\n",
"Q=210.;#Heat added during constant heat process in kJ\n",
"r=1.4;#Isentropic constant of air\n",
"\n",
"#Calculations\n",
"r1=(P2/P1)**(1/r);#Compression ratio\n",
"V2=V1/r1;#Clearance volume in m**3\n",
"C=(V2/(V1-V2))*100;#Percentage clearance in percent\n",
"na=(1-(1/r1)**(r-1))*100;#Air standard efficiency in percent\n",
"W=Q*(na/100);#Work done per cycle in kJ\n",
"\n",
"#Output\n",
"print '(a)Clearance volume as percentage of stroke volume is (percent) = ',round(C,2)\n",
"print '(b)Compression ratio is = ',round(r1,2)\n",
"print '(c)Air standard efficiency is (percent) = ',round(na,1)\n",
"print '(d)Work done per cycle is (kJ) = ',round(W,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7 - pg 1.36"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ideal power developed by the engine is (kW) = 1030.0\n"
]
}
],
"source": [
"#pg 1.36\n",
"#calculate the Ideal power\n",
"#Input data\n",
"r=5.5;#Compression ratio of an engine working on the otto cycle\n",
"Q=250.;#Heat supplied during constant volume in kJ\n",
"N=500.;#Engine operating speed in rpm\n",
"r1=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"n=(1-(1/r)**(r1-1))*100;#Otto cycle efficiency in percent\n",
"W=Q*(n/100);#Work done per cycle in kJ\n",
"P=W*(N/60);#Work done per second i.e., Power developed in kJ/s or kW\n",
"\n",
"#Output data\n",
"print 'Ideal power developed by the engine is (kW) = ',round(P,0)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8 - pg 1.36"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mean effective pressure is (bar) = 2.377\n"
]
}
],
"source": [
"#pg 1.36\n",
"#calculate the Mean effective pressure\n",
"#Input data\n",
"V1=0.53;#Volume of cylinder of an engine working on Otto cycle in m**3\n",
"V2=0.1;#Clearance volume in m**3\n",
"Q=210.;#Heat supplied during constant volume in kJ\n",
"r=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"r1=V1/V2;#Compression ratio\n",
"n=(1-(1/r1)**(r-1))*100;#Otto cycle efficiency in percentage\n",
"W=Q*(n/100);#Work done per cycle in kJ\n",
"P=W/((V1-V2)*100);#Mean effective pressure in bar\n",
"\n",
"#Output data\n",
"print 'Mean effective pressure is (bar) = ',round(P,3)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10 - pg 1.38"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Maximum power developed by the engine is (kW) = 2.194\n"
]
}
],
"source": [
"#pg 1.38\n",
"#calculate the Maximum power\n",
"#Input data\n",
"T3=1500.;#Upper temperature limit of a otto cycle in K\n",
"T1=300.;#Lower temperature limit in K\n",
"a=0.4;#Rate of flow of air through the cycle in kg/min\n",
"Cv=0.718;#\n",
"\n",
"#Calculations\n",
"T2=(T1*T3)**(1./2);#Temperature at point 2 in K\n",
"T4=T2;#Temperature at point 4 in K\n",
"W=Cv*((T3-T2)-(T4-T1));#Work done per cycle in kJ/kg\n",
"P=W*(a/60);#Maximum power developed by the engine in kW\n",
"\n",
"#Output\n",
"print 'Maximum power developed by the engine is (kW) = ',round(P,3)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11 - pg 1.39"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Thermal efficiency when cut off ratio is 1.25 is (percent) = 65.4\n",
"(b)Thermal efficiency when cut off ratio is 1.50 is (percent) = 64.0\n",
"(c)Thermal efficiency when cut off ratio is 2.00 is (percent) = 61.4\n"
]
}
],
"source": [
"#pg 1.39\n",
"#calculate the Thermal efficiency in all cases\n",
"#Input data\n",
"r=1.4;#Air standard ratio\n",
"p1=1.25;#Cut off ratio 1\n",
"p2=1.50;#Cut off ratio 2\n",
"p3=2.00;#Cut off ratio 3\n",
"rc=16;#Compression ratio\n",
"\n",
"#Calculations\n",
"n1=(1-((1/rc**(r-1)*(p1**r-1)/(r*(p1-1)))))*100;#Thermal efficiency of the diesel cycle for cut off ratio 1.25\n",
"n2=(1-((1/rc**(r-1)*(p2**r-1)/(r*(p2-1)))))*100;#Thermal efficiency of the diesel cycle for cut off ratio 1.50\n",
"n3=(1-((1/rc**(r-1)*(p3**r-1)/(r*(p3-1)))))*100;#Thermal efficiency of the diesel cycle for cut off ratio 2.00\n",
"\n",
"#Output\n",
"print '(a)Thermal efficiency when cut off ratio is 1.25 is (percent) = ',round(n1,1)\n",
"print '(b)Thermal efficiency when cut off ratio is 1.50 is (percent) = ',round(n2,1)\n",
"print '(c)Thermal efficiency when cut off ratio is 2.00 is (percent) = ',round(n3,1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12 - pg 1.40"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Air standard efficiency of the diesel cycle is (percent) = 61.94\n"
]
}
],
"source": [
"#pg 1.40\n",
"#calculate the Air standard efficiency\n",
"r=15.;#Compression ratio of a diesel engine\n",
"Q=5.;#Heat supplied upto 5 percent of the stroke\n",
"r1=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"p=1+(Q/100)*(r-1);#Cut off ratio\n",
"n=(1-((1/r**(r1-1)*(p**r1-1)/(r1*(p-1)))))*100;#Efficiency of diesel cycle in percent\n",
"\n",
"#Output\n",
"print 'Air standard efficiency of the diesel cycle is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 13 - pg 1.40"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Air standard efficiency is (percent) = 66.2\n"
]
}
],
"source": [
"#pg 1.40\n",
"#calculate the air standard efficiency\n",
"#Input data\n",
"r=17.;#Compression ratio of a diesel engine\n",
"e=13.5;#Expansion ratio\n",
"r1=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"p=r/e;#Cut off ratio\n",
"n=(1-((1/r**(r1-1)*(p**r1-1)/(r1*(p-1)))))*100;#Air standard efficiency in percent\n",
"\n",
"#Output\n",
"print 'Air standard efficiency is (percent) = ',round(n,1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 14 - pg 1.41"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Compression ratio = 14.45\n",
"(b)Cut off ratio = 2.49\n",
"(c)Ideal efficiency of the diesel cycle is (percent) = 54.78\n"
]
}
],
"source": [
"#pg 1.41\n",
"#calculate the compression ratio, cut off ratio and Ideal efficiency\n",
"#Input data\n",
"T1=300.;#Temperature at the beggining of compression stroke in K\n",
"T2=873.;#Temperature at the end of compression stroke in K\n",
"T3=2173.;#Temperature at the beggining of expansion stroke in K\n",
"T4=1123.;#Temperature at the end of expansion stroke in K\n",
"r1=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"r=(T2/T1)**(1/(r1-1));#Compression ratio\n",
"rho=T3/T2;#Cut off ratio\n",
"n=(1-((1/r1)*((T4-T1)/(T3-T2))))*100;#Efficiency of diesel cycle in percent\n",
"\n",
"#Output data\n",
"print '(a)Compression ratio = ',round(r,2)\n",
"print '(b)Cut off ratio = ',round(rho,2)\n",
"print '(c)Ideal efficiency of the diesel cycle is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 15 - pg 1.42"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Pressure at point 1 in the cycle is (bar) = 1.0\n",
"(b)Pressure at point 2 & 3 is (bar) = 57.3\n",
"(c)Pressure at point 4 is (bar) = 4.87\n",
"(d)Temperature at point 1 is (K) = 300.0\n",
"(e)Temperature at point 2 is (K0 = 955.0\n",
"(f)Temperature at point 3 is (K) = 2955.0\n",
"(g)Temperature at point 4 is (K) = 1460.0\n"
]
}
],
"source": [
"#pg 1.42\n",
"#calculate the pressure at all points\n",
"#Input data\n",
"r=18.;#Compression ratio of diesel cycle\n",
"Q=2000.;#Heat added in kJ/kg\n",
"T1=300.;#Lowest temperature in the cycle in K\n",
"p1=1.;#Lowest pressure in the cycle in bar\n",
"Cp=1.;#Specific heat of air at constant pressure in kJ/kg K\n",
"Cv=0.714;#Specific heat of air at constant volume in kJ/kg K\n",
"\n",
"#Calculations\n",
"r1=Cp/Cv;#Isentropic ratio\n",
"v1=((1-Cv)*T1)/(p1*10**5);#Initial volume at point 1 in the graph in m**3/kg\n",
"v2=v1/r;#Volume at point 2 in m**3/kg\n",
"p2=p1*(v1/v2)**(r1);#Pressure at point 2 in bar\n",
"T2=T1*(v1/v2)**(r1-1);#Temperature at point 2 in K\n",
"T3=(Q/Cp)+T2;#Temperature at point 3 in K\n",
"v3=v2*(T3/T2);#Volume at point 3 in K\n",
"v4=v1;#Since Constant volume heat rejection in m**3/kg\n",
"T4=T3/(v4/v3)**(r1-1);#Temperature at point 4 in K for isentropic expansion\n",
"p4=p1*(T4/T1);#Pressure at point 4 in bar\n",
"\n",
"#Output\n",
"print '(a)Pressure at point 1 in the cycle is (bar) = ',p1\n",
"print '(b)Pressure at point 2 & 3 is (bar) = ',round(p2,1)\n",
"print '(c)Pressure at point 4 is (bar) = ',round(p4,2)\n",
"print '(d)Temperature at point 1 is (K) = ',T1\n",
"print '(e)Temperature at point 2 is (K0 = ',round(T2,0)\n",
"print '(f)Temperature at point 3 is (K) = ',round(T3,0)\n",
"print '(g)Temperature at point 4 is (K) = ',round(T4,0)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16 - pg 1.43"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Thermal efficiency is (percent) = 61.38\n",
"(b)Power developed is (kW) = 405.0\n"
]
}
],
"source": [
"#pg 1.43\n",
"#calculate the Thermal efficiency and Power developed\n",
"#Input data\n",
"r=16.;#Compression ratio for the air standard diesel cycle\n",
"Q1=2200.;#Heat added in kJ/kg\n",
"T4=1500.;#Temperature at the end of isentropic expansion in K\n",
"T1=310.;#Lowest temperature in the cycle in K\n",
"m=0.3;#Air flow rate in kg/sec\n",
"Cv=0.714;#Specific heat at constant volume in kJ/kg K\n",
"\n",
"#Calculations\n",
"Q2=Cv*(T4-T1);#Heat rejected in kJ/kg\n",
"n=((Q1-Q2)/Q1)*100;#Efficiency in percent\n",
"P=m*(Q1-Q2);#Power developed in kW\n",
"\n",
"#Output\n",
"print '(a)Thermal efficiency is (percent) =',round(n,2)\n",
"print '(b)Power developed is (kW) = ',round(P,0)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 17 - pg 1.44"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Air standard efficiency of the cycle is (percent) = 55.9\n"
]
}
],
"source": [
"#pg 1.44\n",
"#calculate the air standard efficiency of the cycle\n",
"#Input data\n",
"T1=303;#Temperature at the beginning of compression in K\n",
"T2=823;#Temperature at the end of compression in K\n",
"T3=3123;#Temperature at the end of heat addition in K\n",
"T4=1723;#Temperature at the end of isentropic expansion in K\n",
"r=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"n=(1-((T4-T1)/(r*(T3-T2))))*100;#Efficiency of the cycle in percent\n",
"\n",
"#Output\n",
"print 'Air standard efficiency of the cycle is (percent) = ',round(n,1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18 - pg 1.45"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mean effective pressure of the cycle is (bar) = 5.44\n"
]
}
],
"source": [
"#pg 1.45\n",
"#calculate the Mean effective pressure\n",
"#Input data\n",
"r=15.;#Compression Ratio of a diesel engine\n",
"P1=1.;#Operating Pressure of a diesel engine in bar\n",
"r1=1.4;#Isentropic constant\n",
"V1=15.;#Volume at the start of compression stroke in m**3\n",
"V3=1.8;#Volume at the end of constant Pressure heat addition in m**3\n",
"V2=1.;#Volume at the end of isentropic compression stroke in m**3\n",
"\n",
"#Calculations\n",
"Vs=V1-V2;#Swept volume in m**3\n",
"V4=V1;#Volume at the end of Isentropic expansion stroke in m**3\n",
"P2=P1*(r)**r1;#Pressure at the end of Isentropic compression of air\n",
"P3=P2;#Pressure at the end of constant pressure heat addition in bar\n",
"P4=P3*(V3/V4)**r1;#Pressure at the end of Isentropic expansion stroke in bar\n",
"Pm=(V2/Vs)*(P2*((V3/V2)-1)+(P3*(V3/V2)-P4*(V4/V2))/(r1-1)-(P2-P1*(V1/V2))/(r1-1));#Mean effective pressure in bar\n",
" \n",
"#Output\n",
"print 'Mean effective pressure of the cycle is (bar) = ',round(Pm,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 19 - pg 1.46"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Compression ratio of the engine = 23.454\n",
"(b)Air standard efficiency is (percent) = 63.48\n",
"The answers are a bit different due to rounding off error in textbook\n"
]
}
],
"source": [
"#pg 1.46\n",
"#calculate the compression ratio and air standard efficiency\n",
"#Input data\n",
"P1=1.5;#Pressure at the 7/8th stroke of compression in bar\n",
"P2=16;#Pressure at the 1/8th stroke of compression in bar\n",
"n=1.4;#Polytropic index\n",
"c=8.;#Cutoff occurs at 8% of the stroke in percentage\n",
"\n",
"#Calculations\n",
"R1=(P2/P1)**(1./n);#Ratio of volumes\n",
"R2=(R1-1.)/((7./8)-(R1/8.));#Ratio of stroke volume to the clearance volume\n",
"r=1.+R2;#Compression ratio\n",
"rho=1+((c/100.)*r);#Cut off ratio\n",
"na=(1-((1./r**(n-1))*(((rho**n)-1.)/(n*(rho-1)))))*100;#Air standard efficiency in percentage\n",
"\n",
"#Output\n",
"print '(a)Compression ratio of the engine = ',round(r,3)\n",
"print '(b)Air standard efficiency is (percent) = ',round(na,2)\n",
"print 'The answers are a bit different due to rounding off error in textbook'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 20 - pg 1.47"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The loss in efficiency is (percent) = 2.15\n"
]
}
],
"source": [
"#pg 1.47\n",
"#calculate the loss in efficiency\n",
"#Input data\n",
"r=16.;#Compression ratio of diesel engine\n",
"r1=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"rho1=1+(r-1)*(6./100);#Cutoff ratio at 6% of stroke\n",
"rho2=1+(r-1)*(9./100);#Cutoff ratio at 9% of stroke\n",
"n1=(1-(1/r**(r1-1))*(1/r1)*(rho1**r1-1)/(rho1-1))*100;#Efficiency of the cycle at 6% of the stroke in percent\n",
"n2=(1-(1/r**(r1-1))*(1/r1)*(rho2**r1-1)/(rho2-1))*100;#Efficiency of the cycle at 9% of the stroke in percent\n",
"L=n1-n2;#The loss in efficiency in percent\n",
"\n",
"#Output \n",
"print 'The loss in efficiency is (percent) = ',round(L,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 21 - pg 1.48"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Compression ratio = 13.65\n",
"(b)Temperature at the end of compression is (K) = 862.0\n",
"(c)Temperature at the end of comstant pressure heat addition is (K) = 1410.0\n",
"(d)Air standard efficiency is (percent) = 60.84\n"
]
}
],
"source": [
"#pg 1.48\n",
"#calculate the compression ratio, temperature in all cases\n",
"#Input data\n",
"P1=1.03;#Pressure at the beginning of compression stroke in bar\n",
"T1=303.;#Initial temperature in K\n",
"P2=40.;#Maximum pressure in the cycle in bar\n",
"Q=550.;#The heat supplied during the cycle in kJ/kg\n",
"r=1.4;#Isentropic compression ratio\n",
"Cp=1.004;#Specific heat at constant pressure in kJ/kg K\n",
"\n",
"#Calculations\n",
"r1=(P2/P1)**(1/r);#Compression ratio\n",
"T2=(P2/P1)**((r-1)/r)*T1;#Temperature at the end of compression stroke in K\n",
"T3=(Q/Cp)+T2;#Temperature at the end of heat addition in K\n",
"rho=T3/T2;#Cut off ratio\n",
"n=(1-(1/r1**(r-1))*(1/r)*(rho**r-1)/(rho-1))*100;#Air standard efficiency in percentage\n",
"\n",
"#Output\\n\n",
"print '(a)Compression ratio =',round(r1,2)\n",
"print '(b)Temperature at the end of compression is (K) =',round(T2,0)\n",
"print '(c)Temperature at the end of comstant pressure heat addition is (K) = ',round(T3,0)\n",
"print '(d)Air standard efficiency is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 22 - pg 1.50"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The air standard efficiency of an oil engine working on the combustion cycle is (percent) = 56.44\n"
]
}
],
"source": [
"#pg 1.50\n",
"#calculate the air standard efficiency \n",
"#Input data\n",
"r=12.;#Compression ratio of an oil engine, working on the combustion cycle\n",
"r1=1.4;#Isentropic ratio\n",
"P1=1.;#Pressure at the beginning of compression\n",
"P3=35.;#Pressure at the end of constant volume heat addition in bar\n",
"\n",
"#Calculations\n",
"rho=1+(1/10.)*(r-1);#Cut off ratio at 1/10th of the stroke\n",
"P2=P1*(r)**r1;#Pressure at the end of isentropic compression in bar\n",
"a=P3/P2;#Pressure ratio\n",
"n=(1-(1/r**(r1-1))*(a*rho**r1-1)/((a-1)+(r1*a*(rho-1))))*100;#Air standard efficiency in percent\n",
"\n",
"#Output\n",
"print 'The air standard efficiency of an oil engine working on the combustion cycle is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 23 - pg 1.51"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Temperature at the end of constant volume heat addition is (C) = 938.85\n",
"(b)Cut off ratio = 1.38\n",
"The answer for cut off ratio is wrong in textbook. It doesnt convert C to kelvins\n"
]
}
],
"source": [
"#pg 1.51\n",
"#calculate the temperature and cut off ratio\n",
"#Input data\n",
"P1=1.;#Pressure at the beginning of compression stroke of an oil engine working on a air standard dual cycle in bar\n",
"T1=303.;#Temperature at the beginning of compression stroke in K\n",
"P3=40.;#The maximum pressure reached in bar\n",
"T4=1673.;#Maximum temperature reached in K\n",
"Cp=1.004;#Specific heat at constant pressure in kJ/kg K\n",
"Cv=0.717;#Specific heat at constant volume in kJ/kg K\n",
"r1=10.;#Compression ratio\n",
"\n",
"#Calculations\n",
"P4=P3;#Pressure at the start of constant pressure heat addition in bar\n",
"r=Cp/Cv;#Isentropic ratio\n",
"T2=T1*r1**(r-1);#Temperature at the end of compression stroke in K\n",
"P2=P1*r1**r;#Pressure at the end of compression stroke in bar\n",
"T3=T2*(P3/P2);#Temperature at the end of constant volume heat addition in K\n",
"rho=T4/T3;#Cut off ratio\n",
"\n",
"#Output\n",
"print '(a)Temperature at the end of constant volume heat addition is (C) = ',T3-273.15\n",
"print '(b)Cut off ratio = ',round(rho,2)\n",
"print 'The answer for cut off ratio is wrong in textbook. It doesnt convert C to kelvins'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 24 - pg 1.52"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)The work done per kg of air is (kJ) = 412.9\n",
"(b)Cycle efficiency is (percent) = 58.07\n",
"The answers are a bit different due to rounding off error in textbook\n"
]
}
],
"source": [
"#pg 1.52\n",
"#calculate the work done and cycle efficiency\n",
"#Input data\n",
"P1=1.;#pressure at the beginning of compression stroke in bar\n",
"T1=298.;#Temperature at the beginning of compression stroke in K\n",
"P3=38.;#Pressure at the end of constant volume heat addition in bar\n",
"T4=1573.;#Temperature at the end of constant volume heat addition in K\n",
"r=9.5;#Compression ratio\n",
"Cp=1.004;#Specific heat of air at constant pressure\n",
"Cv=0.717;#Specific heat of air at constant volume\n",
"\n",
"#Calculations\n",
"r1=Cp/Cv;#Isentropic ratio\n",
"T2=T1*r**(r1-1);#Temperature at the end of compression stroke in K\n",
"P2=P1*r**r1;#Pressure at the end of compression stroke in bar\n",
"T3=T2*(P3/P2);#Temperature at the end of constant volume heat addition in K\n",
"rho=T4/T3;#Cut off ratio\n",
"T5=T4*(rho/r)**(r1-1);#Temperature at the end of expansion stroke in K\n",
"Qs=Cv*(T3-T2)+Cp*(T4-T3);#Heat supplied per kg in kJ\n",
"Qr=Cv*(T5-T1);#Heat rejected per kg in kJ\n",
"W=Qs-Qr;#Work done per kg of air in kJ\n",
"n=(W/Qs)*100;#Efficiency of the air standard dual cycle in percent\n",
"\n",
"#Output\n",
"print '(a)The work done per kg of air is (kJ) = ',round(W,1)\n",
"print '(b)Cycle efficiency is (percent) = ',round(n,2)\n",
"print 'The answers are a bit different due to rounding off error in textbook'\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 25 - pg 1.53"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Pressure at the end of compression stroke is (bar) = 26.9\n",
"(b)Temperature at the end of compression stroke is (K) = 943.2\n",
"(c)Temperature at the end of constant volume heat addition is (K) = 2278.1\n",
"(d)Temperature at the end of constant pressure heat addition is (K) = 2968.22\n",
"(e)Temperature at the end of expansion stroke is (K) = 1287.47\n",
"(e)Pressure at the end of expansion stroke is (bar) = 3.5\n",
"(f)Efficiency of the cycle is (percent) = 60.04\n"
]
}
],
"source": [
"#pg 1.53\n",
"#calculate the pressure, Temperature in all cases and Efficiency\n",
"#Input data\n",
"r=10.5;#Compression ratio\n",
"P3=65.;#Maximum pressure in bar\n",
"qs=1650.;#Heat supplied in kJ/kg\n",
"P1=1.;#Pressure at the beginning of compression stroke in bar\n",
"T1=368.;#Temperature at the beginning of compression stroke in K\n",
"Cp=1.004;#Specific heat of air at constant pressure in kJ/kg K\n",
"Cv=0.717;#Specific heat of air at constant volume in kJ/kg K\n",
"\n",
"#Calculations\n",
"P4=P3;#Pressure at the end of constant volume heat addition in bar\n",
"r1=Cp/Cv;#Compression ratio\n",
"P2=P1*r**r1;#Pressure at the end of compression stroke in bar\n",
"T2=T1*r**(r1-1);#Temperature at the end of compression stroke in K\n",
"T3=T2*(P3/P2);#Temperature at the end of constant volume heat addition in K\n",
"qv=Cv*(T3-T2);#Heat supplied at constant volume in kJ/kg\n",
"qp=qs-qv;#Heat supplied at constant pressure in kJ/kg\n",
"T4=(qp/Cp)+T3;#Temperature at the end of constant volume heat addition in K\n",
"rho=T4/T3;#Cut off ratio\n",
"T5=T4*(rho/r)**(r1-1);#Temperature at the end of expansion stroke in K\n",
"P5=P4*(rho/r)**r1;#Pressure at the end of expansion stroke in K\n",
"q=Cv*(T5-T1);#Heat rejected in kJ/kg\n",
"n=((qs-q)/qs)*100;#Efficiency of the cycle in percent\n",
"\n",
"#Output\n",
"print '(a)Pressure at the end of compression stroke is (bar) = ',round(P2,1)\n",
"print '(b)Temperature at the end of compression stroke is (K) = ',round(T2,1)\n",
"print '(c)Temperature at the end of constant volume heat addition is (K) = ',round(T3,2)\n",
"print '(d)Temperature at the end of constant pressure heat addition is (K) = ',round(T4,2)\n",
"print '(e)Temperature at the end of expansion stroke is (K) = ',round(T5,2)\n",
"print '(e)Pressure at the end of expansion stroke is (bar) = ',round(P5,2)\n",
"print '(f)Efficiency of the cycle is (percent) = ',round(n,2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 26 - pg 1.55"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The air standard efficiency is (percent) = 44.88\n"
]
}
],
"source": [
"#pg 1.55\n",
"#calculate the standard efficiency\n",
"#Input data\n",
"r=8.5;#Compression ratio\n",
"e=5.5;#Expansion ratio\n",
"P1=1;#Pressure at the beginning of compression stroke in bar\n",
"T1=313.;#Temperature at the beginning of compression stroke in K\n",
"n=1.3;#polytropic constant\n",
"Cp=1.004;#Specific heat of air at constant pressure in kJ/kg K\n",
"Cv=0.717;#Specific heat of air at constant volume in kJ/kg K\n",
"\n",
"#Calculations\n",
"rho=r/e;#Cut off ratio\n",
"T2=T1*r**(n-1);#Temperature at the end of compression stroke in K\n",
"T3=(2*Cv*T2)/(2*Cv-Cp*rho+1);#Temperature at the end of constant volume heat addition in K\n",
"T4=rho*T3;#Temperature at the end of constant pressure heat addition in K\n",
"a=T3/T2;#Pressure ratio i.e.,P3/P2\n",
"n1=(1-(1/r**(n-1))*(a*rho**n-1)/((a-1)+(n*a*(rho-1))))*100;#Air standard efficiency in percent\n",
"\n",
"#Output\n",
"print 'The air standard efficiency is (percent) = ',round(n1,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 27 - pg 1.56"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The ideal thermal efficiency is (percent) = 59.18\n"
]
}
],
"source": [
"#pg 1.56\n",
"#calculate the ideal thermal efficiency\n",
"#Input data\n",
"P1=1;#Initial pressure in a compression engine working on a dual combustion engine in bar\n",
"T1=300.;#Initial Temperature in K\n",
"P2=25.;#Pressure at the end of compression stroke in bar\n",
"Q=400.;#Heat supplied per kg of air during constant volume heating in kJ/kg\n",
"P5=2.6;#Pressure at the end of isentropic expansion in bar\n",
"Cp=1.005;#Specific heat of air at constant pressure in kJ/kg K\n",
"Cv=0.715;#Specific heat of air at constant volume in kJ/kg K\n",
"\n",
"#Calculations\n",
"r=Cp/Cv;#Isentropic index\n",
"r1=(P2/P1)**(1/r);#Compression ratio\n",
"T2=T1*(r1)**(r-1);#Temperature at the end of compression stroke in K\n",
"T3=(Q/Cv)+T2;#Temperature at the end of constant volume heat addition in K\n",
"a=T3/T2;#Pressure ratio\n",
"P3=a*P2;#Pressure ratio at the end of constant volume heat addition in bar\n",
"P4=P3;#Pressure at the end of constant pressure heat addition in bar\n",
"x=(P5/P4)**(1/r);#Ratio of volume at the end of constant pressure heat addition to the volume at the end of isentropic expansion\n",
"rho=x*(r1);#Cut off ratio\n",
"n=(1-(1/r1**(r-1))*(a*rho**r-1)/((a-1)+(r*a*(rho-1))))*100;#Air standard efficiency in percent of a dual combustion engine\n",
"\n",
"#Output\n",
"print 'The ideal thermal efficiency is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 28 - pg 1.58"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Temperature at the end of compression stroke is (K) = 914.0\n",
"(b)Temperature at the end of constant volume heat addition is (K) = 1828.0\n",
"(c)Temperature at the end of constant pressure heat addition is (K) = 3655.0\n",
"(d)Temperature at the end of isentropic expansion process is (K) = 1678.0\n",
"(e)Efficiency of the cycle is (percent) = 60.82\n"
]
}
],
"source": [
"#pg 1.58\n",
"#calculate the temperature in all cases\n",
"#Input data\n",
"P1=1.;#Initial pressure of an enfine working on a dual combustion cycle in bar\n",
"T1=318.;#Initial temperature before compression in K\n",
"r1=14.;#Compression ratio\n",
"r=1.4;#Isentropic index\n",
"a=2.;#Pressure ratio in the compression process\n",
"rho=2.;#Cut off ratio \n",
"\n",
"#Calculations\n",
"T2=T1*r1**(r-1);#Temperature at the end of compression stroke in K\n",
"T3=T2*a;#Temperature at the end of constant volume heat addition in K\n",
"T4=rho*T3;#Temperature at the end of constant pressure heat addition in K\n",
"T5=T4*(rho/r1)**(r-1);#Temperature at the end of isentropic compression in K\n",
"n=(1-((T5-T1)/(r*(T4-T3)+(T3-T2))))*100;#Efficiency of an engine working on a dual combustion cycle in percent\n",
"\n",
"#Output\n",
"print '(a)Temperature at the end of compression stroke is (K) = ',round(T2,0)\n",
"print '(b)Temperature at the end of constant volume heat addition is (K) = ',round(T3,0)\n",
"print '(c)Temperature at the end of constant pressure heat addition is (K) = ',round(T4,0)\n",
"print '(d)Temperature at the end of isentropic expansion process is (K) = ',round(T5,0)\n",
"print '(e)Efficiency of the cycle is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 29 - pg 1.59"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(1)Pressure ratio = 1.465\n",
"(2)Cut off ratio = 1.7\n",
"(3)Heat supplied per cycle is (kJ) = 15.0\n",
"(4)Heat rejected per cycle is (kJ) = 5.54\n",
"(5)Work done per cycle is (kJ) = 9.45\n",
"(6)Thermal efficiency of the cycle is (percent) = 63.0\n",
"(7)Mass of air contained in the cylinder is (kg) = 0.01204\n",
"(8)Mean effective pressure is (bar) = 9.45\n"
]
}
],
"source": [
"#pg 1.59\n",
"#calculate the pressure ratio, cut off ratio, heat supplied, heat rejected, Work done, Thermal efficiency, Mass of air, Mean effective pressure\n",
"#Input data\n",
"r=15.;#Compression ratio\n",
"Vs=0.01;#Stroke volume in m**3\n",
"P1=1.;#Initial pressure in bar\n",
"T1=310.;#Initial temperature in K\n",
"P3=65.;#Pressure in constant pressure heat addition stroke in bar\n",
"Cp=1.;#Specific heat of air at constant pressure in kJ/kg K\n",
"Cv=0.714;#Specific heat of air at constant volume in kJ/kg K\n",
"R=287.;#Molar gas constant\n",
"\n",
"#Calculations\n",
"r1=Cp/Cv;#Isentropic index\n",
"P2=P1*(r)**r1;#Pressure at the end of compression stroke in bar\n",
"a=P3/P2;#Pressure ratio\n",
"rho=1+((5./100)*(r-1))\n",
"V2=Vs/(r-1);#Volume at the end of compression stroke in m**3\n",
"V1=Vs+V2;#Initial volume in m**3\n",
"m=P1*10**5*V1/(R*T1);#Mass of air contained in the cylinder in kg\n",
"T2=T1*r**(r1-1);#Temperature at the end of compression stroke in K\n",
"a=P3/P2;#Pressure ratio\n",
"T3=T2*a;#Temperature at the end of constant volume heat addition in K\n",
"T4=T3*rho;#Temperature at the end of constant pressure heat addition in K\n",
"T5=T4/(r/rho)**(r1-1);#Temperature at the end of isentropic expansion in K\n",
"Qs=(Cv*(T3-T2)+Cp*(T4-T3))*m;#Heat supplied in kJ\n",
"Qr=m*Cv*(T5-T1);#Heat rejected in kJ\n",
"W=Qs-Qr;#Work done per cycle in kJ\n",
"n=(W/Qs)*100;#Efficiency of the cycle in percent\n",
"Mep=(W/Vs)/100;#Mean effective pressure in bar\n",
"\n",
"#Output\n",
"print '(1)Pressure ratio = ',round(a,3)\n",
"print '(2)Cut off ratio = ',rho \n",
"print '(3)Heat supplied per cycle is (kJ) = ',round(Qs,0)\n",
"print '(4)Heat rejected per cycle is (kJ) = ',round(Qr,2)\n",
"print '(5)Work done per cycle is (kJ) = ',round(W,2)\n",
"print '(6)Thermal efficiency of the cycle is (percent) = ',round(n,0)\n",
"print '(7)Mass of air contained in the cylinder is (kg) = ',round(m,5)\n",
"print '(8)Mean effective pressure is (bar) = ',round(Mep,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 30 - pg 1.62"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Thermal efficiency of the turbine unit is (percent) = 38.56\n"
]
}
],
"source": [
"#pg 1.62\n",
"#calculate the Thermal efficiency\n",
"#Input data\n",
"P1=1.;#Initial pressure of air received by gas turbine plant in bar\n",
"T1=310.;#Initial tamperature in K\n",
"P2=5.5;#Pressure at the end of compression in bar\n",
"r=1.4;#isentropic index\n",
"\n",
"#Calculations\n",
"rp=P2/P1;#pressure ratio\n",
"n=(1-(1/rp)**((r-1)/r))*100;#Thermal efficiency of the turbine in percent\n",
"\n",
"#Output data\n",
"print 'Thermal efficiency of the turbine unit is (percent) = ',round(n,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 31 - pg 1.62"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Power developed by the turbine assembly per kg of air supplied per second is (kW) = 242.51\n",
"The answer is a bit different from textbook due to rounding off error \n"
]
}
],
"source": [
"#pg 1.62\n",
"#calculate the Power developed\n",
"#Input data\n",
"P1=1.;#Initial pressure of a simple closed cycle gas turbine plant in bar\n",
"T1=298.;#Initial temperature in K\n",
"P2=5.1;#Pressure of gas after compression in bar\n",
"T3=1123.;#Temperature at the end of compression in K\n",
"P4=1.;#Pressure of hot air after expansion in the turbine in bar\n",
"r=1.4;#Isentropic constant\n",
"Cp=1.005;#Specific heat of air in kJ/kg K\n",
"\n",
"#Calculations\n",
"P3=P2;#Pressure at the end of constant pressure stroke\n",
"T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of process 1-2 in K\n",
"T4=T3*(P4/P3)**((r-1)/r);#Temperature at the end of process 3-4 in K\n",
"Wt=Cp*(T3-T4);#Work done by the turbine in kJ/kg\n",
"Wc=Cp*(T2-T1);#Work required by the compressor in kJ/kg\n",
"W=Wt-Wc;#Net work done by the turbine in kJ/kg\n",
"P=1*W;#Power developed by the turbine assembly per kg per second in kW\n",
"\n",
"#Output\n",
"print 'Power developed by the turbine assembly per kg of air supplied per second is (kW) = ',round(P,2)\n",
"print 'The answer is a bit different from textbook due to rounding off error '\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 32 - pg 1.63"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)The maximum temperature of the cycle is (K) = 1148.97\n",
"(b)Cycle efficiency is (percent) = 41.42\n",
"The answers are a bit different from textbook due to rounding off error \n"
]
}
],
"source": [
"#pg 1.63\n",
"#calculate the maximum temperature and cycle efficiency\n",
"#Input data\n",
"P1=1.;#The pressure of air entering the compressor of a gas turbine plant operating on Brayton cycle in bar\n",
"T1=293.;#Initial temperature in K\n",
"r=6.5;#Pressure ratio of the cycle\n",
"r1=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"T2=T1*(r)**((r1-1)/r1);#Temperature at the end of compression in K\n",
"T4=2.3*(T2-T1)/0.708;#Temperature at point 4 in K\n",
"T3=T4*(r)**((r1-1)/r1);#Maximum temperature in K\n",
"n=(1-((T4-T1)/(T3-T2)))*100;#Turbine plant efficiency in percent\n",
"\n",
"#Output\n",
"print '(a)The maximum temperature of the cycle is (K) = ',round(T3,2)\n",
"print '(b)Cycle efficiency is (percent) = ',round(n,2)\n",
"print 'The answers are a bit different from textbook due to rounding off error '\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 33 - pg 1.64"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)The net power output of the installation is (kW) = 152.54\n",
"(b)Air fuel ratio is 108.3\n"
]
}
],
"source": [
"#pg 1.64\n",
"#calculate the net power an dair fuel ratio\n",
"#Input data\n",
"P1=1.;#Pressure in an oil gas turbine installation in bar\n",
"T1=298.;#Initial Temperature in K\n",
"P2=4.;#Pressure after compression in bar\n",
"CV=42100.;#Calorific value of oil in kJ/kg\n",
"T3=813.;#The temperature reached after compression in K\n",
"m=1.2;#Air flow rate in kg/s\n",
"Cp=1.05;#Specific heat of air at constant pressure in kJ/kg K\n",
"r=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"r1=P2/P1;#Pressure ratio\n",
"T2=(r1)**((r-1)/r)*T1;#Temperature at the end of compression stroke in K\n",
"T4=T3/(r1)**((r-1)/r);#Temperature at the end of isentropic expansion in K\n",
"Wt=m*Cp*(T3-T4);#Work done by the turbine in kJ/s or kW\n",
"Wc=m*Cp*(T2-T1);#Work to be supplied to the compressor in kJ/s or kW\n",
"Wn=Wt-Wc;#Net work done by the turbine unit in kW\n",
"qs=m*Cp*(T3-T2);#Heat supplied by the oil in kJ/s\n",
"M=qs/CV;#Mass of fuel burnt per second in kg/s\n",
"a=m/M;#Air fuel ratio\n",
"\n",
"#Output\n",
"print '(a)The net power output of the installation is (kW) = ',round(Wn,2)\n",
"print '(b)Air fuel ratio is ',round(a,1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 34 - pg 1.66"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The net power of the plant per kg of air/s is (kW) = 324.42\n"
]
}
],
"source": [
"#pg 1.66\n",
"#calculate the net power\n",
"#Input data\n",
"T1=300.;#Minimum temperature of the plant containing a two stage compressor with perfect intercooling and a single stage turbine in K\n",
"T5=1100.;#Maximum temperature of the plant in K\n",
"P1=1.;#Initial Pressure in bar\n",
"P5=15.;#Final pressure in bar\n",
"Cp=1.05;#Specific heat of air in kJ/kg K\n",
"r=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"P6=P1;#Pressure at 6 in bar\n",
"P3=(P1*P5)**(1./2);#The intermediate pressure for cooling in bar\n",
"P2=P3;#Pressure at point 2 in bar\n",
"T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of process 1-2\n",
"T3=T1;#Intermediate temperature in K\n",
"T4=1.473*T3;#Temperature at point 4 in K\n",
"T6=T5/(P5/P6)**((r-1)/r);#Temperature at point 6 in k\n",
"Wt=Cp*(T5-T6);#Work done by the turbine per kg of air in kJ/s\n",
"Wc=Cp*(T4-T3)+Cp*(T2-T1);#Work done by the compressor per kg of air in kJ/s\n",
"Wn=Wt-Wc;#Net work done in kJ/s\n",
"Pn=Wn;#Net power developed in kW\n",
"\n",
"#Output \n",
"print 'The net power of the plant per kg of air/s is (kW) = ',round(Pn,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 35 - pg 1.67"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The maximum power that can be obtained from turbine installation is (kW) = 366.0\n"
]
}
],
"source": [
"#pg 1.67\n",
"#calculate the maximum power\n",
"#Input data\n",
"P1=1.;#Initial Pressure of a gas turbine power plant in bar\n",
"P2=8.;#Final pressure in bar\n",
"T1=300.;#Initial temperature in K\n",
"T5=850.;#Temperature of air expanded in the turbine in K\n",
"m=1.8;#Mass of air circulated per second in kg\n",
"Cp=1.05;#Specific heat of air at constant pressure in kJ/kg K\n",
"r=1.4;#Ratio of specific heat\n",
"\n",
"#Calculations\n",
"P4=(P1*P2)**(0.5);#Pressure for maximum power output in bar\n",
"P3=P2;#Pressure after the constant pressure process in bar\n",
"T3=T5;#For reheating condition Temperature in K\n",
"T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of constant entropy process in K\n",
"T4=T3/((P3/P4)**((r-1)/r));#Temperature after the process 3-4 in K\n",
"T6=T4;#Temperature at the end of process 5-6 in K\n",
"Wt=m*Cp*((T3-T4)+(T5-T6));#Work done by the turbine in kJ/s\n",
"Wc=m*Cp*(T2-T1);#Work absorbed by the compressor in kJ/s\n",
"P=Wt-Wc;#Power that can be obtained from gas turbine installation in kW\n",
"\n",
"#Output\n",
"print 'The maximum power that can be obtained from turbine installation is (kW) = ',round(P,0)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 36 - pg 1.69"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Mass of fluid to be circulated in the turbine is (kg/s) = 1.446\n",
"(b)The amount of heat supplied per second from the external source is (kJ/s) = 1212.2\n"
]
}
],
"source": [
"#pg 1.69\n",
"#calculate the mass of fluid and amount of heat supplied\n",
"#Input data\n",
"P1=1.5;#Pressure at the inlet of the low pressure compressor in bar\n",
"T1=300.;#Temperature at the inlet of the low pressure compressor in K\n",
"P5=9.;#Maximum pressure in bar\n",
"T5=1000.;#Maximum temperature in K\n",
"P=400.;#Net power developed by the turbine in kW\n",
"Cp=1.0;#Specific heat of air at constant pressure in kJ/kg K\n",
"r=1.4;#Ratio of specific heat \n",
"\n",
"#Calculations\n",
"P8=P1;#For perfect intercooling and perfect reheating in bar\n",
"P4=P5;#For perfect intercooling and perfect reheating in bar\n",
"P2=(P1*P4)**0.5;#Pressure at the end of Isentropic compression in LP compressor in bar\n",
"P6=P2;#Pressure at the end of process 5-6 in bar\n",
"T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of isentropic compression in K\n",
"T3=T1;#For perfect intercooling in K\n",
"T4=T2;#For perfect intercooling in K\n",
"T6=T5/(P5/P6)**((r-1)/r);#Temperature at the end of process 5-6 in K\n",
"T7=T5;#Temperature in K\n",
"T8=T6;#Temperature in K\n",
"Wt=Cp*((T5-T6)+(T7-T8));#Work done by the turbine in kg/s\n",
"Wc=Cp*((T2-T1)+(T4-T3));#Work absorbed by the compressor in kJ/s\n",
"Wn=Wt-Wc;#Net work output in kJ/s\n",
"m=P/Wn;#Mass of fluid flow per second in kg/s\n",
"qs=m*Cp*((T5-T4)+(T7-T6));#Heat supplied from the external source in kJ/s\n",
"\n",
"#Output\n",
"print '(a)Mass of fluid to be circulated in the turbine is (kg/s) = ',round(m,3)\n",
"print '(b)The amount of heat supplied per second from the external source is (kJ/s) = ',round(qs,1)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 37 - pg 1.70"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(a)Mass of air circulating in the installation is (kg/s) = 4.24\n",
"(b)Heat supplied by the heating chamber is (kJ/s) = 2414.2\n",
"The answers are a bit different from textbook due to rounding off error \n"
]
}
],
"source": [
"#pg 1.70\n",
"#calculate the mass of air and heat supplied\n",
"#Input data\n",
"T1=293.;#Temperature of a constant pressure open cycle gas turbine plant in K\n",
"T3=1043.;#The maximum temperature in K\n",
"a=6.5;#The pressure ratio\n",
"P=1000.;#Power developed by the installation in kW\n",
"Cp=1.05;#Specific heat at constant pressure in kJ/kg K\n",
"r=1.4;#Isentropic ratio\n",
"\n",
"#Calculations\n",
"T2=T1*a**((r-1)/r);#Temperature after the isentropic compression stroke in K\n",
"T4=T3/a**((r-1)/r);#Temperature after the isentropic expansion process in K\n",
"Wt=Cp*(T3-T4);#Work done by the turbine per kg of air per second in kJ\n",
"Wc=Cp*(T2-T1);#Work absorbed by the compressor per kg of air per second in kJ\n",
"Wn=Wt-Wc;#Net work output in kJ/s\n",
"m=P/Wn;#Mass of fluid circulated per second in kg/s\n",
"Q=m*Cp*(T3-T2);#Heat supplied by the heating chamber in kJ/s\n",
"\n",
"#Output\n",
"print '(a)Mass of air circulating in the installation is (kg/s) = ',round(m,2)\n",
"print '(b)Heat supplied by the heating chamber is (kJ/s) = ',round(Q,1)\n",
"print 'The answers are a bit different from textbook due to rounding off error '"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 38 - pg 1.72"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(1)Overall efficiency of the turbine is (percentage) = 21.0\n",
"(2)Mass of air circulated by the turbine is (kg) = 23.85\n"
]
}
],
"source": [
"#pg 1.72\n",
"#calculate the Overall efficiency and Mass of air circulated\n",
"#Input data\n",
"a=6.;#Pressure ratio of a gas turbine plant\n",
"T1=293.;#Inlet temperature of air in K\n",
"T3=923.;#Maximum temperature of the cycle in K\n",
"P=2000.;#Power developed in the cycle in kW\n",
"nc=85.;#Efficiency of the compressor in percentage\n",
"nt=85.;#Efficiency of the turbine in percentage\n",
"Cp=1.;#Specific heat of gas at constant pressure in kJ/kg K\n",
"Cv=0.714;#Specific heat of gas at constant volume in kJ/kg K\n",
"\n",
"#Calculations\n",
"r=Cp/Cv;#Ratio of specific heats\n",
"T2a=a**((r-1)/r)*T1;#Temperature at 2' in K\n",
"T2=((T2a-T1)/(nc/100))+T1;#Temperature at point 2 in K\n",
"T4a=T3/a**((r-1)/r);#Temperature at the point 4' in K\n",
"T4=T3-((T3-T4a)*(nt/100));#Temperature at the point 4 in K\n",
"Wt=Cp*(T3-T4);#Work done by the turbine per kg of air in kJ\n",
"Wc=Cp*(T2-T1);#Work done by the compressor per kg of air in kJ\n",
"Wn=Wt-Wc;#Net work output of the turbine per kg of air in kJ\n",
"qA=Cp*(T3-T2);#Heat supplied per kg of air in kJ\n",
"n=(Wn/qA)*100;#Overall efficiency of the turbine plant in percentage\n",
"m=P/Wn;#Mass of air circulated per second in kg\n",
"\n",
"#Output\n",
"print '(1)Overall efficiency of the turbine is (percentage) = ',round(n,0)\n",
"print '(2)Mass of air circulated by the turbine is (kg) = ',round(m,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 39 - pg 1.73"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The isentropic efficiency of the turbine is (percent) = 88.93\n"
]
}
],
"source": [
"#pg 1.73\n",
"#calculate the isentropic efficiency\n",
"#Input data\n",
"T1=293.;#Initial temperature of a gas turbine plant in K\n",
"P1=1.;#Initial pressure in bar\n",
"P2=4.5;#Pressure after the compression in bar\n",
"nc=80.;#Isentropic efficiency of a compressor in percentage\n",
"T3=923.;#Temperature of the gas whose properties may be assumed to resemble with those of air in the combustion chamber in K\n",
"deltaP=0.1;#Pressure drop in a combustion chamber in bar\n",
"nt=20.;#Thermal efficiency of the plant in percentage\n",
"r=1.4;#Isentropic index\n",
"P4=1.;#Pressure at point 4 in bar\n",
"\n",
"#Calculations\n",
"P3=P2-deltaP;#Pressure at point 3 in bar\n",
"T21=T1*(P2/P1)**((r-1)/r);#Temperature after the compression process in K\n",
"T2=(T21-T1)/(nc/100)+T1;#Temperature at the point 2 in K\n",
"T41=T3/(P3/P4)**((r-1)/r);#Temperature at the end of expansion process in K\n",
"Ac=T2-T1;#Work done by the compressor per kg of air per specific heat at constant pressure Ac=Wc/Cp\n",
"At=T3;#Work done by the turbine per kg of air per specific heat at constant pressure At=Wt/Cp\n",
"An=At-Ac;#Net work done per kg of air\n",
"Bs=T3-T2;#Heat supplied per kg of air per specific heat at constant pressure Bs=qs/Cp;qs=heat supplied\n",
"T4=An-((nt/100)*Bs);#Temperature at point 4 in K\n",
"nT=((T3-T4)/(T3-T41))*100;#Isentropic efficiency of the turbine in percentage\n",
"\n",
"#Output\n",
"print 'The isentropic efficiency of the turbine is (percent) = ',round(nT,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 40 - pg 1.75"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overall efficiency of the plant is (percent) = 14.31\n"
]
}
],
"source": [
"#pg 1.75\n",
"#calculate the Overall efficiency\n",
"#Input data\n",
"P1=1.;#Pressure of air received by the gas turbine plant in bar\n",
"T1=300.;#Initial Temperature in K\n",
"P2=5.;#Pressure of air after compression in bar\n",
"T3=850.;#Temperature of air after the compression in K\n",
"nc=80.;#Efficiency of the compressor in percent\n",
"nt=85.;#Efficiency of the turbine in percent\n",
"r=1.4;#Isentropic index of gas\n",
"P41=1.;#Pressure at the point 41 in bar\n",
"Cp=1.05;#Specific heat of the gas at constant pressure in kJ/kg K\n",
"\n",
"#Calculations\n",
"P3=P2;#Since 2-3 is constant pressure process in bar\n",
"T21=T1*(P2/P1)**((r-1)/r);#Temperature at the point 21 on the curve in K\n",
"T2=(T21-T1)/(nc/100)+T1;#Temperature at the point 2 in K\n",
"T41=T3/(P3/P41)**((r-1)/r);#Temperature at the point 41 in K\n",
"T4=T3-((nt/100)*(T3-T41));#Temperature of gas at the point 4 in K\n",
"Wt=Cp*(T3-T4);#work done by the turbine in kJ/kg of air\n",
"Wc=Cp*(T2-T1);#Work done by the compressor in kJ/kg of air\n",
"Wn=Wt-Wc;#Net work done by the plant in kJ\n",
"nt=(Wn/(Cp*(T3-T2)))*100;#Thermal efficiency of the plant in percentage \n",
"\n",
"#Output\n",
"print 'Overall efficiency of the plant is (percent) = ',round(nt,2)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 41 - pg 1.76"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The overall efficiency of the plant is (percent) = 20.9\n"
]
}
],
"source": [
"#pg 1.76\n",
"#calculate the overall efficiency\n",
"#Input data\n",
"P1=1.;#Initial pressure of a gas turbine plant in bar\n",
"T1=310.;#Initial temperature in K\n",
"P2=4.;#Pressure of air after compressing in a rotary compressor in bar\n",
"P3=P2;#Constant pressure process\n",
"P41=P1;#Since 1-41 is a constant pressure process in bar\n",
"T3=900.;#Temperature of air at the point 3 in constant process in K\n",
"nc=80.;#Efficiency of the compressor in percentage\n",
"nt=85.;#Efficiency of the turbine in percentage\n",
"E=70.;#Effectiveness of the plant in percentage\n",
"r=1.4;#Isentropic index\n",
"Cp=1.;#Specific heat of air at constant pressure in kJ/kg K\n",
"\n",
"#Calculations\n",
"T21=T1*(P2/P1)**((r-1)/r);#Temperature at the point 21 in the temperature versus entropy graph in K\n",
"T2=T1+((T21-T1)/(nc/100));#Temperature of air after the compression process in K\n",
"T41=T3/((P3/P41)**((r-1)/r));#Temperature at the point 41 after the isentropic expansion process in K\n",
"T4=T3-((T3-T41)*(nt/100));#Temperature at the point 4 in K\n",
"Wt=Cp*(T3-T4);#Work done by the turbine in kJ\n",
"Wc=Cp*(T2-T1);#Work done by the compressor in kJ\n",
"Wn=Wt-Wc;#Net work done in kJ\n",
"qs=Cp*(T3-T2);#Heat supplied in kJ\n",
"qa=Cp*(T4-T2);#Heat available in the exhaust gases in kJ\n",
"H=qa*(E/100);#Actual heat recovered from the exhaust gases in the heat exchanger in kJ\n",
"Hs=qs-(H);#Heat supplied by the combustion chamber in kJ\n",
"nt=(Wn/Hs)*100;#Thermal efficiency of the gas turbine plant with heat exchanger in percent\n",
"\n",
"#Output \n",
"print 'The overall efficiency of the plant is (percent) = ',round(nt,1)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|