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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 15 - Ideal gas power cycles"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1: pg 436"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.1\n",
" The thermal efficiency of the cycle is (percent) = 49.0\n"
]
}
],
"source": [
"#pg 436\n",
"print('Example 15.1');\n",
"\n",
"# aim : To determine \n",
"# the thermal efficiency of the cycle\n",
"\n",
"# given values\n",
"T1 = 273.+400;# temperature limit, [K]\n",
"T3 = 273.+70;# temperature limit, [K]\n",
"\n",
"# solution\n",
"# using equation [15] of section 15.3\n",
"n_the = (T1-T3)/T1*100;# thermal efficiency \n",
"#results\n",
"print ' The thermal efficiency of the cycle is (percent) = ',round(n_the)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2: pg 437"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.2\n",
" (a) The volume ratio of the adiabatic process is = 4.425\n",
" The volume ratio of the isothermal process is = 3.39\n",
" (b) The thermal efficiency of the cycle is (percent) = 44.8\n"
]
}
],
"source": [
"#pg 437\n",
"print('Example 15.2');\n",
"\n",
"# aim : To determine\n",
"# (a) the volume ratios of the isothermal and adiabatic processes\n",
"# (b) the thermal efficiency of the cycle\n",
"\n",
"# given values\n",
"T1 = 273.+260;# temperature, [K]\n",
"T3 = 273.+21;# temperature, [K]\n",
"er = 15.;# expansion ratio\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"# (a)\n",
"T2 = T1;\n",
"T4 = T3;\n",
"# for adiabatic process\n",
"rva = (T1/T4)**(1/(Gama-1));# volume ratio of adiabatic\n",
"rvi = er/rva;# volume ratio of isothermal\n",
"print ' (a) The volume ratio of the adiabatic process is = ',round(rva,3)\n",
"print ' The volume ratio of the isothermal process is = ',round(rvi,2)\n",
"\n",
"# (b)\n",
"n_the = (T1-T4)/T1*100;# thermal efficiency\n",
"print ' (b) The thermal efficiency of the cycle is (percent) = ',round(n_the,1)\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3: pg 438"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.3\n",
"(a) At line 1\n",
" V1 = 0.096 m^3, t1 = 300.0 C, P1 = 1730.0 kN/m^2 \n",
"At line 2\n",
" V2 = 0.288 m^3, t2 = 300.0 C, P2 = 576.7 kN/m^2\n",
"At line 3\n",
" V3 = 0.576 m^3, t3 = 161.0 C, P3 = 218.5 kN/m^2\n",
"At line 4\n",
" V4 = 0.192 m^3, t4 = 161.3 C, P4 = 655.5 kN/m^2\n",
" (b) The thermal efficiency of the cycle (percent) = 24.0\n",
" (c) The work done per cycle is (kJ) = 44.2\n",
" (d) The work ratio is = 0.156\n",
"there is calculation mistake in the book so answer is not matching\n"
]
}
],
"source": [
"#pg 438\n",
"print('Example 15.3');\n",
"\n",
"# aim : To determine\n",
"# (a) the pressure, volume and temperature at each corner of the cycle\n",
"# (b) the thermal efficiency of the cycle\n",
"# (c) the work done per cycle\n",
"# (d) the work ratio\n",
"from math import log\n",
"# given values\n",
"m = 1;# mass of air, [kg]\n",
"P1 = 1730.;# initial pressure of carnot engine, [kN/m^2]\n",
"T1 = 273.+300;# initial temperature, [K]\n",
"R = .29;# [kJ/kg K]\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.15\n",
"# (a)\n",
"# for the isothermal process 1-2\n",
"# using ideal gas law\n",
"V1 = m*R*T1/P1;# initial volume, [m^3]\n",
"T2 = T1;\n",
"V2 = 3.*V1;# given condition\n",
"# for isothermal process, P1*V1=P2*V2, so\n",
"P2 = P1*(V1/V2);# [MN/m^2]\n",
"# for the adiabatic process 2-3\n",
"V3 = 6.*V1;# given condition\n",
"T3 = T2*(V2/V3)**(Gama-1);\n",
"# also for adiabatic process, P2*V2^Gama=P3*V3^Gama, so\n",
"P3 = P2*(V2/V3)**Gama;\n",
"# for the isothermal process 3-4\n",
"T4 = T3;\n",
"# for both adiabatic processes, the temperataure ratio is same, \n",
"# T1/T4 = T2/T3=(V4/V1)^(Gama-1)=(V3/V2)^(Gama-1), so\n",
"V4 = 2*V1;\n",
"# for isothermal process, 3-4, P3*V3=P4*V4, so\n",
"P4 = P3*(V3/V4);\n",
"print '(a) At line 1'\n",
"print ' V1 = ',round(V1,3),' m^3, t1 = ',T1-273,' C, P1 = ',P1,' kN/m^2 '\n",
"\n",
"print 'At line 2'\n",
"print ' V2 = ',round(V2,3),' m^3, t2 = ',T2-273,' C, P2 = ',round(P2,1),' kN/m^2'\n",
"\n",
"print 'At line 3'\n",
"print ' V3 = ',round(V3,3),' m^3, t3 = ',round(T3-273),' C, P3 = ',round(P3,1),' kN/m^2'\n",
"\n",
"\n",
"print 'At line 4'\n",
"print ' V4 = ',round(V4,3),' m^3, t4 = ',round(T4-273,1),' C, P4 = ',round(P4,1),' kN/m^2'\n",
"\n",
"\n",
"# (b)\n",
"n_the = (T1-T3)/T1;# thermal efficiency\n",
"print ' (b) The thermal efficiency of the cycle (percent) = ',round(n_the*100)\n",
"\n",
"# (c)\n",
"W = m*R*T1*log(V2/V1)*n_the;# work done, [J]\n",
"print ' (c) The work done per cycle is (kJ) = ',round(W,1)\n",
"\n",
"# (d)\n",
"wr = (T1-T3)*log(V2/V1)/(T1*log(V2/V1)+(T1-T3)/(Gama-1));# work ratio\n",
"print ' (d) The work ratio is = ',round(wr,3)\n",
"\n",
"print 'there is calculation mistake in the book so answer is not matching'\n",
"\n",
"# End\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4: pg 446"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.4\n",
" (a) P1 = 100.0 kN/m^2, V1 = 0.084 m^3, t1 = 28.0 C,\n",
" P2 = 1229.0 kN/m^2, V2 = 0.014 m^3, t2 = 343.0 C,\n",
" P3 = 1229.0 kN/m^2, V3 = 0.019 m^3, t3 = 549.0 C,\n",
" P4 = 100.0 kN/m^2, V4 = 0.112 m^3, t4 = 128.0 C\n",
" (b) The heat received is (kJ) = 20.07\n",
" (c) The work done is (kJ) = 10.27\n",
" (d) The thermal efficiency is (percent) = 51.2\n",
" (e) The carnot efficiency is (percent) = 63.4\n",
" (f) The work ratio is = 0.293\n",
" (g) The mean effective pressure is (kN/m^2) = 104.77\n",
" there is minor variation in answer reported in the book due to rounding off error\n"
]
}
],
"source": [
"#pg 446\n",
"print('Example 15.4');\n",
"\n",
"# aim : To determine\n",
"# (a) the pressure, volume and temperature at cycle state points\n",
"# (b) the heat received\n",
"# (c) the work done \n",
"# (d) the thermal efficiency\n",
"# (e) the carnot efficiency\n",
"# (f) the work ration\n",
"# (g) the mean effective pressure\n",
"\n",
"# given values\n",
"ro = 8.;# overall volume ratio;\n",
"rv = 6.;# volume ratio of adiabatic compression\n",
"P1 = 100.;# initial pressure , [kN/m^2]\n",
"V1 = .084;# initial volume, [m^3]\n",
"T1 = 273.+28;# initial temperature, [K]\n",
"Gama = 1.4;# heat capacity ratio\n",
"cp = 1.006;# specific heat capacity, [kJ/kg K]\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.18\n",
"# (a)\n",
"V2 = V1/rv;# volume at stage2, [m^3] \n",
"V4 = ro*V2;# volume at stage 4;[m^3]\n",
"# using PV^(Gama)=constant for process 1-2\n",
"P2 = P1*(V1/V2)**(Gama);# pressure at stage2,. [kN/m^2]\n",
"T2 = T1*(V1/V2)**(Gama-1);# [K]\n",
"\n",
"P3 = P2;# pressure at stage 3, [kN/m^2]\n",
"V3 = V4/rv;# volume at stage 3, [m^3]\n",
"# since pressure is constant in process 2-3 , so using V/T=constant, so\n",
"T3 = T2*(V3/V2);# temperature at stage 3, [K]\n",
"\n",
"# for process 1-4\n",
"T4 = T1*(V4/V1);# temperature at stage4, [K\n",
"P4 = P1;# pressure at stage4, [kN/m^2]\n",
"\n",
"print ' (a) P1 = ',P1,' kN/m^2, V1 = ',V1,' m^3, t1 = ',T1-273,' C,\\n P2 = ',round(P2),' kN/m^2, V2 = ',V2,' m^3, t2 = ',round(T2-273),' C,\\n P3 = ',round(P3),' kN/m^2, V3 = ',round(V3,3),' m^3, t3 = ',round(T3-273),' C,\\n P4 = ',P4,' kN/m^2, V4 = ',V4,' m^3, t4 = ',round(T4-273),' C'\n",
"\n",
"# (b)\n",
"R = cp*(Gama-1)/Gama;# gas constant, [kJ/kg K]\n",
"m = P1*V1/(R*T1);# mass of gas, [kg]\n",
"Q = m*cp*(T3-T2);# heat received, [kJ]\n",
"print ' (b) The heat received is (kJ) = ',round(Q,2)\n",
"\n",
"# (c) \n",
"W = P2*(V3-V2)-P1*(V4-V1)+((P3*V3-P4*V4)-(P2*V2-P1*V1))/(Gama-1);# work done, [kJ]\n",
"print ' (c) The work done is (kJ) = ',round(W,2)\n",
"\n",
"# (d)\n",
"TE = 1-T1/T2;# thermal efficiency\n",
"print ' (d) The thermal efficiency is (percent) = ',round(TE*100,1)\n",
"\n",
"# (e)\n",
"CE = (T3-T1)/T3;# carnot efficiency\n",
"print ' (e) The carnot efficiency is (percent) = ',round(CE*100,1)\n",
"\n",
"# (f)\n",
"PW = P2*(V3-V2)+(P3*V3-P4*V4)/(Gama-1);# positive work done, [kj]\n",
"WR = W/PW;# work ratio\n",
"print ' (f) The work ratio is = ',round(WR,3)\n",
"\n",
"# (g)\n",
"Pm = W/(V4-V2);# mean effective pressure, [kN/m^2]\n",
"print ' (g) The mean effective pressure is (kN/m^2) = ',round(Pm,2)\n",
"\n",
"print ' there is minor variation in answer reported in the book due to rounding off error'\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 5: pg 450"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.5\n",
" (a) The actual thermal efficiency of the turbine is (percent) = 26.88\n",
" (b) The specific fuel consumption of the turbine is (kg/kWh) = 0.311\n"
]
}
],
"source": [
"#pg 450\n",
"print('Example 15.5');\n",
"\n",
"# aim : To determine\n",
"# (a) the actual thermal efficiency of the turbine\n",
"# (b) the specific fuel consumption of the turbine in kg/kWh\n",
"\n",
"# given values\n",
"P2_by_P1 = 8;\n",
"n_tur = .6;# ideal turbine thermal efficiency\n",
"c = 43.*10**3;# calorific value of fuel, [kJ/kg]\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"# (a)\n",
"rv = P2_by_P1;\n",
"n_tur_ide = 1-1/(P2_by_P1)**((Gama-1)/Gama);# ideal thermal efficiency\n",
"ate = n_tur_ide*n_tur;# actual thermal efficiency\n",
"print ' (a) The actual thermal efficiency of the turbine is (percent) = ',round(ate*100,2)\n",
"\n",
"# (b)\n",
"ewf = c*ate;# energy to work fuel, [kJ/kg]\n",
"kWh = 3600.;# energy equivalent ,[kJ]\n",
"sfc = kWh/ewf;# specific fuel consumption, [kg/kWh]\n",
"print ' (b) The specific fuel consumption of the turbine is (kg/kWh) = ',round(sfc,3)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6: pg 456"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.6\n",
" The relative efficiency of the engine is (percent) = 38.8\n"
]
}
],
"source": [
"#pg 456\n",
"print('Example 15.6');\n",
"\n",
"# aim : To determine\n",
"# the relative efficiency of the engine\n",
"import math\n",
"# given values\n",
"d = 80;# bore, [mm]\n",
"l = 85;# stroke, [mm]\n",
"V1 = .06*10**6;# clearence volume, [mm^3]\n",
"ate = .22;# actual thermal efficiency of the engine\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"sv = math.pi*d**2/4*l;# stroke volume, [mm^3]\n",
"V2 = sv+V1;# [mm^3]\n",
"rv = V2/V1;\n",
"ite = 1-(1/rv)**(Gama-1);# ideal thermal efficiency\n",
"re = ate/ite;# relative thermal efficiency\n",
"#results\n",
"print ' The relative efficiency of the engine is (percent) = ',round(re*100,1)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 7: pg 457"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.7\n",
" (a) P1 = 103.0 kN/m^2, V1 = 1.039 m^3, t1 = 100.0 C,\n",
" P2 = 1265.0 kN/m^2, V2 = 0.173 m^3, t2 = 491.0 C,\n",
" P3 = 3450.0 kN/m^2, V3 = 0.173 m^3, t3 = 1809.0 C,\n",
" P4 = 280.8 kN/m^2, V4 = 1.039 m^3, t4 = 744.0 C\n",
" (b) The heat transferred to the air is (kJ) = 946.0\n",
" (c) The heat rejected by the air is (kJ) = 462.0\n",
" (d) The ideal thermal efficiency is (percent) = 51.2\n",
" (e) The work done is (kJ) = 484.0\n",
" (f) The mean effective pressure is (kN/m^2) = 558.85\n",
"The answers are a bit different due to rounding off error in textbook\n"
]
}
],
"source": [
"#pg 457\n",
"print('Example 15.7');\n",
"\n",
"# aim : To determine\n",
"# (a) the pressure, volume and temperature at each cycle process change points\n",
"# (b) the heat transferred to air\n",
"# (c) the heat rejected by the air\n",
"# (d) the ideal thermal efficiency\n",
"# (e) the work done \n",
"# (f) the mean effective pressure\n",
"\n",
"# given values\n",
"m = 1.;# mass of air, [kg]\n",
"rv = 6.;# volume ratio of adiabatic compression\n",
"P1 = 103.;# initial pressure , [kN/m^2]\n",
"T1 = 273.+100;# initial temperature, [K]\n",
"P3 = 3450.;# maximum pressure, [kN/m^2]\n",
"Gama = 1.4;# heat capacity ratio\n",
"R = .287;# gas constant, [kJ/kg K]\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.20\n",
"# (a)\n",
"# for point 1\n",
"V1 = m*R*T1/P1;# initial volume, [m^3]\n",
"\n",
"# for point 2\n",
"V2 = V1/rv;# volume at point 2, [m^3] \n",
"# using PV^(Gama)=constant for process 1-2\n",
"P2 = P1*(V1/V2)**(Gama);# pressure at point 2,. [kN/m^2]\n",
"T2 = T1*(V1/V2)**(Gama-1);# temperature at point 2,[K]\n",
"\n",
"# for point 3\n",
"V3 = V2;# volume at point 3, [m^3]\n",
"# since volume is constant in process 2-3 , so using P/T=constant, so\n",
"T3 = T2*(P3/P2);# temperature at stage 3, [K]\n",
"\n",
"# for point 4\n",
"V4 = V1;# volume at point 4, [m^3]\n",
"P4 = P3*(V3/V4)**Gama;# pressure at point 4, [kN/m^2] \n",
"# again since volume is constant in process 4-1 , so using P/T=constant, so\n",
"T4 = T1*(P4/P1);# temperature at point 4, [K]\n",
"\n",
"print ' (a) P1 = ',P1,' kN/m^2, V1 = ',round(V1,3),' m^3, t1 = ',T1-273,' C,\\n P2 = ',round(P2),' kN/m^2, V2 = ',round(V2,3),' m^3, t2 = ',round(T2-273),' C,\\n P3 = ',round(P3),' kN/m^2, V3 = ',round(V3,3),' m^3, t3 = ',round(T3-273),' C,\\n P4 = ',round(P4,1),' kN/m^2, V4 = ',round(V4,3),' m^3, t4 = ',round(T4-273),' C'\n",
"\n",
"# (b)\n",
"cv = R/(Gama-1);# specific heat capacity, [kJ/kg K]\n",
"Q23 = m*cv*(T3-T2);# heat transferred, [kJ]\n",
"print ' (b) The heat transferred to the air is (kJ) = ',round(Q23)\n",
"\n",
"# (c) \n",
"Q34 = m*cv*(T4-T1);# heat rejected by air, [kJ]\n",
"print ' (c) The heat rejected by the air is (kJ) = ',round(Q34,1)\n",
"\n",
"# (d)\n",
"TE = 1-Q34/Q23;# ideal thermal efficiency\n",
"print ' (d) The ideal thermal efficiency is (percent) = ',round(TE*100,1)\n",
"\n",
"# (e)\n",
"W = Q23-Q34;# work done ,[kJ]\n",
"print ' (e) The work done is (kJ) = ',round(W,1)\n",
"# (f)\n",
"Pm = W/(V1-V2);# mean effective pressure, [kN/m^2]\n",
"print ' (f) The mean effective pressure is (kN/m^2) = ',round(Pm,2)\n",
"\n",
"print 'The answers are a bit different due to rounding off error in textbook'\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8: pg 460"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.8\n",
" (a) P1 = 101.0 kN/m^2, V1 = 0.003 m^3, t1 = 18.0 C,\n",
" P2 = 2213.0 kN/m^2, V2 = 0.0 m^3, t2 = 436.0 C,\n",
" P3 = 4500.0 kN/m^2, V3 = 0.0 m^3, t3 = 1168.0 C,\n",
" P4 = 205.3 kN/m^2, V4 = 0.003 m^3, t4 = 319.0 C\n",
" (b) The thermal efficiency is (percent) = 59.0\n",
" (c) The theoretical output is (kW) = 55.5\n",
" (g) The mean effefctive pressure is (kN/m^2) = 415.9\n",
" (e) The carnot efficiency is (percent) = 79.8\n"
]
}
],
"source": [
"#pg 460\n",
"print('Example 15.8');\n",
"\n",
"# aim : To determine\n",
"# (a) the pressure, volume and temperature at cycle state points\n",
"# (b) the thermal efficiency\n",
"# (c) the theoretical output\n",
"# (d) the mean effective pressure\n",
"# (e) the carnot efficiency\n",
"\n",
"# given values\n",
"rv = 9.;# volume ratio\n",
"P1 = 101.;# initial pressure , [kN/m^2]\n",
"V1 = .003;# initial volume, [m^3]\n",
"T1 = 273.+18;# initial temperature, [K]\n",
"P3 = 4500.;# maximum pressure, [kN/m^2]\n",
"N = 3000.;\n",
"cp = 1.006;# specific heat capacity at constant pressure, [kJ/kg K]\n",
"cv = .716;# specific heat capacity at constant volume, [kJ/kg K]\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.20\n",
"# (a)\n",
"# for process 1-2\n",
"Gama = cp/cv;# heat capacity ratio\n",
"R = cp-cv;# gas constant, [kJ/kg K]\n",
"V2 = V1/rv;# volume at stage2, [m^3] \n",
"# using PV^(Gama)=constant for process 1-2\n",
"P2 = P1*(V1/V2)**(Gama);# pressure at stage2,. [kN/m^2]\n",
"T2 = T1*(V1/V2)**(Gama-1);# [K]\n",
"\n",
"# for process 2-3\n",
"V3 = V2;# volume at stage 3, [m^3]\n",
"# since volume is constant in process 2-3 , so using P/T=constant, so\n",
"T3 = T2*(P3/P2);# temperature at stage 3, [K]\n",
"\n",
"# for process 3-4\n",
"V4 = V1;# volume at stage 4\n",
"# using PV^(Gama)=constant for process 3-4\n",
"P4 = P3*(V3/V4)**(Gama);# pressure at stage2,. [kN/m^2]\n",
"T4 = T3*(V3/V4)**(Gama-1);# temperature at stage 4,[K]\n",
"\n",
"print ' (a) P1 = ',P1,' kN/m^2, V1 = ',round(V1,3),' m^3, t1 = ',T1-273,' C,\\n P2 = ',round(P2),' kN/m^2, V2 = ',round(V2,3),' m^3, t2 = ',round(T2-273),' C,\\n P3 = ',round(P3),' kN/m^2, V3 = ',round(V3,3),' m^3, t3 = ',round(T3-273),' C,\\n P4 = ',round(P4,1),' kN/m^2, V4 = ',round(V4,3),' m^3, t4 = ',round(T4-273),' C'\n",
"\n",
"# (b)\n",
"TE = 1-(T4-T1)/(T3-T2);# thermal efficiency\n",
"print ' (b) The thermal efficiency is (percent) = ',round(TE*100)\n",
"\n",
"# (c)\n",
"m = P1*V1/(R*T1);# mass os gas, [kg] \n",
"W = m*cv*((T3-T2)-(T4-T1));# work done, [kJ]\n",
"Wt = W*N/60;# workdone per minute, [kW]\n",
"print ' (c) The theoretical output is (kW) = ',round(Wt,1)\n",
"\n",
"# (d)\n",
"Pm = W/(V1-V2);# mean effective pressure, [kN/m^2]\n",
"print ' (g) The mean effefctive pressure is (kN/m^2) = ',round(Pm,1)\n",
"\n",
"# (e)\n",
"CE = (T3-T1)/T3;# carnot efficiency\n",
"print ' (e) The carnot efficiency is (percent) = ',CE*100\n",
"\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9: pg 467"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.9\n",
" (a) P1 = 90.0 kN/m^2, V1 = 0.998 m^3, t1 = 40.0 C,\n",
" P2 = 4365.0 kN/m^2, V2 = 0.062 m^3, t2 = 676.0 C,\n",
" P3 = 4365.0 kN/m^2, V3 = 0.11 m^3, t3 = 1400.0 C,\n",
" P4 = 199.1 kN/m^2, V4 = 0.998 m^3, t4 = 419.0 C\n",
" (b) The work done is (kJ) = 454.959974156\n",
" (c) The thermal efficiency is (percent) = 62.6\n",
" (d) The work ratio is = 0.318\n",
" (e) The mean effefctive pressure is (kN/m^2) = 486.4\n",
" (f) The carnot efficiency is (percent) = 81.3\n",
"value of t2 printed in the book is incorrect\n"
]
}
],
"source": [
"#pg 467\n",
"print('Example 15.9');\n",
"\n",
"# aim : To determine\n",
"# (a) the pressure and temperature at cycle process change points\n",
"# (b) the work done \n",
"# (c) the thermal efficiency\n",
"# (d) the work ratio\n",
"# (e) the mean effective pressure\n",
"# (f) the carnot efficiency\n",
"\n",
"\n",
"# given values\n",
"rv = 16.;# volume ratio of compression\n",
"P1 = 90.;# initial pressure , [kN/m^2]\n",
"T1 = 273.+40;# initial temperature, [K]\n",
"T3 = 273.+1400;# maximum temperature, [K]\n",
"cp = 1.004;# specific heat capacity at constant pressure, [kJ/kg K]\n",
"Gama = 1.4;# heat capacoty ratio\n",
"\n",
"# solution\n",
"cv = cp/Gama;# specific heat capacity at constant volume, [kJ/kg K]\n",
"R = cp-cv;# gas constant, [kJ/kg K]\n",
"# for one kg of gas\n",
"V1 = R*T1/P1;# initial volume, [m^3]\n",
"# taking reference Fig. 15.22\n",
"# (a)\n",
"# for process 1-2\n",
"# using PV^(Gama)=constant for process 1-2\n",
"# also rv = V1/V2\n",
"P2 = P1*(rv)**(Gama);# pressure at stage2,. [kN/m^2]\n",
"T2 = T1*(rv)**(Gama-1);# temperature at stage 2, [K]\n",
"\n",
"# for process 2-3\n",
"P3 = P2;# pressure at stage 3, [kN/m^2]\n",
"V2 = V1/rv;#[m^3]\n",
"# since pressure is constant in process 2-3 , so using V/T=constant, so\n",
"V3 = V2*(T3/T2);# volume at stage 3, [m^3]\n",
"\n",
"# for process 1-4\n",
"V4 = V1;# [m^3]\n",
"P4 = P3*(V3/V4)**(Gama)\n",
"# since in stage 1-4 volume is constant, so P/T=constant, \n",
"T4 = T1*(P4/P1);# temperature at stage 4,[K]\n",
"\n",
"print ' (a) P1 = ',P1,' kN/m^2, V1 = ',round(V1,3),' m^3, t1 = ',T1-273,' C,\\n P2 = ',round(P2),' kN/m^2, V2 = ',round(V2,3),' m^3, t2 = ',round(T2-273),' C,\\n P3 = ',round(P3),' kN/m^2, V3 = ',round(V3,3),' m^3, t3 = ',round(T3-273),' C,\\n P4 = ',round(P4,1),' kN/m^2, V4 = ',round(V4,3),' m^3, t4 = ',round(T4-273),' C'\n",
"\n",
"# (b)\n",
"W = cp*(T3-T2)-cv*(T4-T1);# work done, [kJ]\n",
"print ' (b) The work done is (kJ) = ',W\n",
"\n",
"# (c) \n",
"TE = 1-(T4-T1)/((T3-T2)*Gama);# thermal efficiency\n",
"print ' (c) The thermal efficiency is (percent) = ',round(TE*100,1)\n",
"\n",
"# (d)\n",
"PW = cp*(T3-T2)+R*(T3-T4)/(Gama-1);# positive work done\n",
"WR = W/PW;# work ratio\n",
"print ' (d) The work ratio is = ',round(WR,3)\n",
"\n",
"# (e)\n",
"Pm = W/(V1-V2);# mean effective pressure, [kN/m^2]\n",
"print ' (e) The mean effefctive pressure is (kN/m^2) = ',round(Pm,1)\n",
"\n",
"# (f)\n",
"CE = (T3-T1)/T3;# carnot efficiency\n",
"print ' (f) The carnot efficiency is (percent) = ',round(CE*100,1)\n",
"\n",
"print 'value of t2 printed in the book is incorrect'\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 10: pg 470"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 10\n",
" (a) The maximum temperature during the cycle is (C) = 1595.4\n",
" (b) The thermal efficiency of the cycle is (percent) = 60.3\n"
]
}
],
"source": [
"#pg 470\n",
"print('Example 10');\n",
"\n",
"# aim : To determine\n",
"# (a) the maximum temperature attained during the cycle\n",
"# (b) the thermal efficiency of the cycle\n",
"\n",
"# given value\n",
"rva =7.5;# volume ratio of adiabatic expansion\n",
"rvc =15.;# volume ratio of compression\n",
"P1 = 98.;# initial pressure, [kn/m^2]\n",
"T1 = 273.+44;# initial temperature, [K]\n",
"P4 = 258.;# pressure at the end of the adiabatic expansion, [kN/m^2]\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"# by seeing diagram\n",
"# for process 4-1, P4/T4=P1/T1\n",
"T4 = T1*(P4/P1);# [K]\n",
"# for process 3-4\n",
"T3 = T4*(rva)**(Gama-1);\n",
"print ' (a) The maximum temperature during the cycle is (C) = ',round(T3-273,1)\n",
"\n",
"# (b)\n",
"\n",
"# for process 1-2,\n",
"T2 = T1*(rvc)**(Gama-1);# [K]\n",
"n_the = 1-(T4-T1)/((Gama)*(T3-T2));# thermal efficiency\n",
"print ' (b) The thermal efficiency of the cycle is (percent) = ',round(n_the*100,1)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 11: pg 471"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.11\n",
" (a) the thermal efficiency of the cycle is (percent) = 55.1\n",
" (c) The indicated power of the cycle is (kW) = 26.59\n"
]
}
],
"source": [
"#pg 471\n",
"print('Example 15.11');\n",
"\n",
"# aim : To determine\n",
"# (a) the thermal efficiency of the cycle\n",
"# (b) the indicared power of the cycle\n",
"\n",
"# given values\n",
"# taking basis one second\n",
"rv = 11.;# volume ratio\n",
"P1 = 96.;# initial pressure , [kN/m^2]\n",
"T1 = 273.+18;# initial temperature, [K]\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.24\n",
"# (a)\n",
"Beta = 2;# ratio of V3 and V2\n",
"TE = 1-(Beta**(Gama)-1)/((rv**(Gama-1))*Gama*(Beta-1));# thermal efficiency\n",
"print ' (a) the thermal efficiency of the cycle is (percent) = ',round(TE*100,1)\n",
"\n",
"# (b) \n",
"# let V1-V2=.05, so\n",
"V2 = .05*.1;# [m^3]\n",
"# from this\n",
"V1 = rv*V2;# [m^3]\n",
"V3 = Beta*V2;# [m^3]\n",
"V4 = V1;# [m^3]\n",
"P2 = P1*(V1/V2)**(Gama);# [kN/m^2]\n",
"P3 = P2;# [kn/m^2]\n",
"P4=P3*(V3/V4)**(Gama);# [kN/m^2]\n",
"# indicated power\n",
"W = P2*(V3-V2)+((P3*V3-P4*V4)-(P2*V2-P1*V1))/(Gama-1);# indicated power, [kW]\n",
"print ' (c) The indicated power of the cycle is (kW) = ',round(W,2)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 12: pg 477"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.12\n",
" (a) The pressure at the end of compression is (MN/m^2) = 5.0\n",
" The temperature at the end of compression is (C) = 621.0\n",
" (b) The pressure at the end of constant volume process is (MN/m^2) = 6.9\n",
" The temperature at the end of constant volume process is (C) = 962.0\n",
" (c) The temperature at the end of constant pressure process is (C) = 1517.0\n"
]
}
],
"source": [
"#pg 477\n",
"print('Example 15.12');\n",
"# aim : To determine\n",
"# (a) the pressure and temperature at the end of compression\n",
"# (b) the pressure and temperature at the end of the constant volume process\n",
"# (c) the temperature at the end of constant pressure process\n",
"\n",
"# given values\n",
"P1 = 103.;# initial pressure, [kN/m^2]\n",
"T1 = 273.+22;# initial temperature, [K]\n",
"rv = 16.;# volume ratio of the compression\n",
"Q = 244.;#heat added, [kJ/kg]\n",
"Gama = 1.4;# heat capacity ratio\n",
"cv = .717;# heat capacity, [kJ/kg k]\n",
"\n",
"# solution\n",
"# taking reference as Fig.15.26\n",
"# (a)\n",
"# for compression\n",
"# rv = V1/V2\n",
"P2 = P1*(rv)**Gama;# pressure at end of compression, [kN/m^2]\n",
"T2 = T1*(rv)**(Gama-1);# temperature at end of compression, [K]\n",
"print ' (a) The pressure at the end of compression is (MN/m^2) = ',round(P2*10**-3)\n",
"print ' The temperature at the end of compression is (C) = ',round(T2-273)\n",
"\n",
"# (b)\n",
"# for constant volume process, \n",
"# Q = cv*(T3-T2), so\n",
"T3 = T2+Q/cv;# temperature at the end of constant volume, [K]\n",
"\n",
"# so for constant volume, P/T=constant, hence\n",
"P3 = P2*(T3/T2);# pressure at the end of constant volume process, [kN/m^2]\n",
"print ' (b) The pressure at the end of constant volume process is (MN/m^2) = ',round(P3*10**-3,1)\n",
"print ' The temperature at the end of constant volume process is (C) = ',round(T3-273)\n",
"\n",
"# (c)\n",
"S = rv-1;# stroke\n",
"# assuming \n",
"V3 = 1;# [volume]\n",
"#so\n",
"V4 = V3+S*.03;# [volume]\n",
"# also for constant process V/T=constant, hence\n",
"T4 = T3*(V4/V3);# temperature at the end of constant presure process, [k] \n",
"print ' (c) The temperature at the end of constant pressure process is (C) = ',round(T4-273)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 13: pg 479"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.13\n",
" (a) P1 = 0.097 kN/m^2, V1 = 0.084 m^3, t1 = 28.0 C,\n",
" P2 = 4.0 kN/m^2, V2 = 0.0056 m^3, t2 = 620.0 C,\n",
" P3 = 6.0 kN/m^2, V3 = 0.0056 m^3, t3 = 1010.0 C,\n",
" P4 = 6.2 kN/m^2, V4 = 0.006955 m^3, t4 = 1320.0 C \n",
" P5 = 0.2 kN/m^2, V5 = 0.084 m^3, t5 = 313.0 C\n",
" (b) The net work done is (kJ) = 36.4\n",
" (c) The thermal efficiency is (percent) = 65.5\n",
" (d) The heat received is (kJ) = 55.6\n",
" (f) The work ratio is = 0.477\n",
" (e) The mean effective pressure is (kN/m^2) = 464.0\n",
" (f) The carnot efficiency is (percent) = 81.0\n"
]
}
],
"source": [
"#pg 479\n",
"print('Example 15.13');\n",
"\n",
"# aim : To determine\n",
"# (a) the pressure, volume and temperature at cycle process change points\n",
"# (b) the net work done \n",
"# (c) the thermal efficiency\n",
"# (d) the heat received\n",
"# (e) the work ratio\n",
"# (f) the mean effective pressure\n",
"# (g) the carnot efficiency\n",
"\n",
"\n",
"# given values\n",
"rv = 15.;# volume ratio\n",
"P1 = 97.*10**-3;# initial pressure , [MN/m^2]\n",
"V1 = .084;# initial volume, [m^3]\n",
"T1 = 273.+28;# initial temperature, [K]\n",
"T4 = 273.+1320;# maximum temperature, [K]\n",
"P3 = 6.2;# maximum pressure, [MN/m^2]\n",
"cp = 1.005;# specific heat capacity at constant pressure, [kJ/kg K]\n",
"cv = .717;# specific heat capacity at constant volume, [kJ/kg K]\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.27\n",
"# (a)\n",
"R = cp-cv;# gas constant, [kJ/kg K]\n",
"Gama = cp/cv;# heat capacity ratio\n",
"# for process 1-2\n",
"V2 = V1/rv;# volume at stage2, [m^3] \n",
"# using PV^(Gama)=constant for process 1-2\n",
"P2 = P1*(V1/V2)**(Gama);# pressure at stage2,. [MN/m^2]\n",
"T2 = T1*(V1/V2)**(Gama-1);# temperature at stage 2, [K]\n",
"\n",
"# for process 2-3\n",
"# since volumee is constant in process 2-3 , so using P/T=constant, so\n",
"T3 = T2*(P3/P2);# volume at stage 3, [K]\n",
"V3 = V2;# volume at stage 3, [MN/m^2]\n",
"\n",
"# for process 3-4\n",
"P4 = P3;# pressure at stage 4, [m^3]\n",
"# since in stage 3-4 P is constant, so V/T=constant, \n",
"V4 = V3*(T4/T3);# temperature at stage 4,[K]\n",
"\n",
"# for process 4-5\n",
"V5 = V1;# volume at stage 5, [m^3]\n",
"P5 = P4*(V4/V5)**(Gama);# pressure at stage5,. [MN/m^2]\n",
"T5 = T4*(V4/V5)**(Gama-1);# temperature at stage 5, [K]\n",
"\n",
"print ' (a) P1 = ',P1,' kN/m^2, V1 = ',round(V1,3),' m^3, t1 = ',T1-273,' C,\\n P2 = ',round(P2),' kN/m^2, V2 = ',round(V2,6),' m^3, t2 = ',round(T2-273),' C,\\n P3 = ',round(P3),' kN/m^2, V3 = ',round(V3,6),' m^3, t3 = ',round(T3-273),' C,\\n P4 = ',round(P4,1),' kN/m^2, V4 = ',round(V4,6),' m^3, t4 = ',round(T4-273),' C \\n P5 = ',round(P5,1),' kN/m^2, V5 = ',round(V5,3),' m^3, t5 = ',round(T5-273),' C'\n",
"\n",
"\n",
"# (b)\n",
"W = (P3*(V4-V3)+((P4*V4-P5*V5)-(P2*V2-P1*V1))/(Gama-1))*10**3;# work done, [kJ]\n",
"print ' (b) The net work done is (kJ) = ',round(W,1)\n",
"\n",
"# (c) \n",
"TE = 1-(T5-T1)/((T3-T2)+Gama*(T4-T3));# thermal efficiency\n",
"print ' (c) The thermal efficiency is (percent) = ',round(TE*100,1)\n",
"\n",
"# (d)\n",
"Q = W/TE;# heat received, [kJ]\n",
"print ' (d) The heat received is (kJ) = ',round(Q,1)\n",
"\n",
"# (e)\n",
"PW = P3*(V4-V3)+(P4*V4-P5*V5)/(Gama-1)\n",
"WR = W*10**-3/PW;# work ratio\n",
"print ' (f) The work ratio is = ',round(WR,3)\n",
"\n",
"# (e)\n",
"Pm = W/(V1-V2);# mean effective pressure, [kN/m^2]\n",
"print ' (e) The mean effective pressure is (kN/m^2) = ',round(Pm,1)\n",
"\n",
"# (f)\n",
"CE = (T4-T1)/T4;# carnot efficiency\n",
"print ' (f) The carnot efficiency is (percent) = ',round(CE*100)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 14: pg 487"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.14\n",
" (a) The thermal efficiency is (percent) = 52.6\n",
" (b) The heat received is (kJ/cycle) = 6.22\n",
" (c) The heat rejected is (kJ/cycle) = 2.95\n",
" (d) The net work is (kJ/cycle) = 3.27\n",
" (e) The work ratio is = 0.347\n",
" (f) The mean effefctive pressure is (kN/m^2) = 167.32\n",
" (g) The carnot efficiency is (percent) = 72.7\n",
"there is minor variation in answer reported in the book due to rounding off error\n"
]
}
],
"source": [
"#pg 487\n",
"print('Example 15.14');\n",
"\n",
"# aim : To determine\n",
"# (a) the thermal efficiency\n",
"# (b) the heat received\n",
"# (c) the heat rejected\n",
"# (d) the net work \n",
"# (e) the work ratio\n",
"# (f) the mean effective pressure\n",
"# (g) the carnot efficiency\n",
"\n",
"\n",
"# given values\n",
"P1 = 101.;# initial pressure , [kN/m**2]\n",
"V1 = 14.*10**-3;# initial volume, [m**3]\n",
"T1 = 273.+15;# initial temperature, [K]\n",
"P3 = 1850.;# maximum pressure, [kN/m**2]\n",
"V2 = 2.8*10**-3;# compressed volume, [m**3]\n",
"Gama = 1.4;# heat capacity\n",
"R = .29;# gas constant, [kJ/kg k]\n",
"\n",
"# solution\n",
"# taking reference Fig. 15.29\n",
"# (a)\n",
"# for process 1-2\n",
"# using PV**(Gama)=constant for process 1-2\n",
"P2 = P1*(V1/V2)**(Gama);# pressure at stage2,. [MN/m**2]\n",
"T2 = T1*(V1/V2)**(Gama-1);# temperature at stage 2, [K]\n",
"\n",
"# for process 2-3\n",
"# since volumee is constant in process 2-3 , so using P/T=constant, so\n",
"T3 = T2*(P3/P2);# volume at stage 3, [K]\n",
"\n",
"# for process 3-4\n",
"P4 = P1;\n",
"T4 = T3*(P4/P3)**((Gama-1)/Gama);# temperature\n",
"\n",
"TE = 1-Gama*(T4-T1)/(T3-T2);# thermal efficiency\n",
"print ' (a) The thermal efficiency is (percent) = ',round(TE*100,1)\n",
"\n",
"# (b)\n",
"cv = R/(Gama-1);# heat capacity at copnstant volume, [kJ/kg k]\n",
"m = P1*V1/(R*T1);# mass of gas, [kg]\n",
"Q1 = m*cv*(T3-T2);# heat received, [kJ/cycle]\n",
"print ' (b) The heat received is (kJ/cycle) = ',round(Q1,2)\n",
"\n",
"# (c)\n",
"cp = Gama*cv;# heat capacity at constant at constant pressure, [kJ/kg K]\n",
"Q2 = m*cp*(T4-T1);# heat rejected, [kJ/cycle]\n",
"print ' (c) The heat rejected is (kJ/cycle) = ',round(Q2,2)\n",
"\n",
"# (d)\n",
"W = Q1-Q2;# net work , [kJ/cycle]\n",
"print ' (d) The net work is (kJ/cycle) = ',round(W,2)\n",
"\n",
"# (e)\n",
"# pressure is constant for process 1-4, so V/T=constant\n",
"V4 = V1*(T4/T1);# volume, [m**3]\n",
"V3 = V2;# for process 2-3\n",
"P4 = P1;# for process 1-4\n",
"PW = (P3*V3-P1*V1)/(Gama-1);# positive work done, [kJ/cycle]\n",
"WR = W/PW;# work ratio\n",
"print ' (e) The work ratio is = ',round(WR,3)\n",
"\n",
"# (f)\n",
"Pm = W/(V4-V2);# mean effective pressure, [kN/m**2]\n",
"print ' (f) The mean effefctive pressure is (kN/m^2) = ',round(Pm,2)\n",
"\n",
"# (g)\n",
"CE = (T3-T1)/T3;# carnot efficiency\n",
"print ' (g) The carnot efficiency is (percent) = ',round(CE*100,1)\n",
"\n",
"print 'there is minor variation in answer reported in the book due to rounding off error'\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 15: pg 492"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.15\n",
" (a) The net work done is (kJ) = 28.0\n",
" (b) The ideal thermal efficiency is (percent) = 68.9\n",
" (c) the thermal efficiency if the process of regeneration is not included is (percent) = 39.5\n"
]
}
],
"source": [
"#pg 492\n",
"print('Example 15.15');\n",
"\n",
"# aim : To determine\n",
"# (a) the net work done\n",
"# (b) the ideal thermal efficiency\n",
"# (c) the thermal efficiency if the process of generation is not included\n",
"from math import log\n",
"# given values\n",
"P1 = 110.;# initial pressure, [kN/m^2)\n",
"T1 = 273.+30;# initial temperature, [K]\n",
"V1 = .05;# initial volume, [m^3]\n",
"V2 = .005;# volume, [m^3]\n",
"T3 = 273.+700;# temperature, [m^3]\n",
"R = .289;# gas constant, [kJ/kg K]\n",
"cv = .718;# heat capacity, [kJ/kg K]\n",
"\n",
"# solution\n",
"# (a)\n",
"m = P1*V1/(R*T1);# mass , [kg]\n",
"W = m*R*(T3-T1)*log(V1/V2);# work done, [kJ]\n",
"print ' (a) The net work done is (kJ) = ',round(W)\n",
"\n",
"# (b)\n",
"n_the = (T3-T1)/T3;# ideal thermal efficiency\n",
"print ' (b) The ideal thermal efficiency is (percent) = ',round(n_the*100,1)\n",
"\n",
"# (c)\n",
"V4 = V1;\n",
"V3 = V2;\n",
"T4 = T3;\n",
"T2 = T1;\n",
"\n",
"Q_rej = m*cv*(T4-T1)+m*R*T1*log(V1/V2);# heat rejected\n",
"Q_rec = m*cv*(T3-T2)+m*R*T3*log(V4/V3);# heat received\n",
"\n",
"n_th = (1-Q_rej/Q_rec);# thermal efficiency\n",
"print ' (c) the thermal efficiency if the process of regeneration is not included is (percent) = ',round(n_th*100,1)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16: pg 493"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.16\n",
" (a) The maximum temperature is (C) = 313.0\n",
" (b) The net work done is (kJ) = 12.88\n",
" (c) The ideal thermal efficiency is (percent) = 50.0\n",
" (d) the thermal efficiency if the process of regeneration is not included is (percent) = 24.0\n"
]
}
],
"source": [
"#pg 493\n",
"print('Example 15.16');\n",
"from math import log\n",
"# aim : To determine\n",
"# (a) the maximum temperature\n",
"# (b) the net work done\n",
"# (c) the ideal thermal efficiency\n",
"# (d) the thermal efficiency if the process of regeneration is not included\n",
"\n",
"# given values\n",
"P1 = 100.;# initial pressure, [kN/m^2)\n",
"T1 = 273.+20;# initial temperature, [K]\n",
"V1 = .08;# initial volume, [m^3]\n",
"rv = 5;# volume ratio\n",
"R = .287;# gas constant, [kJ/kg K]\n",
"cp = 1.006;# heat capacity, [kJ/kg K]\n",
"V3_by_V2 = 2;\n",
"\n",
"# solution\n",
"# (a)\n",
"# using Fig.15.33\n",
"# process 1-2 is isothermal\n",
"T2 = T1;\n",
"# since process 2-3 isisobaric, so V/T=constant\n",
"T3 = T2*(V3_by_V2);# maximumtemperature, [K]\n",
"print ' (a) The maximum temperature is (C) = ',T3-273\n",
"\n",
"# (b)\n",
"m = P1*V1/(R*T1);# mass , [kg]\n",
"W = m*R*(T3-T1)*log(rv);# work done, [kJ]\n",
"print ' (b) The net work done is (kJ) = ',round(W,2)\n",
"\n",
"# (c)\n",
"TE = (T3-T1)/T3;# ideal thermal efficiency\n",
"print ' (c) The ideal thermal efficiency is (percent) = ',TE*100\n",
"\n",
"# (d)\n",
"T4 = T3;\n",
"T2 = T1;\n",
"\n",
"Q_rej = m*cp*(T4-T1)+m*R*T1*log(rv);# heat rejected\n",
"Q_rec = m*cp*(T3-T2)+m*R*T3*log(rv);# heat received\n",
"\n",
"n_th = (1-Q_rej/Q_rec);# thermal efficiency\n",
"print ' (d) the thermal efficiency if the process of regeneration is not included is (percent) = ',round(n_th*100)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 17: pg 495"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.17\n",
" (a) The net work done is (kJ) = 44.7\n",
" (b) The thermal efficiency is (percent) = 56.7\n"
]
}
],
"source": [
"#pg 495\n",
"print('Example 15.17');\n",
"\n",
"# aim : To determine \n",
"# (a) the net work done\n",
"# (b) thethermal efficiency\n",
"from math import log\n",
"# given values\n",
"m = 1.;# mass of air, [kg]\n",
"T1 = 273.+230;# initial temperature, [K]\n",
"P1 = 3450.;# initial pressure, [kN/m^2]\n",
"P2 = 2000.;# pressure, [kN/m^2]\n",
"P3 = 140.;# pressure, [kN/m^2]\n",
"P4 = P3;\n",
"Gama = 1.4; # heat capacity ratio\n",
"cp = 1.006;# heat capacity, [kJ/kg k]\n",
"\n",
"# solution\n",
"T2 =T1;# isothermal process 1-2\n",
"# process 2-3 and 1-4 are adiabatic so\n",
"T3 = T2*(P3/P2)**((Gama-1)/Gama);# temperature, [K] \n",
"T4 = T1*(P4/P1)**((Gama-1)/Gama);# [K]\n",
"R = cp*(Gama-1)/Gama;# gas constant, [kJ/kg K]\n",
"Q1 = m*R*T1*log(P1/P2);# heat received, [kJ]\n",
"Q2 = m*cp*(T3-T4);# heat rejected\n",
"\n",
"#hence\n",
"W = Q1-Q2;# work done\n",
"print ' (a) The net work done is (kJ) = ',round(W,1)\n",
"\n",
"# (b)\n",
"TE = 1-Q2/Q1;# thermal efficiency\n",
"print ' (b) The thermal efficiency is (percent) = ',round(TE*100,1)\n",
"\n",
"# End\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 18: pg 497"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Example 15.18\n",
" The thermal efficiency is (percent) = 31.0\n",
" The carnot efficiency is = 73.7\n"
]
}
],
"source": [
"#pg 497\n",
"print('Example 15.18');\n",
"\n",
"# aim : To determine \n",
"# thermal eficiency\n",
"# carnot efficiency\n",
"from math import log\n",
"# given values\n",
"rv = 5.;# volume ratio\n",
"Gama = 1.4;# heat capacity ratio\n",
"\n",
"# solution\n",
"# under given condition\n",
"\n",
"TE = 1-(1/Gama*(2-1/rv**(Gama-1)))/(1+2*((Gama-1)/Gama)*log(rv/2));# thermal efficiency\n",
"print ' The thermal efficiency is (percent) = ',round(TE*100)\n",
"\n",
"CE = 1-1/(2*rv**(Gama-1));# carnot efficiency\n",
"print ' The carnot efficiency is = ',round(CE*100,1)\n",
"\n",
"# End\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.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|