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
|
{
"metadata": {
"name": "",
"signature": "sha256:897b863d1c4a7fc08bdd18a7c97541fdce377415c35a75aa9b7ef0eec5c061e1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter10:AVAILABILITY AND IRREVERSIBILITY"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.1, Page No:472"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"m=100; # Mass of water in kg\n",
"T0=90; # Initial temperature of water in degree celcius\n",
"T=30; # temperature of Surroundings in degree celcius\n",
"C=4.1868; # Specific heat in kJ/kg K\n",
"\n",
"#Calculation\n",
"AE=m*C*((T0-T)-(T+273)*math.log ((T0+273)/(T+273))); # Available energy\n",
"Q=m*C*(T0-T); # Heat supplied\n",
"UE=Q-AE; # Unavailable energy\n",
"\n",
"#Result\n",
"print \"Available energy =\",round(AE,0),\"kJ\"\n",
"print \"Heat supplied = \",round(Q,0),\"kJ\",\"\\nUnavailable energy = \",round(UE,0),\"kJ\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Available energy = 2201.0 kJ\n",
"Heat supplied = 25121.0 kJ \n",
"Unavailable energy = 22920.0 kJ\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.2, Page No:474"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"T=250; # Evaporation teemperature of water in degree celcius\n",
"Ta=1250; # Initial temperature of combustion gas in degree celcius\n",
"Tb=350; # Final temperature of combustion gas in degree celcius\n",
"C=1.08; # Specific heat of gas in kJ/kg K\n",
"T0=30; # temperature of Surroundings in degree celcius\n",
"hfg=1716.2; # Enthalpy of evaporation at T temperature\n",
"\n",
"#Calculation\n",
"del_SH2O=hfg/(T+273); # Entropy change of water\n",
"mgas=hfg/(C*(Ta-Tb)); # Mass of gas\n",
"del_Sgas=mgas*C*math.log ((Tb+273)/(Ta+273)); # Enthalpy change of gas\n",
"del_Stotal=del_SH2O+del_Sgas; # Total entropy change\n",
"l_AE=(T0+273)*del_Stotal; # Loss of available energy\n",
"\n",
"#Result\n",
"print \"Loss of available energy = \",round(l_AE,1),\"kJ\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Loss of available energy = 477.8 kJ\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.3, Page No:475"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"Cp=1.1; # Specific heat of combustion gas in kJ/kg K\n",
"T3=1600; # Initial temperature of combustion gas in Kelvin\n",
"T4=1150; # Final temperature of combustion gas in Kelvin\n",
"p1=0.1; # Pressure at inlet of boiler in MPa\n",
"p2=8;# Pressure at outlet of boiler in MPa\n",
"T2=600; # Temperature at outlet of boiler in degree celcius\n",
"m=1; # Mass of water in kg\n",
"T0=298; # temperature of Surroundings in kelvin\n",
"\n",
"#Calculation for (b)\n",
"# (b).mass flow rate of gases per kg of water\n",
"# From steam table \n",
"h1=2758; h2=3642;# specific enthalpy in kJ/kg \n",
"s1=5.7432; s2=7.0206; # specific entropy in kJ/kg K\n",
"mgas=(h2-h1)/(Cp*(T3-T4)); #mass flow rate of gases per kg of water\n",
"\n",
"#Result for (b)\n",
"print \"(b).mass flow rate of gases per kg of water =\",round(mgas,3),\"kg gas / kg water\"\n",
"\n",
"#Calculation for (c)\n",
"# (c). Degrease in Available energy\n",
"S21=s2-s1; # Change in entropy of water\n",
"S34=mgas*Cp*math.log (T3/T4); # Change in entropy of gases\n",
"UEgases=T0*S34; # UnAvailable energy of gas\n",
"UEsteam=T0*S21; # UnAvailable energy of steam\n",
"d_AE=UEsteam-UEgases; # Degrease in Available energy\n",
"\n",
"#Result for (c)\n",
"print \"\\n(c).\",\"\\nChange in entropy of water = \",round(S21,4),\"kJ/K\",\"\\nChange in entropy of gas = \",round(-S34,4),\"kJ/K\"\n",
"print \"Unavailable energy of gas = \",round(UEgases,1),\"kJ\",\"\\nUnavailable energy of steam =\",round(UEsteam,1),\"kJ\"\n",
"print \"Degrease in Available energy = \",round(d_AE,1),\"kJ\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(b).mass flow rate of gases per kg of water = 1.786 kg gas / kg water\n",
"\n",
"(c). \n",
"Change in entropy of water = 1.2774 kJ/K \n",
"Change in entropy of gas = -0.6487 kJ/K\n",
"Unavailable energy of gas = 193.3 kJ \n",
"Unavailable energy of steam = 380.7 kJ\n",
"Degrease in Available energy = 187.3 kJ\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.5, Page No:481"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"T=700;# Exhaust gas temperature in degree celcius\n",
"p=120;# Exhaust gas pressure in kPa\n",
"Cpo=1.089; # Specific heat at constant pressure in kJ/kg K\n",
"R=0.287; # characteristic gas constant in kJ/kg K\n",
"p0=100; # Pressure of Surroundings in kPa\n",
"T0=30; # temperature of Surroundings in degree celcius\n",
"\n",
"#Calculation\n",
"Cvo=Cpo-R; # Specific heat at constant volume\n",
"AE=(Cvo*(T-T0))+(p0*R*((T+273)/p-(T0+273)/p0))-((T0+273)*((Cpo*math.log((T+273)/(T0+273)))-(R*math.log (p/p0)))); # Available energy\n",
"\n",
"#Result \n",
"print \"Available energy in Exhaust gas =\",round(AE,0),\"kJ\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Available energy in Exhaust gas = 314.0 kJ\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.6, Page No:482"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"p1=450; # Initial pressure in kPa\n",
"T=600; # Initial temperature in kelvin\n",
"V1=0.01; # Initial volume in m^3\n",
"TR=1200; # Temperature of heat source in Kelvin\n",
"V2=0.02; # Final volume in m^3\n",
"p0=100; # Pressure of Surroundings in kPa\n",
"T0=300; # temperature of Surroundings in kelvin\n",
"\n",
"#Calculation\n",
"# Useful Work\n",
"W=p1*V1*math.log (V2/V1); # Actual work\n",
"Wsurr=p0*(V2-V1); # Surrounding work\n",
"Wu=W-Wsurr; # Useful work\n",
"# Reversible work\n",
"Q=W; # For isothermal process\n",
"S21=Q/T; # Entropy change of system\n",
"Wrev=T0*S21-Wsurr+Q*(1-T0/TR); # reversible work\n",
"# Irreversibility of the process\n",
"I=Wrev-Wu; # Irreversibility\n",
"# Entropy generation \n",
"del_Sgen=S21-Q/TR;#Entropy generation\n",
"\n",
"#Results\n",
"print \"Useful Work for the process =\",round(Wu,2),\"kJ\"\n",
"print \"Reversible work for the provess =\",round(Wrev,1),\"kJ\"\n",
"print \"Irreversibility of the process = \",round(I,2),\"kJ\"\n",
"print \"Entropy generation of the process = \",round(del_Sgen,4),\"kJ/kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Useful Work for the process = 2.12 kJ\n",
"Reversible work for the provess = 2.9 kJ\n",
"Irreversibility of the process = 0.78 kJ\n",
"Entropy generation of the process = 0.0026 kJ/kg\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.7, Page No:485"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration for (i)\n",
"# (i).Irreversibility in Turbine\n",
"p1=9; # Steam pressure at turbine inlet in MPa\n",
"T1=450; # Steam temperature at turbine inlet in degree celcius\n",
"p2=50; # Steam pressure at turbine outlet in MPa\n",
"x2=0.95; # Quality of steam \n",
"p0=100; # Pressure of Surroundings in kPa\n",
"T0=300; # temperature of Surroundings in kelvin\n",
"q=-10; # Heat loss in kJ/kg\n",
"\n",
"#Calculation for (a)\n",
"# (a).Decrease in availability\n",
"# from steam table\n",
"h1=3256.6; h2=2415.4;# specific enthalpy in kJ/kg \n",
"s1=6.4844; s2=6.944; # specific entropy in kJ/kg K\n",
"d_AE=(h1-h2)-(T0*(s1-s2)); # Decrease in availability\n",
"\n",
"#Result for (a)\n",
"print \"(i).Irreversibility in turbine\",\"\\n (a).Decrease in availability =\",round(d_AE,1),\"kJ/kg\"\n",
"\n",
"#Calculation for (b)\n",
"# (b).Maxximum work output\n",
"wrev=d_AE; #Maxximum work output\n",
"\n",
"#Result for (b)\n",
"print \" (b).Maxximum work output =\",round(wrev,1),\"kJ/kg\"\n",
"\n",
"#Calculation for (c)\n",
"# (c).Actual work output \n",
"w=(h1-h2)+q; # From SSSF energy equation\n",
"\n",
"#Result for (c)\n",
"print \" (c).Actual work output = \",round(w,1),\"kJ/kg\"\n",
"\n",
"#Calculation for (d)\n",
"# (d).Irreversibility\n",
"I=wrev-w; #Irreversibility\n",
"\n",
"#Result for (d)\n",
"print \" (d).Irreversibility = \",round(I,1),\"kJ/kg\"\n",
"\n",
"#Variable declaration for (ii)\n",
"# (ii).Ammonia compressor\n",
"T1=-10; # Temperature at inlet in degree celcius\n",
"p2=1.554; # Pressure at outlet in MPa\n",
"T2=140; # Temperature at outlet in degree celcius\n",
"T0=298; # temperature of Surroundings in kelvin\n",
"#from ammonia tables \n",
"h1=1433; h2=1752;# specific enthalpy in kJ/kg \n",
"s1=5.477; s2=5.655; # specific entropy in kJ/kg K\n",
"\n",
"#Calculation for (ii)\n",
"wactual=-(h2-h1); # Actual work\n",
"wmin=-((h2-h1)-(T0*(s2-s1)));# mimimum work\n",
"I=wmin-wactual;# Irreversibility\n",
"\n",
"#Result for (ii)\n",
"print \"\\n(ii).Ammonia compressor\",\"\\nActual work = \",wactual,\"kJ/kg\"\n",
"print \"Minimum work =\",round(wmin,0),\"kJ/kg\",\"\\nIrreversibility =\",round(I,0),\"kJ/kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(i).Irreversibility in turbine \n",
" (a).Decrease in availability = 979.1 kJ/kg\n",
" (b).Maxximum work output = 979.1 kJ/kg\n",
" (c).Actual work output = 831.2 kJ/kg\n",
" (d).Irreversibility = 147.9 kJ/kg\n",
"\n",
"(ii).Ammonia compressor \n",
"Actual work = -319 kJ/kg\n",
"Minimum work = -266.0 kJ/kg \n",
"Irreversibility = 53.0 kJ/kg\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.8, Page No:487"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"Cp=1.1; # Specific heat of combustion gas in kJ/kg K\n",
"T3=1600; # Initial temperature of combustion gas in Kelvin\n",
"T4=1150; # Final temperature of combustion gas in Kelvin\n",
"p1=0.1; # Pressure at inlet of boiler in MPa\n",
"p2=8;# Pressure at outlet of boiler in MPa\n",
"T2=600; # Temperature at outlet of boiler in degree celcius\n",
"m=1; # Mass of water in kg\n",
"T0=298; # temperature of Surroundings in kelvin\n",
"# From steam table \n",
"h1=2758; h2=3642;# specific enthalpy in kJ/kg \n",
"s1=5.7432; s2=7.0206; # specific entropy in kJ/kg K\n",
"\n",
"#Calculation \n",
"mgas=(h2-h1)/(Cp*(T3-T4)); #mass flow rate of gases per kg of water\n",
"S21=s2-s1; # Change in entropy of water\n",
"S34=mgas*Cp*math.log (T3/T4); # Change in entropy of gases\n",
"# (a).Decrease in availability of gases\n",
"d_AEgas=mgas*Cp*(T3-T4)-T0*S34#Decrease in availability of gases\n",
"\n",
"#Result for (a)\n",
"print \"(a).Decrease in availability of gases = \",round(d_AEgas,2),\"kJ\"\n",
"\n",
"#Calculation for (b)\n",
"# (b).Decrease in availability of water\n",
"d_AEwater=(h1-h2)-T0*(s1-s2);# Decrease in availability of water\n",
"\n",
"#Result for (b)\n",
"print \"(b).Decrease in availability of water =\",round(d_AEwater,1),\"kJ\"\n",
"\n",
"#Calculation for (c)\n",
"# (c).Reversible work for the process\n",
"Wrev=d_AEgas+d_AEwater; #Reversible work for the process\n",
"\n",
"#Result for (c)\n",
"print \"(c).Reversible work for the process=\",round(Wrev,1),\"kJ\"\n",
"\n",
"#Calculation for (d)\n",
"# (d).Actual work for the process\n",
"W=0; # Actual work\n",
"\n",
"#Result for (d)\n",
"print \"(d).Actual work for the process =\",W,\"kJ\"\n",
"\n",
"#Calculation for (e)\n",
"# (e).Irreversibility\n",
"I=Wrev-W; #Irreversibility\n",
"\n",
"#Result for (e)\n",
"print \"(e).Irreversibility = \",round(I,1),\"kJ\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a).Decrease in availability of gases = 690.68 kJ\n",
"(b).Decrease in availability of water = -503.3 kJ\n",
"(c).Reversible work for the process= 187.3 kJ\n",
"(d).Actual work for the process = 0 kJ\n",
"(e).Irreversibility = 187.3 kJ\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.9, Page No:487"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"TH=600; # Temperature of heat sorce in degree celcius\n",
"T3=311.06; # Boiler temperature in degree celcius\n",
"p3=10; # Boiler pressure in MPa\n",
"T4=32.88; # Condensor temperature in degree celcius\n",
"p4=5; # Condensor pressure in kPa\n",
"T0=288;# Temperature of surroundings in kelvin\n",
"# From steam table and refer figure 10.10 for states\n",
"h1=137.82; h2=147.82; h3=2724.7; hf4=197.82; hfg4=2423.7; h4=1913.6; # specific enthalpy in kJ/kg \n",
"s1=0.4764; s2=s1; s3=5.6141; s4=s3; sf4=0.4764; sfg4=7.9187; s4=6.2782; # specific entropy in kJ/kg K\n",
"\n",
"#Calculation\n",
"wT=h3-h4; # Turbine work\n",
"wp=h2-h1; # Pump work\n",
"wnet=wT-wp; # Net work\n",
"qH=h3-h2; # Heat supplied in boiler\n",
"qL=h4-h1; # Heat rejected in condensor\n",
"Wrev_Wpump=T0*(s2-s1); \n",
"Wrev_Wboiler=T0*(s3-s2)-T0*qH/(TH+273);\n",
"Wrev_Wturbine=T0*(s4-s3);\n",
"Wrev_Wcondenser=T0*(s1-s4)+qL;\n",
"Wrev_Wcycle=Wrev_Wpump+Wrev_Wboiler+Wrev_Wturbine+Wrev_Wcondenser; \n",
"\n",
"#Result\n",
"print \"The lost (Wrev-W)for the Pump = \",Wrev_Wpump,\"kJ/kg\",\"\\nThe lost (Wrev-W)for the Boiler = \",round(Wrev_Wboiler,1),\"kJ/kg\"\n",
"print \"The lost (Wrev-W)for the Turbine = \",round(Wrev_Wturbine,1),\"kJ/kg\"\n",
"print \"The lost (Wrev-W)for the condensor = \",round(Wrev_Wcondenser,1),\"kJ/kg\"\n",
"print \"The lost (Wrev-W)for the overall cycle = \",round(Wrev_Wcycle,0),\"kJ/kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The lost (Wrev-W)for the Pump = 0.0 kJ/kg \n",
"The lost (Wrev-W)for the Boiler = 629.6 kJ/kg\n",
"The lost (Wrev-W)for the Turbine = 191.3 kJ/kg\n",
"The lost (Wrev-W)for the condensor = 104.9 kJ/kg\n",
"The lost (Wrev-W)for the overall cycle = 926.0 kJ/kg\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.10, Page No:491"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Variable declaration\n",
"# State after reversible adiabatic expansion\n",
"p2=50; # pressure in kPa\n",
"s2s=6.4844; s1=6.4844; s2=6.944; # specific entropy in kJ/kg K\n",
"x2s=0.829; # Quality of steam \n",
"h2s=2252.6; h1=3256.6; # specific enthalpy in kJ/kg \n",
"T2=81.33; T0=27; # Temperature in degree celcius\n",
"\n",
"#Calculation\n",
"ws=h1-h2s; # Reversible adiabatic work\n",
"wa=831.2; # Actual work output in kJ/kg\n",
"d_AE=979.1; # Decrease in availability in kJ/LG\n",
"eff_I=wa/ws; # First law efficiency of turbine\n",
"eff_II=wa/d_AE; # Second law efficiency of turbine\n",
"w2srev2=(T2-T0)*(s2-s1); # Negative work\n",
"w1rev2=ws-w2srev2; # Decrease in availability\n",
"\n",
"#Result\n",
"print \"First law efficiency of turbine = \",round(eff_I*100,1),\"%\",\"\\nSecond law efficiency of turbine = \",round(eff_II*100,1),\"%\"\n",
"print \"Negative work = \",round(w2srev2,2),\"kJ/kg\",\"\\nDcresase in Availability = \",round(w1rev2,2),\"kJ/kg\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"First law efficiency of turbine = 82.8 % \n",
"Second law efficiency of turbine = 84.9 %\n",
"Negative work = 24.97 kJ/kg \n",
"Dcresase in Availability = 979.03 kJ/kg\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.11, Page No:493"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"p1=100; # Pressure at inlet in kPa\n",
"T1=30; # Temperature at inlet in degree celcius\n",
"V1=0; # Velocity at inlet in m/s\n",
"p2=350; # Pressure at outlet in kPa\n",
"T2=141; # Temperature at exit in degree celcius\n",
"V2=90; # Velocity at exit in m/s\n",
"p0=100; # Pressure of Surroundings in kPa\n",
"T0=30; # temperature of Surroundings in degree celcius\n",
"k=1.4; # Index of the Isentropic compression process\n",
"Cpo=1.0035; # Specific heat at constant pressure in kJ/kg K\n",
"R=0.287; # characteristic gas constant of air in kJ/kg K\n",
"\n",
"#Calculation for (a)\n",
"# (a).Adiabatic or polytropic compression\n",
"T2s=(T1+273)*(p2/p1)**((k-1)/k); # Temperature after isentropic compression\n",
"\n",
"#Result for (a)\n",
"print \"(a).Adiabatic or polytropic compression\",\"\\nTemperature after isentropic compression =\",round(T2s,1),\"K\"\n",
"print \"T2s>T2. Hence there is cooling . Compression is polytropic.\" \n",
" \n",
"#Calculation for (b)\n",
"# (b).The first law efficiency of the compressor\n",
"wa=Cpo*(T1-T2)-V2**2/2000; #Actual work of compression\n",
"wT=(-R*(T1+273)*math.log (p2/p1))-(V2**2/2000); # Isothermal work\n",
"eff_Ilaw=wT/wa; # The first law efficiency of the compressor\n",
"\n",
"#Result for (b)\n",
"print \"\\n(b).The first law efficiency of the compressor = \",round(eff_Ilaw*100,1),\"%\"\n",
"\n",
"#Calculation for (c)\n",
"# (c).Minimum work input & Irreversibility\n",
"d_AE=(Cpo*(T1-T2))+((T0+273)*((R*math.log (p2/p1))-(Cpo*math.log ((T2+273)/(T1+273)))))-V2**2/2000; # decrease in availability\n",
"wmin=d_AE; # Minimum work input\n",
"wrev=wmin;\n",
"I=wrev-wa; # Irreversibility\n",
"\n",
"#Result for (c)\n",
"print \"\\n(c).Minimum work input & Irreversibility\",\"\\nMinimum work input =\",round(wmin,1),\"kJ/kg\"\n",
"print \"Irreversibility =\",round(I,0),\"kJ/kg\"\n",
"\n",
"#Calculation for (d)\n",
"# (d).Second law efficiency of the compressor\n",
"eff_IIlaw=wmin/wa; # Second law efficiency of the compressor\n",
"\n",
"#Result for (d)\n",
"print \"\\n(d).Second law efficiency of the compressor =\",round(eff_IIlaw*100,0),\"%\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a).Adiabatic or polytropic compression \n",
"Temperature after isentropic compression = 433.4 K\n",
"T2s>T2. Hence there is cooling . Compression is polytropic.\n",
"\n",
"(b).The first law efficiency of the compressor = 97.9 %\n",
"\n",
"(c).Minimum work input & Irreversibility \n",
"Minimum work input = -101.4 kJ/kg\n",
"Irreversibility = 14.0 kJ/kg\n",
"\n",
"(d).Second law efficiency of the compressor = 88.0 %\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 10.12, Page No:498"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"T0=313; # Surroundings temperature in kelvin\n",
"TL=233; # Refrigerated space temperature in kelvin\n",
"QL=3.5167; # Refrigeration load in kW\n",
"\n",
"#Calculation for (a)\n",
"# (a).Carnot cycle\n",
"COPcarnot=TL/(T0-TL); # COP of carnot cycle\n",
"Wcarnot=QL/COPcarnot; # Work done\n",
"Q0=QL+Wcarnot; # Heat rejected\n",
"d_SL=-QL/TL;# Entropy change of refrigerated space\n",
"d_S0=Q0/T0; #Entropy change of surroundings\n",
"d_Sgen= d_SL+ d_S0; # Entropy generation\n",
"\n",
"#Result for (a)\n",
"print \"(a).Carnot cycle\",\"\\nWork done = \",round(Wcarnot,4),\"kW\",\"\\nCOP of carnot cycle = \",round(COPcarnot,4)\n",
"print (\" Entropy generation = %d kJ/K s \")%d_Sgen\n",
"\n",
"#Variable declaration for (b)\n",
"# (b).Vapour compression cycle\n",
"# From Freon-12 property table & figure 10.17\n",
"p1=0.0642; p2=0.9607; # Pressure in MPa\n",
"h1=169.5; h3=74.5; # specific enthalpy in kJ/kg \n",
"s1=0.7269; s3=0.2716;# specific entropy in kJ/kg K\n",
"# By calculations s2=s1 gives the following from property table\n",
"t2=58.9; # Temperature in degree celcius\n",
"h2=217.6; # specific enthalpy in kJ/kg \n",
"# From h4=h3 gives the following from chart\n",
"h4=h3;\n",
"x4=0.44; # Quality of vapour\n",
"s4=0.3195;# specific entropy in kJ/kg K\n",
"\n",
"#Calculation for (b)\n",
"m=QL/(h1-h4); # Mass flow rate of refrigerant\n",
"W=m*(h2-h1); # Work done of vapour compression cycle\n",
"COP=QL/W; # COP of vapour compression cycle\n",
"QH=QL+W; # Heat rejected to surroundings\n",
"d_SL=-QL/TL;# Entropy change of refrigerated space\n",
"d_S0=QH/T0; #Entropy change of surroundings\n",
"d_Sgen= d_SL+ d_S0; # Entropy generation\n",
"\n",
"#Result for (b)\n",
"print \"\\n(b).Vapour compression cycle\",\"Work done = \",round(W,3),\"kW\",\"\\nCOP of vapour compression cycle = \",round(COP,2)\n",
"print (\" Entropy generation = %f kJ/K s \")%round(d_Sgen,5)\n",
"\n",
"#Calculation for (c)\n",
"# (c).Difference in work = Lost work of the cycle\n",
"d_work=W-Wcarnot; # Difference in work\n",
"LWcycle=QH-T0*QL/TL; # Lost work of the cycle\n",
"\n",
"#Result for (c)\n",
"print \"\\n(c).Difference in work = Lost work of the cycle\",\"\\nDifference in work = \",round(d_work,4),\"kW\"\n",
"print \"Lost work of the cycle= \",round(LWcycle,4),\"kW\",\"which is same as Difference in work\"\n",
"\n",
"#Calculation for (d)\n",
"# (d).Second Law efficiency of the vapour compression cycle\n",
"eff_II=COP/COPcarnot; #Second Law efficiency\n",
"\n",
"#Result for (d)\n",
"print \"\\n(d).Second Law efficiency of the vapour compression cycle = \",round(eff_II*100,1),\"%\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a).Carnot cycle \n",
"Work done = 1.2075 kW \n",
"COP of carnot cycle = 2.9125\n",
" Entropy generation = 0 kJ/K s \n",
"\n",
"(b).Vapour compression cycle Work done = 1.781 kW \n",
"COP of vapour compression cycle = 1.98\n",
" Entropy generation = 0.001830 kJ/K s \n",
"\n",
"(c).Difference in work = Lost work of the cycle \n",
"Difference in work = 0.5731 kW\n",
"Lost work of the cycle= 0.5731 kW which is same as Difference in work\n",
"\n",
"(d).Second Law efficiency of the vapour compression cycle = 67.8 %\n"
]
}
],
"prompt_number": 11
}
],
"metadata": {}
}
]
}
|