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
|
{
"metadata": {
"name": "",
"signature": "sha256:71d12a9b1f227d609ccf14dd1bc86e16c513b6cc011b9917a83e499f2febffe6"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 05:Mass, Bernoulli and Energy Equations"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-1, Page No:190"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Vairable Decleration\n",
"V=10#Volume of the bucket in Gal\n",
"r_in=1 #Radius of the hose in cm\n",
"r_e=0.4 #Radius of the hose at the nozzle exit in cm\n",
"t=50 #Time taken to fill the bucket in s\n",
"C_gl=3.7854 #Conversion factor gal to Lit\n",
"rho=1 #Denisty of water in kg/Lit\n",
"C_v=10**-3 #Conersion factor in m^3/lit\n",
"\n",
"#Calculations\n",
"\n",
"#Part (a)\n",
"V_dot=(V*C_gl)/t #Volume flow rate in Lit/s\n",
"m_dot=rho*V_dot #Mass flow rate in kg/s\n",
"\n",
"#Part(b)\n",
"A_e=pi*r_e**2*10**-4 #Cross-Sectional Area of the nozzle at exit in m^2\n",
"V_e=(V_dot*C_v)/A_e #Average Velocity of water at nozzle exit in m/s\n",
"\n",
"#Result\n",
"print \"The Volume Flow rate is\",round(V_dot,3),\"L/s and the mass flow rate is\",round(m_dot,3),\"kg/s\"\n",
"print \"The area of cross section at nozzle exit is\",round(A_e,5),\"m^2\"\n",
"print \"The Average Velocity of water is\",round(V_e,1),\"m/s\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Volume Flow rate is 0.757 L/s and the mass flow rate is 0.757 kg/s\n",
"The area of cross section at nozzle exit is 5e-05 m^2\n",
"The Average Velocity of water is 15.1 m/s\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-2, Page No:191"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"h_o=1.2 #Original Height in m\n",
"h_2=0.6 #Water level drop in m\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"D_tank=0.9 #Diameter of the tank in m\n",
"D_jet=0.013 #Diameter at the jet in m\n",
"\n",
"#Calculations\n",
"#After carrying out the theroetical calculations and integration we arrive to obtain\n",
"t_min=((h_o**0.5-h_2**0.5)/((g/2)**0.5))*((D_tank/D_jet)**2) #Time required to reach a level 0.6m in s\n",
"t=t_min/60 #Converting time from sec to min\n",
"\n",
"#Result\n",
"print \"The time it takes to half empty the tank is\",round(t,1),\"min\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The time it takes to half empty the tank is 11.6 min\n"
]
}
],
"prompt_number": 34
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-3, Page No:195"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"##Note:The symbols in the textbook are cumbersome to code hence a different one has been used in this coding\n",
"\n",
"#Variable Decleration\n",
"h=50 #Elevation difference in m\n",
"m_dot=5000 #Mass flow rate at which the water is to be supplied in kg/s\n",
"W_dot_out=1862 #Electric Power generated in kWh\n",
"n_generator=0.95 #Efficiency of the generator in fraction\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"C=10**-3 #Conversion factor in kJ/kg/m^2/s^2\n",
"\n",
"#Calculations\n",
"\n",
"#Part(a)\n",
"\n",
"#Calling e_mech_in-e_mech_out as del_e for convienence \n",
"del_e=g*h*C #Change in water's mechanical energy per unit mass in kJ/kg\n",
"delta_E_fluid=m_dot*del_e # Change in energy of the fluid in kW\n",
"\n",
"n_overall=W_dot_out/delta_E_fluid #Overall Efficiency in fraction\n",
"\n",
"#Part(b)\n",
"n_turbine_gen=n_overall/n_generator #Mechanical efficiency os the turbine in fraction\n",
"\n",
"#Part(c)\n",
"W_dot_shaft_out=n_turbine_gen*delta_E_fluid #Shaft power output in kW\n",
"\n",
"#Result\n",
"print \"The overall efficiency is\",round(n_overall,2)\n",
"print \"The mechanical efficiency of the turbine is\",round(n_turbine_gen,1)\n",
"print \"The shaft power output is\",round(W_dot_shaft_out,1),\"kW\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The overall efficiency is 0.76\n",
"The mechanical efficiency of the turbine is 0.8\n",
"The shaft power output is 1960.0 kW\n"
]
}
],
"prompt_number": 36
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-5, Page No:205"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"P1=400 #Pressure at upstream of the jet in kPa\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"rho=1000 #Density of water in kg/m^3\n",
"C1=1000 #Conversion factor in N/m^2.kPa\n",
"C2=1 #Conversion factor in kg.m/s^2.N\n",
"\n",
"#Calculations\n",
"#Applying the Bernoulli Equation\n",
"z2=(P1*C1*C2)/(rho*g) #maximun height the water jet reaches in m\n",
"\n",
"#Result\n",
"print \"The water jet rises up to\",round(z2,1),\"m\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The water jet rises up to 40.8 m\n"
]
}
],
"prompt_number": 39
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-6, Page No:206"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"h=5 #Height at which the water tank is filled in m\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"\n",
"#Calculations\n",
"z1=h #Decleration in terms of datum in m\n",
"#Applying the Bernoulli Equation\n",
"V2=(2*g*z1)**0.5 #Maximum velocity that the water jet can attain in m/s\n",
"\n",
"#Result\n",
"print \"The maximum velocity that the water jet can attain is\",round(V2,1),\"m/s\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The maximum velocity that the water jet can attain is 9.9 m/s\n"
]
}
],
"prompt_number": 40
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-7, Page No:207"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"P_atm=101.3 #Atmospheric pressure in kPa\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"rho=750 #Denisty of gasoline in kg/m^3\n",
"z1=0.75 #Location of point 2 w.r.t point 1\n",
"D=5*10**-3 #Diameter of the siphon pipe in m\n",
"V=4 #Volume of gasoline to be siphoned in Lit\n",
"z3=2.75 #Height of point 3 w.r.t to point 2 in m\n",
"C1=1 #conversion factor in N.s^2/kg.m\n",
"C2=10**-3 #Conversion factor in kPa.m^2/N\n",
"#Calculations\n",
"\n",
"#Part (a)\n",
"#Applying the Bernoulli Equation\n",
"V2=(2*g*z1)**0.5 #Velocity in m/s\n",
"A=(pi*D**2)/4 #Cross-Sectional Area in m^2\n",
"V_dot=V2*A*1000#Volume flow rate in L/s\n",
"delta_t=V/V_dot #Time required to siphon gasoline in s\n",
"\n",
"#Part(b)\n",
"#Applying Bernoulli Equations\n",
"P3=P_atm-(rho*g*z3*C1*C2) #Pressure at point 3 in kPa\n",
"\n",
"#result\n",
"print \"The time requires to siphon 4L gasoline is\",round(delta_t,1),\"s\"\n",
"print \"The pressure at point 3 is\",round(P3,1),\"kPa\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The time requires to siphon 4L gasoline is 53.1 s\n",
"The pressure at point 3 is 81.1 kPa\n"
]
}
],
"prompt_number": 45
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-8, Page No:208"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Declerations\n",
"g=9.81 #Acceleration due to Gravity in m/s^2\n",
"h3=0.12 #Difference in level in m\n",
"\n",
"#Calculations\n",
"#Applying Bernoulli Equations\n",
"V1=(2*g*h3)**0.5 #Velocity of Fluid in m/s\n",
"\n",
"#Result\n",
"print \"The velocity of fkuid is\",round(V1,2),\"m/s\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The velocity of fkuid is 1.53 m/s\n"
]
}
],
"prompt_number": 46
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-9, Page No:209"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"rho_hg=13600 #density of mercury in kg/m^3\n",
"rho_sw=1025 #density of sea-water in kg/m^3\n",
"rho_atm_air=1.2 #Density of air in kg/m^3\n",
"P_atm_air=762 #Atmospheric pressure 320km away from the eye in mm oh Hg\n",
"P_air=560 #Atmospheric pressure at the eye of the strom in mm og Hg\n",
"C=10**-3 #Conversion factor in m/mm\n",
"V_A=250 #Hurricane Wind Velocity in km/hr\n",
"C_k=1/3.6 #Conversion Factor from km/hr to m/s \n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"\n",
"#Calculations\n",
"\n",
"#part(a)\n",
"h3=(rho_hg*(P_atm_air-P_air)*C)/rho_sw #Pressure difference in m\n",
"\n",
"#Part(b)\n",
"#Applying Bernoulli Equations\n",
"h_air=(V_A**2*C_k**2)/(2*g) #Height of air column in m\n",
"rho_air=(P_air*rho_atm_air)/P_atm_air #Density of Air in the hurricane in kg/m^3\n",
"h_dynamic=(rho_air*h_air)/rho_sw #Sea-Water column equivalent to air-column in m\n",
"h2=h3+h_dynamic #Total storm surge at point 2 in m\n",
"\n",
"#Result\n",
"print \"The pressure difference between point's 1 and 3 in terms of sea-water column is\",round(h3,2),\"m\"\n",
"print \"The total Storm Surge at point2 is\",round(h2,2),\"m\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The pressure difference between point's 1 and 3 in terms of sea-water column is 2.68 m\n",
"The total Storm Surge at point2 is 2.89 m\n"
]
}
],
"prompt_number": 61
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-12, Page No:221"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"V_dot=50 #Volumetric Flow rate in L/s\n",
"rho=1 #Density of water \n",
"n_motor=0.9 #efficiency of the electric motor in fraction\n",
"W_dot_electric=15 #Power of the electric motor in kW\n",
"P2=300 #Absolute pressure at the outlet in kPa\n",
"P1=100 #Absolute pressure at the inlet in kPa\n",
"c=4.18 #Specific heat of water in kJ/kg C\n",
"#Calculations\n",
"\n",
"#Part(a)\n",
"m_dot=rho*V_dot #Mass flow rate in kg/s\n",
"W_dot_pump=n_motor*W_dot_electric #Mechanical shaft power delivered in kW\n",
"delta_E_dot_mech_fluid=(m_dot*((P2-P1)/rho))/1000 #Increase in mechanical energy in kW\n",
"n_pump=delta_E_dot_mech_fluid/W_dot_pump #Efficiency in fraction\n",
"\n",
"#part (b)\n",
"E_dot_loss=W_dot_pump-delta_E_dot_mech_fluid #Lost mechanical energy in kW\n",
"delta_T=(E_dot_loss)/(m_dot*c) #Temperature rise of water due to mechanical inefficiency in degree C\n",
"\n",
"#Result\n",
"print \"The Mechanical efficiency of the pump is\",round(n_pump,3)\n",
"print \"The temperature rise of water due to mechanical inefficiency is\",round(delta_T,3),\"Degree Centigrade\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Mechanical efficiency of the pump is 0.741\n",
"The temperature rise of water due to mechanical inefficiency is 0.017 Degree Centigrade\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-13, Page No:222"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"V_dot=100 #Discharge through the power plant in m^3/s\n",
"rho=1000 #Density of water in kg/m^3\n",
"z1=120 #Elevation from which the water flows in m\n",
"h_l=35 #Elevation of point 2 in m\n",
"n_turbine_gen=0.8 #Overall efficiency of the generator in fraction\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"C=10**-3 #Conversion Factor\n",
"\n",
"#Calculations\n",
"m_dot=rho*V_dot #mass flow rate through the turbine in kg/s\n",
"\n",
"#Applying Bernoullis principle and taking point 2 as reference point z2=0\n",
"h_turbine=z1-h_l #extracted turbine head in m\n",
"W_dot_turbine=m_dot*g*h_turbine*C #Turbine Power in kW\n",
"W_dot_electric=C*n_turbine_gen*W_dot_turbine #Electrical Power Generated by the actual Unit in MW\n",
"\n",
"#Result\n",
"print \"The electrical Power generated is\",round(W_dot_electric,1),\"MW\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The electrical Power generated is 66.7 MW\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-14, Page No:223"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"void_fraction=0.5 #Void Fraction\n",
"l=12 #Dimension of the fan in cm\n",
"w=40 #Dimension of the fan in cm\n",
"h=40 #Dimension of the fan in cm\n",
"delta_t=1 #time in s\n",
"rho=1.2 #Ddensity of air in kg/m^3\n",
"D=0.05 #Diameter of opening in the case in m\n",
"alpha2=1.1 #kinetic correction factor\n",
"n_fan=0.3 #Efficiency of the fan-motor\n",
"#Calculations\n",
"#Part(a)\n",
"V=void_fraction*l*w*h #Volume in cm^3\n",
"V_dot=(V/delta_t)*10**-6 #Volumetric flow rate in m^3/s\n",
"m_dot=rho*V_dot #mass flow rate in kg/s\n",
"A=(pi*D**2)/4 #Area of the opening is the case in m^2\n",
"\n",
"#Notation has been changed to avoid conflict\n",
"Vel=V_dot/A #Velocity of the air thorught the opening in m/s\n",
"\n",
"#Applying Bernoullis principle\n",
"W_dot_fan=m_dot*alpha2*Vel**2*0.5 #Work done in W\n",
"W_dot_electric=W_dot_fan/n_fan #Electric Work done in W\n",
"\n",
"#Part(b)\n",
"#Applying Brnoullis principle\n",
"#Notation has been changed here\n",
"delta_P=(rho*W_dot_fan)/m_dot #Pressure rise across fan in Pa\n",
"\n",
"#Result\n",
"print \"Wattage of the fan to be purchased is\",round(W_dot_electric,4),\"W\"\n",
"print \"The pressure difference across the fan is\",round(delta_P,1),\"Pa\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Wattage of the fan to be purchased is 0.5049 W\n",
"The pressure difference across the fan is 15.8 Pa\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 5.5-15, Page No:225"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variable Decleration\n",
"W_shaft=5 #Shaft Power in kW\n",
"n_pump=0.72 #Efficiency of the pump in fraction\n",
"g=9.81 #Acceleration due to gravity in m/s^2\n",
"h_l=4 #Head loss in m\n",
"z2=25 #Datum in m\n",
"rho=1000 #Density of water in kg/m^3\n",
"\n",
"#Calculations\n",
"W_dot_pump=n_pump*W_shaft #Useful mechanical power returned in kW\n",
"\n",
"#Applying Bernoullis Principle\n",
"m_dot=(W_dot_pump/(g*(z2+h_l)))*1000 #mass floe rate in kg/s\n",
"V_dot=(m_dot/rho) #Volumetric flow rate in m^3/s\n",
"delta_P=W_dot_pump/V_dot #Pressure difference in kPa\n",
"\n",
"#Result\n",
"print \"Discharge of water is\",round(V_dot,4),\"m^3/s\"\n",
"print \"The pressure difference across the pump is\",round(delta_P),\"kPa\"\n",
"#Answer in the coding is off by 1 kPa due to decimal point accuracy"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Discharge of water is 0.0127 m^3/s\n",
"The pressure difference across the pump is 284.0 kPa\n"
]
}
],
"prompt_number": 21
}
],
"metadata": {}
}
]
}
|