summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Engineering_Heat_And_Mass_Transfer/ch12.ipynb
blob: eb72297115725b48e8b7f8e6a9bf608142db7851 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:0803cdabadcb852bdbb9c79bc32fa04b5ddfc37dadc8bca5c47a13f22864faf2"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 12 : Heat Exchangers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.1  Page No : 503"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#INPUT\n",
      "T = 80.;\t\t        \t#Bulk Temperature of water in degrees C\n",
      "Di = 0.0254;\t\t\t#Inner diameter of steel pipe in m\n",
      "Do = 0.0288;\t\t\t#Outer diameter of steel pipe in m\n",
      "k = 50.;\t\t\t        #Thermal conductivity of steel in W/m.K\n",
      "ho = 30800.;\t\t    \t#Average convection coefficient in W/m**2.K\n",
      "v = 0.50;\t\t    \t#Velocity of water in m/s\n",
      "# Variables FROM HEAT AND MASS TRANSFER DATA BOOK FOR WATER AT BULK TEMPERATURE OF 80 degree C\n",
      "d = 974.;\t\t    \t#Density in kg/m**3\n",
      "v1 = 0.000000364;\t\t#Kinematic viscosity in m**2/s\n",
      "k1 = 0.6687;\t\t\t#Thermal conductivity in W/m.K\n",
      "Pr = 2.2;\t\t\t    #Prantl Number\n",
      "\n",
      "# Calculations\n",
      "Re = (v*Di)/v1;\t\t\t#Reynold's number\n",
      "Nu = (0.023*Re**0.8*Pr**0.4);\t\t\t#Nusselts number\n",
      "hi = Nu*(k1/Di);\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "ri = (Di/2);\t\t\t#Inner radius of steel pipe in m\n",
      "ro = (Do/2);\t\t\t#Outer radius of steel pipe in m\n",
      "U = (1./((1./ho)+((ro/k)*math.log(ro/ri))+(ro/(ri*hi))));\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'Overall heat transfer coefficient is %3.1f W/m**2.K'%(U)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall heat transfer coefficient is 2591.8 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.2  Page No : 504"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "Do = 0.0254;\t\t\t#Outer Diameter of heat exchanger tube in m\n",
      "Di = 0.02286;\t\t\t#Inner Diameter of heat exchanger tube in m\n",
      "k = 102;\t\t\t#Thermal conductivity of the tube in W/m.K\n",
      "hi = 5500;\t\t\t#Heat transfer coefficients at the inner side of tube in W/m**2.K\n",
      "ho = 3800;\t\t\t#Heat transfer coefficients at the outer side of tube in W/m**2.K\n",
      "Rfi = 0.0002;\t\t\t#Fouling factor in m**2.W.K\n",
      "Rfo = 0.0002;\t\t\t#Fouling factor in m**2.W.K\n",
      "\n",
      "# Calculations\n",
      "ro = (Do/2);\t\t\t#Outer radius of heat exchanger tube in m\n",
      "ri = (Di/2);\t\t\t#Inner radius of heat exchanger tube in m\n",
      "U = (1./((1./ho)+Rfo+((ro/k)*math.log(ro/ri))+((ro*Rfi)/ri)+(ro/(ri*hi))));\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Results\n",
      "print 'Overall heat transfer coefficient is %i W/m**2.K'%(U)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall heat transfer coefficient is 1110 W/m**2.K\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.3  Page No : 509"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "mh = 10000.;\t\t\t#Mass flow rate of oil in kg/h\n",
      "ch = 2095.;\t\t\t#Specific heat of oil J/kg.K\n",
      "Thi = 80.;\t\t\t#Inlet temperature of oil in degree C\n",
      "Tho = 50.;\t\t\t#Outlet temperature of oil in degree C\n",
      "mc = 8000.;\t\t\t#Mass flow rate of water in kg/h\n",
      "Tci = 25.;\t\t\t#Inlet temperature of water in degree C\n",
      "U = 300.;\t\t\t#Overall heat ransfer coefficient in W/m**2.K\n",
      "cc = 4180.;\t\t\t#Specific heat of water in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "Q = (mh*ch*(Thi-Tho));\t\t\t#Heat transfer rate in W\n",
      "Tco = ((Q/(mc*cc))+Tci);\t\t\t#Outlet temperature of water in degree C\n",
      "T = (Thi-Tco);\t\t\t#Temperature difference between oil inlet temperature and water outlet temperature in degree C\n",
      "t = (Tho-Tci);\t\t\t#Temperature difference between oil outlet temperature and water inlet temperature in degree C\n",
      "A = (((Q/U)*math.log(t/T))/(3600*(t-T)));\t\t\t#Area of heat exchanger in m**2\n",
      "\n",
      "# Results\n",
      "print 'Area of heat exchanger is %3.2f m**2'%(A)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Area of heat exchanger is 19.23 m**2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.4  Page No : 510"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "Ch = 2500.;\t\t\t#Capacity rate of hot oil in W/K\n",
      "Thi = 360.;\t\t\t#Temperature of hot fluid at the entrance of heat exchanger in degree C\n",
      "Tho = 300.;\t\t\t#Temperature of hot fluid at the exit of heat exchanger in degree C\n",
      "Tci = 30.;\t\t\t#Temperature of cold fluid at the entrance of heat exchanger in degree C\n",
      "Tco = 200.;\t\t\t#Temperature of hot fluid at the exit of heat exchanger in degree C\n",
      "U = 800.;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "\n",
      "# Calculations\n",
      "Q = (Ch*(Thi-Tho));\t\t\t#Heat transfer from the oil in W\n",
      "#Parallel flow\n",
      "T1 = Thi-Tci;\t\t\t#Temperature difference between hot fluid inlet temperature and cold fluid inlet temperature in degree C\n",
      "T2 = Tho-Tco;\t\t\t#Temperature difference between hot fluid outlet temperature and cold fluid outlet temperature in degree C\n",
      "Tlm1 = ((T1-T2)/math.log(T1/T2));\t\t\t#LMTD for parallel flow arrangement in degree C\n",
      "A1 = (Q/(U*Tlm1));\t\t\t#Area of heat exchanger in m**2\n",
      "#Counter flow\n",
      "t1 = Thi-Tco;\t\t\t#Temperature difference between hot fluid inlet temperature and cold fluid outlet temperature in degree C\n",
      "t2 = Tho-Tci;\t\t\t#Temperature difference between hot fluid outlet temperature and cold fluid inlet temperature in degree C\n",
      "Tlm2 = ((t1-t2)/math.log(t1/t2));\t\t\t#LMTD for counter flow arrangement in degree C\n",
      "A2 = (Q/(U*Tlm2));\t\t\t#Area of heat exchanger in m**2\n",
      "\n",
      "# Results\n",
      "print 'Area of heat exchanger in parallel flow arrangement is %3.3f m**2  \\n \\\n",
      "Area of heat exchanger in counter flow arrangement is %3.3f m**2'%(A1,A2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Area of heat exchanger in parallel flow arrangement is 0.973 m**2  \n",
        " Area of heat exchanger in counter flow arrangement is 0.892 m**2\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.5  Page No : 511"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "ch = 2130.;\t\t\t#Specific heat of oil in J/kg.K\n",
      "T1 = 160.;\t\t\t#Temperature of hot fluid (oil) at the entrance of heat exchanger in degree C\n",
      "T2 = 60.;\t\t\t#Temperature of hot fluid (oil) at the exit of heat exchanger in degree C\n",
      "t1 = 25.;\t\t\t#Temperature of cold fluid (water) at the entrance of heat exchanger in degree C\n",
      "d = 0.5;\t\t\t#Inner diameter of the tube in m\n",
      "mc = 2.;\t\t\t#Mass flow rate of cooling water in kg/s\n",
      "D = 0.7;\t\t\t#outer annulus outer diameter in m\n",
      "mh = 2.;\t\t\t#Mass flow rate of hot oil in kg/s\n",
      "U = 250.;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "cc = 4186.;\t\t\t#Specific heat of water in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "Q = (mh*ch*(T1-T2));\t\t\t# Required heat transfer rate in W\n",
      "t2 = ((Q/(mc*cc))+t1);\t\t\t#Outer water temperature in degree C\n",
      "T = T1-t2;  \t    \t\t    #Change in temperature between inlet tmperature of hot fluid and outlet temperature of cold fluid in degree C\n",
      "t = T2-t1;\t    \t        \t#Change in temperature between outlet tmperature of hot fluid and inlet temperature of cold fluid in degree C\n",
      "Tlm = ((T-t)/(math.log(T/t)));\t#Value of LMTD in degree C\n",
      "L = (Q/(U*3.14*d*Tlm));\t\t\t#Length of the heat exchanger in m\n",
      "\n",
      "# Results\n",
      "print 'Length of the heat exchanger is %3.2f m'%(L)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Length of the heat exchanger is 19.38 m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.6  Page No : 512"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "T = 120.;\t\t\t#Saturated steam temperature in degree C\n",
      "U = 1800.;\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "m = 1000.;\t\t\t#mass flow rate of water in kg/h\n",
      "t1 = 20.;\t\t\t#Inlet temperature of water in degree C\n",
      "t2 = 90.;\t\t\t#Outlet tmperature of water in degree C\n",
      "hfg = 2200.;\t\t#Enthalpy of steam in kJ/kg\n",
      "c = 4186.;\t\t\t#Specific het of water in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "Tlm = (((T-t1)-(T-t2))/(math.log((T-t1)/(T-t2))));\t\t\t#LMTD in a condenser in degree C\n",
      "Q = ((m/3600)*c*(t2-t1));\t    \t\t#Rate of heat transfer in W\n",
      "A = (Q/(U*Tlm));\t\t               \t#Surface area of heat exchanger in m**2 \n",
      "ms = ((Q*3600)/(hfg*1000));\t\t    \t#Rate of condensation of steam in kg/h\n",
      "\n",
      "# Results\n",
      "print 'Surface area of heat exchanger is %3.2f m**2  \\n \\\n",
      "Rate of condensation of steam is %3.1f kg/h'%(A,ms)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Surface area of heat exchanger is 0.78 m**2  \n",
        " Rate of condensation of steam is 133.2 kg/h\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.7  Page No : 516"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "T = 100.;\t\t\t#Temperature of saturated steam in degree C\n",
      "t1 = 30.;\t\t\t#Inlet temperature of water in degree C\n",
      "t2 = 70.;\t\t\t#Exit temperature of water in degree C\n",
      "\n",
      "# Calculations\n",
      "#COUNTER FLOW\n",
      "Tc = (T-t2);\t\t\t#Temperature difference between saturated steam and exit water temperature in degree C\n",
      "tc = (T-t1);\t\t\t#Temperature difference between saturated steam and inlet water temperature in degree C\n",
      "Tlmc = ((Tc-tc)/math.log(Tc/tc));\t\t\t#LMTD for counter flow in degree C\n",
      "\n",
      "#PARALLEL FLOW\n",
      "Tp = (T-t1);\t\t\t#Temperature difference between saturated steam and inlet water temperature in degree C\n",
      "tp = (T-t2);\t\t\t#Temperature difference between saturated steam and exit water temperature in degree C\n",
      "Tlmp = ((Tp-tp)/math.log(Tp/tp));\t\t\t#LMTD for counter flow in degree C\n",
      "#CROSS FLOW\n",
      "R = ((T-T)/(t2-t1));\t\t\t#R value for Correction factor F\n",
      "P = ((t2-t1)/(T-t1));\t\t\t#P value for Correction Factor F\n",
      "F = 1;\t\t\t#Referring to Fig.12.12 in page no 515\n",
      "Tlmx = (F*Tlmc);\t\t\t#LMTD for cross flow in degree C\n",
      "\n",
      "# Results\n",
      "print 'The effective math.log mean temperature difference for: \\\n",
      "\\ni)COUNTER FLOW is %3.1f degree C  \\\n",
      "\\nii)PARALLEL FLOW is %3.1f degree C  \\niii)CROSS FLOW is %3.1f degree C'%(Tlmc,Tlmp,Tlmx)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The effective math.log mean temperature difference for: \n",
        "i)COUNTER FLOW is 47.2 degree C  \n",
        "ii)PARALLEL FLOW is 47.2 degree C  \n",
        "iii)CROSS FLOW is 47.2 degree C\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.8  Page No : 516"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Ti = 18;\t\t\t#Inlet temperature of Shell fluid in degree C\n",
      "To = 6.5;\t\t\t#Outlet temperature of Shell fluid in degree C\n",
      "ti = -1.1;\t\t\t#Inlet temperature of Tube fluid in degree C\n",
      "to = 2.9;\t\t\t#Outlet temperature of Tube fluid in degree C\n",
      "U = 850;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "Q = 6000;\t\t\t#Design heat load in W\n",
      "\n",
      "# Calculations\n",
      "T = (Ti-to);\t\t\t#Temperature difference between shell side inlet fluid and tube side outlet fluid in degree C\n",
      "t = (To-ti);\t\t\t#Temperature difference between shell side outlet fluid and tube side inlet fluid in degree C\n",
      "Tlm = ((T-t)/math.log(T/t));\t\t\t#LMTD for a counterflow arrangement in degree C\n",
      "P = ((to-ti)/(Ti-ti));\t\t\t#P value to calculate correction factor\n",
      "R = ((Ti-To)/(to-ti));\t\t\t#R value to calculate correction factor\n",
      "F = 0.97\t\t\t#Taking correction factor from fig. 12.9 on page no.514\n",
      "A = (Q/(U*F*Tlm));\t\t\t#Area of shell aand tube heat exchanger in m**2\n",
      "\n",
      "# Results\n",
      "print 'Area of shell-and-tube heat exchanger is %3.2f m**2'%(A)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Area of shell-and-tube heat exchanger is 0.67 m**2\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.9  Page No : 517"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Q = 6000;\t\t\t#Taking design heat load value in W from Example no. 12.8 on page no.516\n",
      "U = 850;\t\t\t#Taking overall heat transfer coefficient value in W/m**2.K from Example no. 12.8 on page no.516\n",
      "Tlm = 10.92\t\t\t#Taking LMTD for a counterflow arrangement in degree C from Example no. 12.8 on page no.517\n",
      "R = 2.875;\t\t\t#Taking R value from Example no. 12.8 on page no.517\n",
      "P = 0.209;\t\t\t#Taking P value from Example no. 12.8 on page no.517\n",
      "F = 0.985;\t\t\t#Taking correction factor from Fig. 12.10 on page no.514\n",
      "\n",
      "# Calculations\n",
      "A = (Q/(U*F*Tlm));\t\t\t#Area of shell-and-tube heat exchanger in m**2\n",
      "\n",
      "# Results\n",
      "print 'Area of shell aand tube heat exchanger is %3.3f m**2'%(A)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Area of shell aand tube heat exchanger is 0.656 m**2\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.10  Page No : 517"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Ti = 360.;\t\t\t#Inlet temperature of hot fluid in degree C taken from Example no. 12.4 on page no. 510\n",
      "To = 300.;\t\t\t#Outlet temperature of hot fluid in degree C taken from Example no. 12.4 on page no. 510\n",
      "ti = 30.;\t\t\t#Inlet temperature of cold fluid in degree C taken from Example no. 12.4 on page no. 510\n",
      "to = 200.;\t\t\t#Outlet temperature of cold fluid in degree C taken from Example no. 12.4 on page no. 510\n",
      "U = 800.;\t\t\t#Overall heat transfer coefficient in W/m**2.K taken from Example no. 12.4 on page no. 510\n",
      "Q = 150000.;\t\t\t#Calculated heat transfer rate in W from Example no. 12.4 on page no. 510 \n",
      "Tlm = 210.22\t\t\t#Calculated LMTD for counterflow arrangement in degree C taken from Example no. 12.4 on page no. 511\n",
      "\n",
      "# Calculations\n",
      "P = ((to-ti)/(Ti-ti));\t\t\t#P value for calculation of correction factor\n",
      "R = ((Ti-To)/(to-ti));\t\t\t#R value for calculation of correction factor\n",
      "F = 0.98;\t\t\t#Correction Factor value taken from Fig.12.11 on page no.515\n",
      "A = (Q/(U*F*Tlm));\t\t\t#Required surface area in a cross flow heat exchanger in m**2\n",
      "\n",
      "# Results\n",
      "print 'The required surface area in a cross flow heat exchanger is %3.2f m**2'%(A)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required surface area in a cross flow heat exchanger is 0.91 m**2\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.11  Page No : 518"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "mc = 4.;\t\t\t#Mass flow rate of cold water in kg/s\n",
      "Tci = 38.;\t\t\t#Inlet Temperature of cold water in degree C\n",
      "Tco = 55.;\t\t\t#Outlet Temperature of cold water in degree C\n",
      "D = 0.02;\t\t\t#Diameter of the tube in m\n",
      "v = 0.35;\t\t\t#Velocity of water in m/s\n",
      "Thi = 95.;\t\t\t#Inlet Temperature of hot water in degree C\n",
      "mh = 2.;\t\t\t#Mass flow rate of hot water in kg/s\n",
      "L = 2.;\t\t\t    #Length of the tube in m\n",
      "U = 1500.;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "c = 4186.;\t\t\t#Specific heat of water in J/kg.K\n",
      "d = 1000.;\t\t\t#Density of water in kg/m**3\n",
      "\n",
      "# Calculations\n",
      "Q = (mc*c*(Tco-Tci));\t\t\t#Heat transfer rate for cold fluid in W\n",
      "Tho = (Thi-(Q/(mh*c)));\t\t\t#Outlet temperature of hot fluid in degree C\n",
      "T = Thi-Tco;\t\t\t#Difference of temperature between hot water inlet and cold water outlet in degree C\n",
      "t = Tho-Tci;\t\t\t#Difference of temperature between hot water outlet and cold water inlet in degree C\n",
      "Tlm = ((T-t)/math.log(T/t));\t\t\t#LMTD for counterflow heat exchanger\n",
      "A = (Q/(U*Tlm));\t\t\t#Area of heat exchanger in m**2\n",
      "A1 = (mc/(d*v));\t\t\t#Total flow area in m**2\n",
      "n = ((A1*4)/(3.14*D**2));\t\t\t#Number of tubes\n",
      "L = (A/(36*3.14*D));\t\t\t#Length of each tube taking n = 36 in m\n",
      "N = 2;\t\t\t#Since this length is greater than the permitted length of 2m, we must use more than one tube pass. Let us try 2 tube passes\n",
      "P = ((Tco-Tci)/(Thi-Tci));\t\t\t#P value for calculation of correction factor\n",
      "R = ((Thi-Tho)/(Tco-Tci));\t\t\t#R value for calculation of correction factor\n",
      "F = 0.9;\t\t\t#Corrction Factor from Fig.12.9 on page no. 514 \n",
      "A2 = (Q/(U*F*Tlm));\t\t\t#Total area required for one shall pass,2 tube pass exchanger in m**2\n",
      "L1 = (A2/(2*36*3.14*D));\t\t\t#Length of tube per pass taking n = 36 in m\n",
      "\n",
      "# Results\n",
      "print 'Number of tubes per pass is %.f  \\n \\\n",
      "Number of passes is %i  \\n \\\n",
      "Length of tube per pass is %3.3f m'%(n,N,L1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Number of tubes per pass is 36  \n",
        " Number of passes is 2  \n",
        " Length of tube per pass is 1.518 m\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.12  Page No : 524"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "mh = 250.;\t\t\t#Mass flow rate of hot liquid in kg/h\n",
      "ch = 3350.;\t\t\t#Specific heat of hot liquid in J/kg.K\n",
      "Thi = 120.;\t\t\t#Inlet temperature of hot liquid in degree C\n",
      "mc = 1000.;\t\t\t#Mass flow rate of cold liquid in kg/h\n",
      "Tci = 10.;\t\t\t#Inlet temperature of cold liquid in degree C\n",
      "U = 1160.;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "A = 0.25;\t\t\t#Surface area of heat exchanger in m**2\n",
      "cc = 4186.;\t\t\t#Specific heat of cold liquid in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "Cc = ((mc*cc)/3600);\t\t\t#Heat capacity rate for cold liquid in W/K\n",
      "Ch = ((mh*ch)/3600);\t\t\t#Heat capacity rate for hot liquid in W/K\n",
      "Cmin = min(Cc,Ch);\t\t\t#Minimum heat capacity rate in W/K\n",
      "Cmax = max(Cc,Ch);\t\t\t#Maximum heat capacity rate in W/K\n",
      "r = (Cmin/Cmax);\t\t\t#Ratio of min amd max heat capacity rates\n",
      "NTU = ((U*A)/Cmin);\t\t\t#Number of transfer units\n",
      "e = ((1-math.exp(-NTU*(1+r)))/(1+r));\t\t\t#Effectiveness for a parallel flow heat exchanger\n",
      "Qmax = (Cmin*(Thi-Tci));\t\t\t#Maximum possible heat transfer rate in W\n",
      "Q = (e*Qmax);\t\t\t#Actual rate of heat transfer in W\n",
      "Tco = ((Q/Cc)+Tci);\t\t\t#Outlet temperature of cold liquid in degree C\n",
      "Tho = (Thi-(Q/Ch));\t\t\t#Outlet temperature of hot liquid in degree C\n",
      "\n",
      "\n",
      "# Results\n",
      "print 'Effectiveness for a parallel flow heat exchanger is %3.3f \\n \\\n",
      "Outlet temperature of water is %3.2f degree C  \\n \\\n",
      "Outlet temperature of cooled liquid is %3.2f degree C'%(e,Tco,Tho)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Effectiveness for a parallel flow heat exchanger is 0.647 \n",
        " Outlet temperature of water is 24.23 degree C  \n",
        " Outlet temperature of cooled liquid is 48.87 degree C\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.13  Page No : 527"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Tci = 15.;\t\t\t#Inlet temperature of water in degree C\n",
      "mc = 1300.;\t\t\t#Mass flow rate of water in kg/h\n",
      "ch = 2000.;\t\t\t#Specific heat of oil in J/kg.K\n",
      "mh = 550.;\t\t\t#Mass flow rate of oil in kg/h\n",
      "Thi = 94.;\t\t\t#Inlet temperature of oil in degree C\n",
      "A = 1.;\t\t\t    #Area of heat exchanger in m**2\n",
      "U = 1075.;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "cc = 4186.;\t\t\t#Specific heat of water in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "Cc = ((mc*cc)/3600);\t\t\t#Heat capacity of water in W/K\n",
      "Ch = ((mh*ch)/3600);\t\t\t#Heat capacity of oil in W/K\n",
      "Cmin = min(Cc,Ch);\t\t\t#Minimum heat capacity in W/K\n",
      "Cmax = max(Cc,Ch);\t\t\t#Maximum heat capacity in W/K\n",
      "r = (Cmin/Cmax);\t\t\t#Ratio of min and max heat capacity\n",
      "NTU = ((U*A)/Cmin);\t\t\t#Number of transfer Units\n",
      "e = 0.94\t\t\t#Effectiveness of heat exchanger from Fig. 12.15 on page no.524\n",
      "Qmax = (Cmin*(Thi-Tci));\t\t\t#Maximum possible heat transfer rate in W\n",
      "Q = (e*Qmax);\t\t\t#Actual heat transfer rate in W\n",
      "Tco = ((Q/Cc)+Tci);\t\t\t#Outlet Temperature of water in degree C\n",
      "Tho = (Thi-(Q/Ch));\t\t\t#Outlet Temperature of oil in degree C\n",
      "\n",
      "# Results\n",
      "print 'The total heat transfer is %3.1f W  \\n \\\n",
      "Outlet Temperature of water is %i degree C  \\n \\\n",
      "Outlet Temperature of oil is %3.2f degree C'%(Q,Tco,Tho)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total heat transfer is 22690.6 W  \n",
        " Outlet Temperature of water is 30 degree C  \n",
        " Outlet Temperature of oil is 19.74 degree C\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.14  Page No : 528"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "N = 3000.;\t\t\t#Number of brass tubes\n",
      "D = 0.02;\t\t\t#Diameter of brass tube in m\n",
      "Tci = 20.;\t\t\t#Inlet temperature of cooling water in degree C\n",
      "mc = 3000.;\t\t\t#Mass flow rate of cooling water in kg/s\n",
      "ho = 15500.;\t\t\t#Heat transfer coefficient for condensation in W/m**2.K\n",
      "Q = (2.3*10**8);\t\t\t#Heat load of the condenser in W\n",
      "Thi = 50.;\t\t\t#Temperature at which steam condenses in degree C\n",
      "hfg = 2380.\t\t\t#Enthalpy of liquid vapour mixture in kJ/kg\n",
      "m = 1.;\t\t\t#Flow rate of each tube in kg/s\n",
      "Cc = 4180.;\t\t\t#Specific heat of water in J/kg.K\n",
      "#Properties of water at 300K from data book\n",
      "Cc = 4186.;\t\t\t#Specific heat in J/kg.K\n",
      "mu = (855.*10**-6);\t\t\t#Dynamic vismath.cosity in Ns/m**2\n",
      "k = 0.613;\t\t\t#Thermal Conductivity in W/mK\n",
      "Pr = 5.83\t\t\t#Prantl number\n",
      "\n",
      "# Calculations\n",
      "Tco = ((Q/(mc*Cc))+Tci);\t\t\t#Outlet temperature of cooling water in degree C\n",
      "Re = ((4*m)/(3.1415*D*mu));\t\t\t#Reynold's number\n",
      "Nu = (0.023*Re**(4./5)*Pr**(2./5));\t\t\t#Nusselts number\n",
      "hi = (Nu*(k/D));\t\t\t#Heat transfer coefficient in W/m**2.K\n",
      "U = (1./((1./ho)+(1./hi)));\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "Cmin = (mc*Cc);\t\t\t#Minimum heat capacity in W/K\n",
      "Qmax = (Cmin*(Thi-Tci));\t\t\t#Maximum heat transfer rate in W\n",
      "e = (Q/Qmax);\t\t\t#Effectiveness of heat transfer\n",
      "NTU = 0.8;\t\t\t#Number of transfer units from Fig. 12.16 on page no.525 \n",
      "A = ((NTU*Cmin)/U);\t\t\t#Area of heat exchanger in m**2\n",
      "L = (A/(2*N*3.1415*D));\t\t\t#Length of tube per pass in m\n",
      "ms = (Q/(hfg*1000));\t\t\t#Amount of steam condensed in kg/s\n",
      "\n",
      "# Results\n",
      "print 'The outlet temperature of the cooling water is %3.2f degree C  \\n \\\n",
      "The overall heat transfer coefficient is %3.1f W/m**2.K  \\n \\\n",
      "Tube length per pass using NTU method is %3.2f m  \\n \\\n",
      "The rate of condensation of steam is %3.0f kg/s'%(Tco,U,L,ms)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The outlet temperature of the cooling water is 38.32 degree C  \n",
        " The overall heat transfer coefficient is 6525.8 W/m**2.K  \n",
        " Tube length per pass using NTU method is 4.08 m  \n",
        " The rate of condensation of steam is  97 kg/s\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.15  Page No : 530"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Tci = 5.;\t\t\t#Inlet temperature of water in degree C\n",
      "mc = 4600.;\t\t\t#Mass flow rate of water in kg/h\n",
      "mh = 4000.;\t\t\t#Mass flow rate of air in kg/h\n",
      "Thi = 40.;\t\t\t#Inlet temperature of air in degree C\n",
      "U = 150.;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "A = 25.;\t\t\t#Area of heat exchanger in m**2\n",
      "Cc = 4180.;\t\t\t#Specific heat of water in J/kg.K\n",
      "Ch = 1010.;\t\t\t#Specific heat of air in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "C1 = ((mh*Ch)/3600);\t\t\t#Heat capacity of air in W/K\n",
      "C2 = ((mc*Cc)/3600);\t\t\t#Heat capacity of water in W/K\n",
      "Cmin = min(C1,C2);\t\t\t#Minimum value of heat capacity in W/K\n",
      "Cmax = max(C1,C2);\t\t\t#Maximum value of heat capacity in W/K\n",
      "r = (Cmin/Cmax);\t\t\t#Ratio of min and max heat capacity in W/K\n",
      "NTU = ((U*A)/Cmin);\t\t\t#Number of heat transfer units\n",
      "e = 0.92;\t\t\t#Effectiveness of heat exchanger from Fig. 12.18 on page no.526\n",
      "Q = (e*Cmin*(Thi-Tci));\t\t\t#Heat transfer rate in W\n",
      "Tco = ((Q/C2)+Tci);\t\t\t#Outlet temperature of water in degree C\n",
      "Tho = (Thi-(Q/C1));\t\t\t#Outlet temperature of air in degree C\n",
      "\n",
      "# Results\n",
      "print 'The exit temperature of water is %3.1f degree C  \\n \\\n",
      "The exit temperature of air is %3.1f degree C'%(Tco,Tho)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The exit temperature of water is 11.8 degree C  \n",
        " The exit temperature of air is 7.8 degree C\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.16  Page No : 532"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "A = 15.82;\t\t\t#Total outside area of heat exchanger in m**2\n",
      "Thi = 110;\t\t\t#Inlet temperature of oil in degree C\n",
      "Ch = 1900;\t\t\t#Specific heat of oil in J/kg.K\n",
      "mh = 170.9;\t\t\t#Mass flow rate of oil in kg/min\n",
      "mc = 68;\t\t\t#Mass flow rate of water in kg/min\n",
      "Tci = 35;\t\t\t#Inlet temperature of water in degree C\n",
      "U = 320;\t\t\t#Overall heat transfer coefficient in W/m**2.K\n",
      "Cc = 4186;\t\t\t#Specific heat of water in J/kg.K\n",
      "\n",
      "# Calculations\n",
      "C1 = ((mh*Ch)/60);\t\t\t#Heat capacity of oil in W/K\n",
      "C2 = ((mc*Cc)/60);\t\t\t#Heat capacity of water in W/K\n",
      "D = (U*A*((1./C1)-(1./C2)));\t\t\t#Constant\n",
      "r = (C1/C2);\t\t\t#Ratio of heat capacity of oil and water\n",
      "Tho = Thi-(((Thi-Tci)*(1-math.exp(D)))/(r-math.exp(D)));\t\t\t#Outlet temperature of oil in degree C\n",
      "Tco = Tci+(r*(Thi-Tho));\t\t\t#Outlet temperature of water in degree C\n",
      "\n",
      "# Results\n",
      "print 'The exit temperature of oil is %3.2f degree C \\n \\\n",
      " The exit temperature of water is %3.1f degree C'%(Tho,Tco)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The exit temperature of oil is 74.97 degree C \n",
        "  The exit temperature of water is 75.0 degree C\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.17  Page No : 533"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "Tci = 20.;\t\t\t#Inlet temperature of water in degree C\n",
      "Tco = 50.;\t\t\t#Outlet temperature of water in degree C\n",
      "Th = 120.;\t\t\t#Temperature at which steam condenses in degree C\n",
      "newTci = 15.;\t\t\t#New Inlet temperature of water in degree C\n",
      "\n",
      "# Calculations\n",
      "newTco = (((Tco-Tci)*(Th-newTci))/(Th-Tci))+newTci;\t\t\t#New outlet temperature of water in degree C\n",
      "\n",
      "# Results\n",
      "print 'New outlet temperature of water is %3.1f degree C'%(newTco)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "New outlet temperature of water is 46.5 degree C\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.18  Page No : 534"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "T = 100;\t\t\t#Total length of tubes in m\n",
      "\n",
      "\n",
      "# Calculations\n",
      "D = ((3.14*4000)/(3.14*30000))**0.5;\t\t\t#Diameter of the exchanger in m\n",
      "L = (2./(3.1415*D**2));\t\t\t#Length of the exchanger in m\n",
      "Cost = (10000+(15000*D**3*L)+(2000*D*L));\t\t\t#Optimal math.cost in Rs\n",
      "\n",
      "# Results\n",
      "print 'The diameter of the exchanger is %3.3f m  \\n \\\n",
      "The Length of the exchanger is %3.2f m  \\n \\\n",
      "Optimal cost is %3.0f Rs'%(D,L,Cost)\n",
      "\n",
      "# note : rounding error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The diameter of the exchanger is 0.365 m  \n",
        " The Length of the exchanger is 4.77 m  \n",
        " Optimal cost is 16974 Rs\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}