summaryrefslogtreecommitdiff
path: root/Hydraulics_Made_Easy/ch10.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Hydraulics_Made_Easy/ch10.ipynb')
-rwxr-xr-xHydraulics_Made_Easy/ch10.ipynb497
1 files changed, 497 insertions, 0 deletions
diff --git a/Hydraulics_Made_Easy/ch10.ipynb b/Hydraulics_Made_Easy/ch10.ipynb
new file mode 100755
index 00000000..0162251f
--- /dev/null
+++ b/Hydraulics_Made_Easy/ch10.ipynb
@@ -0,0 +1,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": {}
+ }
+ ]
+} \ No newline at end of file