summaryrefslogtreecommitdiff
path: root/Fluid_Mechanics-Fundamentals_&_Applications/Chapter13_2.ipynb
blob: 55eeb9db3e8ef0d4746407551cbcbce65c4000fb (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:a6e557f5af6e8e42adcc2ea3a1c780397b983eb75c9ac0cc9aa8adb6e5b6328c"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 13:Open-Channel Flow"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-1,Page No:711"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "V_dot=0.2 #Volumetric flow rate in m^3/s\n",
      "y=0.15 #Depth of flow in m\n",
      "b=0.4 #Width in m\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "\n",
      "#Calculations\n",
      "V=V_dot/(y*b) #Velocity in m/s\n",
      "yc=(V_dot**2/(g*b**2))**0.33 #Critical depth in m\n",
      "\n",
      "#Flow is supercritical\n",
      "\n",
      "Fr=V/((g*y)**0.5) #Froude Number\n",
      "\n",
      "Es1=y+(V_dot**2/(2*g*b**2*y**2)) #Specific Energy in m\n",
      "#Alternate Depth\n",
      "#Solving the Ploynomial Equation\n",
      "\n",
      "coeff=[1,-Es1,0,V_dot**2/(2*g*b**2)]\n",
      "x=numpy.roots(coeff)\n",
      "\n",
      "#Result\n",
      "print \"The velocity of flow is\",round(V,2),\"m/s\"\n",
      "print \"As the froude number Fr\",round(Fr,2),\"> 1 the flow is supercritical\"\n",
      "print \"The Alternate Depth is\",round(x[0],3),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The velocity of flow is 3.33 m/s\n",
        "As the froude number Fr 2.75 > 1 the flow is supercritical\n",
        "The Alternate Depth is 0.69 m\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-2, Page No:716"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "b=0.8 #Bottom width of the trapezoidal channel in m\n",
      "y=0.52 #Depth of flow in m\n",
      "theta=60 #Angle in degrees\n",
      "alpha1=0.3 #Slope angle in degrees\n",
      "n=0.03 #Mannings Coefficient \n",
      "a=1 #m^1/3/s\n",
      "alpha2=1 #Slope in degrees\n",
      "\n",
      "#Calculations\n",
      "Ac=y*(b+(y/tan((theta*pi)/180))) #Cross-sectional Area in m^2\n",
      "p=b+((2*y)/sin((theta*pi)/180)) #Perimeter in m\n",
      "Rh=Ac/p #Hydraulic Radius in m\n",
      "S01=tan((alpha1*pi)/180) #Slope of the bottom channel \n",
      "S02=tan((alpha2*pi)/180) #Slope of the bottom channel\n",
      "V_dot1=(a/n)*(Ac*Rh**0.66*S01**0.5) #Volumetric Flow rate in m^3/s\n",
      "V_dot2=(a/n)*(Ac*Rh**0.66*S02**0.5) #Volumetric Flow rate in m^3/s\n",
      "\n",
      "#Result\n",
      "print \"The volumetric flow rate when alpha is 0.3 degrees is\",round(V_dot1,2),\"m^3/s\" \n",
      "print \"The volumetric flow rate when alpha is 1 degrees is\",round(V_dot2,2),\"m^3/s\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The volumetric flow rate when alpha is 0.3 degrees is 0.6 m^3/s\n",
        "The volumetric flow rate when alpha is 1 degrees is 1.1 m^3/s\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-4, Page No:718"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "S0=0.003 #Bottom slope\n",
      "l1=3 #Length in m\n",
      "p1= 10.486 #Perimeter in section 1 in m\n",
      "p2=10 #Perimeter of section 2 in m\n",
      "Ac1=21 #Area of section 1 in m^2\n",
      "Ac2=16 #Area of section 2 in m^2\n",
      "a=1 #m^1/3/s\n",
      "n1=0.03 #Mannings coefficient for section 1\n",
      "n2=0.05 #Mannings Coefficient for section 2\n",
      "\n",
      "#Calcualtions\n",
      "Rh1=Ac1/p1 #Hydraulic Radius at section 1 in m\n",
      "Rh2=Ac2/p2 #Hydraulic Radius at section 2 in m\n",
      "Rh=(Ac1+Ac2)/(p1+p2) #Hydraulic Radius of the entire channel in m\n",
      "\n",
      "V_dot=a*S0**0.5*(((Ac1*Rh1**0.66)/n1)+((Ac2*Rh2**0.66)/n2)) #Volumetric Flow rate in m^3/s\n",
      "n_eff=(a*(Ac1+Ac2)*Rh**0.66*S0**0.5)/V_dot #Effective Mannings Coefficient\n",
      "\n",
      "#Result\n",
      "print \"The flow rate is\",round(V_dot),\"m^3/s\"\n",
      "print \"The effective Mannings Coefficient is\",round(n_eff,3)\n",
      "#The decimal point accuracy in python is the possible source of discrepancy in textbook and computed answer\n",
      "#The answer computed is weel within the permissbile error limit\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The flow rate is 78.0 m^3/s\n",
        "The effective Mannings Coefficient is 0.038\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-5, Page No:722"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#NOTE:Variable names have been changed\n",
      "\n",
      "#Variable Decleration\n",
      "n=0.016 #mannings Coefficient\n",
      "V_dot=2 #Volumetric Flow rate in m^3/s\n",
      "S0=0.001 #Bottom Slope\n",
      "theta=60 #Angle in degrees\n",
      "\n",
      "#Calculations\n",
      "\n",
      "#Part(a)\n",
      "#Using the Mannings Equation\n",
      "b1=((2*n*V_dot*4**0.66)/(a*S0**0.5))**0.375 #Width of the Rectangular section in m\n",
      "Aca=b1**2*0.5 #Area of rectangular section in m^2\n",
      "p=2*b1 #Perimeter in m\n",
      "y1=b1/2 #Depth of flow in m\n",
      "\n",
      "#Part(b)\n",
      "b2=((n*V_dot)/(0.75*3**0.5*((3**0.5/4)**0.66)*a*S0**0.5))**0.375 #Width in m\n",
      "y2=((3**0.5)/2)*b2 #Depth of flow in m\n",
      "\n",
      "#Result\n",
      "print \"The cross-section for rectangular section are b=\",round(b1,2),\"m y=\",round(y1,2),\"m\"\n",
      "print \"The cross-section for trapezoidal section are b=\",round(b2,2),\"m y=\",round(y2,3),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The cross-section for rectangular section are b= 1.84 m y= 0.92 m\n",
        "The cross-section for trapezoidal section are b= 1.12 m y= 0.97 m\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-7, Page No:732"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "y=2 #Depth of Flow in m\n",
      "b=6 #Bottom width in m\n",
      "a=1 #m^1/3/s\n",
      "S0=0.004 #Bed Slope\n",
      "n=0.014 #Mannings Coefficient\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "\n",
      "#Calculations\n",
      "Ac=y*b #Area in m^2\n",
      "p=b+2*y #Perimeter in m\n",
      "Rh=(Ac*10**-1)/(p*10**-1) #Hydraulic Radius in m \n",
      "\n",
      "#Flow rate \n",
      "V_dot=(a/n)*(Ac*Rh**0.66*S0**0.5) #Volumetric Flow rate in m^3/s\n",
      "\n",
      "#Critical Depth\n",
      "yc=V_dot**2/(g*Ac**2) #Critical Depth in m\n",
      "\n",
      "#Result\n",
      "print \"As yn=\",round(y,2),\"m < yc=\",round(yc,2),\"m the slope is STEEP\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "As yn= 2.0 m < yc= 2.65 m the slope is STEEP\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-8,Page No:735"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "rho=1000 #Density of water in kg/m^3\n",
      "g=9.81 #Accelration due to gravity in m/s^2\n",
      "y1=0.8 #Pre jump height in m\n",
      "V1=7 #Velocity in m/s pre jump\n",
      "b=10 #Width of the channel in m\n",
      "\n",
      "#Calculations\n",
      "#Part(a)\n",
      "Fr1=V1/((g*y1)**0.5) #Froude Number pre Jump\n",
      "\n",
      "#Greater than 1 hence supecritical\n",
      "\n",
      "y2=0.5*y1*(-1+((1+8*Fr1**2)**0.5)) #Post Jump Height\n",
      "V2=(y1/y2)*V1 #Velocity post jump in m/s\n",
      "\n",
      "Fr2=V2/((g*y2)**0.5) #Froude Number after Jump\n",
      "\n",
      "#Part(b)\n",
      "h_L=y1-y2+(V1**2-V2**2)/(2*g) #Head Loss in m\n",
      "\n",
      "Es1=y1+V1**2/(2*g) #Specific Energy before jump in m\n",
      "\n",
      "Dissipation_Ratio=h_L/Es1 #Dissipiation Ratio\n",
      "\n",
      "#Part(c)\n",
      "m_dot=rho*b*y1*V1 #Mass Flow rate in kg/s\n",
      "\n",
      "E_dissipiated=m_dot*g*h_L #Energy Dissipiated in kW\n",
      "\n",
      "#Result \n",
      "print \"The Depth of flow after the Jump is\",round(y2,2),\"m and the Froude Number is\",round(Fr2,3)\n",
      "print \"The head loss is\",round(h_L,3),\"m and the Energy Dissipation Ratio is\",round(Dissipation_Ratio,3)\n",
      "print \"The energy wasted is\",round(E_dissipiated/1000),\"kW\"\n",
      "#NOTE:Answer differ due to decimal point accuracy"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "56000.0\n",
        "The Depth of flow after the Jump is 2.46 m and the Froude Number is 0.465\n",
        "The head loss is 0.577 m and the Energy Dissipation Ratio is 0.175\n",
        "The energy wasted is 317.0 kW\n"
       ]
      }
     ],
     "prompt_number": 57
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-9,Page No:738"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "y1=3 #Depth of flow in m\n",
      "a=0.25 #Height of Sluice Gate in m\n",
      "y2=1.5 #Depth of flow after the turbulence subsides in m\n",
      "Cd=0.47 #Coefficient of Discharge\n",
      "b=6 #Width of the channel in m\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "\n",
      "#Calculations\n",
      "depth_ratio1=y1/a #Depth ratio\n",
      "depth_ratio2=y2/a #Depth ratio\n",
      "V_dot=Cd*b*a*((2*g*y1)**0.5) #Volumetric Flow rate in m^3/s\n",
      "\n",
      "#Result\n",
      "print \"The volumetric Flow rate is\",round(V_dot,2),\"m^3/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The volumetric Flow rate is 5.41 m^3/s\n"
       ]
      }
     ],
     "prompt_number": 58
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-10, Page No:745"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "V1=1.2 #Velocity in m/s\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "y1=0.8 #Depth of flow before encounternign the bump in m\n",
      "delta_zb=0.15 # depth in m\n",
      "\n",
      "#Calculations\n",
      "Fr1=V1/((g*y1)**0.5) #Froude Number\n",
      "yc=((y1**2*V1**2)/g)**0.33 #Critical depth in m\n",
      "\n",
      "#Flow is subcritical\n",
      "Es1=y1+(V1**2/(2*g)) #Specific Energy in m\n",
      "\n",
      "#Solving the equation\n",
      "coeff=[1,-0.723,0,0.047]\n",
      "y=numpy.roots(coeff) #Depth of flow in m\n",
      "\n",
      "Depression=y1-(y[0]+delta_zb)\n",
      "\n",
      "#Result\n",
      "print \"The depression of the water surface is present and is\",round(Depression,2),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The depression of the water surface is present and is 0.06 m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13-11, Page No:746"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Decleration\n",
      "y1=1.5 #Depth of flow in m\n",
      "Pw=0.6 #Height in m\n",
      "b=5 #Width in m\n",
      "g=9.81 #Acceleration due to gravity in m/s^2\n",
      "\n",
      "#Calculations\n",
      "H=y1-Pw #Weir Head in m\n",
      "\n",
      "#Using the Discharge Coefficient Formula\n",
      "Cwd_rec=0.598+(0.0897*(H/Pw)) #Coefficient of Discharge\n",
      "\n",
      "V_dot=(2*Cwd_rec*b*(2*g)**0.5*(H**1.5))/3 #Volumetric Flow rate in m^3/s\n",
      "\n",
      "#Result\n",
      "print \"The Volumetric Flow rate is\",round(V_dot,2),\"m^3/s\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Volumetric Flow rate is 9.23 m^3/s\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}