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
|
{
"metadata": {
"name": "",
"signature": "sha256:894c0bbedc753b4e771216e4f5b7d444de9bb7d1db18785ff9578b78d3ec1593"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3: Principles of Momentum Transfer and Applications"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-1, Page number 117"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Force on submerged sphere \n",
"from math import pi \n",
"\n",
"# Variable declaration\n",
"Rho_air = 1.137 #Density of air at 37.8 degC (kg/m3)\n",
"u = 0.000019 #Viscosity of air (Pa.s)\n",
"Dp = 0.042 #Diameter of the sphere (m)\n",
"V = 23.0 #velocity of the sphere (m/s)\n",
" \n",
"# Data SI Units \n",
"#Calculation\n",
"Nre = Dp*Rho_air*V/(u)\n",
"Cd = 0.47 #Drag coefficient from fig 3.1-2\n",
"Ap = pi*Dp**2/4\n",
"Fd = Cd*V**2*Rho_air*Ap/2\n",
"#Result\n",
"print 'Reynolds number %4.3e'%Nre\n",
"print \"The drag coefficient of the sphere is\",Cd\n",
"print \"The force on the cylinder is\", round(Fd,4),\"N\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reynolds number 5.781e+04\n",
"The drag coefficient of the sphere is 0.47\n",
"The force on the cylinder is 0.1958 N\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-2, Page number 117"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Force on a cylinder in a tunnel\n",
"# Variable declaration\n",
"V = 1. #Velocity of water in the tunnel (m/s)\n",
"d = 0.09 #Diameter of cylinder (m)\n",
"Rho_H2O = 997.2 #Density of water (kg/m3)\n",
"L = 1. #Length of the tunnel (m)\n",
"mu = 0.0009142 #Viscosity of water (Pa.s)\n",
"T = 24. #Temerature of water (\u00b0C)\n",
"\n",
"# Data SI Units \n",
"#Calculation\n",
"Nre = d*Rho_H2O*V/(mu)\n",
"Cd = 1.4 #Drag Coefficient for cylinder from fig 3.1-2\n",
"Ap = L*d\n",
"Fd = Cd*V**2*Rho_H2O*Ap/2\n",
"#Result\n",
"print 'Reynolds number %4.3e'%Nre\n",
"print \"The drag coefficient of the cylinder is\",Cd\n",
"print \"The force on the sphere is \",round(Fd,2),\"N\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Reynolds number 9.817e+04\n",
"The drag coefficient of the cylinder is 1.4\n",
"The force on the sphere is 62.82 N\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-3, Page number 119"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Surface area in Packed Bed of Cylinders\n",
"# Variable declaration\n",
"D = 0.02 #Diamter of the cylinder (m)\n",
"h = 0.02 #Length of the cylinder (m)\n",
"d_pb = 962. #Density of packed bed (kg/m3)\n",
"d_sc = 1600. #Density of solid cylinders (kg/m3)\n",
"m_pb = 962. #Mass of the packed bed (kg)\n",
"v_pb = 1. #Volume of packed bed (m3)\n",
"v_t = 1. #Total volume of the bed (m3)\n",
" # Calculation\n",
"v_sc = m_pb/d_sc\n",
" #(a) Calculate void fraction\n",
" #e = Volume of voids in bed/total volume of bed\n",
"e = (v_pb - v_sc)/v_t\n",
" #(b)Calculate the effective Diameter of the particle \n",
" #Dp = 6/(6/D)\n",
"Dp = 6/(6/D)\n",
" #(c) Calculate the value of \"a\"\n",
" # a = 6*(1-e)/Dp\n",
"a = 6*(1-e)/Dp\n",
"#Result\n",
"\n",
"print \"(a) The void fraction of bed is\",round(e,3)\n",
"print \"(b) The effective diameter of the particle is\",round(Dp,4),\"m\"\n",
"print \"(c) The calculated value of 'a' is \",round(a,2), \"1/m\"\n",
"print 'The answers are correct because of book uses rounded numbers'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a) The void fraction of bed is 0.399\n",
"(b) The effective diameter of the particle is 0.02 m\n",
"(c) The calculated value of 'a' is 180.38 1/m\n",
"The answers are correct because of book uses rounded numbers\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-4, Page number 121"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Pressure drop and flow of gases through packed beds\n",
"from math import pi\n",
"from scipy.optimize import root\n",
"# Variable declaration\n",
"d = 0.0127 #Diameter of the pipe (m)\n",
"e = 0.38 #Void fraction\n",
"d_bed = 0.61 #Bed diameter (m)\n",
"h = 2.44 #Height of bed (m)\n",
"p1 = 1.1 #Pressure P1 (atm)\n",
"T = 311. #Temperature of water (K)\n",
"R = 8314.34 #Gas constant \n",
"M = 28.97 #Molecular weight of air \n",
"L = 2.44 #Length of the bed (m)\n",
"Mdot = 0.358 #Mass rate of air, kg/s\n",
"\n",
"# Data\n",
"mu = 0.000019 #Viscosity of water (Pa.s)\n",
"# Calculation\n",
"A = pi*d_bed**2/4\n",
"G = Mdot/A\n",
"Nre = d*G/((1-e)*mu)\n",
" #Rho_av = M*Pav/(R*T)\n",
"p1 = p1*101325. #convert to pascal\n",
"er = 0.1\n",
"\n",
"f = lambda dp:dp*(M*(p1+0.5*dp)/(R*T))*d*e**3/(G**2*L*(1-e))-(150./Nre + 1.75)\n",
"sol = root(f,0.049e5)\n",
"dp = sol.x[0]\n",
"\n",
"#Result\n",
"print \"The calclated Reynolds number is\",round(Nre,0)\n",
"print 'The calculated pressure drop is %6.5e Pa'%(dp)\n",
"print 'The answer is difference than book because of method of solution, and is more correct.\\nBook assumes a pressure drop and calculates density at average pressure'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The calclated Reynolds number is 1321.0\n",
"The calculated pressure drop is 4.75988e+03 Pa\n",
"The answer is differencethan book because of method of solution and is more correct.\n",
"Book assumes a pressure drop and calculates density at average pressure\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-5, Page number 122"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Mean Diameter for a Particle\n",
"# Variable declaration\n",
"# Data \n",
"x1 = 0.25\n",
"x2 = 0.40\n",
"x3 = 0.35\n",
"Dp1 = 25.\n",
"Dp2 = 50.\n",
"Dp3 = 75.\n",
"fi = 0.68\n",
"\n",
"# Calculation\n",
" #Dpm = 1/(x1/(fi*Dp1) + x2/(fi*Dp2) + x3/(x3/(fi*Dp3))\n",
"Dpm = 1/((x1/(fi*Dp1)) + (x2/(fi*Dp2)) + (x3/(fi*Dp3)))\n",
"#Result\n",
"print \"The calculated effective mean diameter is \",round(Dpm,4),\"mm\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The calculated effective mean diameter is 30.0 mm\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-6, Page number 125 "
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Minimum Velocity for Fluidization\n",
"from scipy.optimize import root\n",
"\n",
"# Variable declaration\n",
"d = 0.12 #Size of the particle (mm)\n",
"fi = 0.88 #Shape of the particle \n",
"P = 2. #Pressure of the fluidized bed (atm)\n",
"v = 0.42 #Voidage \n",
"A = 0.30 #Cross section of the bed (m2)\n",
"M = 300. #Weight of the solid (kg)\n",
"ep1 = 0.\n",
"ep_mf = 0.42 #voidage at minimum fluidisation\n",
" #Data\n",
"mua = 1.85e-5 #Viscosity of air (Pa.s)\n",
"rhoa = 2.374 #Density of air at 2 atm, kg/m3\n",
"p = 2.0165e5 #Pressure, Pa\n",
"rhop = 1000 #Density of particle, kg/m3\n",
"Dp = 0.00012 #Particle diameter, m\n",
"g = 9.80665 #m/s2\n",
"# Calculation\n",
"\n",
"#Part A \n",
"V = M/rhop\n",
"L1 = V/A\n",
"Lmf = L1*(1. - ep1)/(1 - ep_mf) \n",
"\n",
"#Part B\n",
"delp = Lmf*(1.-ep_mf)*(rhop-rhoa)*g\n",
"\n",
"#Part C\n",
"#Nremf = d*umf*rhoa/mua\n",
"Nrea = Dp*rhoa/mua\n",
"\n",
"f = lambda u: 1.75*(Nrea*u)**2/(fi*ep_mf**3)+150*(1.-ep_mf)*(Nrea*u)/(fi**2*ep_mf**3)-Dp**3*rhoa*(rhop-rhoa)*g/mua**2\n",
"sol = root(f,0.001)\n",
"umf = sol.x[0]\n",
"Nremf = Dp*rhoa*umf/mua\n",
"\n",
"f1 = lambda u: Dp*rhoa*u/mua - sqrt(33.7**2 + 0.0408*Dp**3*rhoa*(rhop-rhoa)*g/mua**2) + 33.7\n",
"sol = root(f1,umf)\n",
"umfn = sol.x[0]\n",
"#Result\n",
"print \"(a) The minimum height of the fluidized bed is\",round(Lmf,3),\"m\"\n",
"print '(b) Pressure drop under conditions of minimum fluidization is %5.4e'%(delp),\"Pa\"\n",
"print \"(c) Minimum fluidozation velocity\",round(umf,6), \"m/s\"\n",
"print \" Reynold number at Minimum fluidization is\",round(Nremf,5)\n",
"print '(d) Minimum fluidozation velocity using simplified relation %7.6f'%umfn\n",
"print 'The answer is correct because of book uses rounded numbers'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a) The minimum height of the fluidized bed is 1.724 m\n",
"(b) Pressure drop under conditions of minimum fluidization is 9.7834e+03 Pa\n",
"(c) Minimum fluidozation velocity 0.005015 m/s\n",
" Reynold number at Minimum fluidization is 0.07723\n",
"(d) Minimum fluidozation velocity using simplified relation 0.004605\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1-7, Page number 126"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Expansion of Fluidized Bed \n",
"from scipy.optimize import root\n",
"\n",
"# Variable declaration\n",
"Nre_mf = 0.07723 #From previous problem\n",
"vmf = 0.005015\n",
"epmf = 0.42\n",
"\n",
"#Calculation\n",
"f = lambda K:vmf-K*epmf**3/(1-epmf)\n",
"sol = root(f,0.01)\n",
"K = sol.x[0]\n",
"vop = 3*vmf\n",
"\n",
"f1 = lambda ep:vop-K*ep**3/(1-ep)\n",
"sol = root(f1,0.1)\n",
"ep1 = sol.x[0]\n",
"#Result\n",
"print 'Operating velocity %6.5f m/s'%vop\n",
"print 'Voidage of bed at operating velocity %4.3f m/s'%(ep1)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Operating velocity 0.01505 m/s\n",
"Voidage of bed at operating velocity 0.555 m/s\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.2-1, Page number 128"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Flow Measurement Using a Pitot Tube\n",
"from math import pi\n",
"\n",
"# Variable declaration\n",
"d = 600. #Diameter of circular duct (m)\n",
"dh1 = 10.7 #Pitot tube reading (mm)\n",
"dh2 = 205. #Pitot tube reading (mm)\n",
"Cp = 0.98 #Pitot tube coefficient \n",
"mu = 0.0000203 #Viscosity of air (Pa.s)\n",
"rhoa = 1.043 #Density of air (kg/m3)\n",
"delh = 0.205 #Head loss in height of water (m)\n",
"rhow = 1000. #Density of water (kg/m3)\n",
"g = 9.80665 #Gravitational accleration (m/s2)\n",
"\n",
"#Calculation \n",
"d = 600./1e3\n",
"dp1 = (dh2/1e3)*(rhow - rhoa)*g\n",
"p1abs = 101325 + dp1\n",
"rhoac = rhoa*p1abs/101325\n",
"dp = (dh1/1e3)*g*(rhow - rhoa)\n",
"v = Cp*sqrt(2*dp/rhoa)\n",
"Nre = d*v*rhoa/mu\n",
"A = 3.14*d**2/4\n",
"vav = 0.85*v\n",
"Q = A*vav\n",
"\n",
"#Result \n",
"print 'Total absolute pressure %7.1f Pa'%p1abs\n",
"print 'Corrected density of air %5.4f kg/m3'%rhoac\n",
"print 'Velocity at centre %5.3f m/s'%v\n",
"print 'Average velocity through pipe %3.2f m/s'%vav\n",
"print 'Reynolds number %5.3f'%Nre\n",
"print \"The Volumetric flow rate is\",round(Q,4),\"m/s\"\n",
"print 'The answers are correct because of book uses rounded numbers'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Total absolute pressure 103333.3 Pa\n",
"Corrected density of air 1.0637 kg/m3\n",
"Velocity at centre 13.894 m/s\n",
"Average velocity through pipe 11.81 m/s\n",
"Reynolds number 428315.769\n",
"The Volumetric flow rate is 3.3375 m/s\n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.2-2, Page number 132"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Metering Oil Flow by an Orifice\n",
"from math import pi\n",
"\n",
"#Variable declaration\n",
"d0 = 0.0566 #Diameter of orifice (m)\n",
"d1 = 0.1541 #Diameter of pipe (m)\n",
"Rhooil = 878. #Density of oil (kg/m3)\n",
"mu = 0.0041 #Viscoity of oil (cp)\n",
"dP = 93200. #Pressure diffrence across orifice (kN/m2)\n",
"Co = 0.61 #Coeficient of discharge of orifice \n",
"\n",
"#Calculations\n",
"beta = d0/d1\n",
"v = Co*sqrt(2*dP/Rhooil)/sqrt(1 - beta**4)\n",
"Q = v*pi*d0**2/4\n",
"Nre = d0*v*Rhooil/mu\n",
"\n",
"#Result\n",
"print 'Velocity of oil %5.3f m/s'%v\n",
"print \"The volumetric flowrate\",round(Q,5), \"m3/s\"\n",
"print 'Reynolds number %5.4e'%Nre\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Velocity of oil 8.970 m/s\n",
"The volumetric flowrate 0.02257 m3/s\n",
"Reynolds number 1.0872e+05\n"
]
}
],
"prompt_number": 26
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3-1, Page number 135"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculation of Brake Horse Power of a Pump\n",
"\n",
"#Variable declaration\n",
"m = 40. #Flowrate for the Pump (gal/min)\n",
"mfps = 5.56 #Flowrate of the Pump in fps units (lbm/s)\n",
"D = 62.4 #Density of water in fps units (lbm/ft3)\n",
"n = .60 #Efficiency of the pump \n",
"H = 38.5 #Developed Head (ft)\n",
"\n",
"#Calculations\n",
"mfps = m*(1./60)*(1./7.481)*62.4\n",
"Ws = -H\n",
"Bhp = -Ws*mfps/(n*550)\n",
"\n",
"#Result\n",
"print \"The Calculated Brake Horse Power is \",round(Bhp,2), \"hp\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Calculated Brake Horse Power is 0.65 hp\n"
]
}
],
"prompt_number": 27
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3-2, Page number 137"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Brake-kQ Power of a Centrifugal Fan\n",
"#Variable declaration\n",
"m = 28.32 #Flowrate of the air (m3/min)\n",
"Ma = 28.97 #Molecular weight of air \n",
"V = 22.414 #Volume of 1 kg air at 101.3 atm pressure and 273.2 K\n",
"T1 = 273.2 #Temperature of air at atmospheric pressure (K) \n",
"T2 = 366.3 #Temperature of air at suction (K)\n",
"T3 = 294.1\n",
"P1 = 760. #Atmospheric pressure of air (mm Hg)\n",
"P2 = 741.7 #Suction Pressure of air (mm Hg)\n",
"P3 = 769.6 #Discharge Pressure of air (mm Hg)\n",
"n = 60. #Efficiency of the pump\n",
"confac = 101325. #Conversion factor pressure from (mm Hg) to (N/m2) (N/m2.atm)\n",
"rhow = 0.958 #Density of water (kg/m3)\n",
"V1 = 0. #Velocity of air at suction (m/s2)\n",
"V2= 45.7 #Velocity of air at discharge (m/s2)\n",
"z1 = 0. #Height at suction (m)\n",
"z2 = 0. #Height at discharge (m)\n",
"g = 9.8 #Gravitational accleration (m/s)\n",
"F = 0.\n",
"#Calculations\n",
"n = n/100\n",
"Rho1 = Ma*T1*P2/(V*T2*P1)\n",
"Rho2 = Rho1*P3/P2\n",
"Rhoavg = (Rho1 + Rho2)/2\n",
"mmks = m*(1./60)*(1./22.414)*(T1/T3)*(Ma)\n",
"P = (P3 - P2)*confac/(P1*rhow)\n",
"\n",
" #z1*g + V1**2/2 + P1/Rho_avg + Ws = z2*g + V2**2/2 + P2/Rho_avg + F\n",
"#-Ws = -z1*g - V1**2/2 - P1/Rho_avg +z2*g + V2**2/2 + P2/Rho_avg + F \n",
"Ws = -z1*g - V1**2/2 + P +z2*g + V2**2/2 + F \n",
"BkW = Ws*mmks/(n*1000)\n",
"\n",
"#Result\n",
"print \"The Calculated Brake Horse Power is\",round(BkW,2), \"kW\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Calculated Brake Horse Power is 4.65 kW\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3-3, Page number 140"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Compression of Methane\n",
"from math import log\n",
"#Variable Declaration\n",
"Q = 0.00756 #Flowrate of methane (kg.mol/s)\n",
"P1 = 137.9 #Initial pressure (kPa)\n",
"P2 = 551.6 #Final pressure (kPa)\n",
"T1 = 26.7 #Temperature of methane (degC)\n",
"M_CH4 = 16. #Molecular weight of Methane\n",
"gama = 1.31 \n",
"R = 8314.3 #Gas constant \n",
"n = .8 #Efficiency of compressor\n",
"#Calculation\n",
" #(a) Calculation for part (a)\n",
"T1_K = T1 + 273.2\n",
"Q_mks = Q*M_CH4\n",
"Ws = gama*R*T1_K*((P2/P1)**((gama - 1)/gama) - 1)/((gama - 1)*M_CH4)\n",
"B_kW = Ws*Q_mks/(n*1000)\n",
"#(b) Calculation for part (b)\n",
" # Ws_b = 2.3026*R*T1_K*math.log10(P2/P1)/M_CH4\n",
"Ws_b = (2.3026/M_CH4)*R*T1_K*log(P2/P1,10)\n",
"B_kW_b = Ws_b*Q_mks/(n*1000)\n",
"#Result \n",
"print \"The power required for adiabatic compression\",round(B_kW,2),\"kW\"\n",
"print \"The power required for isothermal compression\",round(B_kW_b,2),\"kW\"\n",
"print 'The answers are correct because of book uses rounded numbers'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The power required for adiabatic compression 38.66 kW\n",
"The power required for isothermal compression 32.67 kW\n",
"The answers are correct because of book uses rounded numbers\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.4-1, Page number 145"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Power Consumption by an Agitator\n",
"\n",
"#Variable Declaration\n",
"Dt = 1.83 #The tank diameter (m)\n",
"W = 0.122 #Width of the tank (m)\n",
"Da = 0.61 #The turbine diameter (m)\n",
"J = 0.15 #Width of baffle (m)\n",
"Vrpm = 90. #Speed of the turbine (rpm)\n",
"Rho = 929. #Density of liquid (kg/m3)\n",
"mu = 10. #Viscosity of liquid (cp)\n",
"mub = 100000. #Viscosity of the in part (b)liquid (cp)\n",
"\n",
"#Calcualtion\n",
"mu = mu*1e-3\n",
"mub = mub*1e-3\n",
" #Calculation for (a)\n",
"Vrps = Vrpm/60.\n",
"Nre = Da**2*Vrps*Rho/mu\n",
"NpT = 5. \n",
"P = NpT*Rho*Vrps**3*Da**5/1000.\n",
" #Calculation for (b)\n",
"Nreb = Da*Vrps*Rho/mub\n",
"NpL = 14.\n",
"Pb = NpL*Rho*Vrps**3*Da**5/1000.\n",
"\n",
"#Result \n",
"print \"(a)The power required by the mixer is\",round(P,3),\"kW\"\n",
"print \"(b)The power requird by the mixer is for higher viscosity\",round(Pb,2),\"kW\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)The power required by the mixer is 1.324 kW\n",
"(b)The power requird by the mixer is for higher viscosity 3.71 kW\n"
]
}
],
"prompt_number": 31
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.4-3, Page number 149 "
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Scale-up of Turbine Agitation System\n",
"from math import pi\n",
"#Variable Declaration\n",
"Dt1 = 1.83 #Tank diameter (m)\n",
"Da1 = 0.61 #Diameter of turbine (m)\n",
"W1 = 0.122 #Width of turbine (m)\n",
"J1 = 0.15 #Width of baffle (m)\n",
"N1 = 1.5 #Speed of the turbine (rev/s)\n",
"Rho = 929. #Density of fluid (kg/m3)\n",
"mu = 0.01 #Viscosity of the fluid (Pa.s)\n",
"H1 = Dt1\n",
"Np = 5.0 \n",
"\n",
"#Calcualtion\n",
"V1 = pi*Dt1**2*H1/4.\n",
"V2 = 3.*V1\n",
"R = (V2/V1)**(1./3)\n",
"Dt2 = R*Dt1\n",
"Da2 = R*Da1\n",
"W2 = R*W1\n",
"J2 = R*J1\n",
"P1 = Np*Rho*N1**3*Da1**5\n",
"P1_kW = P1/1000.\n",
" #(a)Calculation for equal rate of mass transfer\n",
"n = 2./3\n",
"N2 = N1*(1/R)**n\n",
"Nre = Da2**2*N2*Rho/mu\n",
"\n",
"P2 = Np*Rho*N2**3*Da2**5\n",
"P2_kW = P2/1000.\n",
" #The power per unit volume\n",
"P_v1 = P1_kW/V1 \n",
"P_v2 = P2_kW/V2\n",
" #(b)Calculation for equal liquid motion\n",
"n= 1.\n",
"N2_b = N1*(1./R)**n\n",
"P2_b = Np*Rho*N2_b**3*Da2**5\n",
"P2_vb = P2_b/V2\n",
"\n",
"#Result \n",
"print \"(a) For equal mass transfer\"\n",
"print ' Total power for smaller tank %5.3f W and \\n power required per unit volume is %5.4f W' %(P1,P_v1)\n",
"print ' Total power for larger tank %5.3f W and \\n power required per unit volume is %5.4f W' %(P2,P_v2)\n",
"print \"(b) The power per unit volume for equal liquid motion is\",round(P2_vb/1000,4),\"kW\"\n",
"print 'The answers are different than book because book uses rounded numbers'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a) For equal mass transfer\n",
" Total power for smaller tank 1324.063 W and \n",
" power required per unit volume is 0.2751 W\n",
" Total power for larger tank 3972.189 W and \n",
" power required per unit volume is 0.2751 W\n",
"(b) The power per unit volume for equal liquid motion is 0.1907 kW\n",
"The answers are correct because of book uses rounded numbers\n"
]
}
],
"prompt_number": 35
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.5-1, Page number 158"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Pressure Drop of Power-Law Fluid in Laminar Flow\n",
"#Variable Declaration\n",
"Rho = 1041. #Density of fluid (kg/m3)\n",
"L = 14.9 #Length of the tube (m)\n",
"D = 0.0524 #Inside diameter of the tube (m)\n",
"V = 0.0728 #Average Velocity of the flowing fluid (m/s)\n",
"K = 15.23 #Rheological properties of fluid \n",
"n = 0.4\n",
"\n",
"#Calcualtion\n",
" #Calculation for part (a)\n",
"delP = (K*4*L/D)*(8*V/D)**n\n",
"Ff = delP/Rho\n",
"Nre = ((D**n)*(V**(2-n))*Rho)/(K*8**(n-1))\n",
"print 'Nre = %5.4f is in Laminar range' %Nre\n",
" #Calculation for part (b)\n",
"f = 16./Nre\n",
"delPb = 4*f*Rho*L*V**2/(D*2)\n",
"\n",
"#Result \n",
"print \"(a) The pressure drop calculated is\",round(delP,0),\"N/m2\"\n",
"print \" The friction loss calculated is\",round(Ff,2),\"J/kg\"\n",
"print \"(b) The pressure drop calculated by using the friction factor method is\",round(delP/1000,2),\"kN/m2\"\n",
"print 'The answers are different than book because book uses rounded numbers'"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Nre = 1.1060 is in Laminar range\n",
"(a) The pressure drop calculated is 45391.0 N/m2\n",
" The friction loss calculated is 43.6 J/kg\n",
"(b) The pressure drop calculated by using the friction factor method is 45.39 kN/m2\n"
]
}
],
"prompt_number": 36
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.5-2, Page number 160"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Turbulent Flow of Power-Law Fluid\n",
"#Variable Declaration\n",
"Rho = 961. #Density of fluid (kg/m3)\n",
"Di = 0.0508 #Inner diameter of circular tube (m)\n",
"V_av = 6.1 #Average velocity of fluid (m/s)\n",
"K = 2.744 #Consisitency index\n",
"n = 0.30 #Flow behaiviour index\n",
"L = 30.5 #Length of tubing, m \n",
"f = 0.0032 #Friction factor for turbulent flow\n",
"#Calcualtion\n",
"Nre = Di**n*V_av**(2-n)*Rho/K*8**(n-1)\n",
"delP = 4*f*Rho*L*V_av**2/(2*Di)\n",
"delP_kN = delP/1000 \n",
"#Result \n",
"print \"The frictional pressure drop for turbine is\",round(delP_kN,1), \"kN/m2\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The frictional pressure drop for turbine is 137.4 kN/m2\n"
]
}
],
"prompt_number": 37
}
],
"metadata": {}
}
]
}
|