summaryrefslogtreecommitdiff
path: root/Hydraulics_Made_Easy_by_R._S._Dighe/ch10.ipynb
blob: 0162251f96dd29f8e3b886cecccdaa8aa5884c8f (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:2a1a58d10d8bc25ee316405092c20184a6b3d847d7641c4fa061749730145581"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10 : Miscellaneous Problems"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1 Page No : 316"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "#initialisation of variables\n",
      "w = 62.4 \t\t#lb/ft**3\n",
      "x = 8.  \t\t#ft\n",
      "A = 16. \t\t#ft**2\n",
      "X = 2.5 \t\t#ft\n",
      "X1 = 0.66 \t\t#ft\n",
      "x1 = 3.834 \t\t#ft\n",
      "x2 = 2.182 \t\t#ft\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "P = w*x*A\n",
      "y = A/3\n",
      "P1 = w*x*A*0.5*X1\n",
      "R = math.sqrt(P1**2+P**2)\n",
      "m = P1/P\n",
      "X2 = x1-x2\n",
      "C = ((2./3)*A)-m*X\n",
      "Y = m*X2+ C\n",
      "print P1\t\n",
      "#RESULTS\n",
      "print  'Water pressure on vertical face  = %.f lbs'%(round(P,-3))\n",
      "print  ' pressure which acts at the base  = %.2f ft'%(y)\n",
      "print  ' Resultant  = %.f lbs'%(R)\n",
      "print  ' x coordinate of the resultant  = %.3f ft'%(X2)\n",
      "print  ' y coordinate of the resultant  = %.3f ft'%(Y)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "2635.776\n",
        "Water pressure on vertical face  = 8000 lbs\n",
        " pressure which acts at the base  = 5.33 ft\n",
        " Resultant  = 8411 lbs\n",
        " x coordinate of the resultant  = 1.652 ft\n",
        " y coordinate of the resultant  = 10.387 ft\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2 Page No : 319"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "s = 13.6\n",
      "h = 12. \t\t#in\n",
      "u = 0.04\n",
      "k = 1.\n",
      "d = 6.   \t\t#in\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "w = 62.4 \t\t#lbs/ft**3\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "h1 = h*(s-1)/12\n",
      "hf = u*h1\n",
      "hn = h1-hf\n",
      "Q = k*math.pi/4*(d/12)**2*8.02*math.sqrt(hn)/(math.sqrt(16-k))\n",
      "Q = Q*60*w/10        # fro, cusecs to GPM\n",
      "\n",
      "#RESULTS\n",
      "print  'discharge through flow = %.f ft G.P.M'%(Q)\n",
      "\n",
      "# rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "discharge through flow = 529 ft G.P.M\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3 Page No : 321"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "za = 16. \t\t#ft\n",
      "h1 = 2. \t\t#ft\n",
      "h2 = 3. \t\t#ft\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "vc = math.sqrt(2*g*(za-h1-h2))\n",
      "vb = vc*(h1/(2*h1))**2\n",
      "r = -h1-h2-(vb**2/(2*g))\n",
      "r1 = r+34\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'pressure head at B = %.1f ft lb'%(r1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "pressure head at B = 28.3 ft lb\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.4 Page No : 322"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "Cd = 0.62\n",
      "a = 90. \t\t#degrees\n",
      "H1 = 14. \t\t#in\n",
      "H2 = 8. \t\t#in\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "Q1 = (8./15)*Cd*math.sqrt(2*g)*math.tan(math.radians(a/2))*(H1/12)**(5/2.)\n",
      "Q2 = (8./15)*Cd*math.sqrt(2*g)*math.tan(math.radians(a/2))*(H2/12)\n",
      "Q = Q1-Q2\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'Discharge through notch = %.2f cuses'%(Q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Discharge through notch = 2.13 cuses\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.5 Page No : 324"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "Cd = 0.62\n",
      "d = 5./4 \t\t#in\n",
      "h = 9. \t\t#ft\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "T = (2./3)*math.pi*(h)**(3./2)/(Cd*(math.pi/4)*math.sqrt(2*g)*(d/12)**2)\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'time required to lower water level = %.f secs'%(T)\n",
      "\n",
      "# rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "time required to lower water level = 1334 secs\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.6 Page No : 325"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "a = 60. \t\t#degrees\n",
      "d = 4.  \t\t#in\n",
      "Cd = 0.62\n",
      "h = 5. \t    \t#ft\n",
      "w = 30. \t\t#ft\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "H1 = 10*math.sin(math.radians(a))\n",
      "H2 = H1-h\n",
      "T = (2*w/math.tan(math.radians(a)))*(2./3)*(H1**(3./2)-H2**(3./2))/(Cd*math.sqrt(2*g)*math.pi/(4*(d/12)**2))*100\n",
      "\n",
      "#RESULTS\n",
      "print  'time required to lower water level = %.f secs'%(T)\n",
      "\n",
      "# answer is accurate.please check manually"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "time required to lower water level = 1214 secs\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.7 Page No : 326"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "p1 = 40. \t\t#percent\n",
      "p2 = 35. \t\t#percent\n",
      "dh = 200. \t\t#ft\n",
      "f = 0.1\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "l = 2000. \t\t#ft\n",
      "d = 1.   \t\t#ft\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "hf1 = p1*dh/100\n",
      "hf2 = p2*dh/100\n",
      "hf3 = (100-p1-p2)*dh/100\n",
      "hft = hf1+hf2+hf3\n",
      "v1 = math.sqrt(2*g*hf1/(4*f*l))\n",
      "Q = v1*math.pi*d**2/4\n",
      "d2 = (Q*7*math.sqrt(3/(5*g)))**(2./3)\n",
      "v3 = Q*4*(4./3)**2/math.pi\n",
      "l3 = hf2*2*g*(3./4)/(4*f*v3**2)\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'proportion of the quantity folwing in the bypass to the whole pass = %d ft'%(l3)\n",
      "\n",
      "# rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "proportion of the quantity folwing in the bypass to the whole pass = 415 ft\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.8 Page No : 328"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "d = 1. \t    \t#ft\n",
      "l = 2000. \t\t#ft\n",
      "f = 0.038\n",
      "g = 32.2 \t\t#/ft/sec**2\n",
      "Q = 6.   \t\t#cuses\n",
      "l1 = 1500. \t\t#ft\n",
      "r = 2.\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "v = 4*Q/(d**2*math.pi)\n",
      "hf = 4*f*l*v**2/(2*g)\n",
      "v1 = math.sqrt(hf*2*g/(4*f*l1+4*f*(l-l1)*r**2))\n",
      "v3 = r*v1\n",
      "Q1 = math.pi*d**2*v3/4\n",
      "Q2 = math.pi*d**2*v1/4\n",
      "r1 = Q2/Q1\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'proportion of the quantity folwing in the bypass to the whole pass = %.1f '%(r1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "proportion of the quantity folwing in the bypass to the whole pass = 0.5 \n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.9 Page No : 329"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "f = 0.01\n",
      "d = 3. \t\t#in\n",
      "l = 22. \t\t#ft\n",
      "l1 = 20. \t\t#ft\n",
      "w = 20. \t\t#ft\n",
      "h = 5. \t\t#ft\n",
      "h1 = 20. \t\t#ft\n",
      "t = 4. \t\t#min\n",
      "g = 32.2 \t\t#ft/sec**2\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "h2 = h+h1\n",
      "h3 = (h-(t*60*math.pi*math.sqrt(2*g/h)/(l1*w*2*64)))**2-4\n",
      "dh = h2-h3\n",
      "Q = dh*l1*w\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'Quantiy discharged = %.f cuses '%(round(Q,-2))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Quantiy discharged = 1800 cuses \n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.10 Page No : 332"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\t\n",
      "#initialisation of variables\n",
      "g = 32.2     \t\t#ft/sec**2\n",
      "sct = 1.6\n",
      "sl = 0.8\n",
      "K = 0.98\n",
      "dh1 = 4.      \t\t#ft\n",
      "W = 62.4     \t\t#lbs/ft**3\n",
      "d1 = 8.       \t\t#in\n",
      "d2 = 6.       \t\t#in\n",
      "\n",
      "\t\t\n",
      "#CALCULATIONS\n",
      "dp = dh1*((sct/sl)-1)\n",
      "C = math.sqrt(2*g)*math.pi*(d1/24)**2 /math.sqrt((d1**2/d2**2)**2 -1)\n",
      "Q = C*K*math.sqrt(dh1)\n",
      "\n",
      "\t\t\n",
      "#RESULTS\n",
      "print  'Discharge passing through the pipe = %.1f cuses '%(Q)\n",
      "\t\t#The answer given in textbook is wrong. Please verify it.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Discharge passing through the pipe = 3.7 cuses \n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}