summaryrefslogtreecommitdiff
path: root/Transport_Phenomena:_A_Unified_Approach/ch12.ipynb
blob: 7821140361097f34293b474c8f5c2b0732fdf83f (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 12 : Transport past immersed bodies"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.2 - Page No :562\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "p = 1.2047*0.06243;  \t\t\t #[lb/ft**3]\n",
      "mu = (18.17*10**-6)*(0.6720);  \t #[lb/ft*sec]\n",
      "v = mu/p;\n",
      "x = 2.;  \t\t\t #[ft]\n",
      "U = 6.;  \t\t\t #[ft/sec]\n",
      "\n",
      "# Calculation and Results\n",
      "Nre = (x*U)/v;\n",
      "print \"The Reynolds number is well within the laminar region %.3e Nre\"%Nre\n",
      "del_ = 5*x*(Nre)**(-1./2);\n",
      "C1 = 0.33206;\n",
      "Cd = 2.*C1*(Nre)**(-1./2);\n",
      "L2 = 2.;  \t\t\t #[ft]\n",
      "L1 = 1.;  \t\t\t #[ft]\n",
      "b = 1.;\n",
      "F = ((2*(C1)*U*b))*((mu*p*U)**(1./2))*(((L2)**(1./2))-((L1)**(1./2)));\n",
      "gc = 32.174;\n",
      "F = F/gc;\n",
      "print \" The value of F properly expressed in force units is  F = %.3e lbf\"%(F);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Reynolds number is well within the laminar region 7.391e+04 Nre\n",
        " The value of F properly expressed in force units is  F = 1.204e-04 lbf\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.3 - Page No :569\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "U = 3.;  \t\t\t #[m/sec]\n",
      "x1 = 1.;  \t\t\t #[m]\n",
      "x2 = 2.;  \t\t\t #[m]\n",
      "\n",
      "# Calculations\n",
      "p = 1./(1.001*10**-3);  \t\t\t #[kg/m**3];\n",
      "mu = 1.*10**-3;           \t\t\t #[kg/m*sec]\n",
      "Nre1 = (x1*U*p)/(mu);\n",
      "Nre2 = (x2*p*U)/(mu);\n",
      "tauw = (1./2)*(p*(U**2))*((2*math.log10(Nre1)-0.65)**(-2.3));\n",
      "B = 1700.;\n",
      "Cd = (0.455*(math.log10(Nre2))**-2.58)-(B/(Nre2));\n",
      "Lb = 2.0;\n",
      "F = (1./2)*(p*(U**2))*(Lb)*(Cd);\n",
      "\n",
      "Xc = round((5*10**5 * mu)/(U*p),3)\n",
      "CDlaminar = round(4*.33206*(5*10**5)**(-1./2),5)\n",
      "Flaminar= round(1./2*(p*U**2)*Xc*CDlaminar,3)\n",
      "Cd = round(.455*((math.log10(Nre2))**-2.58),6)\n",
      "Fturbulent1 = round(1./2*(p*U**2)*x2*Cd,2)\n",
      "Fturbulent2 = round(1./2*(p*U**2)*Xc*.005106,3)\n",
      "Factual = 1.411 + Fturbulent1 - Fturbulent2\n",
      "\n",
      "\n",
      "# Results\n",
      "print \" the drag on the plate is  F  =  %f kg*m/sec**2  =  %.1f N\"%(F,F);\n",
      "print ' total drag on the plate Factual = %.2f N'%Factual\n",
      "print \" the shear stress is %.f N/m^2\"%tauw\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " the drag on the plate is  F  =  26.801111 kg*m/sec**2  =  26.8 N\n",
        " total drag on the plate Factual = 26.93 N\n",
        " the shear stress is 14 N/m^2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.5 - Page No :576\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables \n",
      "T = 290.;  \t\t\t     #[K] - temperature of flowing water\n",
      "U = 3.;  \t\t\t     #[m/sec] - free stream velocity\n",
      "Tfs = 285.;  \t\t\t #[K] - temperature of free stream\n",
      "vr = 10.**-3;  \t\t\t #[m**3/kg] - volume per unit mass\n",
      "p = 1./vr;  \t\t\t #[kg/m**3] - density of water at Tfs\n",
      "mu = 1225.*10**-6;  \t #[N*sec/m**2]\n",
      "k = 0.590;  \t\t\t #[W/m*K]\n",
      "Npr = 8.70;\n",
      "\n",
      "# Calculation and Results\n",
      "#  (a) The length of laminar boundary\n",
      "Nre = 5.*10**5;\n",
      "xc = (Nre)*(mu/(p*U));\n",
      "print \" a) The length of laminar boundary is  xc  =  %.4f m\"%(xc);\n",
      "#  (b) Thickness of the momentum boundary layer and thermal boundary layer\n",
      "del_ = 5*xc*((Nre)**(-1./2));\n",
      "del_h = del_*((Npr)**(-1./3));\n",
      "print \" b) The thickness of momentum boundary layer is  del_  =  %.3e m \\n The \\\n",
      " thickness of the hydryodynamic layer is  del_h  =  %.3e m\"%(del_,del_h);\n",
      "\n",
      "# (c) Local heat transfer coefficient\n",
      "x = 0.2042;  \t\t\t #[ft]\n",
      "hx = ((0.33206*k)/(x))*((Nre)**(1./2))*((Npr)**(1./3));\n",
      "print \" c) The local heat transfer coefficient is  h  =  %.0f W/m**2*K \\\n",
      " =  %.0f Btu/hr*ft**2*degF\"%(hx,hx*0.17611);\n",
      "\n",
      "# (d) Mean heat transfer coefficient\n",
      "hm = 2*hx;\n",
      "print \" d) The mean heat transfer coefficient is  h  =  %.0f W/m**2*K \\\n",
      "  =  %.0f Btu/hr*ft**2*degF\"%(hm,round(hm*0.17611,1));\n",
      "\n",
      "# Answer may vary because of rounding error.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " a) The length of laminar boundary is  xc  =  0.2042 m\n",
        " b) The thickness of momentum boundary layer is  del_  =  1.444e-03 m \n",
        " The  thickness of the hydryodynamic layer is  del_h  =  7.019e-04 m\n",
        " c) The local heat transfer coefficient is  h  =  1395 W/m**2*K  =  246 Btu/hr*ft**2*degF\n",
        " d) The mean heat transfer coefficient is  h  =  2791 W/m**2*K   =  492 Btu/hr*ft**2*degF\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.10 - Page No :590\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "T = 293.15;  \t\t\t #[K]\n",
      "pp = 999.;  \t\t\t #[kg/m**3] - density of water\n",
      "mu = 0.01817*10**-3;  \t #[kg/m*sec] - viscosity of air\n",
      "p = 1.205;  \t\t\t #[kg/m**3] - density of air\n",
      "d = 5*10**-6;  \t\t\t #[m] - particle diameter\n",
      "g = 9.80;  \t\t\t     #[m/sec**2]\n",
      "\n",
      "# Calculations\n",
      "rp = d/2;\n",
      "Ut = ((2*g*(rp**2))*(pp-p))/(9*mu);\n",
      "Nre = (d*Ut*p)/(mu);\n",
      "Fp = 6*math.pi*mu*rp*Ut;\n",
      "\n",
      "# Results\n",
      "print \" The drag force is  Fp  =  %.2e N\"%(Fp);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The drag force is  Fp  =  6.40e-13 N\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.11 - Page No :591\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "T = 293.15;  \t\t\t #[K]\n",
      "pp = 999.;  \t\t\t #[kg/m**3] - density of water\n",
      "mu = 0.01817*10**-3;  \t #[kg/m*sec] - viscosity of air\n",
      "p = 1.205;  \t\t\t #[kg/m**3] - density of air\n",
      "d = 5*10**-6;  \t\t\t #[m] - particle diameter\n",
      "g = 9.80;  \t\t\t     #[m/sec**2]\n",
      "\n",
      "# Calculations\n",
      "rp = d/2;\n",
      "Ut = ((2*g*(rp**2))*(pp-p))/(9*mu);\n",
      "Nre = (d*Ut*p)/(mu);\n",
      "t = ((-2*(rp**2)*pp))/(9*mu)*(math.log(1-0.99));\n",
      "\n",
      "# Results\n",
      "print \" Time for the drop of water in previous Example  from an initial \\\n",
      " velocity of zero to 0.99*Ut is  \\n  t  =  %.3e sec\"%(t);\n",
      "print \" In other words, the drop accelerates almost instantaneously to its terminal velocity\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Time for the drop of water in previous Example  from an initial  velocity of zero to 0.99*Ut is  \n",
        "  t  =  3.517e-04 sec\n",
        " In other words, the drop accelerates almost instantaneously to its terminal velocity\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.12 - Page No : 594\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "pp = 1.13*10**4;  \t\t\t #[kg/m**3] - density of lead particle\n",
      "p = 1.22;  \t\t\t #[kg/m**3] - density of air\n",
      "g = 9.80;  \t\t\t #[m/sec**2] - acceleration due to gravity\n",
      "d = 2*10**-3;  \t\t\t #[m] - diameter of particle\n",
      "mu = 1.81*10**-5;  \t\t\t #[kg/m*sec] - viscosity of air\n",
      "\n",
      "# Calculations\n",
      "# let us assume\n",
      "Cd = 0.44;\n",
      "Ut = ((4*d*g*(pp-p))/(3*p*Cd))**(1./2);\n",
      "Nre = (Ut*d*p)/(mu);\n",
      "\n",
      "# from fig 12,16 value of Cd is\n",
      "Cd = 0.4;\n",
      "Ut = ((4*d*g*(pp-p))/(3*p*Cd))**(1./2);\n",
      "Nre = (Ut*d*p)/(mu);\n",
      "\n",
      "# Results\n",
      "# Within the readibility of the chart Cd is unchanged and therefore the above obtained Cd is the final answer\n",
      "\n",
      "print \" The terminal velocity is  Ut  =  %.2f m/sec\"%(Ut);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The terminal velocity is  Ut  =  24.60 m/sec\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.13 - Page No :595\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "distance = 1./12;  \t #[ft]\n",
      "time = 60.;  \t\t #[sec]\n",
      "Ut = distance/time;\n",
      "mu = 1.68;  \t\t #[lb/ft*sec] - viscosity \n",
      "pp = 58.;  \t\t\t #[lb/ft**3] - density of sphere\n",
      "p = 50.;  \t\t\t #[lb/ft**3] - density of polymer solution\n",
      "g = 32.;  \t\t\t #[ft/sec] - acceleration due to gravity\n",
      "\n",
      "# Calculations\n",
      "rp = ((9*mu)*(Ut)*((2*g)**(-1))*((pp-p)**(-1)))**(1./2);\n",
      "Nre = (rp*2*Ut*p)/(mu);\n",
      "\n",
      "# Results\n",
      "print \" The required particle diameter would be about %.2f inch\"%(rp*2*12);\n",
      "print \"Nre = %.2e\"%Nre\n",
      "print \" This reynolds number is well within the stokes law region ; thus the design is reasonable\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The required particle diameter would be about 0.15 inch\n",
        "Nre = 5.29e-04\n",
        " This reynolds number is well within the stokes law region ; thus the design is reasonable\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.14 - Page No :616\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "T = 842.;  \t\t\t #[degF] - temperature\n",
      "P = 14.6;  \t\t\t #[psia] - pressure\n",
      "p = 0.487;  \t\t #[kg/m**3] - density of air\n",
      "mu = 3.431*10**-5;  \t #[kg/m*sec] - viscosity of air\n",
      "k = 0.05379;  \t\t\t #[W/m*K] - thermal conductivity\n",
      "Npr = 0.7025;  \t\t\t #prandtl no.\n",
      "\n",
      "# Calculation and Results\n",
      "# (a) static void_ fraction\n",
      "mcoal = 15.*2000; \t #[lb] - mass of coal\n",
      "pcoal = 94.;  \t\t #[lbm/ft**3] - density of coal\n",
      "d = 10.;  \t\t\t #[ft]\n",
      "L = 7.;  \t\t\t #[ft]\n",
      "area = ((math.pi*(d**2))/4);\n",
      "Vcoal = mcoal/pcoal;\n",
      "Vtotal = area*L;\n",
      "e = (Vtotal-Vcoal)/(Vtotal);\n",
      "print \"(a) The void_ fraction is E = %.2f\"%e\n",
      "\n",
      "# (b) minimum void_ fraction and bed height\n",
      "d = 200.;  \t\t\t #[um] - particle diameter\n",
      "Emf = 1-0.356*((math.log10(d))-1);\n",
      "\n",
      "# this value seems to be a lottle low and therefore 0.58 will be used\n",
      "Emf = 0.58;\n",
      "Lmf = ((L)*(1-e))/(1-Emf);\n",
      "print \" b) The bed height is  Lmf  =  %.3f ft\"%(Lmf);\n",
      "\n",
      "# (c) Minimum fluid_ization velocity\n",
      "P1 = 20.;  \t\t\t #[psia]\n",
      "P2 = 14.696;  \t\t\t #[psia]\n",
      "p1 = (p*P1)/(P2);\n",
      "\n",
      "# the archimid_es no. is\n",
      "g = 9.78;  \t\t\t #[m/sec**2]\n",
      "Nar = p1*g*((d*10**-6)**3)*(1506-p1)*((1./(mu)**2));\n",
      "C1 = 27.2;\n",
      "C2 = 0.0408;\n",
      "Nremf = (((C1**2)+C2*Nar)**(1./2))-C1;\n",
      "Umf = (Nremf*mu)/((d*10**-6)*p1);\n",
      "print \" c) The minimum fluid_ization velocity is  Umf  =  %.4f %% m/sec\"%(Umf);\n",
      "\n",
      "# (d) Minimum pressure\n",
      "del_tapmf = (1506-p1)*(g)*(1-Emf)*((Lmf*12*2.54)/(100))+p1*g*Lmf;\n",
      "print \" d) The minimum pressure drop for fluid_ization is  -del_tapmf  =  %.3e Pa\"%(del_tapmf);\n",
      "\n",
      "# (e) Particle settling velocity\n",
      "Cd = 0.44;\n",
      "Ut = (((8*((d*10**-6)/2)*g)*(1506-p1))/(3*p1*Cd))**(1./2);\n",
      "Nrep = (Ut*d*10**-6*p1)/(mu);\n",
      "print \"Nrep = %.2f\"%Nrep\n",
      "Ut = ((5.923/18.5)*(((d*10**-6)*p1)/(mu))**(0.6))**(1./(2-0.6))\n",
      "print \" e) The particle settling velocity is  Ut  =  %.5f m/sec\"%(Ut);\n",
      "\n",
      "# (f) Bed to wall heat transfer coefficient\n",
      "Nrefb = (d*10**-6)*2.5*Umf*p1*(1./mu);\n",
      "Nnufb = 0.6*Npr*((Nrefb)**(0.3));\n",
      "hw = Nnufb*(k/(d*10**-6));\n",
      "print \" f) The bed to wall heat transfer coefficient is  hw  =  %.1f W/m**2*K\"%(hw);\n",
      "\n",
      "# Answer may vary because of rounding error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The void_ fraction is E = 0.42\n",
        " b) The bed height is  Lmf  =  9.675 ft\n",
        " c) The minimum fluid_ization velocity is  Umf  =  0.0129 % m/sec\n",
        " d) The minimum pressure drop for fluid_ization is  -del_tapmf  =  1.830e+04 Pa\n",
        "Nrep = 14.18\n",
        " e) The particle settling velocity is  Ut  =  0.79114 m/sec\n",
        " f) The bed to wall heat transfer coefficient is  hw  =  60.6 W/m**2*K\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.15 - Page No :618\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "pp = 249.6;  \t\t #[lb/ft**3] - density of catalyst\n",
      "p = 58.;  \t\t\t #[lb/ft**3] - density of liquid\n",
      "g = 32.174;  \t\t #[ft/sec**2]\n",
      "gc = 32.174;\n",
      "Lmf = 5.;  \t\t\t #[ft] - height of bed\n",
      "mu = 6.72*10**-3;  \t #[lbm/ft*sec] - viscosity of liquid\n",
      "dp = 0.0157/12;  \t #[ft] - diameter of particle\n",
      "emf = 0.45;\n",
      "\n",
      "# Calculations\n",
      "del_tapmf = (pp-p)*(g/gc)*(1-emf)*(Lmf);\n",
      "Nar = (p*g*dp**3)*(pp-p)*(1./(mu)**2);\n",
      "C1 = 27.2;\n",
      "C2 = 0.0408;\n",
      "Nremf = (((C1**2)+C2*Nar)**(1./2))-C1;\n",
      "Umf = Nremf*(mu/(dp*p));\n",
      "\n",
      "# Results\n",
      "print \" Minimum fluidization velocity is  Umf  =  %.2e ft/sec\"%(Umf);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Minimum fluidization velocity is  Umf  =  1.18e-03 ft/sec\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.16 - Page No :624\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "d = 24.*10**-6;  \t\t\t #[m] - diameter of wire\n",
      "T = 415.;  \t\t\t #[K] - operating temperature of hot wire anemometer\n",
      "P = 0.1;  \t\t\t #[W] - power consumption\n",
      "L = 250.*d;\n",
      "Tair = 385.;  \t\t\t #[K] - temperature of air in duct\n",
      "A = math.pi*d*L;\n",
      "Tfilm = (T+Tair)/2.;\n",
      "\n",
      "# properties of air at Tfilm\n",
      "p = 0.8825;  \t\t\t #[kg/m**3]\n",
      "mu = 2.294*10**-5;  \t\t\t #[kg/m*s]\n",
      "cpf = 1013.;  \t\t\t #[J*kg/K]\n",
      "kf = 0.03305;  \t\t\t #[W/m*K]\n",
      "Npr = 0.703;\n",
      "\n",
      "# Calculations\n",
      "h = P/(A*(T-Tair));\n",
      "Nnu = (h*d)/kf;\n",
      "def func(x):\n",
      "    return Nnu-0.3-((0.62*(x**(1./2))*(Npr**(1./3)))/((1+((0.4/Npr)**(2./3)))**(1./4)))*((1+((x/(2.82*(10**5)))**(5./8)))**(4./5));\n",
      "\n",
      "# on solving the above function for x by umath.sing some root solver technique like Newton raphson method , we get\n",
      "x = 107.7;\n",
      "\t\t\t # or\n",
      "Nre = 107.7;\n",
      "y = func(x);\n",
      "Um = (Nre*mu)/(d*p);\n",
      "\n",
      "# Results\n",
      "print \" The velocity is  Um  =  %.1f m/sec  =  %d ft/sec\"%(Um,Um*3.28);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The velocity is  Um  =  116.6 m/sec  =  382 ft/sec\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 12.17 - Page No :630\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "dt = 0.75;\n",
      "St = 1.5*dt;\n",
      "Sl = 3.*dt;\n",
      "Lw = 1.;  \t\t\t #[m]\n",
      "N = 12.;\n",
      "Stotalarea = N*(St/12.)*Lw;\n",
      "Sminarea = N*((St-dt)/12.)*Lw*0.3048;\n",
      "\n",
      "# properties of air at 293.15 K\n",
      "p = 1.204;  \t\t\t #[kg/m**3]\n",
      "mu = 1.818*10**-5;  \t #[kg/m*s]\n",
      "cp = 1005.;  \t\t\t #[J*kg/K];\n",
      "k = 0.02560;  \t\t\t #[J/s*m*K]\n",
      "Npr = (cp*mu)/k;\n",
      "U_inf = 7.;  \t\t\t #[m/sec]\n",
      "\n",
      "# Calculations\n",
      "Umax = U_inf*(St/(St-dt));\n",
      "w = p*Umax*Sminarea;\n",
      "C_tubes = 0.05983;  \t\t\t #[m**2/m] - circumference of the tubes\n",
      "N_tubes = 96.;\n",
      "Atubes = N_tubes*C_tubes*Lw;\n",
      "Tw = 328.15;  \t\t\t #[K]\n",
      "Tinf = 293.15; \t\t\t #[K]\n",
      "Tin = 293.15;  \t\t\t #[K]\n",
      "Tout = 293.15;  \t\t #[K]\n",
      "u = 100.;\n",
      "while u>10**-1:\n",
      "    T = (Tin+Tout)/2\n",
      "    Told = Tout;\n",
      "    p = -(0.208*(10**-3))+(353.044/T);\n",
      "    mu = -(9.810*(10**-6))+(1.6347*(10**-6)*(T**(1./2)));\n",
      "    cp = 989.85+(0.05*T);\n",
      "    k = 0.003975+7.378*(10**-5)*T;\n",
      "    Npr = (cp*mu)/k;\n",
      "    dt = 0.75*0.0254;\n",
      "    Gmax = w/Sminarea;\n",
      "    Nre = (dt*Gmax)/mu;\n",
      "    h = 0.27*(k/dt)*(Npr**0.36)*(Nre**0.63);\n",
      "    h = h*0.98;\n",
      "    del_taT = (h*Atubes*(Tw-Tinf))/(w*cp);\n",
      "    Tout = Tin+del_taT;\n",
      "    u = abs(Tout-Told);\n",
      "\n",
      "T = (Tin+Tout)/2\n",
      "p = -(0.208*(10**-3))+(353.044/T);\n",
      "mu = -(9.810*(10**-6))+(1.6347*(10**-6)*(T**(1./2)));\n",
      "dt = 0.75;\n",
      "dv = (4*(St*Sl-(math.pi*(dt**2)*(1./4))))/(math.pi*dt)*(0.09010/3.547);\n",
      "de = dv;\n",
      "Nre = (dv*24.72)/mu;\n",
      "dv = dv/(0.09010/3.547);\n",
      "ftb = 1.92*(Nre**(-0.145));\n",
      "Zt = Sl;\n",
      "Ltb = 8*Sl;\n",
      "del_tap = (ftb*(24.72**2))/(2*p*(dv/Ltb)*((St/dv)**0.4)*((St/Zt)**0.6));\n",
      "\n",
      "# Results\n",
      "print \" del_tap  =  %.0f kg/m*s  =  %.0f N/m**2  =  %f psia\"%(del_tap,del_tap,round(del_tap*0.1614/1113,5))\n",
      "print \" Exit temperature : %.2f K\"%T\n",
      "# answer may slightly vary because of rounding error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " del_tap  =  1113 kg/m*s  =  1113 N/m**2  =  0.161350 psia\n",
        " Exit temperature : 299.87 K\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}