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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 04:Unsteady conduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.1:pg-137"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 1\n",
"Biot number is\n",
"Bi= 0.277777777778\n",
"Problem is not suitable for lumped parameter analysis\n"
]
}
],
"source": [
" \n",
"\n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 1\"\n",
"#Diameter of apple in m\n",
"d = 100*(10**(-3));\n",
"#radius in m\n",
"r = d/2;\n",
"#Thermal conductivity of apple in W/(m*K)\n",
"k = 0.6;\n",
"#Heat transfer coefficient in W/(m**2*°C)\n",
"h = 10;\n",
"#Caculating characteristic dimension in m\n",
"Lc = (((((4*math.pi)*r)*r)*r)/3)/(((4*math.pi)*r)*r);\n",
"#Biot number\n",
"print\"Biot number is\"\n",
"Bi = (h*Lc)/k\n",
"print\"Bi=\",Bi\n",
"if Bi<0.1:\n",
" print\"Problem is suitable for lumped parameter analysis\"\n",
"else:\n",
" print\"Problem is not suitable for lumped parameter analysis\"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.2:pg-138 "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 2\n",
"Time constant in seconds is\n",
"tc= 8.0\n",
"Time required in seconds\n",
"t= 36.8413614879\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 2\"\n",
"#Diameter of sphere in m\n",
"d = 1.5*(10**(-3));\n",
"#radius in m\n",
"r = d/2;\n",
"#Thermal conductivity of sphere in W/(m*°C)\n",
"k = 40.0;\n",
"#Density in kg/m**3\n",
"rho = 8000.0;\n",
"#Specific heat in J/(Kg*K)\n",
"c = 300.0;\n",
"#Heat transfer coefficient in W/(m**2*°C)\n",
"h = 75.0;\n",
"#Time constant in sec\n",
"tc = ((rho*c)*(((((4*math.pi)*r)*r)*r)/3))/((((h*4)*math.pi)*r)*r);\n",
"print\"Time constant in seconds is\"\n",
"print\"tc=\",tc\n",
"#Using eq. 4.4\n",
"#Given fraction is 0.01 (1 percent)\n",
"#Required time in sec\n",
"t = (-8)*math.log(0.01);\n",
"print\"Time required in seconds\"\n",
"print\"t=\",t\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.3:pg-138"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 3\n",
"Maximum dimension in metre for lumped parameter analysis\n",
"a= 5.0\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 3\"\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 30;\n",
"#Thermal conductivity of sphere in W/(m*K)\n",
"k = 250;\n",
"#Biot number for lumped parameter analysis is 0.1\n",
"Bi = 0.1;\n",
"#Characteristic dimension of a cube is (a/6) where a is the side of cube in metre\n",
"#Maximum dimension in metre\n",
"a = ((6*k)*Bi)/h;\n",
"print\"Maximum dimension in metre for lumped parameter analysis\"\n",
"print\"a=\",a\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.4:pg-146"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 4\n",
"Time required to cool milk in minutes\n",
"Energy required for cooling in KJ\n",
"E= -319.013666564\n"
]
}
],
"source": [
" \n",
"from scipy.integrate import quad\n",
"import math\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 4\"\n",
"#Diameter of glass in m\n",
"d = 50*(10**(-3));\n",
"#radius in m\n",
"r = d/2;\n",
"#Height of milk in glass in m\n",
"H = 0.1;\n",
"#Initial temperature of milk in °C\n",
"T = 80.0;\n",
"#Cold water temperature in °C\n",
"Tf = 25.0;\n",
"#Heat transfer coefficient in W/(m**2*°C)\n",
"h = 100.0;\n",
"#Thermal conductivity of milk in W/(m*K)\n",
"k = 0.6;\n",
"#Density of milk in kg/m**3\n",
"rho = 900.0;\n",
"#Specific heat in J/(Kg*K)\n",
"c = 4.2*(10**3);\n",
"#Since the milk temperature is always maintained as constant.\n",
"#Therefore it can be assumed as lumped paramteter analysis.\n",
"#Time constant n seconds\n",
"tcs = (((((rho*c)*math.pi)*r)*r)*H)/(((h*math.pi)*d)*H);\n",
"#Time constant in minutes\n",
"tc = tcs/60;\n",
"#Calculating from eq. 4.3 time taken to cool milk from 80°C to 30°C\n",
"t = -tc*math.log((30.0-Tf)/(T-Tf));\n",
"print\"Time required to cool milk in minutes\"\n",
"t\n",
"#Energy transferred during cooling\n",
"E = (((h*math.pi)*d)*H)*quad(lambda t:(80.0-25.0)*math.e*(-t/472.5),0,60.0*t)[0];\n",
"print\"Energy required for cooling in KJ\"\n",
"E = E/1000.0\n",
"print \"E=\",E\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.5:pg-159"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 5\n",
"Time required in hours\n",
"t= 7.5\n",
"Heat transfer rate in MJ\n",
"Q= 186.3\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 5\"\n",
"#Thermal conductivity of wall in W/(m*K)\n",
"k = 0.6;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 5*(10**(-7));\n",
"#Thickness in m\n",
"L = 0.15;\n",
"#Initial temperature in °C\n",
"Ti = 30;\n",
"#Temperature of hot gas in °C\n",
"Tinfinity = 780;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 20;\n",
"#Surface temperaute to be achieved in °C\n",
"To = 480;\n",
"#Dimensionless temperature ratio\n",
"z = (To-Tinfinity)/(Ti-Tinfinity);\n",
"#Biot number\n",
"Bi = (h*L)/k;\n",
"#For this value of (1/Bi) and dimensionless temp. ratio\n",
"#From Fig. 4.11 Fourier number is\n",
"Fo = 0.6;\n",
"#Time required in seconds\n",
"t = ((Fo*L)*L)/alpha;\n",
"print\"Time required in hours\"\n",
"t = t/3600\n",
"print\"t=\",t\n",
"#From fig. 4.13, for this Bi and Fo*Bi*Bi, we have ratio of heats as\n",
"#Q/Qi=0.69\n",
"#Heat transfer in J\n",
"Q = ((((0.69*k)*2)*L)*(Tinfinity-Ti))/alpha;\n",
"print\"Heat transfer rate in MJ\"\n",
"Q = Q/(10**6)\n",
"print\"Q=\",Q\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.6:pg-166"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 6\n",
"Temperature at this distance in °C\n",
"T= 355.5\n",
"Heat transfer rate in MJ\n",
"Q= 100.0\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 6\"\n",
"#Thickness of plate in m\n",
"L = 0.2;\n",
"#Initial temperature in °C\n",
"Ti = 530;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 500;\n",
"#Given distance in m\n",
"x = L-20*(10**(-3));\n",
"#Temperature of surrounding in °C\n",
"Tinfinity = 30;\n",
"#Given time in seconds\n",
"t = 225;\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 200;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 8*(10**(-5));\n",
"#Biot number\n",
"Bi = (h*L)/k;\n",
"#Fourier number\n",
"Fo = (alpha*t)/(L*L);\n",
"#From fig. 4.11, at this Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.7\n",
"#From fig. 4.12 for this (1/Bi) and (x/L), we have another dimensionless\n",
"#temperature to be 0.93\n",
"#Temperature in °C\n",
"T = Tinfinity+(0.93*0.7)*(Ti-Tinfinity);\n",
"print\"Temperature at this distance in °C\"\n",
"print\"T=\",T\n",
"#From fig. 4.13, for this Bi and Fo*Bi*Bi, we have ratio of heats as\n",
"#Q/Qi=0.4\n",
"#Heat transfer in J\n",
"Q = (((0.4*k)*L)*(Ti-Tinfinity))/alpha;\n",
"print\"Heat transfer rate in MJ\"\n",
"Q = Q/(10**6)\n",
"print\"Q=\",Q\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.7:pg-171"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 7\n",
"Temperature at this radius in °C\n",
"T= 300.0\n",
"Heat transfer rate per unit length in MJ/m\n",
"Q= 33.2639222145\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 7\"\n",
"#Radius in m\n",
"ro = 0.15;\n",
"#Initial temperature in °C\n",
"Ti = 530;\n",
"#Temperature of surrounding in °C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 380;\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 200;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 8.5*(10**(-5));\n",
"#Given radius at which temperature has to be find out in m\n",
"r = 0.12;\n",
"#Given time in seconds\n",
"t = 265;\n",
"#Fourier number\n",
"Fo = (alpha*t)/(ro**2);\n",
"#Biot number\n",
"Bi = (h*ro)/k;\n",
"#From fig. 4.15, at this fourier number,Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.6\n",
"#From fig. 4.16 for this (1/Bi) and (r/ro), we have another dimensionless\n",
"#temperature to be 0.9\n",
"#Temperature in °C\n",
"T = Tinfinity+(0.9*0.6)*(Ti-Tinfinity);\n",
"print\"Temperature at this radius in °C\"\n",
"print\"T=\",T\n",
"#From fig. 4.17, for this Bi and Fo*Bi*Bi, we have ratio of heats as\n",
"#Q/Qi=0.4\n",
"#Heat transfer per metre in J/m\n",
"Q = (((((0.4*k)*math.pi)*ro)*ro)*(Ti-Tinfinity))/alpha;\n",
"print\"Heat transfer rate per unit length in MJ/m\"\n",
"Q = Q/(10**6)\n",
"print\"Q=\",Q\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.8:pg-174"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 8\n",
"Time required in minutes\n",
"t= 4.16666666667\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
"\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 8\"\n",
"#Radius in m\n",
"ro = 0.05;\n",
"#Initial temperature in °C\n",
"Ti = 530;\n",
"#Temperature of surrounding in °C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 500;\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 50;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 1.5*(10**(-5));\n",
"#Required centre temperature to achieve in °C\n",
"To = 105;\n",
"#Dimensionless temperature\n",
"z = (To-Tinfinity)/(Ti-Tinfinity);\n",
"#Biot number\n",
"Bi = (h*ro)/k;\n",
"#For this value of (1/Bi) and dimensionless temp. ratio\n",
"#From Fig. 4.19 Fourier number is\n",
"Fo = 1.5;\n",
"#Time required in seconds\n",
"t = ((Fo*ro)*ro)/alpha;\n",
"print\"Time required in minutes\"\n",
"t = t/60\n",
"print\"t=\",t\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.9:pg-177"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 9\n",
"Tempearture of bar in °C\n",
"T= 260.3\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 9\"\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 198;\n",
"#Length in m\n",
"L = 0.18;\n",
"#Breadth in m\n",
"b = 0.104;\n",
"#Initial temperature in °C\n",
"Ti = 730;\n",
"#Temperature of surrounding in °C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 1100;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 8.1*(10**(-5));\n",
"#Given time in seconds\n",
"t = 100;\n",
"#Bar can be considered to be an intersection of two infinite plates of\n",
"#thickness L1 and L2 in m\n",
"L1 = L/2;\n",
"L2 = b/2;\n",
"#For plate 1\n",
"#Fourier number\n",
"Fo1 = (alpha*t)/(L1**2);\n",
"#Biot number\n",
"Bi1 = (h*L1)/k;\n",
"#From fig. 4.11, at this Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.7\n",
"#For plate 2\n",
"#Fourier number\n",
"Fo2 = (alpha*t)/(L2**2);\n",
"#Biot number\n",
"Bi2 = (h*L2)/k;\n",
"#From fig. 4.11, at this Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.47\n",
"#Therefore combined dimensionless temperature ratio is multiply of two\n",
"z = 0.47*0.7;\n",
"#Temperature in °C\n",
"T = Tinfinity+z*(Ti-Tinfinity);\n",
"print\"Tempearture of bar in °C\"\n",
"print\"T=\",T\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.10:pg-180"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 10\n",
"The factor((To-Tinf)/(Ti-Tinf)) is \n",
"For plate 1\n",
"A= 0.85\n",
"For plate 2\n",
"B= 0.8\n",
"For plate 1\n",
"A= 0.83\n",
"For plate 2\n",
"B= 0.72\n",
"The calculated value is very close to the required value of 0.6.Hence the time required for the centre of the beam to reach 310°C is nearly 1200s or 20 minutes.\n",
"T= 0.5976\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 10\"\n",
"#An iron beam of rectangular cross section of size length,L=300mm by breadth,B=200 mm is used in the construction of a building\n",
"#Initially the beam is at a uniform temprature(Ti) of 30°C.\n",
"#Due to an accidental fire,the beam is suddenly exposed to hot gases at temprature,Tinf=730°C,with a convective heat transfer coefficient(h) of 100 W/(m**2*K)\n",
"#To determine the time required for the centre plane of the beam to reach a temprature(To) of 310°C.\n",
"To=310;\n",
"Tinf=730;\n",
"Ti=30;\n",
"#Take thermal conductivity k=73W/(m*K) and thermal diffusivity of the beam alpha=2.034*10**-5m**2/s \n",
"alpha=2.034*10**-5; \n",
"k=73; \n",
"h=100; \n",
"#The rectangular iron beam can be considered as an intersection of an infinite plate 1 having thickness 2*L1=300mm and a second infinite plate 2 of thickness 2*L2=200mm \n",
"L1=0.15;#in metre\n",
"L2=0.10;#in metre\n",
"#Here the faactor X=((To-Tinf)/(Ti-Tinf))\n",
"print\"The factor((To-Tinf)/(Ti-Tinf)) is \"\n",
"X=((To-Tinf)/(Ti-Tinf))\n",
"#Therefore we can write 0.6=((To-Tinf)/(Ti-Tinf))plate 1 *((To-Tinf)/(Ti-Tinf))plate2\n",
"#A straight forward solution is not possible.We have to adopt an iterative method of solution \n",
"#At first ,a value of time(t) is assumed to determine the centre-line temprature of the beam.The value of t at which((To-Tinf)/(Ti-Tinf))beam =0.6 is satisfied\n",
"#Let us first assume time, t=900s\n",
"t=900;\n",
"print\"For plate 1\"\n",
"#For plate1 Biot number Bi1=h*L1/k \n",
"Bi1=h*L1/k \n",
"Y=1/Bi1\n",
"#Fourier number(Fo1) is\n",
"Fo1=alpha*t/L1**2\n",
"#At Fo=0.814 and (1/Bi)=4.87...We read from graphs A=((To-Tinf)/(Ti-Tinf))plate1= 0.85\n",
"A=0.85;\n",
"print\"A=\",A\n",
"print\"For plate 2\"\n",
"#For plate1 Biot number Bi2=h*L2/k \n",
"Bi2=h*L2/k \n",
"Y=1/Bi2\n",
"#Fourier number(Fo2) is\n",
"Fo2=alpha*t/L2**2\n",
"#At Fo=1.83 and (1/Bi)=7.3...We read from graphs B=((To-Tinf)/(Ti-Tinf))plate2= 0.8\n",
"B=0.8;\n",
"print\"B=\",B\n",
"#Therefore ((To-Tinf)/(Ti-Tinf))plate1*((To-Tinf)/(Ti-Tinf))plate2=A*B\n",
"T=A*B\n",
"#Since the calculated value of 0.68 is greater than the required value of 0.60 and Tinf>To>Ti,The assume dvalue of t is less.\n",
"#So let us take time,t=1200s for the second iteration\n",
"t=1200;\n",
"print\"For plate 1\"\n",
"#For plate1 Biot number Bi1=h*L1/k \n",
"Bi1=h*L1/k \n",
"Y=1/Bi1\n",
"#Fourier number (Fo1)\n",
"Fo1=alpha*t/L1**2\n",
"#At Fo=1.08 and (1/Bi)=4.87...We read from graphs A=((To-Tinf)/(Ti-Tinf))plate1= 0.83\n",
"A=0.83;\n",
"print\"A=\",A\n",
"print\"For plate 2\"\n",
"#For plate1 Biot number Bi2=h*L2/k \n",
"Bi2=h*L2/k \n",
"Y=1/Bi2\n",
"#Fourier number (Fo2)\n",
"Fo2=alpha*t/L2**2\n",
"#At Fo=2.44 and (1/Bi)=7.3...We read from graphs B=((To-Tinf)/(Ti-Tinf))plate2= 0.72\n",
"B=0.72;\n",
"print\"B=\",B\n",
"#Therefore ((To-Tinf)/(Ti-Tinf))plate1*((To-Tinf)/(Ti-Tinf))plate2=A*B\n",
"T=A*B\n",
"print\"The calculated value is very close to the required value of 0.6.Hence the time required for the centre of the beam to reach 310°C is nearly 1200s or 20 minutes.\" \n",
"print\"T=\",T\n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n",
" \n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.11:pg-182"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 11\n",
"The time required for the temprature to reach 255°C at a depth of 80mm, in minutes is\n",
"T= 255\n"
]
}
],
"source": [
" \n",
" \n",
" \n",
" \n",
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 11\"\n",
"#A large slab wrought-iron is at a uniform temprature of Ti=550°C.\n",
"#The temprature of one surface is suddenly changed to Tinf=50°C\n",
"Tinf=50;\n",
"Ti=550; \n",
"#For slab conductivity(k=60W/(m*K)),Thermal diffusivity(alpha=1.6*10**-5m**2/s)\n",
"#To calculate the time(t) required for the temprature to reach T=255°C at a depth of 80mm\n",
"k=60;\n",
"T=255;\n",
"alpha=1.6**10-5;\n",
"#Similarity parameter,eta=x/(2*(alpha*t)**0.5)=(10/t**0.5)\n",
"#((T-Tinf)/(Ti-Tinf))=erf(10/t**0.5)...where erf is the error function.\n",
"#Let ((T-Tinf)/(Ti-Tinf))=X\n",
"X=((T-Tinf)/(Ti-Tinf));\n",
"#This implies erf(10/t**0.5)=0.41\n",
"#We read from the table the value of eta(=10/t**0.5)=0.38....corresponding to erf(eta)=0.41\n",
"#Therefore 10/t**0.5=0.38...this implies t=(10/0.38)**2\n",
"print\"The time required for the temprature to reach 255°C at a depth of 80mm, in minutes is\"\n",
"t=(10/0.38)**2/60\n",
"print\"T=\",T\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.12:pg-186"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 12\n",
"gaussian error function is \n",
"E= 0.998109069322\n",
"The temprature at a depth(x) of 100mm after a time(t) of 100 seconds,in °C is\n",
"T= -29851.5095103\n"
]
}
],
"source": [
" \n",
"import math\n",
"import scipy \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 12\"\n",
"#A large block of nickel steel conductivity(k=20W/(m*K)),thermal diffusivity(alpha=0.518*10-5 m**2/s) is at uniform temprature(Ti) of 30°C.\n",
"Ti=30.0;\n",
"k=20.0;\n",
"alpha=0.518*10.0**-5.0;\n",
"#One surface of the block is suddenly exposed to a constant surface heat flux(qo) of 6MW/m**2.\n",
"qo=6*10**6;#in W/m**2\n",
"#To determine the temprature at a depth(x) of 100mm after a time(t) of 100 seconds.\n",
"t=100.0;\n",
"x=0.1;#in metre\n",
"#Similarity parameter,eta=x/(4*alpha*t)\n",
"eta=x/((4.0*alpha*t)**0.5)\n",
"#E is gaussian error function\n",
"print\"gaussian error function is \"\n",
"E=scipy.special.erf(eta)\n",
"print\"E=\",E\n",
"#The equation to determine temprature is T-Ti=((2*qo(alpha*t/math.pi)**0.5)/(k))*e**((-x**2)/(4*alpha*t))-((qo*x)/(k))*erf(x/(2.0*(alpha*t)**0.5))\n",
"#Above equation can also be written as T=Ti+((2*qo(alpha*t/math.pi)**0.5)/(k))*e**((-x**2)/(4*alpha*t))-((qo*x)/(k))*erf(x/(2.0*(alpha*t)**0.5))\n",
"print\"The temprature at a depth(x) of 100mm after a time(t) of 100 seconds,in °C is\"\n",
"T=Ti+((2*qo*(alpha*t/math.pi)**0.5)/(k))*math.e**((-x**2.0)/(4*alpha*t))-((qo*x)/(k))*scipy.special.erf(x/(2*(alpha*t)**0.5))\n",
"print\"T=\",T\n",
"#NOTE:The answer in the book is incorrect(Calculation mistake)\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.14:pg-187 "
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 14\n",
"Temperature distribution after 25 mins in °C\n",
"[[ 2.29192547e+02 2.91925466e+00 1.11801242e+00 4.34782609e-01\n",
" 1.86335404e-01 6.21118012e-02]\n",
" [ 8.75776398e+01 8.75776398e+00 3.35403727e+00 1.30434783e+00\n",
" 5.59006211e-01 1.86335404e-01]\n",
" [ 3.35403727e+01 3.35403727e+00 8.94409938e+00 3.47826087e+00\n",
" 1.49068323e+00 4.96894410e-01]\n",
" [ 1.30434783e+01 1.30434783e+00 3.47826087e+00 9.13043478e+00\n",
" 3.91304348e+00 1.30434783e+00]\n",
" [ 5.59006211e+00 5.59006211e-01 1.49068323e+00 3.91304348e+00\n",
" 1.02484472e+01 3.41614907e+00]\n",
" [ 3.72670807e+00 3.72670807e-01 9.93788820e-01 2.60869565e+00\n",
" 6.83229814e+00 8.94409938e+00]]\n"
]
}
],
"source": [
" \n",
"import math\n",
"import numpy\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 14\"\n",
"#Nodal distance Deltax in m\n",
"deltax = 0.1;\n",
"#Time in seconds\n",
"t = 25*60;\n",
"#timestep deltaT in seconds\n",
"deltaT = 500;\n",
"#Number of increment\n",
"n = t/deltaT;\n",
"#Temperature raised in °C\n",
"To = 580.0;\n",
"#Using Eq. 4.114 for interior grid points, table 4.8 for exterior node\n",
"#Using Eq. 4.125a to 4.125f are written in matrix form\n",
"#Coefficient matrix A is\n",
"A = [[-3,1,0,0,0,0],[1,-3,1,0,0,0],[0,1,-3,1,0,0],[0,0,1,-3,1,0],[0,0,0,1,-3,1],[0,0,0,0,2,-3]]\n",
"#Coefficient matrix B is\n",
"B = [-600,-20,-20,-20,-20,-20];\n",
"#Temperature matrix is transpose of [T2 T3 T4 T5 T6 T7] where\n",
"#T2 to T7 are temperature in °C\n",
"#From Eq. 4.126\n",
"#Temperature distribution after one time step\n",
"T = numpy.linalg.inv(A)*B;\n",
"\n",
" \n",
"print\"Temperature distribution after 25 mins in °C\"\n",
"print T\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|