diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | db0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch) | |
tree | b95975d958cba9af36cb1680e3f77205354f6512 /sample_notebooks/MaulikRathod/ch11_1.ipynb | |
parent | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff) | |
download | Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2 Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip |
add books
Diffstat (limited to 'sample_notebooks/MaulikRathod/ch11_1.ipynb')
-rwxr-xr-x | sample_notebooks/MaulikRathod/ch11_1.ipynb | 573 |
1 files changed, 573 insertions, 0 deletions
diff --git a/sample_notebooks/MaulikRathod/ch11_1.ipynb b/sample_notebooks/MaulikRathod/ch11_1.ipynb new file mode 100755 index 00000000..f4d8bc9d --- /dev/null +++ b/sample_notebooks/MaulikRathod/ch11_1.ipynb @@ -0,0 +1,573 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:af2e84ceb74c3bc3148f31759e2a692dba979671e7232787c666481af8571437" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : SPILLWAYS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 pg : 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Given\n", + "h = 1.2; \t\t\t\t#head of water\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "rho = 1; \t\t\t\t#density of water\n", + "gamma_w = 9.81; \t\t\t\t#unit weigth of water\n", + "\n", + "q = Cd*h**1.5;\n", + "\n", + "#applying bernaulli's equation at u/s water surface at section A and B\n", + "#solving it by error and trial method we get\n", + "v1 = 13.7;v2 = 14.7;\n", + "d1 = 0.212;d2 = 0.197;\n", + "\n", + "F1 = gamma_w*d1**2*math.cos(math.radians(60))/2;\n", + "F2 = gamma_w*d2**2/2;\n", + "W = gamma_w*60*2*math.pi*3*((d1+d2)/2)/360;\n", + "Fx = rho*q*(v2-v1*math.cos(math.radians(60)))-F1/2+F2;\n", + "Fy = rho*q*(v1*math.sin(math.radians(60)))+F1*math.sin(math.radians(60))+W;\n", + "F = (Fx**2+Fy**2)**0.5;\n", + "F = round(F*100)/100;\n", + "\n", + "# Results\n", + "print \"Resultant force = %.2f kN/m.\"%(F);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force = 46.68 kN/m.\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2 pg : 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\t\t\t\t\n", + "#Given\n", + "C = 2.4; \t\t\t\t#coefficient of discharge\n", + "H = 2; \t\t\t\t#head\n", + "L = 100; \t\t\t\t#length of spillway\n", + "wc = 8; \t\t\t\t#heigth of weir crest above bottom\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "h = H+wc;\n", + "Q1 = C*L*H**(1.5); \t\t\t\t#neglecting approach velocity and end contractions\n", + "va = Q1/(h*L);\n", + "ha = va**2/(2*g);\n", + "Ha = ha+H;\n", + "Q = C*L*Ha**1.5;\n", + "Q = round(Q*10)/10;\n", + "\n", + "# Results\n", + "print \"discharge over oggy weir = %.2f cumecs.\"%(Q);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "discharge over oggy weir = 690.80 cumecs.\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#capacity of siphon\n", + "#head required in oggy spillway\n", + "#length of oggy weir required\n", + "\n", + "#Given\n", + "t = 6; \t\t\t\t#tail water elevation\n", + "h = 1; \t\t\t\t#heigth of siphon spillway\n", + "w = 4; \t\t\t\t#width of siphon spillway\n", + "hw = 1.5; \t\t\t\t#head water elevation\n", + "C = 0.6; \t\t\t\t#coefficient of discharge\n", + "Co = 2.25; \t\t\t\t#coefficient of discharge of oggy spillway\n", + "lo = 4; \t\t\t\t#length of oggy spillway\n", + "hc = 1.5; \t\t\t\t#head on weir crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations and Results\n", + "#part (a)\n", + "Q = C*h*w*(2*g*(t+hw))**0.5;\n", + "Q = round(Q*10)/10;\n", + "print \"capacity of siphon = %.2f cumecs.\"%(Q);\n", + "\n", + "#part (b)\n", + "h1 = (Q/(Co*lo))**(2./3);\n", + "h1 = round(h1*100)/100;\n", + "print \"head required in oggy spillway = %.2f m\"%(h1);\n", + "\n", + "#part (c)\n", + "L = Q/(Co*(hc)**1.5);\n", + "L = round(L*100)/100;\n", + "print \"length of oggy weir required = %.2f m.\"%(L);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacity of siphon = 29.10 cumecs.\n", + "head required in oggy spillway = 2.19 m\n", + "length of oggy weir required = 7.04 m.\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 pg : 540" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "rl = 435; \t\t\t\t#full reservior level\n", + "cl = 429.6; \t\t\t\t#level of centre of siphon\n", + "hfl = 435.85; \t\t\t\t#high flood level\n", + "hfd = 600; \t\t\t\t#high flood discharge\n", + "w = 4; \t\t\t\t#width of throat\n", + "h = 2; \t\t\t\t#heigth of throat\n", + "C = 0.65; \t\t\t\t#coefficient of discharge\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "\n", + "# Calculations\n", + "H = hfl-cl;\n", + "Q = C*w*h*(2*g*H)**0.5;\n", + "n = hfd/Q;\n", + "n = round(n*100)/100;\n", + "\n", + "# Results\n", + "print \" number of siphons units required = %.2f.hence provide 11 siphons units.\"%(n);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " number of siphons units required = 10.42.hence provide 11 siphons units.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 pg : 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import arange,zeros\n", + "\n", + "#design oggy spillway for concrete gravity dam\n", + "\n", + "#Given\n", + "rbl = 250; \t\t\t\t#avarage river bed level\n", + "rlc = 350; \t\t\t\t#R.L of spillway crest\n", + "s = 0.75; \t\t\t\t#slope on downstream side\n", + "Q = 6500; \t\t\t\t#discharge\n", + "L = 5*9; \t\t\t\t#length of spillway\n", + "Cd = 2.2; \t\t\t\t#coefficient of discharge\n", + "t = 2; \t\t\t\t#thickness of each pier\n", + "\n", + "#step 1. computation of design head\n", + "H = (Q/(Cd*L))**(2./3);\n", + "P = rlc-rbl;\n", + "\n", + "#P/H = 6.15,which is<1.33;it is a high overflow spillway\n", + "\n", + "#H+P/H = 7.15>1.7; hence discharge coefficient is not affected by downstream apron interface\n", + "\n", + "Kp = 0.01;\n", + "Ka = 0.1;\n", + "N = 4;\n", + "He = 17.5; \t\t\t\t#assumed\n", + "Le = L-2*(N*Kp+Ka)*He;\n", + "He1 = (Q/(Cd*Le))**(2./3);\n", + "He1 = round(He1*100)/100;\n", + "#He1 is almost equal to He\n", + "print \"crest profile will be designed for Hd = %.2f m.\"%(He1);\n", + "\n", + "#step 2. determination of d/s profile\n", + "\n", + "#equating the slope of d/s side and derivative of profile equation suggested by WES\n", + "x = 27.03;\n", + "y = 0.04372*x**1.85;\n", + "print \"downstream profile:\";\n", + "x = arange(1,27)\n", + "y = zeros(26)\n", + "for i in range(26):\n", + " y[i] = 0.04372*x[i]**1.85;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(26):\n", + " print \"%i %.2f\"%(x[i],y[i]);\n", + "\n", + "print \"27.03 19.48\";\n", + "#step 3. determination of u/s profile\n", + "# math.cosidering equation for vertical u/s face and Hd = 17.58\n", + "\n", + "print \"upstream profile:\";\n", + "x = [-0.5, -0.1, -1.5, -2.0, -3.0, -4.0, -4.75];\n", + "y = zeros(7)\n", + "for i in range(7):\n", + " if i==6:\n", + " y[i] = 0.0633*(x[i]+4.75)**1.85+2.2151-1.2643*(x[i]+4.75)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + " continue\n", + " \n", + " y[i] = 0.0633*(x[i]+4.7466)**1.85+2.2151-1.2643*(x[i]+4.7466)**0.625;\n", + " y[i] = round(y[i]*1000)/1000;\n", + "\n", + "print \"x y\";\n", + "for i in range(7):\n", + " print \"%.2f %.2f\"%(x[i],y[i]);\n", + "\n", + "\n", + "#step 4.design of d/s bucket\n", + "\n", + "R = P/4;\n", + "print \"radius of bucket = %i m.\"%(R);\n", + "print \"bucket will subtend angle of 60 degree at the centre.\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "crest profile will be designed for Hd = 17.58 m.\n", + "downstream profile:\n", + "x y\n", + "1 0.04\n", + "2 0.16\n", + "3 0.33\n", + "4 0.57\n", + "5 0.86\n", + "6 1.20\n", + "7 1.60\n", + "8 2.05\n", + "9 2.55\n", + "10 3.10\n", + "11 3.69\n", + "12 4.34\n", + "13 5.03\n", + "14 5.77\n", + "15 6.55\n", + "16 7.38\n", + "17 8.26\n", + "18 9.18\n", + "19 10.15\n", + "20 11.16\n", + "21 12.21\n", + "22 13.31\n", + "23 14.45\n", + "24 15.63\n", + "25 16.86\n", + "26 18.13\n", + "27.03 19.48\n", + "upstream profile:\n", + "x y\n", + "-0.50 0.01\n", + "-0.10 -0.00\n", + "-1.50 0.14\n", + "-2.00 0.25\n", + "-3.00 0.60\n", + "-4.00 1.20\n", + "-4.75 2.21\n", + "radius of bucket = 25 m.\n", + "bucket will subtend angle of 60 degree at the centre.\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 pg : 562" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\t\t\t\t#design length and depth of stilling bamath.sin\n", + "\t\t\t\t\n", + "#Given\n", + "q = 1; \t\t\t\t#discharge of spillway\n", + "Cd = 0.7; \t\t\t\t#coefficient of discharge\n", + "h1 = 10; \t\t\t\t#heigth of crest above downstream silting bamath.sin\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "Cv = 0.9; \t\t\t\t#coefficient of velocity\n", + "\n", + "# Calculations\n", + "h = (3*q/(2*Cd*(2*g)**0.5))**(2./3);\n", + "H = h1+h/2;\n", + "vt = (2*g*H)**0.5;\n", + "v1 = Cv*vt;\n", + "y1 = q/v1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\t\t\t\t#F>1, flow is super-critical\n", + "y2 = 1;\n", + "v2 = q/y2;\n", + "F2 = v2/(g*y2)**0.5; \t\t\t\t#<1\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-1;\n", + "le = 5*(y2-y1);\n", + "de = round(de*1000)/1000;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 0.58 m.\n", + "length of stilling bamath.sin = 7.50 m.\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.7 pg : 563" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 7.83; \t\t\t\t#discharge through spillway\n", + "w = 12.5; \t\t\t\t#width of fall\n", + "d = 2.; \t\t\t\t#depth of water in downstream\n", + "g = 9.8;\n", + "\n", + "y1 = 0.5;\n", + "v1 = q/y1;\n", + "F1 = v1/(g*y1)**0.5;\n", + "\n", + "#F>1,flow is super-critical\n", + "\n", + "# Calculations\n", + "v2 = q/d;\n", + "F2 = v2/(g*d)**0.5;\n", + "y2 = (y1/2)*((1+8*F1**2)**0.5-1);\n", + "de = y2-d;\n", + "le = 5*(y2-y1);\n", + "de = round(de*100)/100;\n", + "le = round(le*10)/10;\n", + "\n", + "# Results\n", + "print \"stilling bamath.sin should be depressed by %.2f m.\"%(de);\n", + "print \"length of stilling bamath.sin = %.2f m.\"%(le); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "stilling bamath.sin should be depressed by 2.76 m.\n", + "length of stilling bamath.sin = 21.30 m.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "Ag = 5*2.5; \t\t\t\t#area of gate\n", + "miu = 0.25; \t\t\t\t#coefficient of friction\n", + "w = 0.5; \t\t\t\t#weigth of gate\n", + "h = 2; \t\t\t\t#head of water over crest\n", + "g = 9.81; \t\t\t\t#acceleration due to gravity\n", + "gamma_w = 1000; \t\t\t\t#unit weigth of water\n", + "\n", + "\n", + "# Calculations\n", + "m = w*g*1000;\n", + "F = gamma_w*Ag*h*h*g/10;\n", + "ff = miu*F;\n", + "tf = (m+ff)/1000;\n", + "\n", + "# Results\n", + "print \"force to be exerted to lift the gate = %.2f kN.\"%(tf);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "force to be exerted to lift the gate = 17.17 kN.\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 pg : 564" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "\n", + "\t\t\t\t\n", + "#Given\n", + "q = 19; \t\t\t\t#dischrge through spillway\n", + "E = 1; \t\t\t\t#energy loss\n", + "\n", + "\t\t\t\t#from energy loss equation;E = (y2-y1)**3/4y2y1; and solving it we get\n", + "\t\t\t\t#x = 0.5*(-1+(1+294.39*(x-1)**9/64*x**3))\n", + "\t\t\t\t#by trial and error method x = 2.806\n", + "x = 2.806;\n", + "y1 = 4*x/(x-1)**3;\n", + "y2 = x*y1;\n", + "y1 = round(y1*1000)/1000;\n", + "y2 = round(y2*1000)/1000;\n", + "print \"depth of flow at both end of jumps = %.2f m and %.2f m. respectively.\"%(y1,y2);\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth of flow at both end of jumps = 1.91 m and 5.35 m. respectively.\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |