summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Engineering_Heat_And_Mass_Transfer/ch3.ipynb
blob: 930ae930d0cc89217c85f0f9a29144bd1cd2cb9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
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
{
 "metadata": {
  "name": "",
  "signature": "sha256:a4eb855d2f94bc4d3b88cc418db7aa787fc638da4c248a8ac28f23e0760aff9c"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3 : OneDimensional Steady State Heat Conduction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.1  Page No : 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "l = 5;\t\t    \t#Length of the wall in m\n",
      "h = 4;\t\t\t    #Height of the wall in m\n",
      "L = 0.25;\t\t\t#Thickness of the wall in m\n",
      "T = [110,40];\t\t#Temperature on the inner and outer surface in degree C\n",
      "k = 0.7;\t\t\t#Thermal conductivity in W/m.K\n",
      "x = 0.20;\t\t\t#Distance from the inner wall in m\n",
      "\n",
      "# Calculations\n",
      "A = l*h;\t\t\t                    #Arear of the wall in m**2\n",
      "Q = (k*A*(T[0]-T[1]))/L;\t    \t\t#Heat transfer rate in W\n",
      "T = (((T[1]-T[0])*x)/L)+T[0];\t\t\t#Temperature at interior point of the wall, 20 cm distant from the inner wall in degree C\n",
      "\n",
      "# Results\n",
      "print 'a)Heat transfer rate is %i W  \\n \\\n",
      "b)Temperature at interior point of the wall, 20 cm distant from the inner wall is %i degree C'%(Q, T)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)Heat transfer rate is 3920 W  \n",
        " b)Temperature at interior point of the wall, 20 cm distant from the inner wall is 54 degree C\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.2  Page No : 48"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Di = 0.05;\t\t    \t#Inner diameter of hollow cylinder in m\n",
      "Do = 0.1;\t\t\t    #Outer diameter of hollow cylinder in m\n",
      "T = [200,100];\t\t\t#Inner and outer surface temperature in degree C\n",
      "k = 70;\t\t\t        #Thermal conductivity in W/m.K\n",
      "\n",
      "# Calculations\n",
      "ro = (Do/2);\t\t\t#Outer radius of hollow cylinder in m\n",
      "ri = (Di/2);\t\t\t#Inner radius of hollow cylinder in m\n",
      "Q = ((2*3.14*k*(T[0]-T[1]))/(math.log(ro/ri)));\t\t\t#Heat transfer rate in W\n",
      "r1 = (ro+ri)/2;\t\t\t#Radius at halfway between ro and ri in m\n",
      "T1 = T[0]-((T[0]-T[1])*(math.log(r1/ri)/(math.log(ro/ri))));\t\t\t#Temperature of the point halfway between the inner and outer surface in degree C\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer rate is %3.1f W /m \\n \\\n",
      "Temperature of the point halfway between the inner and outer surface is %3.1f degree C'%(Q,T1)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer rate is 63420.9 W /m \n",
        " Temperature of the point halfway between the inner and outer surface is 141.5 degree C\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.3  Page No : 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Di = 0.1;\t\t\t#Inner diameter of hollow sphere in m\n",
      "Do = 0.3;\t\t\t#Outer diameter of hollow sphere in m\n",
      "k = 50.  \t\t\t#Thermal conductivity in W/m.K\n",
      "T = [300,100];\t\t\t#Inner and outer surface temperature in degree C\n",
      "\n",
      "# Calculations\n",
      "ro = (Do/2);\t\t\t#Outer radius of hollow sphere in m\n",
      "ri = (Di/2);\t\t\t#Inner radius of hollow sphere in m\n",
      "Q = ((4*3.14*ro*ri*k*(T[0]-T[1]))/(ro-ri))/1000;\t\t\t#Heat transfer rate in W\n",
      "r = ri+(0.25*(ro-ri));\t\t\t#The value at one-fourth way of te inner and outer surfaces in m\n",
      "T = ((ro*(r-ri)*(T[1]-T[0]))/(r*(ro-ri)))+T[0];\t\t\t#Temperature at a point a quarter of the way between the inner and outer surfaces in degree C\n",
      "\n",
      "# Results\n",
      "print 'Heat flow rate through the sphere is %3.2f kW \\n \\\n",
      " Temperature at a point a quarter of the way between the inner and outer surfaces is %i degree C'%(Q,T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat flow rate through the sphere is 9.42 kW \n",
        "  Temperature at a point a quarter of the way between the inner and outer surfaces is 200 degree C\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.4  Page No : 55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.4;\t\t\t#Thickness of the furnace in m\n",
      "T = [300,50];\t\t\t#Surface temperatures in degree C\n",
      "#k = 0.005T-5*10**-6T**2\n",
      "\n",
      "# Calculations\n",
      "q = ((1./L)*(((0.005/2)*(T[0]**2-T[1]**2))-((5*10**-6*(T[0]**3-T[1]**3))/3)));\t\t\t#Heat loss per square meter surface area in W/m**2\n",
      "\n",
      "# Results\n",
      "print 'Heat loss per square meter surface area is %3.0f W/m**2'%(q)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss per square meter surface area is 435 W/m**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.5  Page No : 55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.2;\t\t\t    #Thickness of the wall in m\n",
      "T = [1000,200];\t\t\t#Surface temperatures in degree C\n",
      "ko = 0.813;\t\t\t    #Value of thermal conductivity at T = 0 in W/m.K\n",
      "b = 0.0007158;\t\t\t#Temperature coefficient of thermal conductivity in 1./K\n",
      "\n",
      "# Calculations\n",
      "km = ko*(1+((b*(T[0]+T[1]))/2));\t\t\t#Constant thermal conductivity in W/m.K\n",
      "q = ((km*(T[0]-T[1]))/L);\t\t\t        #Rate of heat flow in W/m**2\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat flow is %3.0f W/m**2'%(q)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat flow is 4649 W/m**2\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.6  Page No : 58"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "r = [0.01,0.02];\t\t\t#Inner and outer radius of a copper cylinder in m\n",
      "T = [310,290];\t\t\t#Inner and Outer surface temperature in degree C\n",
      "ko = 371.9;\t\t\t#Value of thermal conductivity at T = 0 in W/m.K\n",
      "b = (9.25*10**-5);\t\t\t#Temperature coefficient of thermal conductivity in 1./K\n",
      "\n",
      "# Calculations\n",
      "Tm = ((T[0]-150)+(T[1]-150))/2;\t\t\t#Mean temperature in degree C\n",
      "km = ko*(1-(b*Tm));\t\t\t            #Constant thermal conductivity in W/m.K\n",
      "q = ((2*3.14*km*(T[0]-T[1]))/math.log(r[1]/r[0]))/1000;\t\t\t#Heat loss per unit length in kW/m\n",
      "\n",
      "# Results\n",
      "print 'Heat loss per unit length is %3.2f kW/m'%(q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss per unit length is 66.45 kW/m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.8  Page No : 63"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L1 = 0.5;\t\t    \t#Thickness of the wall in m\n",
      "k1 = 1.4;\t\t\t    #Thermal conductivity in W/m.K\n",
      "k2 = 0.35;\t\t\t    #Thermal conductivity of insulating material in W/m.K\n",
      "q = 1450.;\t\t\t    #Heat loss per square metre in W\n",
      "T = [1200,15];\t\t\t#Inner and outer surface temperatures in degree C\n",
      "\n",
      "# Calculations\n",
      "L2 = (((T[0]-T[1])/q)-(L1/k1))*k2;\t\t\t#Thickness of the insulation required in m\n",
      "\n",
      "# Results\n",
      "print 'Thickness of the insulation required is %3.3f m'%(L2)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thickness of the insulation required is 0.161 m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.9  Page No : 64"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L1 = 0.006; \t\t\t#Thickness of each glass sheet in m\n",
      "L2 = 0.002;\t    \t\t#Thickness of air gap in m\n",
      "Tb = -20;\t\t    \t#Temperature of the air inside the room in degree C\n",
      "Ta = 30;\t\t\t    #Ambient temperature of air in degree C\n",
      "ha = 23.26;\t\t\t    #Heat transfer coefficient between glass and air in W/m**2.K\n",
      "kglass = 0.75;\t\t\t#Thermal conductivity of glass in W/m.K\n",
      "kair = 0.02;\t\t\t#Thermal conductivity of air in W/m.K\n",
      "\n",
      "# Calculations\n",
      "q = ((Ta-Tb)/((1./ha)+(L1/kglass)+(L2/kair)+(L1/kglass)+(1./ha)));\t\t\t#Rate of heat leaking into the room per unit area of the door in W/m**2\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat leaking into the room per unit area of the door is %3.1f W/m**2'%(q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat leaking into the room per unit area of the door is 247.5 W/m**2\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.10  Page No : 65"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "LA = 0.05;\t\t\t#Length of section A in m\n",
      "LB = 0.1;\t\t\t#Length of section A in m\n",
      "LC = 0.1;\t\t\t#Length of section A in m\n",
      "LD = 0.05;\t\t\t#Length of section A in m\n",
      "LE = 0.05;\t\t\t#Length of section A in m\n",
      "kA = 50;\t\t\t#Thermal conductivity of section A in W/m.K\n",
      "kB = 10;\t\t\t#Thermal conductivity of section B in W/m.K\n",
      "kC = 6.67;\t\t\t#Thermal conductivity of section C in W/m.K\n",
      "kD = 20;\t\t\t#Thermal conductivity of section D in W/m.K\n",
      "kE = 30;\t\t\t#Thermal conductivity of section E in W/m.K\n",
      "Aa = 1;\t\t\t#Area of section A in m**2\n",
      "Ab = 0.5;\t\t\t#Area of section B in m**2\n",
      "Ac = 0.5;\t\t\t#Area of section C in m**2\n",
      "Ad = 1;\t\t\t#Area of section D in m**2\n",
      "Ae = 1;\t\t\t#Area of section E in m**2\n",
      "T = [800,100];\t\t\t#Temperature at inlet and outlet temperatures in degree C\n",
      "\n",
      "# Calculations\n",
      "Ra = (LA/(kA*Aa));  \t\t\t#Thermal Resistance of section A in K/W\n",
      "Rb = (LB/(kB*Ab));\t    \t\t#Thermal Resistance of section B in K/W\n",
      "Rc = (LC/(kC*Ac));\t\t    \t#Thermal Resistance of section C in K/W\n",
      "Rd = (LD/(kD*Ad));\t\t\t    #Thermal Resistance of section D in K/W\n",
      "Re = (LE/(kE*Ae));\t\t    \t#Thermal Resistance of section E in K/W\n",
      "Rf = ((Rb*Rc)/(Rb+Rc));\t\t\t#Equivalent resistance of section B and section C in K/W\n",
      "R = Ra+Rf+Rd+Re;\t\t\t    #Equivalent resistance of all sections in K/W\n",
      "Q = ((T[0]-T[1])/R)/1000;\t\t\t#Heat transfer through the composite wall in kW\n",
      "\n",
      "# Results\n",
      "print 'Heat transfer through the composite wall is %3.1f kW'%(Q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer through the composite wall is 40.8 kW\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.11  Page No : 66"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "T1 = 2000;\t\t\t#Temperature of hot gas in degree C\n",
      "Ta = 45;\t\t\t#Room air temperature in degree C\n",
      "Qr1 = 23.260;\t\t\t#Heat flow by radiation from gases to inside surface of the wall in kW/m**2\n",
      "h = 11.63;\t\t\t#Convective heat transfer coefficient in W/m**2.\n",
      "C = 58;\t\t\t#Thermal conductance of the wall in W/m**2.K\n",
      "Q = 9.3;\t\t\t#Heat flow by radiation from external surface to the surrounding in kW.m**2\n",
      "T2 = 1000;\t\t\t#Interior wall temperature in degree C\n",
      "\n",
      "# Calculations\n",
      "qr1 = Qr1;\t\t\t#Haet by radiation in kW/m**2\n",
      "qc1 = h*((T1-T2)/1000);\t\t\t#Heat by conduction in kW/m**2\n",
      "q = qc1+qr1;\t\t\t#Total heat entering the wall in kW/m**2\n",
      "R = (1./C);\t\t\t#Thermal resistance in m**2.K/W\n",
      "T3 = T2-(q*R*1000);\t\t\t#External wall temperature in degree C\n",
      "Ql = q-Q;\t\t\t#Heat loss due to convection kW/m**2\n",
      "h4 = (Ql*1000)/(T3-Ta);\t\t\t#Convective conductance in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'The surface temperature is %i degree C \\n \\\n",
      "The convective conductance is %3.1f W/m**2.K'%(T3,h4)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The surface temperature is 398 degree C \n",
        " The convective conductance is 72.4 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.12  Page No : 67"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L1 = 0.125;\t\t\t#Thickness of fireclay layer in m\n",
      "L2 = 0.5;\t\t\t#Thickness of red brick layer in m\n",
      "T = [1100,50];\t\t\t#Temperatures at inside and outside the furnaces in degree C\n",
      "k1 = 0.533;\t\t\t#Thermal conductivity of fireclay in W/m.K\n",
      "k2 = 0.7;\t\t\t#Thermal conductivity of red brick in W/m.K\n",
      "\n",
      "# Calculations\n",
      "R1 = (L1/k1);\t\t\t#Resismath.tance of fireclay per unit area in K/W\n",
      "R2 = (L2/k2);\t\t\t#Resistance of red brick per unit area in K/W\n",
      "R = R1+R2;\t\t\t#Total resistance in K/W\n",
      "q = (T[0]-T[1])/R;\t\t\t#Heat transfer in W/m**2\n",
      "T2 =  T[0]-(q*R1);\t\t\t#Temperature in degree C\n",
      "T3 = T[1]+(q*R2*0.5);\t\t\t#Temperature at the interface between the two layers in degree C\n",
      "km = 0.113+(0.00023*((T2+T3)/2));\t\t\t#Mean thermal conductivity in W/m.K\n",
      "x = ((T2-T3)/q)*km;\t\t\t#Thickness of diatomite in m\n",
      "\n",
      "# Results\n",
      "print 'Amount of heat loss is %3.1f W/m**2  \\n \\\n",
      "Thickness of diatomite is %3.4f m'%(q,x )\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amount of heat loss is 1106.7 W/m**2  \n",
        " Thickness of diatomite is 0.0932 m\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.13  Page No : 70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "Di = 0.1;\t\t\t#I.D of the pipe in m\n",
      "L = 0.01;\t\t\t#Thickness of the wall in m\n",
      "L1 = 0.03;\t\t\t#Thickness of insulation in m\n",
      "Ta = 85;\t\t\t#Temperature of hot liquid in degree C\n",
      "Tb = 25;\t\t\t#Temperature of surroundings in degree C\n",
      "k1 = 58;\t\t\t#Thermal conductivity of steel in W/m.K\n",
      "k2 = 0.2;\t\t\t#Thermal conductivity of insulating material in W/m.K\n",
      "ha = 720;\t\t\t#Inside heat transfer coefficient in W/m**2.K\n",
      "hb = 9;\t\t\t    #Outside heat transfer coefficient in W/m**2.K\n",
      "D2 = 0.12;\t\t\t#Inner diameter in m\n",
      "r3 = 0.09;\t\t\t#Radius in m\n",
      "\n",
      "# Calculations\n",
      "q = ((2*3.14*(Ta-Tb))/((1./(ha*(Di/2)))+(1./(hb*r3))+(math.log(D2/Di)/k1)+(math.log(r3/(D2/2))/k2)));\t\t\t#Heat loss fro an insulated pipe in W/m\n",
      "\n",
      "# Results\n",
      "print 'Heat loss from an insulated pipe is %3.2f W/m'%(q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss from an insulated pipe is 114.43 W/m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.14  Page No : 71"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "Di = 0.1;\t\t\t#I.D of the pipe in m\n",
      "Do = 0.11;\t\t\t#O.D of the pipe in m\n",
      "L = 0.005;\t\t\t#Thickness of the wall in m\n",
      "k1 = 50;\t\t\t#Thermal conductivity of steel pipe line in W/m.K\n",
      "k2 = 0.06;\t\t\t#Thermal conductivity of first insulating material in W/m.K\n",
      "k3 = 0.12;\t\t\t#Thermal conductivity of second insulating material in W/m.K\n",
      "T = [250,50];\t\t\t#Temperature at inside tube surface and outside surface of insulation in degree C\n",
      "r3 = 0.105;\t\t\t#Radius of r3 in m as shown in fig.3.14 on page no.71\n",
      "r4 = 0.155;\t\t\t#Radius of r4 in m as shown in fig.3.14 on page no.71\n",
      "\n",
      "# Calculations\n",
      "r1 = (Di/2);\t\t\t#Radius of the pipe in m\n",
      "r2 = (Do/2);\t\t\t#Radius of the pipe in m\n",
      "q = ((2*3.14*(T[0]-T[1]))/(((math.log(r2/r1))/k1)+((math.log(r3/r2))/k2)+((math.log(r4/r3))/k3)));\t\t\t#Loss of heat per metre length of pipe in W/m\n",
      "T3 = ((q*math.log(r4/r3))/(2*3.14*k3))+T[1];\t\t\t#Interface temperature in degree C\n",
      "\n",
      "# Results\n",
      "print 'Loss of heat per metre length of pipe is %3.1f W/m  \\n \\\n",
      "Interface temperature is %3.1f degree C'%(q,T3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss of heat per metre length of pipe is 89.6 W/m  \n",
        " Interface temperature is 96.3 degree C\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.15  Page No : 72"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "Di = 0.1;\t\t\t#I.D of the pipe in m\n",
      "Do = 0.11;\t\t\t#O.D of the pipe in m\n",
      "L = 0.005;\t\t\t#Thickness of the wall in m\n",
      "k1 = 50;\t\t\t#Thermal conductivity of steel pipe line in W/m.K\n",
      "k3 = 0.06;\t\t\t#Thermal conductivity of first insulating material in W/m.K\n",
      "k2 = 0.12;\t\t\t#Thermal conductivity of second insulating material in W/m.K\n",
      "T = [250,50];\t\t\t#Temperature at inside tube surface and outside surface of insulation in degree C\n",
      "r3 = 0.105;\t\t\t#Radius of r3 in m as shown in fig.3.14 on page no.71\n",
      "r4 = 0.155;\t\t\t#Radius of r4 in m as shown in fig.3.14 on page no.71\n",
      "\n",
      "# Calculations\n",
      "r1 = (Di/2);\t\t\t#Radius of the pipe in m\n",
      "r2 = (Do/2);\t\t\t#Radius of the pipe in m\n",
      "q = ((2*3.14*(T[0]-T[1]))/(((math.log(r2/r1))/k1)+((math.log(r3/r2))/k2)+((math.log(r4/r3))/k3)));\t\t\t#Loss of heat per metre length of pipe in W/m\n",
      "\n",
      "# Results\n",
      "print 'Loss of heat per metre length of pipe is %3.2f W/m'%(q)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss of heat per metre length of pipe is 105.71 W/m\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.16  Page No : 73"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "D1 = 0.1;\t\t\t#O.D of the pipe in m\n",
      "P = 1373;\t\t\t#Pressure of saturated steam in kPa\n",
      "D2 = 0.2;\t\t\t#Diameter of magnesia in m\n",
      "k1 = 0.07;\t\t\t#Thermal conductivity of magnesia in W/m.K\n",
      "k2 = 0.08;\t\t\t#Thermal conductivity of asbestos in W/m.K\n",
      "D3 = 0.25;\t\t\t#Diameter of asbestos in m\n",
      "T3 = 20;\t\t\t#Temerature under the canvas in degree C\n",
      "t = 12;\t\t\t    #Time for condensation in hours\n",
      "l = 150;\t\t\t#Lemgth of pipe in m\n",
      "T1 = 194.14;\t\t\t#Saturation temperature of steam in degree C from Table A.6 (Appendix A) at 1373 kPa on page no. 643\n",
      "hfg = 1963.15;\t\t\t#Latent heat of steam in kJ/kg from Table A.6 (Appendix A) at 1373 kPa on page no. 643\n",
      "\n",
      "# Calculations\n",
      "r1 = (D1/2);\t\t\t#Radius of the pipe in m\n",
      "r2 = (D2/2);\t\t\t#Radius of magnesia in m\n",
      "r3 = (D3/2);\t\t\t#Radius of asbestos in m\n",
      "Q = (((2*3.14*l*(T1-T3))/((math.log(r2/r1)/k1)+(math.log(r3/r2)/k2)))*(3600./1000));\t\t\t#Heat transfer rate in kJ/h\n",
      "m = (Q/hfg);\t\t\t#Mass of steam condensed per hour\n",
      "m1 = (m*t);\t\t\t#Mass of steam condensed in 12 hours\n",
      "\n",
      "# Results\n",
      "print 'Mass of steam condensed in 12 hours is %3.2f kg'%(m1)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mass of steam condensed in 12 hours is 284.43 kg\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17  Page No : 74"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D1 = 0.1;\t\t\t#I.D of the first pipe in m\n",
      "D2 = 0.3;\t\t\t#O.D of the first pipe in m\n",
      "k1 = 70;\t\t\t#Thermal conductivity of first material in W/m.K\n",
      "D3 = 0.4;\t\t\t#O.D of the second pipe in m\n",
      "k2 = 15;\t\t\t#Thermal conductivity of second material in W/m.K\n",
      "T = [300,30];\t\t\t#Inside and outside temperatures in degree C\n",
      "\n",
      "# Calculations\n",
      "r1 = (D1/2);\t\t\t#Inner Radius of first pipe in m\n",
      "r2 = (D2/2);\t\t\t#Outer Radius of first pipe in m\n",
      "r3 = (D3/2);\t\t\t#Radius of second pipe in m\n",
      "Q = ((4*3.14*(T[0]-T[1]))/(((r2-r1)/(k1*r1*r2))+((r3-r2)/(k2*r2*r3))))/1000;\t\t\t#Rate of heat flow through the sphere in kW\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat flow through the sphere is %3.2f kW'%(Q)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat flow through the sphere is 11.24 kW\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.18  Page No : 77"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "Di = 0.1;\t\t\t#I.D of a steam pipe in m\n",
      "Do = 0.25;\t\t\t#I.D of a steam pipe in m\n",
      "k = 1.;\t\t\t#Thermal conductivity of insulating material in W/m.K\n",
      "T = [200.,20];\t\t\t#Steam temperature and ambient temperatures in degree C\n",
      "h = 8.;\t\t\t#Convective heat transfer coefficient between the insulation surface and air in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "ri = (Di/2);\t\t\t#Inner Radius of steam pipe in m\n",
      "ro = (Do/2);\t\t\t#Outer Radius of steam pipe in m\n",
      "rc = (k/h)*100;\t\t\t#Critical radius of insulation in cm\n",
      "q = ((T[0]-T[1])/((math.log(ro/ri)/(2*3.14*k)+(1./(2*3.14*ro*h)))));\t\t\t#Heat loss per metre of pipe at critical radius in W/m\n",
      "Ro = (q/(2*3.14*ro*h))+T[1];\t\t\t#Outer surface temperature in degree C\n",
      "\n",
      "# Results\n",
      "print 'Heat loss per metre of pipe at critical radius is %i W/m  \\n \\\n",
      "Outer surface temperature is %3.2f degree C'%(q,Ro)\n",
      "\n",
      "# Note : Answer in book is wrong. Please check manually."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss per metre of pipe at critical radius is 589 W/m  \n",
        " Outer surface temperature is 113.93 degree C\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.19  Page No : 78"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "Di = 0.001;\t\t    \t#Diameter of copper wire in m\n",
      "t = 0.001;\t\t    \t#Thickness of insulation in m;\n",
      "To = 20;\t\t    \t#Temperature of surrondings in degree C\n",
      "Ti = 80;\t\t    \t#Maximum temperature of the plastic in degree C\n",
      "kcopper = 400;\t\t\t#Thermal conductivity of copper in W/m.K\n",
      "kplastic = 0.5;\t\t\t#Thermal conductivity of plastic in W/m.K\n",
      "h = 8;\t        \t\t#Heat transfer coefficient in W/m**2.K\n",
      "p = (3*10**-8);\t\t\t#Specific electric resistance of copper in Ohm.m\n",
      "\n",
      "# Calculations\n",
      "r = (Di/2);\t\t\t#Radius of copper tube in m\n",
      "ro = (r+t);\t\t\t#Radius in m \n",
      "R = (p/(3.14*r*r*0.01));\t\t\t#Electrical resistance per meter length in ohm/m\n",
      "Rth = ((1./(2*3.14*ro*h))+(math.log(ro/r)/(2*3.14*kplastic)));\t\t\t#Thermal resistance of convection film insulation per metre length \n",
      "Q = ((Ti-To)/Rth);\t\t\t#Heat transfer in W\n",
      "I = math.sqrt(Q/R);\t\t\t#Maximum safe current limit in A\n",
      "rc = ((kplastic*100)/h);\t\t\t#Critical radius in cm\n",
      "\n",
      "# Results\n",
      "print 'The maximum safe current limit is %3.3f A  \\n \\\n",
      "As the critical radius of insulation is much greater,the current carrying capacity of the conductor can be raised upto %3.1f cm \\n \\\n",
      "considerably in increasing the radius of plastic covering'%(I,rc)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The maximum safe current limit is 1.074 A  \n",
        " As the critical radius of insulation is much greater,the current carrying capacity of the conductor can be raised upto 6.2 cm \n",
        " considerably in increasing the radius of plastic covering\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.20  Page No : 83"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "L = 0.1;\t\t\t#Thickness of the wall in m\n",
      "Q = (4*10**4);\t\t\t#Heat transfer rate in W/m**3\n",
      "h = 50;\t\t\t#Convective heat transfer coefficient in W/m**2.K\n",
      "T = 20;\t\t\t#Ambient air temperature in degree C\n",
      "k = 15;\t\t\t#Thermal conductivity of the material in W/m.K\n",
      "\n",
      "# Calculations\n",
      "Tw = (T+((Q*L)/(2*h)));\t\t\t#Surface temperature in degree C\n",
      "Tmax = (Tw+((Q*L*L)/(8*k)));\t\t\t#Maximum temperature in the wall in degree C\n",
      "\n",
      "# Results\n",
      "print 'Surface temperature is %i degree C \\nMaximum temperature in the wall is %3.3f degree C'%(Tw,Tmax)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Surface temperature is 60 degree C \n",
        "Maximum temperature in the wall is 63.333 degree C\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.21  Page No : 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "Do = 0.006;\t\t\t#Outer diameter of hallow cylinder in m\n",
      "Di = 0.004;\t\t\t#Inner diameter of hallow cylinder in m\n",
      "I = 1000;\t\t\t#Current in A\n",
      "T = 30;\t\t\t#Temperature of water in degree C\n",
      "h = 35000;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "k = 18;\t\t\t#Thermal conductivity of the material in W/m.K\n",
      "R = 0.1;\t\t\t#Electrical reisitivity of the material in ohm.mm**2/m\n",
      "\n",
      "# Calculations\n",
      "ro = (Do/2);\t\t\t#Outer radius of hallow cylinder in m\n",
      "ri = (Di/2);\t\t\t#Inner radius of hallow cylinder in m\n",
      "V = ((3.14*(ro**2-ri**2)));\t\t\t#Vol. of wire in m**2\n",
      "Rth = (R/(3.14*(ro**2-ri**2)*10**6));\t\t\t#Resistivity in ohm/mm**2\n",
      "q = ((I*I*Rth)/V);\t\t\t#Heat transfer rate in W/m**3\n",
      "To = T+(((q*ri*ri)/(4*k))*((((2*k)/(h*ri))-1)*((ro/ri)**2-1)+(2*(ro/ri)**2*math.log(ro/ri))));\t\t\t#Temperature at the outer surface in degree C\n",
      "\n",
      "# Results\n",
      "print 'Temperature at the outer surface is %3.2f degree C'%(To)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature at the outer surface is 57.44 degree C\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.22  Page No : 88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "D = 0.025;\t\t\t#Diameter of annealed copper wire in m\n",
      "I = 200;\t\t\t#Current in A\n",
      "R = (0.4*10**-4);\t#Resistance in ohm/cm\n",
      "T = [200,10];\t\t#Surface temperature and ambient temperature in degree C\n",
      "k = 160;\t\t\t#Thermal conductivity in W/m.K\n",
      "\n",
      "# Calculations\n",
      "r = (D/2);\t\t\t#Radius of annealed copper wire in m\n",
      "Q = (I*I*R*100);\t#Heat transfer rate in W/m\n",
      "V = (3.14*r*r);\t    #Vol. of wire in m**2\n",
      "q = (Q/V);\t\t\t#Heat loss in conductor in W/m**2\n",
      "Tc = T[0]+((q*r*r)/(4*k));\t\t\t#Maximum temperature in the wire in degree C\n",
      "h = ((r*q)/(2*(T[0]-T[1])));\t\t#Heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'Maximum temperature in the wire is %3.2f degree C  \\nHeat transfer coefficient is %3.2f W/m**2.K'%(Tc,h)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum temperature in the wire is 200.08 degree C  \n",
        "Heat transfer coefficient is 10.73 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.23  Page No : 89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "p = 100.;\t\t\t#Resistivity of nichrome in \u00b5 ohm-cm \n",
      "Q = 10000.;\t\t\t#Heat input of a heater in W\n",
      "T = 1220.;\t\t\t#Surface temperature of nichrome in degree C\n",
      "Ta = 20.;\t\t\t#Temperature of surrounding air in degree C\n",
      "h = 1150.;\t\t\t#Outside surface coeffient in W/m**2.K\n",
      "k = 17.;\t\t\t#Thermal conductivity of nichrome in W/m.K\n",
      "L = 1.; \t\t\t#Length of heater in m\n",
      "\n",
      "# Calculations\n",
      "d = (Q/((T-Ta)*3.14*h))*1000;\t#Diameter of nichrome wire in mm\n",
      "A = (3.14*d*d)/4;\t\t\t    #Area of the wire in m**2\n",
      "R = ((p*10**-8*L)/A);\t\t\t#Resistance of the wire in ohm\n",
      "I = math.sqrt(Q/R)/1000;\t\t#Rate of current flow in A\n",
      "\n",
      "# Results\n",
      "print 'Diameter of nichrome wire is %3.4f mm  \\n \\\n",
      "Rate of current flow is %i A'%(d,I)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Diameter of nichrome wire is 2.3078 mm  \n",
        " Rate of current flow is 204 A\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.24  Page No : 93"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Do = 0.025;\t\t\t#O.D of the rod in m\n",
      "k = 20;\t\t\t#Thermal conductivity in W/m.K\n",
      "Q = (2.5*10**6);\t\t\t#Rate of heat removal in W/m**2\n",
      "\n",
      "# Calculations\n",
      "ro = (Do/2);\t\t\t#Outer radius of the rod in m\n",
      "q = ((4*Q)/(ro));\t\t\t#Heat transfer rate in W/m**3\n",
      "T = ((-3*q*ro**2)/(16*k));\t\t\t#Temperature drop from the centre line to the surface in degree C\n",
      "\n",
      "# Results\n",
      "print 'Temperature drop from the centre line to the surface is %3.3f degree C'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature drop from the centre line to the surface is -1171.875 degree C\n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.25  Page No : 95"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Q = 300;\t\t\t#Heat produced by the oranges in W/m**2\n",
      "s = 0.08;\t\t\t#Size of the orange in m\n",
      "k = 0.15;\t\t\t#Thermal conductivity of the sphere in W/m.K\n",
      "\n",
      "# Calculations\n",
      "q = (3*Q)/(s/2);\t\t\t#Heat flux in W/m**2\n",
      "Tc = 10+((q*(s/2)**2)/(6*k));\t\t\t#Temperature at the centre of the sphere in degree C\n",
      "\n",
      "# Results\n",
      "print 'Temperature at the centre of the orange is %i degree C'%(Tc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature at the centre of the orange is 50 degree C\n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.26  Page No : 102"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "To = 140;\t\t\t#Temperature at the junction in degree C\n",
      "Ti = 15;\t\t\t#Temperature of air in the room in degree C\n",
      "D = 0.003;\t\t\t#Diameter of the rod in m\n",
      "h = 300;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "k = 150;\t\t\t#Thermal conductivity in W/m.K\n",
      "\n",
      "# Calculations\n",
      "P = (3.14*D);\t\t\t#Perimeter of the rod in m\n",
      "A = (3.14*D**2)/4;\t\t\t#Area of the rod in m**2\n",
      "Q = math.sqrt(h*P*k*A)*(To-Ti);\t\t\t#Total heat dissipated by the rod in W\n",
      "\n",
      "# Results\n",
      "print 'Total heat dissipated by the rod is %3.3f W'%(Q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total heat dissipated by the rod is 6.841 W\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.27  Page No : 103"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "D = 0.025\t\t\t#Diameter of the rod in m\n",
      "Ti = 22.;\t\t\t#Temperature of air in the room in degree C\n",
      "x = 0.1;\t\t\t#Dismtance between the points in m\n",
      "T = [110.,85.];\t\t#Temperature sat two points in degree C\n",
      "h = 28.4;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "m = -math.log((T[1]-Ti)/(T[0]-Ti))/x;\t\t\t#Calculation of m for obtaining k\n",
      "P = (3.14*D);\t\t\t#Perimeter of the rod in m\n",
      "A = (3.14*D**2)/4;\t\t\t#Area of the rod in m**2\n",
      "k = ((h*P)/((m)**2*A));\t\t\t#Thermal conductivity of the rod material in W/m.K\n",
      "\n",
      "# Results\n",
      "print 'Thermal conductivity of the rod material is %3.1f W/m.K'%(k)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thermal conductivity of the rod material is 406.8 W/m.K\n"
       ]
      }
     ],
     "prompt_number": 38
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.28  Page No : 103"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "L = 0.06;\t\t\t#Length of the turbine blade in m\n",
      "A = (4.65*10**-4);\t#Cross sectional area in m**2\n",
      "P = 0.12;\t\t\t#Perimeter in m\n",
      "k = 23.3;\t\t\t#Thermal conductivity of stainless steel in W/m.K\n",
      "To = 500;\t\t\t#Temperature at the root in degree C\n",
      "Ti = 870;\t\t\t#Temperature of the hot gas in degree C\n",
      "h = 442;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "m = math.sqrt((h*P)/(k*A));\t\t\t#Calculation of m for calculating heat transfer rate\n",
      "X = (To-Ti)/math.cosh(m*L);\t\t\t#X for calculating tempetarure distribution\n",
      "Q = math.sqrt(h*P*k*A)*(To-Ti)*math.tanh(m*L);\t\t\t#Heat transfer rate in W\n",
      "\n",
      "# Results\n",
      "print 'Temperature distribution is given by :\\n T-Ti  =  %i cosh[%3.2f%3.2f-x)] cosh[%3.2f%3.2f)] \\n \\\n",
      "Heat transfer rate is %3.1f W'%(To-Ti,m,L,m,L,Q)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature distribution is given by :\n",
        " T-Ti  =  -370 cosh[69.970.06-x)] cosh[69.970.06)] \n",
        " Heat transfer rate is -280.4 W\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.29  Page No : 104"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "W = 1;\t\t\t#Length of the cylinder in m\n",
      "D = 0.05;\t\t\t#Diameter of the cylinder in m\n",
      "Ta = 45;\t\t\t#Ambient temperature in degree C\n",
      "n = 10;\t\t\t#Number of fins\n",
      "k = 120;\t\t\t#Thermal conductivity of the fin material in W/m.K\n",
      "t = 0.00076;\t\t\t#Thickness of fin in m\n",
      "L = 0.0127;\t\t\t#Height of fin in m\n",
      "h = 17;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Ts = 150;\t\t\t#Surface temperature of cylinder in m\n",
      "\n",
      "# Calculations\n",
      "P = (2*W);\t\t\t#Perimeter of cylinder in m\n",
      "A = (W*t);\t\t\t#Surface area of cyinder in m**2\n",
      "m = round(math.sqrt((h*P)/(k*A)),2);\t\t\t#Calculation of m for determining heat transfer rate\n",
      "Qfin = (math.sqrt(h*P*k*A)*(Ts-Ta)*((math.tanh(m*L)+(h/(m*k)))/(1+((h/(m*k))*math.tanh(m*L)))));\t\t\t#Heat transfer through the fin in kW\n",
      "Qb = h*((3.14*D)-(n*t))*W*(Ts-Ta);\t\t\t#Heat from unfinned (base) surface in W\n",
      "Q = ((Qfin*10)+Qb);\t\t\t#Total heat transfer in W\n",
      "Ti = ((Ts-Ta)/(math.cosh(m*L)+((h*math.sinh(m*L))/(m*k))));\t\t\t#Ti to calculate temperature at the end of the fin in degree C\n",
      "T = (Ti+Ta);\t\t\t#Temperature at the end of the fin in degree C\n",
      "\n",
      "# Results\n",
      "print 'Rate of heat transfer is %3.2f W \\nTemperature at the end of the fin is %3.2f degree C'%(Q,T )\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rate of heat transfer is 723.99 W \n",
        "Temperature at the end of the fin is 146.74 degree C\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.31  Page No : 109"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "t = 0.025;\t\t\t#Thickness of fin in m\n",
      "L = 0.1;\t\t\t#Length of fin in m\n",
      "k = 17.7;\t\t\t#Thermal conductivity of the fin material in W/m.K\n",
      "p = 7850;\t\t\t#Density in kg/m**3\n",
      "Tw = 600;\t\t\t#Temperature of the wall in degree C\n",
      "Ta = 40;\t\t\t#Temperature of the air in degree C\n",
      "h = 20;\t\t\t    #Heat transfer coefficient in W/m**2.K\n",
      "I0 = 2.1782;\t\t\t#Io value taken from table 3.2 on page no.108\n",
      "I1 = 1.48871;\t\t\t#I1 value taken from table 3.2 on page no. 108\n",
      "\n",
      "# Calculations\n",
      "B = math.sqrt((2*L*h)/(k*t));\t\t\t#Calculation of B for determining temperature distribution \n",
      "\n",
      "X = ((Tw-Ta)/2.1782);\t\t\t#Calculation of X for determining temperature distribution \n",
      "Y = (2*B);\t\t\t#Calculation of Y for determining temperature distribution \n",
      "Q = (math.sqrt(2*h*k*t)*(Tw-Ta)*((1.48871))/(2.1782));\n",
      "m = ((p*t*L)/2);\t\t\t#Mass of the fin per meter of width in kg/m\n",
      "q = (Q/m);\t\t\t#Rate of heat flow per unit mass in W/kg\n",
      "\n",
      "# Results\n",
      "print 'Temperature distribution is T = %i+%3.1f(%3.4f\u221ax) \\n \\\n",
      "Rate of heat flow per unit \\\n",
      " mass of the fin is %3.2f W/kg'%(Ta,X,Y,q)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Temperature distribution is T = 40+257.1(6.0132\u221ax) \n",
        " Rate of heat flow per unit  mass of the fin is 164.10 W/kg\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.32  Page No : 116"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "t = 0.002;\t\t\t#Thickness of fin in m\n",
      "L = 0.015;\t\t\t#Length of fin in m\n",
      "k1 = 210.;\t\t\t#Thermal conductivity of aluminium in W/m.K\n",
      "h1 = 285.;\t\t\t#Heat transfer coefficient of aluminium in W/m**2.K\n",
      "k2 = 40.;\t\t\t#Thermal conductivity of steel in W/m.K\n",
      "h2 = 510.;\t\t\t#Heat transfer coefficient of steel in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "Lc = (L+(t/2));\t\t\t#Corrected length of fin in m\n",
      "mLc1 = Lc*math.sqrt((2*h1)/(k1*t));\t\t\t#Calculation of mLc for efficiency\n",
      "n1 = math.tanh(mLc1)/mLc1;\t\t\t#Efficiency of fin when aluminium is used\n",
      "mLc2 = Lc*math.sqrt((2*h2)/(k2*t));\t\t\t#Calculation of mLc for efficiency\n",
      "n2 = math.tanh(mLc2)/mLc2;\t\t\t#Efficiency of fin when steel is used\n",
      "\n",
      "\n",
      "# Results\n",
      "print 'Efficiency of fin when aluminium is used is %3.4f \\n \\\n",
      "Efficiency of fin when steel is used is %3.3f'%(n1,n2)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency of fin when aluminium is used is 0.8983 \n",
        " Efficiency of fin when steel is used is 0.524\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.33  Page No : 117"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "k = 200;\t\t\t#Thermal conductivity of aluminium in W/m.K\n",
      "t = 0.001;\t\t\t#Thickness of fin in m\n",
      "L = 0.015;\t\t\t#Width of fin in m\n",
      "D = 0.025;\t\t\t#Diameter of the tube in m\n",
      "Tb = 170;\t\t\t#Fin base temperature in degree C\n",
      "Ta = 25;\t\t\t#Ambient fluid temperature in degree C\n",
      "h = 130;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "Lc = (L+(t/2));\t\t\t#Corrected length of fin in m\n",
      "r1 = (D/2);\t\t\t#Radius of tube in m\n",
      "r2c = (r1+Lc);\t\t\t#Corrected radius in m\n",
      "Am = t*(r2c-r1);\t\t\t#Corrected area in m**2\n",
      "x = Lc**(3/2)*math.sqrt(h/(k*Am));\t\t\t#x for calculating efficiency\n",
      "n = 0.82;\t\t\t#From fig. 3.18 on page no. 112 efficiency is 0.82\n",
      "qmax = (2*3.14*(r2c**2-r1**2)*h*(Tb-Ta));\t\t\t#Maximum heat transfer in W\n",
      "qactual = (n*qmax);\t\t\t#Actual heat transfer in W\n",
      "\n",
      "# Results\n",
      "print 'Heat loss per fin is %3.2f W'%(qactual)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat loss per fin is 60.94 W\n"
       ]
      }
     ],
     "prompt_number": 51
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.34  Page No : 117"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "k = 16;\t\t\t#Thermal conductivity of fin in W/m.K\n",
      "L = 0.1;\t\t\t#Length of fin in m\n",
      "D = 0.01;\t\t\t#Diameter of fin in m\n",
      "h = 5000;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "P = (3.14*D);\t\t\t#Perimeter of fin in m\n",
      "A = (3.14*D**2)/4;\t\t\t#Area of fin in m**2\n",
      "m = math.sqrt((h*P)/(k*A));\t\t\t#Calculation of m for determining heat transfer rate\n",
      "n = math.tanh(m*L)/math.sqrt((h*A)/(k*P));\t\t\t#Calculation of n for checking whether installation of fin is desirable or not\n",
      "x = (n-1)*100;\t\t\t#Conversion into percentage\n",
      "\n",
      "# Results\n",
      "print 'This large fin only produces an increase of %i percent in heat dissipation, \\\n",
      " so naturally this configuration is undesirable'%(x)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "This large fin only produces an increase of 13 percent in heat dissipation,  so naturally this configuration is undesirable\n"
       ]
      }
     ],
     "prompt_number": 52
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.35  Page No : 119"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "k = 55.8;\t\t\t#Thermal conductivity of steel in W/m.K\n",
      "t = 0.0015;\t\t\t#Thickness of steel tube in m\n",
      "L = 0.12;\t\t\t#Length of steel tube in m\n",
      "h = 23.3;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "Tl = 84;\t\t\t#Temperature recorded by the thermometer in degree C\n",
      "Tb = 40;\t\t\t#Temperature at the base of the well in degree C\n",
      "\n",
      "# Calculations\n",
      "m = math.sqrt(h/(k*t));\t\t\t#Calculation of m for determining the temperature distribution\n",
      "x = 1./math.cosh(m*L);\t\t\t#Calculation of x for determining the temperature distribution\n",
      "Ti = ((Tl-(x*Tb))/(1-x));\t\t\t#Temperature distribution in degree C\n",
      "T = (Ti-Tl);\t\t\t#Measurement error in degree C\n",
      "\n",
      "# Results\n",
      "print 'Measurement error is %3.0f degree C'%(T)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Measurement error is  16 degree C\n"
       ]
      }
     ],
     "prompt_number": 16
    }
   ],
   "metadata": {}
  }
 ]
}