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
|
{
"metadata": {
"name": "",
"signature": "sha256:fa83fbd9ef67c487a6b826f93a8f247d29a52d7d385a133945df461f51a51664"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 6 : Thermodynamics\n"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.1 Page No : 292"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"H = 80. # The Heat flows into the system in joules\n",
"W = 30. # The Work done by the system in joules\n",
"\n",
"# Calculations\n",
"U = H - W # The internal energy of the system in joules\n",
"W1 = 10. # The work done along the path ADB in joules\n",
"H1 = W1 + U # The heat flows into the system along the path ADB in joules\n",
"W2 = -20 # The work done on the system from B to A in joules\n",
"H2 = W2 - U # The heat liberated from B to A in joules\n",
"Ua = 0. # Internal energy at A in joules\n",
"Ud = 40. # Internal energy at D in joules\n",
"Wa = 10. # Work done from A to D in joules\n",
"Wd = 0. # Work done from D to B in joules\n",
"Uc = 50. # Internal energy at C in joules\n",
"Had = (Ud - Ua) + Wa # Heat absorbed in the process AD in joules\n",
"Hdb = Uc - Ud + Wd # Heat absorbed in the process DB in joules\n",
"\n",
"# Output\n",
"print '(a)Heat flows into the system along the path ADB is H = %3.0f joules \\n (b)The heat liberated by the system is H = %3.0f joules \\n (c)The heat absorbed in the process AD is H = %3.0f joules and \\n The heat absorbed in the process DB is H = %3.0f joules ' % (H1, H2, Had, Hdb)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Heat flows into the system along the path ADB is H = 60 joules \n",
" (b)The heat liberated by the system is H = -70 joules \n",
" (c)The heat absorbed in the process AD is H = 50 joules and \n",
" The heat absorbed in the process DB is H = 10 joules \n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.2 Page No : 296"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"p = 2. # Given Pressure of a motor car tyre in atms\n",
"t = 27. # The room temperature in degree centigrade\n",
"g = 1.4 # Adiabatic index\n",
"\n",
"# Calculations\n",
"P1 = p # The pressure of a motor car tyre in atms\n",
"T1 = t + 273 # The room temperature in K\n",
"P2 = 1. # The surrounding pressure in atms\n",
"T2 = ((P2 / P1)**((g - 1) / g)) * T1 # The resulting temperature in K\n",
"T21 = T2 - 273 # The resulting temperature in degree centigrade\n",
"\n",
"# Output\n",
"print 'The resulting temperature is T2 = %3.1f K (or) %3.1f degree centigrade ' % (T2, T21)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The resulting temperature is T2 = 246.1 K (or) -26.9 degree centigrade \n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.3 Page No : 302"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t = 27. # The room temperature of air in degree centigrade\n",
"g = 1.4 # Adiabatic index\n",
"\n",
"# Calculations\n",
"V1 = 1. # Let the Original volume in cc\n",
"V2 = V1 / 2 # The final volume i.e half the original volume in cc\n",
"P1 = 1. # The atmospheric pressure in atms\n",
"P2 = P1 * (V1 / V2)**g # The final pressure in atms\n",
"T1 = t + 273 # The room temperature in K\n",
"T2 = T1 * (V1 / V2)**(g - 1) # The final temperature in K\n",
"T21 = T2 - 273 # The final temperature in degree centigrade\n",
"\n",
"# Output\n",
"print '(1)The final pressure is P2 = %3.3f atmospheres \\n (2)The final temperature is T2 = %3.1f K (or) %3.1f degree centigrade ' % (P2, T2, T21)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(1)The final pressure is P2 = 2.639 atmospheres \n",
" (2)The final temperature is T2 = 395.9 K (or) 122.9 degree centigrade \n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.4 Page No : 306"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"g = 1.4 # Adiabatic index\n",
"\n",
"# Calculations\n",
"V1 = 1. # Let the initial volume be in cc\n",
"V2 = V1 / 2 # The final volume is half the initial volume in cc\n",
"T1 = 1. # Let the initial temperature of air be in K\n",
"T2 = T1 * (V1 / V2)**(g - 1) # The final temperature of air in K\n",
"T = T2 - T1 # The change in temperature of air in K\n",
"\n",
"# Output\n",
"print 'The change in the temperature is %3.3fT1 K ' % (T)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The change in the temperature is 0.320T1 K \n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.5 Page No : 308"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"g = (5. / 3) # Adiabatic index for monoatomic\n",
"t = 27. # The room temperature in degree centigrade\n",
"P1 = 1. # The initial pressure in atmosphere\n",
"P2 = 50. # The final pressure in atmosphere\n",
"\n",
"# Calculations\n",
"T1 = t + 273 # The room temperature in K\n",
"T2 = ((P2 / P1)**((g - 1) / g)) * T1 # The final temperature in K\n",
"T21 = T2 - 273 # The final temperature in degree centigrade\n",
"\n",
"# Output\n",
"print 'The Final temperature is T2 = %3.0f K (or) %3.0f degree centigrade ' % (T2, T21)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Final temperature is T2 = 1435 K (or) 1162 degree centigrade \n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.6 Page No : 314"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t = 27. # The temperature of dry air in degree centigrade\n",
"g = 1.4 # Adiabatic index\n",
"\n",
"# Calculations\n",
"V1 = 1. # Let us assume the initial volume in cc\n",
"V2 = V1 / 3 # Then the final volume is 1/3 of the initial volume in cc\n",
"T1 = t + 273 # The initial temperature of dry air in K\n",
"T2 = ((V1 / V2)**(g - 1)) * T1 # The final temperature of air in K\n",
"T21 = T2 - 273 # The final temperature of air in degree centigrade\n",
"T = T21 - t # The change in temperature in degree centigrade\n",
"\n",
"# Output\n",
"print '(1)When the process is slow the temperature of the system remains constant so, there is no change in the temperature \\n (2)When the compression is sudden then, \\n The temperature of the air increases by T = %3.1f degree centigrade (or) %3.1f K' % (T, T)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(1)When the process is slow the temperature of the system remains constant so, there is no change in the temperature \n",
" (2)When the compression is sudden then, \n",
" The temperature of the air increases by T = 165.6 degree centigrade (or) 165.6 K\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.7 Page No : 316"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"g = 1.4 # Adiabatic index\n",
"\n",
"# Calculations\n",
"V1 = 1. # Let the initial volume of the gas in cc\n",
"V2 = 3. * V1 # Then the final volume of the gas is 3 times the initial volume of the gas in cc\n",
"T1 = 273. # Initial temperature of the gas at NTP in K\n",
"T2 = ((V1 / V2)**(g - 1)) * T1 # The resulting temperature in K\n",
"T21 = T2 - 273 # The resulting temperature in degree centigrade\n",
"P1 = 1. # The atmospheric pressure in atms\n",
"P2 = ((V1 / V2)**(g)) * P1 # The resulting atmospheric pressure in atmosphere\n",
"\n",
"# Output\n",
"print '(1)The resulting temperature is T2 = %3.0f K (or) %3.0f degree centigrade \\n (2)The resulting pressure is P2 = %3.4f atmosphere ' % (T2, T21, P2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(1)The resulting temperature is T2 = 176 K (or) -97 degree centigrade \n",
" (2)The resulting pressure is P2 = 0.2148 atmosphere \n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.8 Page No : 321"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t1 = 100. # The temperature at steam point in degree centigrade\n",
"t2 = 0. # The temperature at ice point in degree centigrade\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # The temperature at steam point in K\n",
"T2 = t2 + 273 # The temperature at ice point in K\n",
"n = (1 - (T2 / T1)) * 100 # The efficiency of the carnots engine in percent\n",
"\n",
"# Output\n",
"print 'The efficiency of the Carnot engine is %3.2f percent ' % (n)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The efficiency of the Carnot engine is 26.81 percent \n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.9 Page No : 325"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t1 = 127. # The temperature at initial point in degree centigrade\n",
"t2 = 27. # The temperature at final point in degree centigrade\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # The temperature at initial point in K\n",
"T2 = t2 + 273 # The temperature at final point in K\n",
"n = (1 - (T2 / T1)) * 100 # The efficiency of the carnots engine in percent\n",
"\n",
"# Output\n",
"print 'The efficiency of the Carnot engine is %3.0f percent ' % (n)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The efficiency of the Carnot engine is 25 percent \n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.10 Page No : 329"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"T1 = 400. # The temperature of the source in k\n",
"H1 = 200. # The amount of heat taken by the engine at T1 in calories\n",
"H2 = 150. # The amount of heat rejected by the engine to the sinkk in calories\n",
"\n",
"# Calculations\n",
"T2 = (H2 / H1) * T1 # The temperature of the sinkk in K\n",
"n = (1 - (T2 / T1)) * 100 # The efficiency of the engine in percent\n",
"\n",
"# output\n",
"print 'The temperature of the sinkk is T2 = %3.0f K The efficiency of the engine is %3.0f percent ' % (T2, n)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The temperature of the sinkk is T2 = 300 K The efficiency of the engine is 25 percent \n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.11 Page No : 333"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"T1 = 450. # The temperature of the source in k\n",
"H1 = 1000. # The amount of heat taken by the engine at T1 in calories\n",
"T2 = 350. # The temperature of the sinkk in K\n",
"\n",
"# Calculations\n",
"# The amount of heat rejected to the sinkk in each cycle in calories\n",
"H2 = (T2 / T1) * H1\n",
"n = (1 - (T2 / T1)) * 100 # The efficiency of the engine in percent\n",
"W = H1 - H2 # The work done by the engine in each cycle in calories\n",
"W1 = W * 4.2 # The work done by the engine in each cycle in joules\n",
"\n",
"# Output\n",
"print 'The amount of heat rejected to the sinkk in each cycle is H2 = %3.2f cals The efficiency of the engine is %3.2f percent The work done by the engine in each cycle is W = %3.2f joules' % (H2, n, W1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The amount of heat rejected to the sinkk in each cycle is H2 = 777.78 cals The efficiency of the engine is 22.22 percent The work done by the engine in each cycle is W = 933.33 joules\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.12 Page No : 337"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"T1 = 300. # The higher temperature of the reservoir in K\n",
"T2 = 260. # The lower temperature of the reservoir in K\n",
"H2 = 500. # The amount of heat from the reservoir at the lower temperature in calories\n",
"\n",
"# Calculations\n",
"# The amount of heat rejected to the reservoir at the higher temperature\n",
"# in calories\n",
"H1 = (T1 / T2) * H2\n",
"# The amount of work done in each cycle to operate the refrigerator in joules\n",
"W = (H1 - H2) * 4.2\n",
"\n",
"# Output\n",
"print 'The amount of heat rejected to the reservoir at the higher temperature is H1 = %3.2f cal The amount of work done in each cycle to operate the refrigerator is W = %3.2f joules ' % (H1, W)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The amount of heat rejected to the reservoir at the higher temperature is H1 = 576.92 cal The amount of work done in each cycle to operate the refrigerator is W = 323.08 joules \n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.13 Page No : 340"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"T2 = 273. # The lower temperature of the reservoir for a carnot refrigerator in K\n",
"T1 = 27. + 273 # The higher temperature of the reservoir for a carnot refrigerator in K\n",
"H2 = 1000. * 80 # The amount of heat from the reservoir to the lower temperature in cal\n",
"J = 4.2 # The one calorie in joules\n",
"\n",
"# Calculations\n",
"H1 = (T1 / T2) * H2 # The amount of heat discarded to the room in calories\n",
"W = J * (H1 - H2) # The work done by the refrigerator in joules\n",
"C = H2 / (H1 - H2) # The coefficient of performance\n",
"\n",
"# output\n",
"print 'The amount of heat discarded to the room is H1 = %3.0f cal The work done by the refrigerator is W = %3.4g joules The coefficient of performance of the machine is %3.2f ' % (H1, W, C)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The amount of heat discarded to the room is H1 = 87912 cal The work done by the refrigerator is W = 3.323e+04 joules The coefficient of performance of the machine is 10.11 \n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.14 Page No : 344"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t2 = 7. # The lower temperature of the reservoir in degree centigrade\n",
"n = 50. # The efficiency of the carnot engine in percent\n",
"n1 = 70. # It is desired to increase the efficiency in percent\n",
"\n",
"# Calculations\n",
"T2 = t2 + 273 # The lower temperature of the reservoir in K\n",
"# The higher temperature of the reservoir for 50% efficiency of the engine in K\n",
"T1 = T2 / (1 - (n / 100))\n",
"# The higher temperature of the reservoir for 70% efficiency of the engine in K\n",
"T11 = T2 / (1 - (n1 / 100))\n",
"T = T11 - T1 # Increase in temperature for the change in efficiencies in K\n",
"\n",
"# Output\n",
"print 'The temperature of the high temperature reservoir should be increased by %3.0f K ' % (T)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The temperature of the high temperature reservoir should be increased by 373 K \n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.15 Page No : 348"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"T1 = 600. # The higher temperature of the reservoir in K\n",
"T2 = 300. # The lower temperature of the reservoir in K\n",
"n1 = 52. # The efficiency claimed by the inventor in percent\n",
"\n",
"# Calculations\n",
"n = (1 - (T2 / T1)) * 100 # The efficiency of the carnot engine in percent\n",
"\n",
"# Output\n",
"print 'The efficiency of the carnot engine is %3.0f percent \\n The efficiency claimed is %3.0f percent \\n The efficiency of the engine is more than the efficiency of the carnot engine \\n .But no engine can have an efficiency more than a carnots engine, \\n so his claim is invalid' % (n, n1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The efficiency of the carnot engine is 50 percent \n",
" The efficiency claimed is 52 percent \n",
" The efficiency of the engine is more than the efficiency of the carnot engine \n",
" .But no engine can have an efficiency more than a carnots engine, \n",
" so his claim is invalid\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.16 Page No : 350"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"P = 10.**5 # The average pressure of the steam in a double acting steam engine in newtons/m**2\n",
"L = 1. # The length of the stroke in m\n",
"A = 0.15 # The area of the piston in m**2\n",
"N = 5. # Number of strokes in strokes per second\n",
"\n",
"# Calculations\n",
"P = (2 * P * L * A * N) / 1000 # The power of the engine in kilowatts\n",
"\n",
"# Output\n",
"print 'The power of the engine is %3.0f kilowatts ' % (P)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The power of the engine is 150 kilowatts \n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.17 Page No : 352"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 80. # The latent heat of ice in calories per gram\n",
"V1 = 1.091 # The specific volume of 1 gram of ice at 0 degree centigrade in cm**3\n",
"V2 = 1.000 # The specific volume of 1 gram of water at 0 degree centigrade in cm**3\n",
"p = 1. # The pressure in atm\n",
"T = 273. # The temperature at 0 degree centigrade in K\n",
"\n",
"# Calculations\n",
"L = 80. * 4.2 * 10**7 # The latent heat of ice in ergs\n",
"P = 76. * 13.6 * 980 # The pressure in dynes/cm**2\n",
"# The depression in the melting point of ice produced by one atmosphere\n",
"# increase of pressure in K\n",
"T = (P * T * (V2 - V1)) / L\n",
"T1 = -T # The decrease in the melting point of ice with an increase in pressure of one atmosphere\n",
"\n",
"# Output\n",
"print 'The decrease in the melting point of ice with an increase, \\n in pressure of one atmosphere is %3.4f K (or) %3.4f degree centigrade ' % (T1, T1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The decrease in the melting point of ice with an increase, \n",
" in pressure of one atmosphere is 0.0075 K (or) 0.0075 degree centigrade \n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.18 Page No : 358"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# input data\n",
"p = 1. # The pressure in atm\n",
"V1 = 1.000 # The specific volume of one gram of water in cm**3\n",
"V2 = 1677. # The specific volume of one gram of steam in cm**3\n",
"l = 540. # Latent heat of vaporisation of steam in cal/gram\n",
"\n",
"# Calculations\n",
"P = 76. * 13.6 * 980 # The pressure in dynes/cm**2\n",
"T = 100. + 273 # The temperature at 100 degree centigrade in K\n",
"L = l * 4.2 * 10**7 # The latent heat of vapourisation in ergs\n",
"# The increase in the boiling point of water with an increase in pressure\n",
"# of one atmosphere in degree centigrade\n",
"T = (P * T * (V2 - V1)) / L\n",
"\n",
"# Output\n",
"print 'The increase in the boiling point of water with an increase , \\n in pressure of one atmosphere is %3.2f degree centigrade (or) %3.2f K ' % (T, T)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The increase in the boiling point of water with an increase , \n",
" in pressure of one atmosphere is 27.92 degree centigrade (or) 27.92 K \n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.19 Page No : 361"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 537. # Latent heat of steam in cal/g\n",
"V2 = 1674. # The specific volume of one gram of steam in cm**3\n",
"V1 = 1.000 # The specific volume of one gram of water in cm**3\n",
"p = 2.712 # The increase in the pressure in cm of Hg\n",
"t = 100. # The boiling point of water in degree centigrade\n",
"\n",
"# Calculations\n",
"T = t + 273 # The boiling point of water in K\n",
"P = p * 13.6 * 980 # The increase in the pressure in dynes/cm**2\n",
"L = l * 4.2 * 10**7 # Latent heat of steam in ergs\n",
"# The change in the temperature of the boiling water when the pressure is\n",
"# increased in K\n",
"T1 = (P * T * (V2 - V1)) / L\n",
"\n",
"# Output\n",
"print 'The change in temperature of boiling water is %3.0f K (or) %3.0f degree centigrade ' % (T1, T1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The change in temperature of boiling water is 1 K (or) 1 degree centigrade \n"
]
}
],
"prompt_number": 19
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.20 Page No : 368"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 4563. # The latent heat of fusion of naphthalene in cal/mol\n",
"V = 18.7 # The increase in volume of fusion in cm**3/mol\n",
"p = 1. # The pressure in atm\n",
"t = 80. # The melting point of naphthalene in degree centigrade\n",
"\n",
"# Calculations\n",
"L = l * 4.2 * 10**7 # The latent heat of fusion of naphthalene in ergs/mol\n",
"T = t + 273 # The melting point of naphthalene in K\n",
"P = 76. * 13.6 * 980 # The pressure in dynes/cm**2\n",
"# The increase in the melting point of naphthalene with an increase in\n",
"# pressure of one atmosphere in K\n",
"T1 = (P * T * (V)) / L\n",
"\n",
"# Output\n",
"print 'The increase in the melting point of naphthalene with an increase,\\n in pressure of one atmosphere is %3.5f K (or) %3.5f degree centigrade ' % (T1, T1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The increase in the melting point of naphthalene with an increase,\n",
" in pressure of one atmosphere is 0.03489 K (or) 0.03489 degree centigrade \n"
]
}
],
"prompt_number": 20
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.21 Page No : 372"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"p1 = 80. # The under pressure of benzene in cm of Hg\n",
"t = 80. # The normal boiling point of benzene in degree centigrade\n",
"l = 380. # The latent heat of vapourisation in joules/g\n",
"d2 = 4. # Density of vapour at boiling point in g/litre\n",
"d1 = 0.9 # Density of liquid in g/cm**3\n",
"\n",
"# Calculations\n",
"p = p1 - 76 # The change in pressure in cm of Hg\n",
"P = p * 13.6 * 980 # The change in pressure in dynes/cm**2\n",
"T = t + 273 # The normal boiling point of benzene in K\n",
"L = l * 10**7 # Latent heat of vapourisation in ergs/g\n",
"V1 = 1. / d1 # The specific volume of liquid in cm**3\n",
"V2 = 1000. / d2 # The specific volume of vapour in cm**3\n",
"# The increase in the boiling point of benzene in K\n",
"T1 = (P * T * (V2 - V1)) / L\n",
"T2 = t + T1 # The boiling point of benzene at a pressure of 80 cm of Hg in degree centigrade\n",
"\n",
"# Output\n",
"print 'The boiling point of benzene at a pressure of 80 cm of Hg is %3.3f degree centigrade ' % (T2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The boiling point of benzene at a pressure of 80 cm of Hg is 81.233 degree centigrade \n"
]
}
],
"prompt_number": 21
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.22 Page No : 378"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t = 100. # The boiling point of water in degree centigrade\n",
"p1 = 1. # Initial pressure in atm\n",
"p2 = 1.10 # Final pressure in atm\n",
"l = 537. # Latent heat of water at 100 degree centigrade in cal/g\n",
"V1 = 1. # The specific volume of one gram of water in cm**3\n",
"V2 = 1676. # The specific volume of one gram of steam in cm**3\n",
"\n",
"# Calculations\n",
"p = p2 - p1 # The change in pressure in atm\n",
"P = p * 76 * 13.6 * 980 # The change in pressure in dynes/cm**2\n",
"T = t + 273 # The boiling point of water in K\n",
"L = l * 4.2 * 10**7 # The latent heat of water at 100 degree centigrade in ergs/g\n",
"# The change in boiling point of water in K (or) degree centigrade\n",
"T1 = (P * T * (V2 - V1)) / L\n",
"\n",
"# Output\n",
"print 'The increase in the boiling point of water with an increase,\\n of 0.1 atmosphere pressure is %3.3f K (or) %3.3f degree centigrade ' % (T1, T1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The increase in the boiling point of water with an increase,\n",
" of 0.1 atmosphere pressure is 2.806 K (or) 2.806 degree centigrade \n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.23 Page No : 382"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"p1 = 1. # The atmospheric pressure in atm\n",
"p2 = 100. # The given pressure in atm\n",
"d1 = 0.917 # The density of ice in g/cm**3\n",
"l = 336. # The latent heat of ice in j/g\n",
"\n",
"# Calculations\n",
"p = p2 - p1 # The change in pressure in atms\n",
"P = p * 76 * 13.6 * 980 # The change in pressure in dynes/cm**2\n",
"L = l * 10**7 # The latent heat of ice in ergs/g\n",
"T = 273. # The temperature of melting point of ice in K\n",
"V2 = 1. # The specific volume of one gram of water in cm**3\n",
"V1 = 1. / d1 # The specific volume of ice in cm**3\n",
"T1 = (T * P * (V2 - V1)) / L # The change in the melting point of ice in K\n",
"# The decrease in the melting point of ice in K (or) degree centigrade\n",
"T2 = -T1\n",
"\n",
"# Output\n",
"print 'The decrease in the melting point of ice,\\n with a pressure of 100 atmospheres is %3.4f degree centigrade ' % (T2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The decrease in the melting point of ice,\n",
" with a pressure of 100 atmospheres is 0.7375 degree centigrade \n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.24 Page No : 385"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 79.6 # latent heat of ice in cal/g\n",
"V2 = 1. # The specific volume of water at 0 degree centigrade in cm**3\n",
"V1 = 1.091 # The specific volume of ice at 0 degree centigrade in cm**3\n",
"p = 1.013 * 10**6 # One atmospheric pressure in dynes/cm**3\n",
"T = -1 # The change in temperature in K\n",
"T1 = 273. # The temperature of water at 0 degree centigrade in K\n",
"p1 = 1. # The atmospheric pressure in atm\n",
"\n",
"# Calculations\n",
"L = l * 4.18 * 10**7 # The latent heat of ice in ergs/g\n",
"P = ((L * T) / (T1 * (V2 - V1) * p)) # The change in pressure in atmospheres\n",
"P1 = P + p1 # The pressure required in atmospheres\n",
"\n",
"# Output\n",
"print 'The pressure required to lower melting point of ice,\\n by 1 degree centigrade is %3.1f atmospheres ' % (P1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The pressure required to lower melting point of ice,\n",
" by 1 degree centigrade is 133.2 atmospheres \n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.25 Page No : 392"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t = 100. # The temperature at which water boils in degree centigrade\n",
"p2 = 787. # The pressure at which water boils in mm of Hg\n",
"J = 4.2 * 10**7 # Joule in ergs/cal\n",
"p1 = 760. # The atmospheric pressure in mm of Hg\n",
"V2 = 1601. # The specific volume of 1 g of water at 100 degree centigrade in cm**3\n",
"V1 = 1. # The specific volume of 1 g of water at 0 degree centigrade in cm**3\n",
"\n",
"# Calculations\n",
"T = t + 273 # The temperature at which water boils in K\n",
"T1 = 1. # The difference in the temperature in K\n",
"p = p2 - p1 # The difference in the pressure in mm of Hg\n",
"P = (p / 10) * 13.6 * 980 # The difference in the pressure in dynes/cm**2\n",
"L = (T * P * (V2 - V1)) / T1 # The latent heat of steam in ergs/g\n",
"L1 = L / J # The latent heat of steam in cal/g\n",
"\n",
"# Output\n",
"print 'The Latent heat of steam is L = %3.1f cal/g ' % (L1)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Latent heat of steam is L = 511.3 cal/g \n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.26 Page No : 394"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"T = 600. # The melting point of lead in K\n",
"d1 = 11.01 # Initial density of the lead in g/cm**3\n",
"d2 = 10.65 # The final density of the lead in g/cm**3\n",
"l = 24.5 # The latent heat of fusion of lead in j/g\n",
"p1 = 1. # The atmospheric pressure in atmospheres\n",
"p2 = 100. # The given pressure in atmospheres\n",
"\n",
"# Calculations\n",
"p = p2 - p1 # The change in pressure in atmospheres\n",
"P = p * 76 * 13.6 * 980 # The change in pressure in dynes/cm**2\n",
"L = l * 10**7 # The latent heat of fusion of lead in ergs/g\n",
"V1 = 1. / d1 # The initial specific volume of the lead in cm**3\n",
"V2 = 1. / d2 # The final specific volume of the lead in cm**3\n",
"T1 = (T * P * (V2 - V1)) / L # The change in the temperature in K\n",
"T2 = T + T1 # Melting point of lead at 100 atmospheres pressure in K\n",
"\n",
"# Output\n",
"print 'The melting point of lead at a pressure of 100 atmospheres is %3.4f K ' % (T2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The melting point of lead at a pressure of 100 atmospheres is 600.7540 K \n"
]
}
],
"prompt_number": 26
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.28 Page No : 397"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t2 = 120. # The given temperature for the water to boil in degree centigrade\n",
"t1 = 100. # The actual boiling point of water in degree centigrade\n",
"V = 1676. # The change in specific volume in cm**3\n",
"l = 540. # Latent heat of steam in cal/g\n",
"J = 4.2 * 10**7 # joule in ergs/cal\n",
"\n",
"# Calculations\n",
"T1 = t2 - t1 # The change in temperature in degree centigrade (or) K\n",
"T = t1 + 273 # The boiling point of water in K\n",
"L = l * J # The latent heat of steam in ergs/g\n",
"p = 1. # The atmospheric pressure in atmospheres\n",
"P = (L * T1) / (T * V) # The change in pressure in dynes/cm**2\n",
"P1 = P / 10**6 # The change in pressure in atmospheres\n",
"P2 = P1 + p # The required pressure in atmospheres\n",
"\n",
"# Output\n",
"print 'The required pressure is %3.4f atmospheres ' % (P2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The required pressure is 1.7256 atmospheres \n"
]
}
],
"prompt_number": 27
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.29 Page No : 400"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 80. # Latent heat of ice in cal/g\n",
"m = 10. # Mass of ice in g\n",
"T = 273. # The temperature of ice in K\n",
"\n",
"# Calculations\n",
"H = m * l # Heat absorbed by 10 g of ice at 273 K when it is converted into water at 273 K in cal\n",
"S = H / T # The gain in entropy in cal/K\n",
"\n",
"# Output\n",
"print 'The gain in entropy is %3.2f cal/K' % (S)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The gain in entropy is 2.93 cal/K\n"
]
}
],
"prompt_number": 28
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.30 Page No : 404"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"m = 5. # Mass of water in kg\n",
"t = 100. # The temperature of water in degree centigrade\n",
"l = 540. # Latent heat of water at 100 degree centigrade in cal/g\n",
"\n",
"# Calculations\n",
"T = t + 273 # The temperature of water in K\n",
"M = m * 1000 # Mass of water in g\n",
"H = M * l # Heat absorbed by 5 kg of water at 100 degree centigrade when it is converted into steam at 100 degree centigrade in cal\n",
"S = H / T # The gain in entropy in cal/K\n",
"\n",
"# Output\n",
"print 'The gain in entropy is %3.0f cal/K ' % (S)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The gain in entropy is 7239 cal/K \n"
]
}
],
"prompt_number": 29
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.31 Page No : 411"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"m = 1. # mass of ice in g\n",
"t1 = -10 # The given temperature of ice in degree centigrade\n",
"t2 = 100. # The given temperature of steam in degree centigrade\n",
"S = 0.5 # Specific heat of ice\n",
"s = 1. # Specific heat of water\n",
"l1 = 80. # Latent heat of ice in cal/g\n",
"l2 = 540. # Latent heat of steam in cal/g\n",
"\n",
"# Calculations\n",
"T = 273. # The temperature of ice at 0 degree centigrade in K\n",
"T1 = t1 + 273 # The given temperature of ice in K\n",
"T2 = t2 + 273 # The given temperature of steam in K\n",
"# Increase in entropy when the temperature of 1 gram of ice increases from\n",
"# -10 to 0 degree centigrade in cal/K\n",
"S1 = m * S * 2.3026 * math.log10(T / T1)\n",
"S2 = l1 / T # Increase in entropy when 1 g of ice at 0 degree centigrade is converted into water at 0 degree centigrade in cal/K\n",
"# Increase in entropy when 1 g of water raised from 0 to 100 degree\n",
"# centigrade in cal/K\n",
"S3 = m * s * 2.3026 * math.log10(T2 / T)\n",
"S4 = l2 / T2 # Increase in entropy when 1g water at 100 degree centigrade is converted into steam at 100 degree centigrade in cal/K\n",
"S5 = S1 + S2 + S3 + S4 # Total increase in entropy in cal/K\n",
"\n",
"# Output\n",
"print 'The total increase in entropy is %3.5f cal/K' % (S5)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The total increase in entropy is 2.07153 cal/K\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.32 Page No : 413"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"V1 = 1. # Let us assume the initial volume be one in cc\n",
"V2 = 4. * V1 # Then the final volume is four times the initial volume in cc\n",
"\n",
"# Calculations\n",
"# The gain in entropy in terms of the gas constant in cal/K\n",
"S = 2.3026 * (math.log10(V2 / V1))\n",
"\n",
"# Output\n",
"print 'The gain in entropy in terms of the gas constant is %3.3f (R/J)cal/K' % (S)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The gain in entropy in terms of the gas constant is 1.386 (R/J)cal/K\n"
]
}
],
"prompt_number": 31
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.33 Page No : 420"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"m1 = 50. # Mass of water at 0 degree centigrade in g\n",
"m2 = 50. # Mass of water at 83 degree centigrade in g\n",
"t1 = 0. # The temperature of water in degree centigrade\n",
"t2 = 83. # The temperature of water in degree centigrade\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # Temperature of water in K\n",
"T2 = t2 + 273 # Tempearture of water in K\n",
"s = 1. # The specific heat of water\n",
"# The final temperature of the mixture in K\n",
"T = ((m2 * s * T2) + (m1 * s * T1)) / ((m1 + m2) * s)\n",
"# The change in entropy by 50 g of water when its temperature rises from\n",
"# 273 K to 313 K in cal/K\n",
"S1 = (m1 * s * math.log(T / T1))\n",
"# The change in entropy by 50 g of water when its temperature falls from\n",
"# 353 K to 313 K in cal/K\n",
"S2 = (m2 * s * math.log(T / T2))\n",
"S3 = S1 + S2 # The total gain in the entropy of the system in cal/K\n",
"\n",
"# Output\n",
"print 'The total gain in entropy of the system is %3.3f cal/K ' % (S3)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The total gain in entropy of the system is 0.878 cal/K \n"
]
}
],
"prompt_number": 32
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.34 Page No : 424"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"m1 = 50. # Mass of water at 15 degree centigrade in g\n",
"m2 = 80. # Mass of water at 40 degree centigrade in g\n",
"t1 = 15. # The temperature of water in degree centigrade\n",
"t2 = 40. # The temperature of water in degree centigrade\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # Temperature of water in K\n",
"T2 = t2 + 273 # Tempearture of water in K\n",
"s = 1. # The specific heat of water\n",
"# The final temperature of the mixture in K\n",
"T = ((m2 * s * T2) + (m1 * s * T1)) / ((m1 + m2) * s)\n",
"# The change in entropy by 50 g of water when its temperature rises from\n",
"# 288 K to 303.4 K in cal/K\n",
"S1 = (m1 * s * math.log(T / T1))\n",
"# The change in entropy by 80 g of water when its temperature falls from\n",
"# 313 K to 303.4 K in cal/K\n",
"S2 = (m2 * s * math.log(T / T2))\n",
"S3 = S1 + S2 # The total gain in the entropy of the system in cal/K\n",
"\n",
"# Output\n",
"print 'The net increase in the entropy of the system is %3.3f cal/K ' % (S3)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The net increase in the entropy of the system is 0.106 cal/K \n"
]
}
],
"prompt_number": 33
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.35 Page No : 429"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"m1 = 10. # Mass of steam in g\n",
"t1 = 100. # The temperature of the steam in degree centigrade\n",
"m = 90. # mass of water in g\n",
"t2 = 0. # The temperature of water in degree centigrade\n",
"m2 = m + m1 # The total mass of water in g\n",
"l = 540. # The latent heat of steam in cal/g\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # The temperature of the steam in K\n",
"T2 = t2 + 273 # The temperature of the water in K\n",
"T = ((m1 * l) + (m1 * T1) + (m2 * T2)) / \\\n",
" (m1 + m2) # The final temperature in K\n",
"# The change in entropy when the temperature of water and calorimeter\n",
"# rises from 273 K to 331.2 K in cal/K\n",
"S1 = m2 * math.log(T / T2)\n",
"# The change in entropy when 10 grams of steam at 373 K condenses to water\n",
"# at 373K in cal/K\n",
"S2 = -(m1 * l) / T1\n",
"# Change in entropy when 10 g of water at 373 K is cooled to water at\n",
"# 331.2 K in cal/K\n",
"S3 = m1 * math.log(T / T1)\n",
"S4 = S1 + S2 + S3 # Net change in entropy in cal/K\n",
"\n",
"# Output\n",
"print 'The net increase in the entropy of the system is %3.3f cal/K ' % (S4)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The net increase in the entropy of the system is 3.653 cal/K \n"
]
}
],
"prompt_number": 34
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.36 Page No : 431"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"m = 1. # Mass of water in g\n",
"t1 = 20. # The temperature of water in degree centigrade\n",
"t2 = -10 # The temperature of ice in degree centigrade\n",
"s1 = 4.2 # Heat capacity for one gram of water in J/g-K\n",
"s2 = 2.1 # Heat capacity for ice in J/g-K\n",
"li = 335. # Latent heat of fusion of ice at 0 degree centigrade in J/g\n",
"\n",
"# Calculations\n",
"T = 273. # The temperature of water at 0 degree centigrade in K\n",
"T1 = t1 + 273 # The temperature of water in K\n",
"T2 = t2 + 273 # The temperature of ice in K\n",
"# Change in entropy when the temperature of 1 g of water at 293 K falls to\n",
"# 273 K in J/K\n",
"S1 = m * s1 * math.log(T / T1)\n",
"# Change in entropy when 1 g of water at 273 K is converted into ice at\n",
"# 273 K in J/K\n",
"S2 = -(m * li) / T\n",
"# Change in entropy when the temperature of 1 g of ice at 273 K falls to\n",
"# 263 K in J/K\n",
"S3 = m * s2 * math.log(T2 / T)\n",
"S4 = S1 + S2 + S3 # The total change in entropy of the system in J/K\n",
"\n",
"# Output\n",
"print 'The total change in the entropy of the system is %3.5f J/K \\n (Negative sign indicates that there is decrease in the entropy of the system)' % (S4)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The total change in the entropy of the system is -1.60242 J/K \n",
" (Negative sign indicates that there is decrease in the entropy of the system)\n"
]
}
],
"prompt_number": 35
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.37 Page No : 435"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# Input data\n",
"M = 1. # Mass of water in kg\n",
"m = M * 1000 # Mass of water in g\n",
"T1 = 273. # The temperature of the water in K\n",
"T2 = 373. # The temperature of the heat reservoir in K\n",
"s = 1. # Specific heat of water\n",
"\n",
"# Calculations\n",
"# Increase in entropy when the temperature of 1000 g of water is raised\n",
"# from 273 K to 373 k in cal/K\n",
"S1 = m * s * math.log(T2 / T1)\n",
"S2 = -(m * s * (T2 - T1)) / T2 # Change in entropy of the reservoir in cal/K\n",
"S = S1 + S2 # Change in entropy of the universe in cal/K\n",
"\n",
"# Output\n",
"print '(1)The change in entropy of water when temperature reaches 373 K is %3.0f cal/K \\n (2) (i)The Change in entropy of the reservoir is %3.1f cal/K \\n (ii)The Change in entropy of the universe is %3.1f cal/K ' % (S1, S2, S)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(1)The change in entropy of water when temperature reaches 373 K is 312 cal/K \n",
" (2) (i)The Change in entropy of the reservoir is -268.1 cal/K \n",
" (ii)The Change in entropy of the universe is 44.0 cal/K \n"
]
}
],
"prompt_number": 36
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.42 Page No : 440"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 540. # Latent heat of vapourisation of steam in cal/g\n",
"L = l * 4.2 * 10**7 # Latent heat of vapourisation of steam in ergs/g\n",
"V = 1676. # The change in specific volume when 1 g of water is converted into steam in cc\n",
"t1 = 100. # The actual boiling temperature of water in degree centigrade\n",
"t2 = 150. # The given temperature at which water must boil in degree centigrade\n",
"p = 1. # The atmospheric pressure in atmospheres\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # The actual boiling temperature of water in K\n",
"T2 = t2 + 273 # The given temperature at which water must boil in K\n",
"T = T2 - T1 # The change in temperature in K\n",
"P = (L * T) / (T1 * V) # The pressure in dynes/cm**2\n",
"P1 = P / 10**6 # The pressure in atmospheres\n",
"P2 = P1 + p # The pressure at which water would boil at 150 degree centigrade in atmospheres\n",
"\n",
"# Output\n",
"print 'The pressure at which water would boil at 150 degree centigrade is %3.3f atmospheres ' % (P2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The pressure at which water would boil at 150 degree centigrade is 2.814 atmospheres \n"
]
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.43 Page No : 447"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"l = 80. # Latent heat of fusion of ice in cal/g\n",
"L = l * 4.2 * 10**7 # Latent heat of fusion in ergs/g\n",
"V = 0.091 # The change in specific volume when 1 g of water freezes into ice in cc\n",
"t1 = 0. # The actual freezing point of ice in degree centigrade\n",
"t2 = -1 # The given temperature at which ice must freeze in degree centigrade\n",
"p = 1. # The atmospheric pressure in atmospheres\n",
"\n",
"# Calculations\n",
"T1 = t1 + 273 # The actual freezing point of ice in K\n",
"T2 = t2 + 273 # The given temperature at which ice must freeze in K\n",
"T = T1 - T2 # The change in temperature in K\n",
"P = (L * T) / (V * T1) # The pressure in dynes/cm**2\n",
"P1 = P / 10**6 # The pressure in atmospheres\n",
"P2 = P1 + p # The pressure under which ice would freeze in atmospheres\n",
"\n",
"# Output\n",
"print 'The pressure under which ice would freeze at -1 degree centigrade is %3.1f atmospheres ' % (P2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The pressure under which ice would freeze at -1 degree centigrade is 136.2 atmospheres \n"
]
}
],
"prompt_number": 38
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.44 Page No : 451"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t = 100. # The given temperature of water in degree centigrade\n",
"C1 = 1.01 # The specific heat of water at 100 degree centigrade in cal/g\n",
"L = -0.64 # The rate at which the latent heat of vapourisation decreases with rise in temperature in cal/K\n",
"l = 540. # The latent heat of vapourisation of steam in cal\n",
"\n",
"# Calculations\n",
"T = t + 273 # The given temperature of water in K\n",
"C2 = L - (l / T) + C1 # The specific heat of saturated steam in cal/g\n",
"\n",
"# Output\n",
"print 'The specific heat of satureted steam is %3.3f cal/g The specific heat of saturated steam is negative)' % (C2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The specific heat of satureted steam is -1.078 cal/g The specific heat of saturated steam is negative)\n"
]
}
],
"prompt_number": 39
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.45 Page No : 454"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Input data\n",
"t = 100. # The temperature of saturated steam in degree centigrade\n",
"L1 = 545.25 # The latent heat of saturated steam at 90 degree centigrade in cal\n",
"L2 = 539.30 # The latent heat of saturated steam at 100 degree centigrade in cal\n",
"L3 = 533.17 # The latent heat of saturated steam at 110 degree centigrade in cal\n",
"C1 = 1.013 # The specific heat of water at 100 degree centigrade in cal/g\n",
"\n",
"# Calculations\n",
"T = t + 273 # The temperature of saturated steam in K\n",
"# The rate at which the latent heat of saturated steam decreases with rise\n",
"# in temperature in cal/K\n",
"L = (L3 - L1) / (110 - 90)\n",
"# The specific heat of saturated steam at 100 degree centigrade in cal/g\n",
"C2 = C1 + L - (L2 / T)\n",
"\n",
"# Output\n",
"print 'The specific heat of saturated steam at 100 degree centigrade is %3.3f cal/g' % (C2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The specific heat of saturated steam at 100 degree centigrade is -1.037 cal/g\n"
]
}
],
"prompt_number": 40
}
],
"metadata": {}
}
]
}
|