diff options
Diffstat (limited to 'Problems_In_Hydraulics')
-rwxr-xr-x | Problems_In_Hydraulics/README.txt | 10 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch1.ipynb | 466 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch10.ipynb | 589 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch11.ipynb | 745 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch12.ipynb | 294 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch13.ipynb | 624 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch2.ipynb | 222 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch3.ipynb | 251 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch4.ipynb | 291 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch5.ipynb | 422 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch6.ipynb | 757 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch7.ipynb | 453 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch8.ipynb | 296 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/ch9.ipynb | 323 | ||||
-rwxr-xr-x | Problems_In_Hydraulics/screenshots/1Hydrostatics.png | bin | 0 -> 124458 bytes | |||
-rwxr-xr-x | Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png | bin | 0 -> 120873 bytes | |||
-rwxr-xr-x | Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png | bin | 0 -> 118705 bytes |
17 files changed, 5743 insertions, 0 deletions
diff --git a/Problems_In_Hydraulics/README.txt b/Problems_In_Hydraulics/README.txt new file mode 100755 index 00000000..058b166c --- /dev/null +++ b/Problems_In_Hydraulics/README.txt @@ -0,0 +1,10 @@ +Contributed By: Ankit Barot +Course: btech +College/Institute/Organization: Anupam-Mistubishi Heavy Industries Ltd., India +Department/Designation: Graduate Engineer Trainee +Book Title: Problems In Hydraulics +Author: R. S. Paradise +Publisher: Blcakie & Son Ltd, London +Year of publication: 1953 +Isbn: 978-1577664550 +Edition: 3
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch1.ipynb b/Problems_In_Hydraulics/ch1.ipynb new file mode 100755 index 00000000..8ed87e00 --- /dev/null +++ b/Problems_In_Hydraulics/ch1.ipynb @@ -0,0 +1,466 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:82344ff688f3e86a09716345a8eb43cec4a8aadc2157f526516e21d9f1e84d30" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Hydrostatics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "w= 62.4 #lb/ft**3\n", + "A= 18. #ft**2\n", + "x= 6. # height ft\n", + "kg= 6.\n", + "y= 2. #ft hinges\n", + "y1= 5. #ft\n", + "\n", + "#CALCULATIONS\n", + "F= w*A*x\n", + "F1= F/2\n", + "Ft= (F*y-F1*(y1/2))/y1\n", + "Fb= F1-Ft\n", + "\n", + "#RESULTS\n", + "print 'Force exerted on the bolt = %.f lb'%(F1)\n", + "print ' Force exerted on the hinge = %.f lb'%(Ft)\n", + "print ' Force exerted on the bolt = %.f lb'%(Fb)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force exerted on the bolt = 3370 lb\n", + " Force exerted on the hinge = 1011 lb\n", + " Force exerted on the bolt = 2359 lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "h1= 11.54 \t#ft\n", + "h2= 16.33 \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "x1= 7.69 \t#ft\n", + "x2= 14.09 \t#ft\n", + "x3= 18.23 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Ft= round(w*h1**2/2)\n", + "\n", + "#RESULTS\n", + "print 'h1 = %.2f ft'%(h1)\n", + "print ' h2 = %.2f ft'%(h2)\n", + "print ' h1+ = %.2f ft'%(x1)\n", + "print ' h2+ = %.2f ft'%(x2)\n", + "print ' h3+ = %.2f ft'%(x3)\n", + "print ' Thrust force = %.f lb/ft run'%(round(Ft,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h1 = 11.54 ft\n", + " h2 = 16.33 ft\n", + " h1+ = 7.69 ft\n", + " h2+ = 14.09 ft\n", + " h3+ = 18.23 ft\n", + " Thrust force = 4160 lb/ft run\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "spo= 0.9 # gravity\n", + "h= 3. \t#ft depth\n", + "d= 2. \t #ft depth of water\n", + "w= 62.4 \t#lb/ft**3\n", + "H= 0.71 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "do= spo*w\n", + "de= w*d\n", + "bc= do*h\n", + "Pt= (bc*(h/2)+bc*d+de*(d/2))*(h+d)\n", + "y= (bc*(h/2)+bc*d+de*(d/2)*(d/3))*(h+d)/Pt+H\n", + "\n", + "#RESULTS\n", + "print \"Total pressure = %d lb\"%(Pt)\n", + "print ' position of centre of pressure above the base = %.2f ft position of centre of pressure above the axis '%(y)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure = 3572 lb\n", + " position of centre of pressure above the base = 1.65 ft position of centre of pressure above the axis \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#initialisation of variables\n", + "a= 30. \t#degrees\n", + "b= 30. \t#degrees\n", + "h= 20. \t#ft width of lock\n", + "h1= 10. \t#ft water level\n", + "h2= 15. \t#ft water level\n", + "h3= 16. \t#ft high\n", + "w= 62.4 \t#lb/ft**3\n", + "h4= 10./3 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Rt= (1./h3)*((w*(h*h2**2*(h2/3)/(2*math.sqrt(3))))-(w*(h*h1**2*h4/(2*math.sqrt(3)))))\n", + "R= ((w*(h*h2**2/(2*math.sqrt(3))))-(w*(h*h1**2/(2*math.sqrt(3)))))\n", + "Rb= R-Rt\n", + "\n", + "#RESULTS\n", + "print 'Force at the hinge = %.f lb '%(Rt)\n", + "print ' Force at the hinge = %.f lb '%(Rb)\n", + "\n", + "# Note : Round off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force at the hinge = 17826 lb \n", + " Force at the hinge = 27208 lb \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "#initialisation of variables\n", + "x= 32. \t #ft\n", + "h= 60. \t#ft depth\n", + "w= 62.4 \t#lb/ft**3\n", + "AE= 20. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Vabc= 2*x*h/3\n", + "vc= Vabc*w\n", + "Tab= w*h**2/2\n", + "Rt= math.sqrt(vc**2+Tab**2)/2240\n", + "A= math.degrees(math.atan(vc/Tab))\n", + "AD= x-AE+AE*(1/(math.tan(math.radians(A))))\n", + "\n", + "\n", + "#RESULTS\n", + "print \"resulmath.tant thrust = %.1f tons\"%(Rt)\n", + "print \" Angle = %.2f degrees\"%(A)\n", + "print ' AD = %.1f ft '%(AD)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resulmath.tant thrust = 61.5 tons\n", + " Angle = 35.42 degrees\n", + " AD = 40.1 ft \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "wdc= 3*math.sqrt(3) \t#ft\n", + "wdo= math.sqrt(3)\n", + "ac= 30. \t#degrees\n", + "ao= 60. \t#degrees\n", + "hob= 3. \t#ft\n", + "haf= 2.6 \t#ft\n", + "hfc= 3. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "V= 5.63 \t#ft**3\n", + "h= 4.3 \t#ft\n", + "y= 3.6 \t #ft\n", + "\n", + "#CALCULATIONS\n", + "W1= int(wdc*hfc*w/2)\n", + "Hbc= round(w*hob*(hob/2))\n", + "W2= int(V*w)\n", + "W3= int(w*haf*h)\n", + "Vt= W1+W2\n", + "Vht= Hbc+W3\n", + "Rt= int(math.sqrt(Vt**2+Vht**2))\n", + "A= math.degrees(math.atan(Vht/Vt))\n", + "x= (W1*(wdo-(hob/2))+Hbc*y)/Rt\n", + "OP= x/math.sin(math.radians(A))\n", + "AP= hob+OP\n", + "\n", + "#RESULTS\n", + "print \"Resultant thrust = %d lb\"%(Rt)\n", + "print \" Angle = %.2f degrees \"%(A)\n", + "print ' Distance from A till horizontal thrust = %.3f ft '%(AP)\n", + "\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant thrust = 1287 lb\n", + " Angle = 49.44 degrees \n", + " Distance from A till horizontal thrust = 4.150 ft \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 96. # T air\n", + "T= 10.5 \t#C\n", + "K1= 288. \t#C temperature gound level\n", + "K2= 0.0015 \t#C**-1 temperature gradient\n", + "h= 3000. \t#ft height\n", + "P1= 14.69\n", + "\n", + "#CALCULATIONS\n", + "P2= P1*10**(((1/(r*K2))*math.log10((K1-K2*h)/K1)))\n", + "w= P2*144/(r*(273+T))\n", + "\n", + "#RESULTS\n", + "print 'Density = %.4f lb/ft**3 '%(w)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density = 0.0697 lb/ft**3 \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Hb= 20. \t#in ratio\n", + "Ha= 1. \t#in ratio\n", + "a= 20. \t #degrees\n", + "\n", + "#CALCULATIONS\n", + "hb= Hb*math.sin(math.radians(a))\n", + "dh= hb+Ha\n", + "dP= dh/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Pressure difference between tapping points = %.3f lb/in**2 '%(dP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure difference between tapping points = 0.283 lb/in**2 \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 180. \t#ln/in**2 pressure\n", + "r= 53. #T air\n", + "T= 60. \t#F temperature of air\n", + "w= 62.4 \t#lb/ft**3\n", + "h= 12. \t #in water level\n", + "\n", + "#CALCULATIONS\n", + "R= P*144/(r*(460+T))\n", + "dP= 12*(1-(R/w))\n", + "Pab= dP/(12*2.309)\n", + "\n", + "#RESULTS\n", + "print 'Difference in water level = %.2f in of water '%(dP)\n", + "print \" Pressure difference = %.3f lb/in**2\"%(Pab)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in water level = 11.82 in of water \n", + " Pressure difference = 0.427 lb/in**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch10.ipynb b/Problems_In_Hydraulics/ch10.ipynb new file mode 100755 index 00000000..9cf18748 --- /dev/null +++ b/Problems_In_Hydraulics/ch10.ipynb @@ -0,0 +1,589 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:54b93ceee4137049e1ed8024ecd6ba8e7f6645f46f71063561c8d2f8b4589ff2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10 : Hydraulic Prime Movers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 231. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "vc= 0.97\n", + "r= 0.47\n", + "p= 85. \t#per cent\n", + "A= 170. \t#degrees\n", + "p1= 88. \t#per cent\n", + "l= 950. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "H= v**2/(vc**2*2*g)\n", + "u= r*v\n", + "vr= v-u\n", + "vr1= p*vr/100\n", + "w1= u-vr1*math.cos(math.radians(180-A))\n", + "W= u*(v-w1)/g\n", + "he= W*100/H\n", + "W1= p1*W/100\n", + "oe= W1*100/l\n", + "\n", + "#RESULTS\n", + "print 'hydraulic efficiency = %.f percent'%(he)\n", + "print ' overall efficiency = %.1f percent'%(oe)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hydraulic efficiency = 86 percent\n", + " overall efficiency = 70.2 percent\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 1. \t#in\n", + "v= 95. \t#ft/sec\n", + "F= 173.2 \t#lb\n", + "A= 163. \t#degrees\n", + "H= 500. \t#ft\n", + "Cv= 0.97\n", + "d1= 1.33 \t#ft\n", + "r= 0.47\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= w*math.pi*v/(144*4)\n", + "k= (F-v)/(v*math.cos(math.radians(180-A)))\n", + "v1= Cv*math.sqrt(2*g*H)\n", + "W= v1*w*d**2*math.pi/(4*144)\n", + "N= 60*r*v1/(math.pi*d1)\n", + "whp= (v1-v)*(1+k*math.cos(math.radians(180-A)))*v1*2/550\n", + "Ns= N*whp**0.5/H**1.25\n", + "\n", + "#RESULTS\n", + "print 'specific speed = %.2f r.p.m'%(Ns)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "specific speed = 4.75 r.p.m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.4 Page No : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "D= 2. \t#ft\n", + "f= 0.005\n", + "l= 10000. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "H= 1000. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "d= (2*D**5/(f*l))**0.25\n", + "v= math.sqrt(8*g*H*D**5/(f*l*d**4+4*D**5))\n", + "HP= w*math.pi*d**2*v**3/(2*g*550*4)\n", + "Q= math.pi*d**2*(HP/67)/4\n", + "\n", + "#RESULTS\n", + "print 'Quantity flowing = %.f cusecs'%(Q)\n", + "\n", + "# rounding off error\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity flowing = 185 cusecs\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No : 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "pl= 122.5 \t# ft\n", + "Hw= 1225 \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "Cd= 0.98\n", + "Cd1= 0.45\n", + "N= 500. \t#r.p.m\n", + "P= 6800. \t#h.p\n", + "n= 0.86\n", + "w= 62.4 \t#lb/ft**2\n", + "l= 5450. \t#ft\n", + "f= 0.005\n", + "A= 18. \t#ft**2\n", + "\n", + "#CALCULATIONS\n", + "Ah= Hw-pl\n", + "js= Cd*math.sqrt(2*g*Ah)\n", + "bs= Cd1*js\n", + "D= bs*60*2/(N*2*math.pi)\n", + "a= P*2*g*550*144/(n*w*js**3*2)\n", + "vp= math.sqrt(pl*2*g/(4*f*l))\n", + "dp= (js*2*4*A/(math.pi*144*vp))**(2./3)\n", + "dp=2.495 \t#ft\n", + "\n", + "#RESULTS\n", + "print 'diameter of bucket circle D = %.1f ft'%(D)\n", + "print ' area of jet = %.f in**2'%(a)\n", + "print ' diameter of pipe = %.1f ft'%(dp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of bucket circle D = 4.5 ft\n", + " area of jet = 18 in**2\n", + " diameter of pipe = 2.5 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No : 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "u= 10.*math.pi \t#ft/sec\n", + "u1= 5.*math.pi \t#ft/sec\n", + "a= 20. \t#degrees\n", + "A= 300. \t#r.p.m\n", + "v= 10. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "wi= 2. \t#ft\n", + "d= 6. \t#in\n", + "w1= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "w= v/math.tan(math.radians(a))\n", + "a1= math.degrees(math.atan((v/(u-w))))\n", + "b= math.degrees(math.atan((v/u1)))\n", + "W= u*w/g\n", + "A1= math.pi*wi*d/12\n", + "Q= A1*v\n", + "WHP= W*Q*w1/550\n", + "\n", + "#RESULTS\n", + "print 'Blade angle at inlet is given by = %.2f degrees'%(a1)\n", + "print ' Blade angle at inlet is given by = %.2f degrees'%(b)\n", + "print ' Water horse power = %.1f h.p'%(WHP)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Blade angle at inlet is given by = 68.49 degrees\n", + " Blade angle at inlet is given by = 32.48 degrees\n", + " Water horse power = 95.5 h.p\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "H= 100. \t#ft\n", + "a= 25. \t#degrees\n", + "a1= 20. \t#degrees\n", + "r1= 9./8\n", + "r2= 0.2\n", + "u= 6.63 \t#ft/sec\n", + "w= 62.4 \t#lb/ft**3\n", + "h1= 34. \t#ft\n", + "h2= 100. \t#ft\n", + "r= 0.1\n", + "\n", + "#CALCULATIONS\n", + "f= math.sqrt(H*g/((r1*1/math.tan(math.radians(a))*1/math.tan(math.radians(a1)))+r1*0.5+(r1*0.5**2*0.2/(math.sin(math.radians(a)))**2)+0.1/(math.sin(math.radians(a1+10)))**2))\n", + "W= u*f**2/g\n", + "q= a*H*550/(10*W*w)\n", + "q1= q/w\n", + "A= q/f\n", + "dh= h1+h2-((1+r)*f**2/((math.sin(math.radians(a1)))**2*2*g))\n", + "\n", + "#RESULTS\n", + "print 'f = %.1f ft/sec'%(f)\n", + "print ' Work Done = %.1f ft-lb/lb'%(W)\n", + "print ' Quantity flow = %.1f cusecs'%(q)\n", + "print ' Area form guides = %.3f ft**2'%(A)\n", + "print ' Pressure at entry of level = %.1f ft of water'%(dh)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f = 20.2 ft/sec\n", + " Work Done = 83.9 ft-lb/lb\n", + " Quantity flow = 26.3 cusecs\n", + " Area form guides = 1.302 ft**2\n", + " Pressure at entry of level = 74.5 ft of water\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8 Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#initialisation of variables\n", + "d= 8. \t#in\n", + "w= 2. \t#in\n", + "di= 12. \t#in\n", + "wi= 3. \t#in\n", + "a= 24. \t#degrees\n", + "p= 88. \t#per cent\n", + "a1= 85. \t#degrees\n", + "a2= 30. \t#degrees\n", + "p1= 94. \t#per cent\n", + "h= 180. \t#ft\n", + "d1= 18. \t#in\n", + "Cd= 0.92\n", + "g=32.2\n", + "n1= 111. \t#rpm\n", + "\n", + "#calculations\n", + "r1= 1./math.tan(math.radians(a))\n", + "r2= (1./math.tan(math.radians(a1)))+r1\n", + "r3= 2*r2/3\n", + "r4= (1/math.tan(math.radians(a2)))-r3\n", + "a3= math.tan(math.radians(1/r4))\n", + "r5= math.sin(math.radians(a3))\n", + "f= math.sqrt(g*h*(p/100.)/(r1*r2+r3*r4+(r5**2/2)))\n", + "A= r2*f/(d/12)\n", + "N= (A*60/(2*math.pi))-n1\n", + "W= (r1*r2+r3*r4)*f**2/g\n", + "Q= math.pi*(d1/12)*(w/12)*Cd*f*62.08\n", + "whp= W*Q/550\n", + "bhp= p1*whp/100\n", + "\n", + "#RESULTS\n", + "print 'Speed = %.f rpm'%(N)\n", + "print ' output horsepower = %.f hp'%(bhp)\n", + "\n", + "# slightly change in r1,r2,r3 and that leads to some error in answer. Please check manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed = 905 rpm\n", + " output horsepower = 369 hp\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.9 Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "N= 428.6 \t#r.p.m\n", + "D= 5. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "hp= 16800. \t#hp\n", + "Qw= 435. \t#cuses\n", + "g= 32.2 \t#ft/sec**2\n", + "v= 32. \t#ft/sec\n", + "v1= 24. \t#f/sec\n", + "H= 200. \t#ft\n", + "lh1= 0.32 \t#ft lb/lb\n", + "\n", + "#CALCULATIONS\n", + "u= math.pi*D*N/60\n", + "W= hp*550/(Qw*w)\n", + "w= W*g/u\n", + "a= math.radians(math.tan(v/w))\n", + "va= math.sqrt(w**2+v**2)\n", + "b= math.radians(math.tan(v/(u-w)))\n", + "B= 180-b\n", + "vew= va**2/(2*g)\n", + "ve1w= v1**2/(2*g)\n", + "LH= H+vew-ve1w-W+lh1\n", + "\n", + "#RESULTS\n", + "print ' Absolute velocity at entry to runner = %.1f ft/sec'%(va)\n", + "print ' Loss of head in runner = %.2f ft lb/lb'%(LH)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Absolute velocity at entry to runner = 102.8 ft/sec\n", + " Loss of head in runner = 15.05 ft lb/lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.10 Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "\n", + "#initialisation of variables\n", + "A1= 25. \t#degrees\n", + "A2= 80. \t#degrees\n", + "H1= 100. \t#ft\n", + "H2= 13. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "v= 8. \t#ft/sec\n", + "d= 3.5 \t#in\n", + "de= 15.4 \t#in\n", + "b= 1.5 \t#in\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "W= H1-H2-(v**2/(2*g))\n", + "f= math.sqrt(W*g/(1/math.tan(math.radians(A1))*(1/math.tan(math.radians(A1))-1/math.tan(math.radians(A2)))))\n", + "u= f*(1/math.tan(math.radians(A1))-1/math.tan(math.radians(A2)))\n", + "V= d*u/7.7\n", + "r= math.degrees(math.atan(f/V))\n", + "N= 60*u*12/(math.pi*de)\n", + "Q= math.pi*de*f*b/144\n", + "HP= Q*w*W/550\n", + "Ns= N*math.sqrt(HP)/H1**1.25\n", + "di= math.sqrt(Q*4*144/(math.pi*f))\n", + "\n", + "#RESULTS\n", + "print 'angle = %.f degrees'%(r)\n", + "print \" Angular speed = %.1f rpm\"%(Ns)\n", + "print ' inlet diameter to draft tube = %.2f in'%(di)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "angle = 48 degrees\n", + " Angular speed = 26.6 rpm\n", + " inlet diameter to draft tube = 9.61 in\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.12 Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "H= 82.1 \t#ft\n", + "h= 90. \t#ft\n", + "k= 0.00646\n", + "k1= 0.00454\n", + "vd= 11. \t#ft/sec\n", + "P= 0.53 \t#hp\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt((1/k))*math.sqrt(h-H)\n", + "Qu= Q/math.sqrt(H)\n", + "Q1= math.sqrt(vd/k1)\n", + "hf= Q1**2*k\n", + "Qu1= Q1/math.sqrt(h-hf)\n", + "Pu= P*(h-hf)**1.5\n", + "\n", + "#RESULTS\n", + "print 'Qu = %.2f cuses'%(Qu)\n", + "print ' Q = %.1f cuses'%(Q1)\n", + "print ' power Developed = %.f hp'%(Pu)\n", + "\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Qu = 3.86 cuses\n", + " Q = 49.2 cuses\n", + " power Developed = 340 hp\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch11.ipynb b/Problems_In_Hydraulics/ch11.ipynb new file mode 100755 index 00000000..3b3ec8a7 --- /dev/null +++ b/Problems_In_Hydraulics/ch11.ipynb @@ -0,0 +1,745 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f1e32f78d016d65eaf62d619ce157e62f2d402e55bfc70a9a046c3e8d919d007" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11 : Pumping Machinery" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No : 223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "\n", + "import math \n", + "h= 75. \t#ft\n", + "e= 0.75\n", + "k= 0.01\n", + "Q= 3000. \t#gal/min\n", + "k1= 1.2\n", + "N= 1500.\n", + "g= 32.2 \t#ft/sec**2\n", + "D= 0.836 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "W= h/e\n", + "v1= math.sqrt((W-h)/k)\n", + "Q1= Q/374.06\n", + "f1= Q1/(k1*D**2)\n", + "u1= math.pi*D*N/60\n", + "w1= W*g/u1\n", + "B= math.degrees(math.atan((f1/(u1-w1))))\n", + "\n", + "#RESULTS\n", + "print 'Diameter of impeller = %.3f ft '%(D)\n", + "print ' Blade angle at outlet edge of impeller = %.f degrees '%(B)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of impeller = 0.836 ft \n", + " Blade angle at outlet edge of impeller = 30 degrees \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3 Page No : 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 150. \t#ft**3/sec\n", + "A1= 750. \t#r.p.m\n", + "di= 21. \t#in\n", + "do= 30. \t#in\n", + "v= 50. \t#ft/sec\n", + "A= 70. \t#degrees\n", + "w= 4.\t#in\n", + "p= 30. \t#per cent\n", + "p1= 25. \t#per cent\n", + "sv= 12.8 \t#ft**3/lb\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "u= A1*2*math.pi*di/(24*60)\n", + "u1= A1*2*math.pi*do/(24*60)\n", + "f1= V/(math.pi*(do/12)*(1./3))\n", + "w1= u1-f1*1/math.tan(math.radians((A)))\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "P= (u1**2+v**2-(f1**2/(math.sin(math.radians(A)))**2))/(2*g)\n", + "h= 30*v1**2/(100*2*g)\n", + "Nh= v1**2/(20*2*g)\n", + "Prt= P+Nh\n", + "W= u1*w1/g\n", + "e= Prt*100/W\n", + "Power= Prt*V/(sv*550)\n", + "\n", + "#RESULTS\n", + "print 'Total pressure rise = %.1f ft of air'%(Prt)\n", + "print ' manometric efficiency = %.1f percent'%(e)\n", + "print ' Power = %.2f hp '%(Power)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total pressure rise = 137.9 ft of air\n", + " manometric efficiency = 58.5 percent\n", + " Power = 2.94 hp \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No : 228" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "u1= 90. \t#ft/sec\n", + "w1= 70. \t#ft\n", + "e= 0.8\n", + "h1= 10. \t#ft\n", + "h2= 16. \t#ft\n", + "h3= 5. \t#ft\n", + "k= 2./5\n", + "f1= 20. \t#ft/sec\n", + "f= 18. \t#ft/sec\n", + "a= 45. \t #degrees\n", + "x1= 164.4 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Hm= u1*w1/g\n", + "Hm1= e*Hm\n", + "lh= Hm-Hm1-h1-h2-h3\n", + "vg= k*math.sqrt(f1**2+w1**2)\n", + "pr= ((f**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g))-h2\n", + "pr1= x1-pr\n", + "ge= pr1*g*2*100/(vg/k)**2\n", + "\n", + "#RESULTS\n", + "print 'manometer Head = %.1f ft '%(Hm1)\n", + "print ' outlet velocity from guides = %.1f ft/sec '%(vg)\n", + "print ' Pressure rise through impeller only = %.1f ft '%(pr)\n", + "print ' Guide balde efficiency = %.f per cent '%(ge)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "manometer Head = 156.5 ft \n", + " outlet velocity from guides = 29.1 ft/sec \n", + " Pressure rise through impeller only = 102.4 ft \n", + " Guide balde efficiency = 75 per cent \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.6 Page No : 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "D1= 7.5 \t#in\n", + "Q1= 850. \t#gal/min\n", + "p1= 62.4 \t#lb/ft**3\n", + "N1= 1800.\n", + "D2= 15. \t#in\n", + "Q2= 12000. \t#gal/min\n", + "p2= 64. \t#lb/ft**3\n", + "N1= 1800. \t#r.p.m \n", + "H1= 14. \t#lb/ft**2\n", + "\n", + "#CALCULATIONS\n", + "N2= Q2*N1*(D1)**3/(Q1*D2**3)\n", + "P1= p1*H1/144\n", + "P2= P1*N2**2*D2**2*p2/(N1**2*p1*D1**2)\n", + "\n", + "#RESULTS\n", + "print 'N2 = %.f r.p.m '%(N2+4)\n", + "print ' P2 = %.f lb/in**2 '%(P2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N2 = 3180 r.p.m \n", + " P2 = 78 lb/in**2 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8 Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "r= 5.\n", + "\n", + "#CALCULATIONS\n", + "sr= r**2\n", + "sr1= r**2/r\n", + "\n", + "#RESULTS\n", + "print 'Corresponding ratio = %.f '%(sr)\n", + "print ' Corresponding ratio = %.f '%(sr1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Corresponding ratio = 25 \n", + " Corresponding ratio = 5 \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "e= 0.88\n", + "w= 1.25 \t#in\n", + "d= 10. \t#in\n", + "q= 630. \t#gal/min\n", + "a= 40. \t#degrees\n", + "g= 32.2 \t#ft/sec**2\n", + "e1= 0.83\n", + "\n", + "#CALCULATIONS\n", + "Q= q/(6.24*60)\n", + "f1= Q/(e*math.pi*(d/12)*(w/12))\n", + "u1= 1000*(w*4/12)*2*math.pi/60\n", + "w1= u1-f1*1/math.tan(math.radians(a))\n", + "W= u1*w1/g\n", + "lr= (f1**2+u1**2-f1**2/(math.sin(math.radians(a)))**2)/(2*g)\n", + "mh= e1*W\n", + "p= mh-lr\n", + "v1= math.sqrt(f1**2+w1**2)\n", + "ke= v1**2/(2*g)\n", + "pke= p*100/ke\n", + "me= 100*lr/W\n", + "\n", + "#RESULTS\n", + "print 'Velocity of flow = %.f ft/sec'%(f1)\n", + "print ' Work done = %.1f ft-lb/lb'%(W)\n", + "print ' manometric efficiency = %.1f ft'%(mh)\n", + "print ' Pressure recovered = %.1f ft head'%(p)\n", + "print ' Kinetic energy discharge = %.f ft-lb/lb'%(ke)\n", + "print ' Percentage of kinetic energy recovered = %.1f per cent'%(pke)\n", + "print ' manometric efficiency = %d percent'%(me)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of flow = 7 ft/sec\n", + " Work done = 47.8 ft-lb/lb\n", + " manometric efficiency = 39.7 ft\n", + " Pressure recovered = 11.2 ft head\n", + " Kinetic energy discharge = 20 ft-lb/lb\n", + " Percentage of kinetic energy recovered = 55.7 per cent\n", + " manometric efficiency = 59 percent\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.10 Page No : 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "W1= 7640. \t#gal/min\n", + "W2= 11400. \t#gal/min\n", + "Hm= 63. \t#ft\n", + "Hm1= 80. \t#ft\n", + "ep1= 72. \t#per cent\n", + "ep2= 76. \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "whp1= W1*Hm/(60*550)\n", + "whp2= W2*Hm1/(60*550)\n", + "bhp1= whp1*100/ep1\n", + "bhp2= whp2*100/ep2\n", + "w1= W2/10\n", + "\n", + "#RESULTS\n", + "print 'For both pumps discharge = %.f gal/min against an 80-ft head'%(W2)\n", + "print ' delivery from one pump = %.1f h.p '%(bhp1)\n", + "print ' delivery from two pumps = %.1f h.p '%(bhp2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For both pumps discharge = 11400 gal/min against an 80-ft head\n", + " delivery from one pump = 20.3 h.p \n", + " delivery from two pumps = 36.4 h.p \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.11 Page No : 241" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 94. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "e= 0.58\n", + "p= 73.5 \t#per cent\n", + "\n", + "#CALCULATIONS\n", + "WHP= h*e*w/550\n", + "BHP= WHP/(p/100)\n", + "\n", + "#RESULTS\n", + "print 'W.H.P= %.2f h.p'%(WHP)\n", + "print ' Brake horse power= %.1f'%(BHP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "W.H.P= 6.19 h.p\n", + " Brake horse power= 8.4\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12 Page No : 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "sl= 12. \t#ft\n", + "l= 20. \t#ft\n", + "d= 4. \t#in\n", + "dp= 6. \t#in\n", + "lst= 18. \t#in\n", + "k= 0.025\n", + "H= 32. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "pf= 6. \t#ft\n", + "a= 33.83 \n", + "a1= 9.53\n", + "\n", + "#CALCULATIONS\n", + "A= math.sqrt((H-sl-d)*g/a)*a1\n", + "Q= 2*math.pi*(dp/12)**2*lst/(12*4*60)\n", + "v= Q/(math.pi*(d/12)**2/4)\n", + "kh= v**2/(2*g)\n", + "fh= k*l*v**2*12/(2*g*d)\n", + "N= math.sqrt((H-sl-pf)/(kh+fh))\n", + "\n", + "#RESULTS\n", + "print 'premissible speed = %.1f r.p.m'%(A)\n", + "print ' maximum premissible speed = %.1f r.p.m'%(N)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "premissible speed = 37.2 r.p.m\n", + " maximum premissible speed = 168.8 r.p.m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.13 Page No : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 6. \t#in\n", + "s= 12. \t #in\n", + "d= 4. \t #in\n", + "a1= 30. \t#degrees\n", + "a2= 90. \t#degrees\n", + "a3= 120. \t#degrees\n", + "N= 120. \t#r.p.m\n", + "n= 4.\n", + "#calculations\n", + "A= 2*math.pi*N/60\n", + "V= math.pi*(b/12)**2*n/4\n", + "v= (b/12)**2*A*(b/12)/(d/12)**2\n", + "Q1= v*math.pi*(d/12)**2*math.sin(math.radians(a1))/4\n", + "Q2= v*math.pi*(d/12)**2*math.sin(math.radians(a2))/4\n", + "Q3= v*math.pi*(d/12)**2*math.sin(math.radians(a3))/4\n", + "Q4= V-Q1\n", + "Q5= Q2-V\n", + "Q6= Q3-V\n", + "a4= math.degrees(math.asin(V/(v*math.pi*(d/12)**2)))+a1\n", + "A= 180-a4\n", + "\n", + "#RESULTS\n", + "print 'rate of flow at a1 = %.3f cuses'%(Q4)\n", + "print ' rate of flow at a2 = %.3f cuses'%(Q5)\n", + "print ' rate of flow at a3 = %.3f cuses'%(Q6)\n", + "print ' crak angle = %.1f degrees'%(a4)\n", + "print ' crak angle = %.1f degrees'%(A)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate of flow at a1 = 0.169 cuses\n", + " rate of flow at a2 = 0.448 cuses\n", + " rate of flow at a3 = 0.283 cuses\n", + " crak angle = 39.2 degrees\n", + " crak angle = 140.8 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.14 Page No : 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 2. \t#strokes/sec\n", + "dp= 6. \t#in\n", + "ds= 18. \t#in\n", + "ds1=4. \t#in\n", + "l= 20. \t#ft\n", + "l1= 20. \t#ft\n", + "f= 0.008\n", + "la= 5. \t#ft\n", + "A= 60. \t#r.p.m\n", + "f= 0.008\n", + "w= 62.4 \t#lb/ft**3\n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "V= math.pi*(ds/12)*n*(dp/12)**2/4\n", + "vmp= 2*math.pi*A*(ds/24)/60\n", + "vmp1= vmp*(dp**2/ds1**2)\n", + "hfmax= 4*f*(l-la)*vmp1**2/(2*g*ds1/12)\n", + "H1= round(2*hfmax/3,1)\n", + "H2= H1*13\n", + "Wls= (H1+H2)*w*math.pi/16*1.5*2\n", + "mv= V/(math.pi*(ds1/12)**2/4)\n", + "lh= round(4*f*(l-la)*mv**2/(2*g*(ds1/12)),2)\n", + "lhf= 12*lh\n", + "Wls1= (lh+13.21)*w*math.pi*1.5/16 *2 \n", + "WS= Wls-Wls1\n", + "\n", + "#RESULTS\n", + "print 'Work lost per second= %.f ft lb/sec'%(Wls)\n", + "print ' Work saved per second = %.f ft-lb/sec'%(WS)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work lost per second= 875 ft lb/sec\n", + " Work saved per second = 352 ft-lb/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.15 Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 7.5 \t#in\n", + "s= 15. \t#in\n", + "l= 36. \t#ft\n", + "h1= 34. \t#ft\n", + "h2= 12. \t#ft\n", + "L= 10. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.008\n", + "l1= 20. \t#ft\n", + "d1= 4. \t#in\n", + "h3= 110. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "l2= 180. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Q= (math.pi/4)*(d)**2*(s/12)*2*(l/60)/144\n", + "v= Q/((math.pi/4)*(d1/12)**2)\n", + "a= (d/4)**2*(d/12)*(l*2*math.pi/60)**2\n", + "H= h1-h2-(L*a/g)-(v**2*0.5/g)-(4*f*l1*v**2/(2*g*(d1/12)))\n", + "H1= h1+h3+(L*a/g)+(v**2*0.5/g)+(4*f*l2*v**2/(2*g*(d1/12)))\n", + "dh= (H1-H)*w/144\n", + "NP= dh*(math.pi/4)*d**2\n", + "\n", + "#RESULTS\n", + "print 'Head at piston = %.2f ft of water absolute'%(H)\n", + "print ' Head at piston = %.2f ft of water absolute'%(H1)\n", + "print ' Difference on head of piston = %.f lb/in**2'%(dh)\n", + "print ' Net load on piston = %.f lb'%(NP)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head at piston = 11.04 ft of water absolute\n", + " Head at piston = 161.59 ft of water absolute\n", + " Difference on head of piston = 65 lb/in**2\n", + " Net load on piston = 2882 lb\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.16 Page No : 250" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "f= 0.009\n", + "dc= 3.5 \t#in\n", + "ds= 6. \t#in\n", + "r= 0.25\n", + "sl= 8. \t#ft\n", + "d= 2.5 \t#in\n", + "l= 14. \t#ft\n", + "el= 8. \t#ft\n", + "ed= 22.5 \t#in\n", + "ph= 4. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.009\n", + "\n", + "#CALCULATIONS\n", + "BC= el+l\n", + "v= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*9.55\n", + "vec=roots([2,1/r,-1])\n", + "H1= 77\n", + "MV= math.sqrt(BC*g/(l*(d/2)*(r)*(dc/d)**2))*r*(math.sin(math.radians(H1))+(math.sin(math.radians(2*H1))/8))\n", + "mvp= MV*dc**2/d**2\n", + "hf= 4*f*(sl+l)*mvp**2/(2*g*(d/12))\n", + "\n", + "#RESULTS\n", + "print 'pump speed = %.1f r.p.m'%(v)\n", + "print ' Friction head = %.3f ft'%(hf)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pump speed = 86.8 r.p.m\n", + " Friction head = 1.240 ft\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch12.ipynb b/Problems_In_Hydraulics/ch12.ipynb new file mode 100755 index 00000000..6c180ea8 --- /dev/null +++ b/Problems_In_Hydraulics/ch12.ipynb @@ -0,0 +1,294 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5f1e1e7eb1f2538f17f15df30e5829cbbc6f3ee52bddff3d767ce84c4a9e05f8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Dimensional and Model Analysis" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No : 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 0.0625 \t#in\n", + "sg= 0.91\n", + "vs= 1.62\n", + "ss= 7.85\n", + "g= 981. \t#cm/sec**2\n", + "\n", + "#CALCULATIONS\n", + "v= 4*(d*2.54/2)**2*(ss-sg)*g/(3*6*30.45*vs)\n", + "\n", + "#RESULTS\n", + "print 'steady speed attained = %.4f ft/sec '%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "steady speed attained = 0.1932 ft/sec \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No : 263" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "vs= 16. \t#ft/sec\n", + "lm= 1. \t#ft\n", + "l= 16. \t#ft\n", + "R= 9.6 \t#lb\n", + "ds= 64. \t#lb/ft**3\n", + "dm= 62.4 \t#/lb/ft**3\n", + "A= 40. \t#ft**2\n", + "\n", + "#CALCULATIONS\n", + "vm= vs*math.sqrt(lm/l)\n", + "rs= 0.0095*vm**1.9*A\n", + "rw= R-rs\n", + "Rw= rw*ds*(l/lm)**3/dm\n", + "Rs= 0.009*vs**1.85*A*l**2\n", + "R1= Rw+Rs\n", + "\n", + "#RESULTS\n", + "print 'speed = %.f b ft/sec'%(vm)\n", + "print ' Total resistance = %.f lb '%(round(R1,-2))\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed = 4 b ft/sec\n", + " Total resistance = 33700 lb \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "H2= 0.75 \t#ft\n", + "v1= 1. \t#ft/sec\n", + "v2= 6. \t#ft/sec\n", + "k= 1.433\n", + "\n", + "#CALCULATIONS\n", + "H1= H2*(v1/v2)**(2./3)\n", + "Q1= k*H1**2.47\n", + "Q2= Q1*(H2/H1)**2.5\n", + "\n", + "#RESULTS\n", + "print 'Flow = %.3f cuses '%(Q2 )\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow = 0.730 cuses \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "nm= 360.\n", + "d= 1.5 \t#in\n", + "n= 100. \n", + "dp= 12. \t#in\n", + "vm= 4.8 \t#ft/sec\n", + "Tm= 52. \t#sec\n", + "T= 16. \t#lb-ft\n", + "t= 133. \t#lb ft\n", + "\n", + "#CALCULATIONS\n", + "vp= n*dp*vm/(nm*d)\n", + "Tp= round(Tm*dp**2*vp**2/(d**2*vm**2),-2)\n", + "N= Tm*vm*6080*100/(T*2*math.pi*nm*60)\n", + "W= Tp*65000\n", + "T1= W/(.7*2*math.pi*n*60)\n", + "\n", + "\n", + "#RESULTS\n", + "print 'Speed of advance = %.2f knots '%(vp)\n", + "print ' Thrust = %.f lb '%(Tp)\n", + "print ' Efficiency = %.f per cent '%(N)\n", + "print ' Torque = %.f lb ft '%(round(T1,-2))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of advance = 10.67 knots \n", + " Thrust = 16400 lb \n", + " Efficiency = 70 per cent \n", + " Torque = 40400 lb ft \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "w= 62.4 \t#lb/ft**3\n", + "d= 4 \t#in\n", + "D= 0.0765 \t#lb/ft**3\n", + "Da= 8 \t#in\n", + "vw= 1./13\n", + "nw= 20\n", + "va= 13 \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "na= nw*va*d**2/Da**2\n", + "\n", + "#RESULTS\n", + "print 'power = %.f r.p.m '%(na)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power = 65 r.p.m \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7 Page No : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "dtp= 120. \t#in\n", + "dpd= 48. \t#in\n", + "vim= 1.25 \t#ft/sec\n", + "vip= 5. \t#ft/sec\n", + "lp = 600. \t#ft\n", + "lm= 40. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "Rm= (dtp/dpd)**2/((lp/lm)*(vim/vip)**2)\n", + "d= math.sqrt(4*Rm)\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.2f in '%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 5.16 in \n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch13.ipynb b/Problems_In_Hydraulics/ch13.ipynb new file mode 100755 index 00000000..30017a36 --- /dev/null +++ b/Problems_In_Hydraulics/ch13.ipynb @@ -0,0 +1,624 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da0a57e05023d78d40f48e24ac486e01915e80a89fcf828d645acb89b5297ac2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13 : Miscellaneous Problems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No : 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "W= 5000 \t#lb\n", + "vr= 6\n", + "e= 0.95\n", + "ep = 0.75\n", + "d= 9 \t#in\n", + "D= 45 \t#ft\n", + "t= 2 \t#min\n", + "v= 4.5 \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "L= W*vr/(e*ep)\n", + "Pr= L/(math.pi*d**2/4)\n", + "s= D/vr\n", + "V= s*math.pi*ep**2/(4*t*60)\n", + "T= D/v\n", + "V1= s*math.pi*ep**2/4\n", + "V2= V*T\n", + "V3= V1-V2\n", + "\n", + "#RESULTS\n", + "print 'Pressure on ram = %.f ln/in**2 '%(Pr)\n", + "print ' Pump duty = %.4f cusec'%(V)\n", + "print ' Minimum capacity if accumulator = %.3f ft**3 '%(round(V3))\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure on ram = 662 ln/in**2 \n", + " Pump duty = 0.0258 cusec\n", + " Minimum capacity if accumulator = 3.000 ft**3 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P1= 1100. \t#lb/in**2\n", + "P2= 85. \t#lb/in**2\n", + "f= 0.01\n", + "g= 32.2 \t#ft/sec**2\n", + "l= 1600. \t#ft\n", + "r= 1./8\n", + "W= 2500. \t#lb\n", + "d= 6. \t#in\n", + "\n", + "#CALCULATIONS\n", + "L= W*d\n", + "P= L*2.31/(math.pi*(d/2)**2)\n", + "s1= P1*2540/1100\n", + "s2= P2*196/85\n", + "vp= math.sqrt((s1-s2-P)/(4*f*l/(2*g*r)))\n", + "V= vp/16\n", + "Vl= V*d\n", + "Vp= math.sqrt((s1/3)/(4*f*l/(2*g*r)))\n", + "vl= Vp*d/16\n", + "Hr= s1-(s1/3)-s2\n", + "Lr= Hr*math.pi*(d/2)**2/(2.31*d)\n", + "\n", + "#RESULTS\n", + "print \"In case 1 velocity of load = %.2f ft/sec\"%(Vl)\n", + "print \" In case 2 velocity of load = %.2f ft/sec\"%(vl)\n", + "print ' Load to be lifted = %d lb '%(Lr)\n", + "\n", + "# note : roundin off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "In case 1 velocity of load = 4.45 ft/sec\n", + " In case 2 velocity of load = 3.87 ft/sec\n", + " Load to be lifted = 3054 lb \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3 Page No : 284" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "bhp= 1500 \t#h.p\n", + "e= 0.86\n", + "h1= 300 \t#ft\n", + "h2= 15 \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "t= 30 \t#days\n", + "t1= 10 \t#hr\n", + "t2= 3 \t#months\n", + "f= 0.005\n", + "l= 1000 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "WHP= bhp/e\n", + "Ha= h1-h2\n", + "W= WHP*550\n", + "Q= W/(Ha*w)\n", + "Qt= Q*36009*t1*t*t2\n", + "Qp= Qt/(3600*t*45)\n", + "d= (f*l*(Q/2)**2/(t1*h2))**(1./5)\n", + "\n", + "#RESULTS\n", + "print \"Minimum size of basin required = %.1e cusecs\"%Qt\n", + "print \"Pump Discharge : %.f cusecs\"%(Qp/10)\n", + "print 'Diameter = %.2f ft '%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum size of basin required = 1.7e+09 cusecs\n", + "Pump Discharge : 36 cusecs\n", + "Diameter = 1.89 ft \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4 Page No : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 140 \t#ft\n", + "P= 70 \t#percent\n", + "V= 3*10**8 \t#ft**3\n", + "w= 62.4 \t#lb/ft**3\n", + "SBD= 4.9*10**8 \t#ft**3\n", + "Q= 162 \t#cuses\n", + "s= 12.2*10**6 \t#ft**3/day\n", + "\n", + "#CALCULATIONS\n", + "O= Q*w*l*(P/1000.)/550.\n", + "\n", + "#RESULTS\n", + "print 'Size of reservoir= %.2e ft**3'%(SBD)\n", + "print ' output = %.f h.p '%(O)\n", + "print ' output = %d h.p '%(Q)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Size of reservoir= 4.90e+08 ft**3\n", + " output = 180 h.p \n", + " output = 162 h.p \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No : 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Q= 140 \t#cuses\n", + "w= 62.4 \t#lb/ft**3\n", + "l= 140 \t#ft\n", + "P= 70 \t#percent\n", + "k= 1.6\n", + "v= 3*10**8\n", + "\n", + "#CALCULATIONS\n", + "rv= k*v\n", + "HP= Q*l*w*(P/1000.)/550.\n", + "\n", + "#RESULTS\n", + "print 'Required size of reservoir = %.1e ft**3 '%(rv)\n", + "print ' horsepower = %.f h.p '%(HP)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required size of reservoir = 4.8e+08 ft**3 \n", + " horsepower = 156 h.p \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6 Page No : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 10. \t#lb/in**2\n", + "r1= 0.5 \t#ft\n", + "r= 0.25 \t#ft\n", + "f= 42.3 \t#ft/sec\n", + "b= 1./40\n", + "Tt= 1400. \t#lb\n", + "\n", + "#CALCULATIONS\n", + "Q= 2*math.pi*r*b*f\n", + "p1= 34+P\n", + "Fu= p1*math.pi*(r-(r/4))*144/2.3\n", + "Fr= Fu-Tt\n", + "\n", + "#RESULTS\n", + "print 'Quantity = %.2f cusecs '%(Q)\n", + "print ' Resultant force on the plate = %.f lb '%(round(Fr,-1))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity = 1.66 cusecs \n", + " Resultant force on the plate = 220 lb \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page No : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 0.5 \t#ft\n", + "N= 300\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "A= N*2*math.pi/60\n", + "Ft= math.pi*A**2*r**4*w/(4*g)\n", + "\n", + "#RESULTS\n", + "print 'total force = %.1f lb '%(Ft)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total force = 93.9 lb \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page No : 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 4. \t#in\n", + "h= 12. \t#in\n", + "h1= 9. \t#in\n", + "g= 32. \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "H= 2*(1-(h1/h))\n", + "A= math.sqrt((H*2*g/((d/24)**2)))\n", + "A1= math.sqrt((H*2*g*2/((d/24)**2)))\n", + "\n", + "#RESULTS\n", + "print 'speed when the axial is zero = %.f radn/sec '%(A)\n", + "print ' speed when the axial is zero = %.f radn/sec '%(A1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "speed when the axial is zero = 34 radn/sec \n", + " speed when the axial is zero = 48 radn/sec \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.10 Page No : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "P= 14.7 \t#lb/in**2\n", + "T= 15. \t#C\n", + "v= 350. \t#ft/sec\n", + "R= 0.714\n", + "\n", + "#CALCULATIONS\n", + "P1= P*144\n", + "r= 3091*(273+T)\n", + "d1= P1/r\n", + "r1= r+(v**2/7)\n", + "P2= (r1*d1/(P1**R))**(1/(1-R))/144\n", + "dP= P2-P\n", + "T2= r1/3091\n", + "dT= T2-(273+T)\n", + "\n", + "#RESULTS\n", + "print 'rise in pressure = %.f lb/in**2 '%(dP)\n", + "print ' rise in temperature = %.1f C '%(dT)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rise in pressure = 1 lb/in**2 \n", + " rise in temperature = 5.7 C \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11 Page No : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "T= 27. \t#C\n", + "P = 33. \t#lb/in**2\n", + "p1= 14.7 \t#lb/in**2\n", + "w= 250. \t#lb\n", + "g= 32.2 \t#ft/sec**2\n", + "Cd= 0.99\n", + "r= 1.4\n", + "\n", + "#CALCULATIONS\n", + "w1= P*144/(96*(273+T))\n", + "d= p1*144/(96*(273+T))\n", + "W= d*w/60\n", + "d= math.sqrt(W*4/(Cd*math.pi*math.sqrt(2*g*P*144*(r/(r-1))*w1*(0.528**(2/1.4)-0.528**(2.4/1.4)))))*12\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.3f in '%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 0.722 in \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12 Page No : 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "sp= 13.6\n", + "hm= 800. \t#mm\n", + "d= 3. \t#in\n", + "r= 1.4\n", + "R= 1385. \t#ft-lb/lb/C\n", + "w= 62.4 \t#lb/ft**3\n", + "T= 15. \t#C\n", + "hm1= 765. \t#mm\n", + "r1= 9.\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "p1= hm*sp*w/304.8\n", + "r2= (273+T)*R\n", + "w1= p1/r2\n", + "k= hm/hm1\n", + "v1= math.sqrt((2*g*r*r2*(1-k**0.286))/((1-r)*(r1**2*k**1.43-1)))\n", + "W= v1*w1*3600*(math.pi/64)\n", + "\n", + "#RESULTS\n", + "print 'Weight flowing = %.f lb/hr '%(W)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight flowing = 115 lb/hr \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.13 Page No : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "p= 160. \t#lb/in**2\n", + "d= 1./3 \t#ft\n", + "T= 15. \t#C\n", + "R= 96. \n", + "V= 120. \t#ft**3\n", + "f= 0.004\n", + "a= 60*math.pi\n", + "l= 10560. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "p1= p*144\n", + "w1= p*144/(R*(273+T))\n", + "v1= V*36/a\n", + "p2= math.sqrt(p1**2-((2*4*f*p1*w1*v1**2*l)/(2*g*d)))/144\n", + "v2= p*v1/p2\n", + "\n", + "#RESULTS\n", + "print ' pressure = %.1f lb/in**2 '%(p2)\n", + "print ' velocity = %.1f ft/sec '%(v2)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " pressure = 134.0 lb/in**2 \n", + " velocity = 27.4 ft/sec \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch2.ipynb b/Problems_In_Hydraulics/ch2.ipynb new file mode 100755 index 00000000..d68673ef --- /dev/null +++ b/Problems_In_Hydraulics/ch2.ipynb @@ -0,0 +1,222 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2c442a1cbc28b933d555165b6cb09fa7f45de31e28c837593e3048f115cafdbb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Equilibrium of Floating Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#initialisation of variables\n", + "d= 40. \t#lb/ft**2 density of wood\n", + "w= 4 \t#ft wide\n", + "h= 6 \t#ft deep\n", + "l= 12 \t#ft long \n", + "\n", + "#CALCULATIONS\n", + "W= w*h*d*l\n", + "V= W/64\n", + "D= V/(w*l)\n", + "\n", + "#RESULTS\n", + "print 'Volume of water print laced = %.f ft**3'%(V)\n", + "print ' Depth of immersion = %.2f ft'%(D)\n", + "print ' Centre of buoyancy = %.2f ft from base'%(D)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume of water print laced = 180 ft**3\n", + " Depth of immersion = 3.75 ft\n", + " Centre of buoyancy = 3.75 ft from base\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import Symbol,solve\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 4. \t#ft diameter\n", + "h= 7. \t#ft high\n", + "W= 2500. \t#lb weighing \n", + "OG= 3.5\n", + "OB= 1.55 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "V= W/d**3\n", + "D= V/(math.pi*(d/2)**2)\n", + "I= math.pi*d**4/64\n", + "BM= I/V\n", + "BG= OG-OB\n", + "T = Symbol(\"T\")\n", + "ans = solve( (2500 + T)**2 -(512*math.pi *(8750 - 804)) - 1)\n", + "T = ans[1]\n", + "\n", + "#RESULTS\n", + "print 'Minimum tension in chain = %d lb'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum tension in chain = 1075 lb\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "W1= 1000. \t#lb weighing\n", + "W2= 100. \t#lb load\n", + "h= 4. \t#ft height\n", + "d= 5. \t#ft diameter\n", + "\n", + "#CALCULATIONS\n", + "V= (W1+W2)/h**3\n", + "D= V*h/(d**2*math.pi)\n", + "I= d**4*math.pi/h**3\n", + "BM= I/V\n", + "x= (BM+(D/2)-(W1*(h/2)/(W1+W2)))/(W2/(W1+W2))-0.02\n", + "C= x-h\n", + "\n", + "#RESULTS\n", + "print 'centre of gravity = %.2f ft'%(x)\n", + "print ' Hence the gravity of the weight must not be more than above the top of buoy = %.2f ft'%(C)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "centre of gravity = 4.43 ft\n", + " Hence the gravity of the weight must not be more than above the top of buoy = 0.43 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5 Page No : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 12. \t#ft breadth\n", + "h1= 3. \t#ft draught\n", + "h2= 1.5 \t#ft\n", + "h3= 5+(2./3) \t#ft\n", + "\n", + "#CALCULATIONS\n", + "I= b**3/12\n", + "V= b*h1\n", + "bm= I/V\n", + "BG= bm+(h1*2/(3*b))\n", + "O= math.degrees(math.tan(math.sqrt((h3*2-h1-bm*2)/(bm*2+bm))))\n", + "\n", + "\n", + "#RESULTS\n", + "print ' Volume of body immersed = %.f ft**3'%(V)\n", + "print ' BM = %.f ft'%(bm)\n", + "print ' BG = %.2f ft'%(BG)\n", + "print ' angle of heel = %.2f degrees'%(O)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Volume of body immersed = 36 ft**3\n", + " BM = 4 ft\n", + " BG = 4.17 ft\n", + " angle of heel = 9.64 degrees\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch3.ipynb b/Problems_In_Hydraulics/ch3.ipynb new file mode 100755 index 00000000..a3c142e2 --- /dev/null +++ b/Problems_In_Hydraulics/ch3.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b5106ea5cae253fe059288e745550627fa4df81e4cd0d1b81237c843ab3f804d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3 : Hydrodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 Page No : 39" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "# points\n", + "hob= 34. \t#ft\n", + "hoc= 5. \t#ft\n", + "hoa= 50. \t#ft\n", + "\n", + "hod= 80. \t#ft height\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "# sectional areas\n", + "A= 2.1 \t#in**2\n", + "A1= 4.8 \t#in**2\n", + "A2= 9.6 \t#in**2\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*(hod-hoc))\n", + "Q= v*A/144\n", + "va= v*A/A1\n", + "vb= v*A/A2\n", + "Va= va**2/(2*g)\n", + "Vb= vb**2/(2*g)\n", + "r= hob+hod-hoa-(va**2/(2*g))\n", + "r1=hob+hod-hob-(vb**2/(2*g))\n", + "\n", + "#RESULTS\n", + "print 'Discharge = %.2f cuses'%(Q) \n", + "print ' Velocity head at A = %.2f ft-lb/lb'%(Va)\n", + "print ' Velocity head at B = %.2f ft-lb/lb'%(Vb)\n", + "print ' Pressure head at A = %.2f ft-lb/lb'%(r) \n", + "print ' Pressure head at B = %.2f ft-lb/lb'%(r1) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 1.01 cuses\n", + " Velocity head at A = 14.36 ft-lb/lb\n", + " Velocity head at B = 3.59 ft-lb/lb\n", + " Pressure head at A = 49.64 ft-lb/lb\n", + " Pressure head at B = 76.41 ft-lb/lb\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 Page No : 40" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "w= 62.4 \t#lb/ft**3\n", + "P= 1.7 \t#lb/in**2 pressure\n", + "d1= 6. \t #in diameters\n", + "d2= 3. \t #in diameters\n", + "hab= 8. \t#ft\n", + "Q= 0.75 \t#cuses\n", + "sm= 13.6 # gravity\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "dP= P*144/w\n", + "va= Q*(d1/d2)**4/math.pi\n", + "k= -(((d1/d2)**4-1)-((-dP+hab)*2*g/va**2))\n", + "h= (-dP+hab)*12/(sm-1)\n", + "\n", + "#RESULTS\n", + "print 'k = %.f '%(k)\n", + "print 'height difference = %.2f in'%(h) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 3 \n", + "height difference = 3.88 in\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 Page No : 42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 20. \t #ft pressure head\n", + "Q= 4.81 \t#cuses \n", + "C= 1.\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 10. \t#indiameter\n", + "\n", + "#CALCULATIONS\n", + "d= ((Q*4*144/(d**2*math.pi))**2*100**2/((Q*4*144/(d**2*math.pi))**2+2*g*h))**0.25\n", + "\n", + "#RESULTS\n", + "print 'Smallest Diameter = %.1f in'%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest Diameter = 4.9 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 Page No : 43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 1./3 \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 4. \t #in\n", + "d2= 1.6 \t#in diameter\n", + "\n", + "# guage readings\n", + "h1= 5.7 \t#ft\n", + "h2= -1.9 \t#ft\n", + "\n", + "Q= 0.3 \t#cuses\n", + "H1= 34. \t#ft height of water\n", + "H2= 19. \t#ft\n", + "H3= 7. \t #ft\n", + "H4= 9.2 \t#ft\n", + "h3= 2.9 \t#ft\n", + "h4= 3.9 \t#ft\n", + "Et= 54. \t#ft-lb/lb\n", + "\n", + "#CALCULATIONS\n", + "v1= math.sqrt(2*g*(h1-h2)/((d1/d2)**4-1))\n", + "Q1= math.pi*v1*d**2/4\n", + "k= Q/Q1\n", + "P= (H1+H2)*H3/H4\n", + "P1= P-h3\n", + "r= P+h1-h2-h4\n", + "V= v1**2/(2*g)\n", + "E= r+V\n", + "dE= Et-E\n", + "\n", + "#RESULTS\n", + "print 'Coefficienct of venturi meter = %.4f '%(k)\n", + "print ' Pressure of venturi throat = %.2f ft of water'%(P1)\n", + "print ' Loss in energy = %.1f ft-lb/lb'%(dE)\n", + "\n", + "# Note : The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Coefficienct of venturi meter = 0.9587 \n", + " Pressure of venturi throat = 37.43 ft of water\n", + " Loss in energy = 9.8 ft-lb/lb\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch4.ipynb b/Problems_In_Hydraulics/ch4.ipynb new file mode 100755 index 00000000..aefd97a7 --- /dev/null +++ b/Problems_In_Hydraulics/ch4.ipynb @@ -0,0 +1,291 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f02a7c0105dc5d8192eae252809dedbf748fa59e0b9b78e4af3b1079610b7a69" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4 : Orifices and Notches" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Cd= 0.98 # velocity\n", + "g= 32.2 \t#ft/sec**2\n", + "H= 2. \t#ft\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*H)\n", + "t= H/v\n", + "h= 0.5*g*t**2\n", + "\n", + "#RESULTS\n", + "print 'Vertical distance fallen in this ttime = %.3f ft'%(h) \n", + "\n", + "#Note : The answer given in textbook is wrong.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vertical distance fallen in this ttime = 0.500 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2 Page No : 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "r= 53.4\n", + "T= 60. \t #F pressure of air\n", + "h= 29.7 \t#in of mercury\n", + "sm= 13.6\n", + "w= 62.4 \t#lb/ft**3\n", + "d= 1.5 \t#in diameter\n", + "Qin= 2. \t#cuses air\n", + "g=32.2 \t #ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "W= h*sm*w/(r*(460+T)*12)\n", + "dP= 0.75*w/(12*W)\n", + "Q= math.sqrt(2*g*dP)*math.pi*d**2/(4*144)\n", + "W= Q*W*60\n", + "Cd= Qin/W\n", + "\n", + "#RESULTS\n", + "print 'coefficient of discharge = %.2f '%(Cd) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of discharge = 0.62 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3 Page No : 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "H1= 34. \t#ft height\n", + "H2= 8. \t #ft head\n", + "H3= 7. \t#ft pressure head\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 1.5 \t #in\n", + "\n", + "#CALCULATIONS\n", + "v2= math.sqrt(2*g*(H1+H2-H3))\n", + "Q= v2*math.pi*d**2/(4*144)\n", + "v3= (2*v2+math.sqrt(4*v2**2-4*6*(v2**2-H2*2*5*g)))/12\n", + "dr= math.sqrt(v2/v3)\n", + "\n", + "#RESULTS\n", + "print 'ratio of diameteres = %.1f '%(dr) \n", + "print \" Maximum discharge = %.3f cusec\"%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ratio of diameteres = 1.6 \n", + " Maximum discharge = 0.583 cusec\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4 Page No : 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Q1= 8./15 \t#cuses\n", + "Q2= 2./15 \t#cuses\n", + "\n", + "#CALCULATIONS\n", + "A= math.degrees(math.atan(Q2/Q1))\n", + "\n", + "#RESULTS\n", + "print 'Angle of inclination = %.2f degrees'%(A) \n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of inclination = 14.04 degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "r= g**2/((math.sqrt(2))**2*g**2)\n", + "\n", + "#RESULTS\n", + "print 'coefficient of contraction = %.1f '%(r) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of contraction = 0.5 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6 Page No : 56" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "B= 3. \t #ft long\n", + "H= 2. \t#ft depth of water\n", + "H1= 3.75 \t#ft \n", + "w= 4. \t#ft wide\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= 3.33*(B-(H1/5))*H**1.5\n", + "v= Q/(H*w)\n", + "kh= v**2/(2*g)\n", + "Q1= 3.33*(B-(H1/5)-kh)*(((H1/5)+kh)**1.5-kh**1.5)\n", + "\n", + "#RESULTS\n", + "print 'Discharge = %.2f cuses'%(Q1) \n", + "\n", + "\n", + "# NOte : ANSWER IN THE TEXTBOOK IS WRONG\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 5.42 cuses\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch5.ipynb b/Problems_In_Hydraulics/ch5.ipynb new file mode 100755 index 00000000..696c90f4 --- /dev/null +++ b/Problems_In_Hydraulics/ch5.ipynb @@ -0,0 +1,422 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:99b4244f7dba40fbe6b1f9647ffae37a043c932f7cb3e888c2ad7aac3ff9563e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5 : Flow in Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1 Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 2.5 \t#ft depth of water\n", + "a= 45. \t#degrees side slope\n", + "x= 5. \t#ft\n", + "Q= 45. \t#cuses\n", + "v= 2.6 \t#ft/sec velocity\n", + "w= 6.92 \t#ft \n", + "C= 120.\n", + "\n", + "#CALCULATIONS\n", + "b= (Q/(v*h))-h\n", + "p= b+2*(h+math.sqrt(2))\n", + "A= h*w\n", + "m= A/p\n", + "i= (v/(C*math.sqrt(m)))**2\n", + "\n", + "#RESULTS\n", + "print 'Width = %.2f ft'%(b) \n", + "print ' Slope = %.6f '%(i) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width = 4.42 ft\n", + " Slope = 0.000332 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2 Page No : 69" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "a= 60. \t#degrees sides inclined\n", + "i= 1./1600\n", + "Q= 8.*10**6 \t#gal/hr discharge\n", + "M= 110.\n", + "w= 6.24 \t#lb/ft**3\n", + "\n", + "#CALCULATIOS\n", + "d= ((Q*2**(2./3)*math.sqrt(1./i))/(w*3600*math.sqrt(3)*M))**(3./8)\n", + "b=6.93 \t#ft\n", + "\n", + "#RESULTS\n", + "print 'Diameter = %.f ft'%(d) \n", + "print ' breadth = %.2f ft'%(b)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 6 ft\n", + " breadth = 6.93 ft\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3 Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/swc**2\n", + "Q= 40. \t#cuses rate\n", + "w= 5.5 \t#ft\n", + "h= 9. \t#in depth\n", + "d= 0.75 \t#ft\n", + "V= 3. \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "D= ((Q*2)**2/(g*(w*2)**2))**(1./3)\n", + "v= Q*d/w\n", + "D1= math.sqrt((2*v**2*d/g)+h/64)-(d/2)\n", + "dD= D1-d\n", + "El= -dD+((v**2*(1-(V/v)**2))/(2*g))\n", + "Els= Q*El*62.4/550\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(D)\n", + "print ' Rise in level = %.f ft'%(D1)\n", + "print ' Horse-power lost = %.3f hp'%(Els) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 1.18 ft\n", + " Rise in level = 1 ft\n", + " Horse-power lost = 0.961 hp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6 Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "b= 3.5 \t#ft\n", + "H= 2.5 \t#ft\n", + "w= 3. \t#ft depth\n", + "h= 6. \t#ft wide\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= 3.09*b*H**1.5\n", + "v= Q/(w*h)\n", + "H1= H+(v**2/(2*g))\n", + "Q1= 3.09*b*H1**1.5\n", + "hc= (Q1**2/(b**2*g))**(1./3)\n", + "h2= 0.5*(math.sqrt(hc**2+8*hc**2)-hc)\n", + "dh= h2+b-w\n", + "\n", + "#RESULTS\n", + "print \"Flow rate = %.1f cusecs\"%(Q)\n", + "print \" Flow rate = %d cusecs\"%(Q1)\n", + "print ' maximum depth of water downstream = %.3f ft'%(dh) \n", + "print ' Shooting flow depth at hump = %.3f ft'%(h2) \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow rate = 42.8 cusecs\n", + " Flow rate = 45 cusecs\n", + " maximum depth of water downstream = 2.226 ft\n", + " Shooting flow depth at hump = 1.726 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7 Page No : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "m= 60./26\n", + "i= 1./2000\n", + "h1= 3. \t#ft depth\n", + "h2= 5. \t#ft depth\n", + "m1= 10./3\n", + "C= 90. # constant\n", + "l= 500. \t#ft depth\n", + "H= 20. \t#ft broad\n", + "H1= 29.62 \t#ft\n", + "g= 32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "v= 90*math.sqrt(m*i)\n", + "v1= v*h1/h2\n", + "dh= (i-(v1**2/(C**2*m1)))*l/(1-v1**2/(g*h2))\n", + "h3= h2-dh\n", + "V= h1*v/h3\n", + "\n", + "#RESULTS\n", + "print 'Height of water 1000 ft upstream = %.3f ft'%(h3) \n", + "print ' Height of water upstream = %.3f ft'%(h3) \n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of water 1000 ft upstream = 4.808 ft\n", + " Height of water upstream = 4.808 ft\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8 Page No : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 5. \t #ft/sec\n", + "m= 60./26\n", + "i= 1./2000\n", + "h= 5.5 \t#ft\n", + "m1= 110./31\n", + "d= 3. \t #ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "C= v/(math.sqrt(m*i))\n", + "v1= v*d/h\n", + "r= (i-(v1**2/(C**2*m1)))/(1-(v1**2/(g*h)))\n", + "x= 1/r\n", + "\n", + "#RESULTS\n", + "print 'Distance upstream = %.f ft'%(round(x,-1)) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Distance upstream = 2380 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9 Page No : 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "from numpy import *\n", + "from numpy.linalg import *\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "Q= 12 \t#cuses\n", + "\n", + "#CALCULATIONS\n", + "hc= (Q/(3*math.sqrt(g)))**(2./3)\n", + "vec=roots([1,6,12,8,0,-8.95,-8.95])\n", + "H=vec[2]\n", + "\n", + "#RESULTS\n", + "print 'Critical depth = %.2f ft'%(hc) \n", + "print ' Critical depth = %.2f ft'%(H) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 0.79 ft\n", + " Critical depth = 0.89 ft\n" + ] + }, + { + "output_type": "stream", + "stream": "stderr", + "text": [ + "-c:17: ComplexWarning: Casting complex values to real discards the imaginary part\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11 Page No : 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Cd= 0.64 # coefficient\n", + "g= 32.2 \t#ft/sec**2\n", + "A= 12.5 \t#ft**2\n", + "H= 24.8 \t#ft\n", + "Q= 3200. \t#cuses\n", + "b= 150. \t#ft wide\n", + "A1= 5.*10**6 # avg surface area\n", + "h= 9. \t#ft\n", + "h1= 6. \t #in\n", + "\n", + "#CALCULATIONS\n", + "N= Q/(Cd*A*math.sqrt(2*g*H))\n", + "H1= (Q/(3.2*b))**(2./3)\n", + "ES= (H1-(h1/12))*A1*h\n", + "\n", + "#RESULTS\n", + "print 'number of siphons = %.f '%(N) \n", + "print ' Extra Storage = %.2e ft**3'%(ES) \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of siphons = 10 \n", + " Extra Storage = 1.37e+08 ft**3\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch6.ipynb b/Problems_In_Hydraulics/ch6.ipynb new file mode 100755 index 00000000..5608cc77 --- /dev/null +++ b/Problems_In_Hydraulics/ch6.ipynb @@ -0,0 +1,757 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cfc2d9c55b511981c268535b9b836c28d1aec92123c8d6e11efaae493bc2b6d5" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6 : Flow in Pipes" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1 Page No : 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 5000. #ft long\n", + "l1= 2000. #ft\n", + "d= 12. #in diameter\n", + "f= 0.005 # coefficient\n", + "d1= 24 #in diameter\n", + "f1= 0.0045 \n", + "l2= 3000. #ft\n", + "Q= 1800. #gal/min flow\n", + "w= 6.24 #lb/ft**3\n", + "g=32.2 #ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "F= Q/(60*w)\n", + "v1= F*4/(math.pi*(d/12)**2)\n", + "v2= v1/(d1/d)**2\n", + "H= (f*l1*F**2/(10*(d/12)**5))+(f1*l2*F**2/(10*(d1/12)**5))+(v1**2/(4*g))+((v1-v2)**2/(2*g))+(v2**2/(2*g))\n", + "\n", + "#RESULTS\n", + "print 'Available Head = %.2f ft'%(H)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Available Head = 24.74 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2 Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "f= 0.01\n", + "h= 42. \t#ft\n", + "l= 3200. \t#ft length\n", + "d= 14. \t#in diameter\n", + "h1= 8. \t#ft\n", + "l1= 1800. \t#ft point\n", + "w= 6.24 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "v= math.sqrt(2*g*h/(1+0.5+(4*f*l/(d/12.))))\n", + "h2= h-h1-(v**2/(2*g))-h1-(0.5*v**2/(2*g))-(4*f*l1*v**2/(2*g*(d/12)))\n", + "Q= math.pi*(d/12)**2*v*w*60/4\n", + "\n", + "#RESULTS\n", + "print 'Height of siphon above A = %.2f ft'%(h2)\n", + "print ' Total Discharge = %.f gal/min'%(Q)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of siphon above A = 2.13 ft\n", + " Total Discharge = 1974 gal/min\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3 Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "H= 950. \t#lb/in**2\n", + "l= 5. \t#miles distance\n", + "d= 4. \t#in\n", + "f= 0.0075 # friction\n", + "p= 92. \t#per cent\n", + "hp= 200. \t#h.p power\n", + "g= 32.2 \t#ft/sec62\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "H1= H*2.3\n", + "H2= H1*100/p\n", + "Hf= H2-H1\n", + "v= math.sqrt(2*g*(d/12)*Hf/(4*f*l*5280))\n", + "n= hp/(w*v*(H1/550)*math.pi*(d/12)**2/4)\n", + "\n", + "#RESULTS\n", + "print 'number of pipes required = %.2f'%(n)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of pipes required = 4.07\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4 Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 1.5 \t #miles length\n", + "d= 18. \t #in diameter\n", + "Q= 12.4 \t#/cusecs\n", + "h= 130. \t#ft\n", + "r= 169.\n", + "r1= 338.\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "f= h*10*l**5/(l*5280*Q**2)\n", + "R= math.sqrt(1.5*r1-r)\n", + "d= math.sqrt(l**2/R*144)\n", + "v= math.sqrt(h*g*2/(r/R**2+1))\n", + "HP= w*0.25*math.pi*(d/12)**2*v**3/(550*2*g)\n", + "\n", + "#RESULTS\n", + "print 'f = %.3f '%(f)\n", + "print ' Diameter of jet d = %.2f in'%(d)\n", + "print ' Water h.p = %.1f h.p'%(HP)\n", + "\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f = 0.008 \n", + " Diameter of jet d = 4.20 in\n", + " Water h.p = 70.6 h.p\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5 Page No : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 5000. \t#ft long\n", + "d= 24. \t #in diameter\n", + "Q= 18. \t#cuses\n", + "t= 10. \t #sec \n", + "P= 275000. \t#lb/in**2\n", + "g= 32.2 \t#ft/sec**2\n", + "w=62.4\n", + "\n", + "#CALCULATIONS\n", + "v= Q/(math.pi*(d/24)**2)\n", + "C= v/(t**2/2)\n", + "Pr= ((l*C*t/g)+(v**2/(2*g)))/2.3\n", + "Pr1= v*12*math.sqrt(w*P/(386.4*1728))\n", + "\n", + "#RESULTS\n", + "print 'Pressure Rise = %.1f lb/in**2'%(Pr)\n", + "print ' Pressure Rise = %d lb/in**2'%(Pr1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Rise = 77.6 lb/in**2\n", + " Pressure Rise = 348 lb/in**2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6 Page No : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "v= 4. \t#ft/sec velocity\n", + "K= 300000. \t#lb/in**2 water\n", + "d= 6. \t#in\n", + "t= 0.25 \t#in\n", + "E= 30*10**6 \t#lb/in**2\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "P= math.sqrt((w*v**2/g)/((d/(E*144*t))+(1/(K*144))))/144\n", + "Sm= P*d/(2*t)\n", + "\n", + "#RESULTS\n", + "print 'Hoop stress = %.f lb/in**2'%(Sm)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hoop stress = 2739 lb/in**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7 Page No : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "l1= 19. \t#ft\n", + "l2= 1. \t#ft\n", + "r1= 0.298\n", + "r2= 0.238\n", + "r3= 0.359\n", + "r4= 0.242\n", + "r5= 0.121\n", + "d= 6 \t #in diameter\n", + "\n", + "#CALCULATIONS\n", + "m= -(-r4-math.sqrt(r4**2-4*(3*r1-r5)*(-(d/2)*r2-r3)))/(2*(3*r1-r5))\n", + "v2= math.sqrt((l1+l2)/(r1*m**2-r2))\n", + "v3= m*v2\n", + "Q2= math.pi*v2/d**2\n", + "Q3= math.pi*v3/d**2\n", + "Q= Q2+Q3\n", + "\n", + "#RESULTS\n", + "print 'Q2 = %.3f cusec'%(Q2)\n", + "print ' Q3 = %.2f cusec'%(Q3)\n", + "print ' Total Quantity = %.3f cusecs'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q2 = 0.711 cusec\n", + " Q3 = 0.96 cusec\n", + " Total Quantity = 1.668 cusecs\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8 Page No : 106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h= 80. \t#ft levels\n", + "f= 0.008 # friction coefficient\n", + "l= 3000. \t#ft long\n", + "r1= 6.07\n", + "r2= 377.5\n", + "r3= 4733. \n", + "r4= 0.0466\n", + "r5= 3220.\n", + "r6= 51.5\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt(h*10/(f*l))\n", + "Q1= math.sqrt(r2+math.sqrt(r2**2-4*r1*r3)/(2*r1))/3\n", + "Q2= Q1-r4*math.sqrt(r5-r6*Q1**2)\n", + "\n", + "#RESULTS\n", + "print 'rate discharge when valve B is closed= %.2f cusecs'%(Q)\n", + "print ' Flow in reservoir= %.2f cusecs'%(Q2)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rate discharge when valve B is closed= 5.77 cusecs\n", + " Flow in reservoir= 5.13 cusecs\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9 Page No : 108" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "Q= 450. \t#gal/min\n", + "w= 6.24 \t#lb/ft**3\n", + "f= 0.005\n", + "l1= 1000. \t#ft from reservoir A\n", + "l2= 2000. \t#ft from reservoir D\n", + "r1= 1.6\n", + "r2= 4.4\n", + "r3= 0.8\n", + "r4 = 12.85\n", + "h1= 59.1 \t#ft\n", + "h2= 40.19 \t#ft\n", + "v= 1.2 \t #ft/sec\n", + "f= 0.0056\n", + "l= 10 \t #ft below reservoir A\n", + "\n", + "#CALCULATIONS\n", + "Q1= Q/(w*60)\n", + "Q2= (r1+math.sqrt(r1**2+4*r2))/2\n", + "Q3= Q2-Q1\n", + "Q4= (-r3+math.sqrt(r3**2+4*r4))/2\n", + "Q5= Q4+Q1\n", + "d= (f*5500*v**2/(l*(h1-h2)))**0.2*12\n", + "\n", + "#RESULTS\n", + "print 'flow in to reservoir B= %.2f cusecs'%(Q3)\n", + "print ' flow in to reservoir D= %.1f cusecs'%(Q5)\n", + "print ' diameter of MN= %.f in'%(d)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "flow in to reservoir B= 1.84 cusecs\n", + " flow in to reservoir D= 4.4 cusecs\n", + " diameter of MN= 9 in\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10 Page No : 110" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 2.5 \t#ft\n", + "a= 45. \t#degrees\n", + "Q= 69. \t#cuses\n", + "l= 30. \t#ft\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Ps= 0.25*math.pi*d**2*w*l/2240\n", + "Rs= Ps*math.sqrt((1-math.cos(math.radians(a)))*2)\n", + "W= Q*w/2240\n", + "v= Q*4/(math.pi*d**2)\n", + "Rd= W*v*math.sqrt(2*(1-math.cos(math.radians(a))))/g\n", + "Rt= Rs+Rd\n", + "\n", + "#RESULTS\n", + "print 'total resultant thrust = %.3f tons'%(Rt)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total resulmath.tant thrust = 3.782 tons\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11 Page No : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "r1= 1./3\n", + "r2= 7./12\n", + "l= 5000. \t#ft\n", + "l1= 10000. \t#ft\n", + "d= 27. \t#in\n", + "d1= 18. \t#in\n", + "Q= 10. \t#cuses\n", + "f= 0.006\n", + "\n", + "#CALCULATIONS\n", + "Q2= Q/(math.sqrt(r2/r1)+1)\n", + "Q1= Q-Q2\n", + "H= (f*l*Q**2/(10*(d/12)**5))+(f*l1*Q1**2/(3*10**(d1/12)**5))\n", + "\n", + "#RESULTS\n", + "print 'total difference in head = %.2f ft'%(H)\n", + "\n", + "\n", + "#ANSWER GIVEN IN THE TEXTBOOK IS WRONG\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total difference in head = 5.20 ft\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12 Page No : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 4. \t #ft/sec\n", + "L= 1225. \t#ft\n", + "l= 1200. \t#ft\n", + "H= 50. \t#ft\n", + "d= 1./3 \t#ft\n", + "f= 0.008\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "a= 2*g*H\n", + "b= (4*f*L/d)+1.5\n", + "c= math.sqrt(a/b)\n", + "d= math.sqrt(a*b)\n", + "T= math.log(math.sqrt((c+V)/(c-V)))*l*2/d\n", + "\n", + "#RESULTS\n", + "print 'time interval for elapse = %.2f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time interval for elapse = 3.95 sec\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14 Page No : 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "L= 8000. \t#ft\n", + "d= 5. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 5. \t #ft\n", + "l= 250. \t#ft\n", + "b= 100.\n", + "\n", + "#CALCULATIONS\n", + "A= math.pi*0.25*d**2*l-0.5*d**2*b\n", + "V= A*g/L\n", + "\n", + "#RESULTS\n", + "print 'Velocity = %.2f ft/sec'%(V)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 14.73 ft/sec\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15 Page No : 121" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "B= 3. \t#ft\n", + "Cd= 0.6\n", + "g= 32.2 \t#ft/sec**2\n", + "d1= 6. \t #in\n", + "d2= 4. \t#in\n", + "\n", + "#CALCULATIONS\n", + "Q2= 0.428 \t#cuses\n", + "r= math.sqrt((((d1/12)**5)/((d2/12)**5)))\n", + "Q1= r*Q2\n", + "Q= Q1+Q2\n", + "\n", + "#RESULTS\n", + "print 'Total inflow = %.3f cuses'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total inflow = 1.607 cuses\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17 Page No : 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "f= 0.007\n", + "l= 30. \t#miles\n", + "Q1= 5.*10**6 \t#gal/day\n", + "w= 6.24 \t #lb/ft**3\n", + "H= 500. \t #ft\n", + "Q2= 7*10**6 \t#gal/day\n", + "\n", + "#CALCULATIONS\n", + "Qi= Q1/(w*24*3600)\n", + "d= (f*l*5280*Qi**2/(10*H))**0.2\n", + "Qe = Q2*Qi/Q1\n", + "x= (30-(H*10*d**5/(f*Qe**2*5280)))*(4./3)\n", + "\n", + "#RESULTS\n", + "print 'diameter of pipes = %.1f ft'%d\n", + "print 'length of new pipe required = %.1f miles'%(x)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diameter of pipes = 1.8 ft\n", + "length of new pipe required = 19.6 miles\n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch7.ipynb b/Problems_In_Hydraulics/ch7.ipynb new file mode 100755 index 00000000..b5eb3280 --- /dev/null +++ b/Problems_In_Hydraulics/ch7.ipynb @@ -0,0 +1,453 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8fbfdaa034f011c9304b20c16adbf915d0a8f58f4b89051b6e8db7227dd1440f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7 : Flow Under Varying Head" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1 Page No : 139" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 6. \t#ft\n", + "di= 2. \t #in\n", + "h= 9. \t #ft\n", + "Cd= 0.6\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5*(d/2)**2*math.pi/(Cd*math.pi*math.sqrt(2*g)/144)\n", + "\n", + "\n", + "vec2=quad(fun,0,h)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'Time to emptify = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time to emptify = 1615 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2 Page No : 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "d1= 4. \t#ft\n", + "d2= 2. \t #in\n", + "l= 300. \t#ft\n", + "P= 5. \t #lb/in**2\n", + "h1= 3. \t #ft\n", + "h2= 6. \t #ft\n", + "f= 0.01\n", + "\n", + "#CALCULATIONS\n", + "X= P*2.31*10*(d2/12)**5/(f*l)\n", + "A= math.pi*d1**2/4\n", + "\n", + "def fun(h):\n", + " return A*math.sqrt((P*2.31*10*(d2/12)**5/(f*l))-(10*(d2/12)**5*h/(f*l)))/(10*(d2/12)**5/(f*l))/7\n", + "\n", + "vec2=quad(fun,h1,h2)\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.2f sec'%(T)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 689.35 sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3 Page No : 141" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 10. \t#in\n", + "l= 15. \t#ft\n", + "di= 3. \t#in\n", + "Cd= 0.62 \n", + "g=32.2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return -l*2*math.sqrt((d/2)**2-((d/2)-H)**2)/(Cd*(math.pi*(di/12)**2/4)*H**0.5*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,0,d/2)\n", + "T= vec2[0]\n", + "secs = -T%60\n", + "mins = -T/60\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d mins and %d seconds'%(mins,secs)\n", + "\n", + "# rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 27 mins and 54 seconds\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4 Page No : 142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.integrate import quad\n", + "\n", + "#initialisation of variables\n", + "h= 4. \t#ft\n", + "w= 6. \t#ft\n", + "l= 100. \t#yd\n", + "a= 60. \t#degrees\n", + "h1= 3. \t#ft\n", + "h2= 2. \t#ft\n", + "Cd= 0.6\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "A= l*3*w\n", + "def fun(H):\n", + " return -A*H**-2.5/(Cd*(8./15)*(math.tan(math.radians(a/2)))*math.sqrt(2*g))\n", + "\n", + "vec2=quad(fun,h1,(h1-h2))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 654 sec\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.5 Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "A= 1./16 \t#mile**2\n", + "d= 2. \t#ft\n", + "h= 18. \t#ft\n", + "h1= 5. \t#ft\n", + "f= 0.006\n", + "l= 200. \t#ft\n", + "h2= 10. \t#ft\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "X= math.sqrt(1./((1.5+(4*f*l/d))/(2*g)))\n", + "def fun(H):\n", + " return A*5280**2*H**-0.5/(math.pi*d**2*X/4)\n", + "\n", + "vec2=quad(fun,h-h1,h)\n", + "T= vec2[0]\n", + "hours = T/3600\n", + "mins = T%3600/60\n", + "\n", + "#RESULTS\n", + "print 'time for the channel to fall = %d hours and %d mins sec'%(hours,round(mins,-1))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the channel to fall = 48 hours and 20 mins sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6 Page No : 144" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "l= 8. \t#ft\n", + "b= 6. \t#ft\n", + "h= 10. \t#ft\n", + "r= 3.\n", + "Cd= 0.6\n", + "A1= 36. \t#ft**2\n", + "A2= 12. \t#ft**2\n", + "l1= 6. \t#ft\n", + "h1= 1. \t#ft\n", + "d= 2. \t#in\n", + "g=32.2 \t#ft/s**2\n", + "\n", + "#CALCULATIONS\n", + "def fun(H):\n", + " return H**-0.5/(Cd*(math.pi*(d/12)**2/4)*math.sqrt(2*g)*((1/A1)+(1/A2)))\n", + "\n", + "vec2=quad(fun,0,(b-h1))\n", + "T= vec2[0]\n", + "\n", + "#RESULTS\n", + "print 'time for the levels to become equal = %.f sec'%(T)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "time for the levels to become equal = 383 sec\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7 Page No : 145" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "h1= 3. \t#ft\n", + "h2= 4. \t#ft diameter\n", + "r= 0.95 \t#m**-1\n", + "k= 27.65 \t#sec\n", + "Cd= 0.95\n", + "\n", + "#CALCULATIONS\n", + "T= k*(math.log(r*math.sqrt(h2)-1)+(r*math.sqrt(h2)-1))-k*(math.log(r*math.sqrt(h1)-1)+(r*math.sqrt(h1)-1))\n", + "h= ((h2-h1)/Cd)**2\n", + "\n", + "#RESULTS\n", + "print 'Time = %.2f sec'%(T)\n", + "print ' Increase in water level = %.2f ft'%(h)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time = 16.23 sec\n", + " Increase in water level = 1.11 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8 Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "t= 75. \t#sec\n", + "h= 10.5 \t#in constant\n", + "h1= 13.5 \t#in\n", + "\n", + "#CALCULATIONS\n", + "r= t*math.pi*math.sqrt(2*h**2)/math.log((math.sqrt(2*h1**2)+h1)/(math.sqrt(2*h**2)-h))\n", + "t= -r*((1/h1)-(1/h))\n", + "\n", + "#RESULTS\n", + "print 'A/K = %.f '%(r)\n", + "print ' Time taken = %.1f sec'%(t)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A/K = 1737 \n", + " Time taken = 36.8 sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9 Page No : 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "g= 9.8 \t#m/sec**2\n", + "h1= 10. \t#in\n", + "h2= 12. \t#in\n", + "r1= 1.32\n", + "r2= 1.56\n", + "r3= 1.97\n", + "r4= 4.10\n", + "r5= 2.64\n", + "\n", + "#CALCULATIONS\n", + "Q= math.sqrt(32.2)*(h2/18)**1.5\n", + "T= 10**5*(r1+2*r3+r4+4*(r3+r5))/(6*h2*60*60)\n", + "\n", + "#RESULTS\n", + "print 'Actual discharge = %.2f CBH**1.5 cuses'%(Q)\n", + "print ' Time = %.1f hr'%(T)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual discharge = 3.09 BH**1.5 cuses\n", + " Time = 10.7 hr\n" + ] + } + ], + "prompt_number": 20 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch8.ipynb b/Problems_In_Hydraulics/ch8.ipynb new file mode 100755 index 00000000..9a5c856c --- /dev/null +++ b/Problems_In_Hydraulics/ch8.ipynb @@ -0,0 +1,296 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:35125badba4aaa9b528697efd91fa6b7acc4c2f1f63bb28106c08928483bd0b9" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8 :Viscosity and Viscous Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "v= 10.01 \t#poise velocity\n", + "g= 32.2 \t#ft/sec**2\n", + "d= 30.48 \t#cm\n", + "w= 453.6 \t#gm\n", + "\n", + "#CALCULATIONS\n", + "M= round(v*d/w,3)\n", + "F= M/g\n", + "\n", + "#RESULTS\n", + "print 'Pound in unit of mass = %.3f lb/ft sec absolute units'%(M)\n", + "print ' Pound in unit of force = %.4f slugs/ft sec'%(F)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pound in unit of mass = 0.673 lb/ft sec absolute units\n", + " Pound in unit of force = 0.0209 slugs/ft sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2 Page No : 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "W= 20. \t#tons/hr oil\n", + "l= 1000. \t#ft long\n", + "w= 57. \t#lb/ft**3 weighs\n", + "kv= 0.0205 \t#ft**2/sec kinematic viscisity\n", + "d= 6. \t#in diameter\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "Q= W*2240/(3600*w)\n", + "A= math.pi*(d/12)**2/4\n", + "v= Q/A\n", + "R= v*(d/12)/kv\n", + "n= w*kv/g\n", + "P= 32*v*n*l/((d/12)**2*w)\n", + "HP= P*2240*W/(3600*500)\n", + "\n", + "#RESULTS\n", + "print 'Reynolds number = %.1f '%(R)\n", + "print ' H.P required = %.2f hp'%(HP)\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reynolds number = 27.1 \n", + " H.P required = 2.26 hp\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4 Page No : 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 0.0067 \t#poise\n", + "l= 10. \t#ft length\n", + "w= 62. \t#lb/ft**3 density\n", + "d= 1. \t#in\n", + "Q= 2. \t#ft**2/sec\n", + "sm= 13.57\n", + "k1= 0.003\n", + "k2= 0.0725\n", + "r= 0.3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "n1= n*30.48/453.6\n", + "v= Q*4/(60*math.pi*(d/12)**2)\n", + "RN= v*(d/12)*w/n1\n", + "f= k1+(k2/RN**r)\n", + "hf= 4*f*l*v**2/(2*g*(d/12))\n", + "hl= hf*12/sm\n", + "\n", + "#RESULTS\n", + "print 'Head lost in inches of mercury = %.2f in'%(hl)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head lost in inches of mercury = 1.37 in\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5 Page No : 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "n= 0.91 \t#poise\n", + "g= 32.2 \t#ft/sec\n", + "N= 300. \t#r.p.m\n", + "t= 0.01 \t#in\n", + "r1= 0.25 \t#ft\n", + "r2= 1./6 \t#ft\n", + "\n", + "#CALCULATIONS\n", + "n1= n*30.48/(454*g)\n", + "A= N*2*math.pi/60\n", + "t1= t/12\n", + "hp= math.pi*A**2*n1*(r1**4-r2**4)/(t1*1100)\n", + "\n", + "#RESULTS\n", + "print 'Horse Power lost = %.4f '%(hp)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horse Power lost = 0.0201 \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "vw= 0.3 \t#ft/sec\n", + "dw= 1. \t#in\n", + "da= 12. \t#in\n", + "ww= 62.3 \t#lb/ft**3\n", + "wa= 0.075 \t#lb/ft**3\n", + "nw= 0.01 \t#poise\n", + "na= 0.00018 \t#poise\n", + "\n", + "#CALCULATIONS\n", + "va= vw*dw*ww*na/(nw*da*wa)\n", + "\n", + "#RESULTS\n", + "print 'critical velocity of air = %.3f ft/sec'%(va)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "critical velocity of air = 0.374 ft/sec\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No : 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "dm= 0.75 \t#in\n", + "dt= 0.25 \t#in\n", + "dP= 10.4 \t#lb/in**2\n", + "rd= 0.84\n", + "w= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "v1= math.sqrt(dP*144*g/(rd*w*((dm/dt)**4-1)))\n", + "Q= math.pi*dm**2*v1*60*w/(4*144*10)\n", + "\n", + "#RESULTS\n", + "print 'Discharge rate = %.1f gal.min'%(Q)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge rate = 3.9 gal.min\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/ch9.ipynb b/Problems_In_Hydraulics/ch9.ipynb new file mode 100755 index 00000000..8afae5a1 --- /dev/null +++ b/Problems_In_Hydraulics/ch9.ipynb @@ -0,0 +1,323 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:62ceb66cf48441d19499a6332c57808da0a2f8834a586c75e2d7d1a835c045df" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9 : Impact of Jets" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1 Page No : 171" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 2. \t #in\n", + "V= 210. \t#ft/sec\n", + "V1= 50. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "w= 62.4 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "M= math.pi*V*w/(4*36*g)\n", + "F= M*V\n", + "dV= V-V1\n", + "M1= math.pi*dV*w/(4*36*g)\n", + "F1= M1*dV\n", + "W= F1*V1\n", + "F2= M*dV\n", + "W1= F2*V1\n", + "\n", + "#RESULTS\n", + "print 'Force on plate = %.f lb'%(F+1)\n", + "print ' Force on plate = %.f lb'%(F1)\n", + "print ' Work done/sec = %.f ft-lb/sec'%(W)\n", + "print ' Force on plate = %.f lb'%(F2)\n", + "print ' Work done/sec = %.f ft-lb/sec'%(round(W1,-3))\n", + "\n", + "#The answer is a bit different due to rounding off error in textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on plate = 1865 lb\n", + " Force on plate = 1082 lb\n", + " Work done/sec = 54116 ft-lb/sec\n", + " Force on plate = 1421 lb\n", + " Work done/sec = 71000 ft-lb/sec\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No : 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "v1= 15. \t#ft/sec\n", + "v2= 40. \t#ft/sec\n", + "a= 30. \t#degrees\n", + "b= 150. \t#degrees\n", + "v= 15.27 \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "a1= a-math.degrees(math.sin(v1*math.sin(math.radians(b))/v2))\n", + "w= math.cos(math.radians(a1))*v2\n", + "vr= v2*math.sin(math.radians(a1))/math.sin(math.radians(a))\n", + "v1= math.sqrt(v1**2+vr**2-2*v1*vr*math.cos(math.radians(a)))\n", + "r= 180-math.sin(math.radians(a))*vr/v\n", + "w1= v*math.cos(math.radians(r))\n", + "W= v1*(w-w1)/g\n", + "\n", + "#RESULTS\n", + "print 'a = %.2f degrees'%(a1)\n", + "print ' w = %.2f ft/sec'%(w)\n", + "print ' vr = %.2f ft/sec'%(vr)\n", + "print ' v1 = %.2f ft/sec'%(v1)\n", + "print ' w = %.2f ft/sec'%(w)\n", + "print ' Work done per pound = %.2f ft-lb/lb'%(W)\n", + "\n", + "# Note : Answers are different because of rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 19.32 degrees\n", + " w = 37.75 ft/sec\n", + " vr = 26.47 ft/sec\n", + " v1 = 15.42 ft/sec\n", + " w = 37.75 ft/sec\n", + " Work done per pound = 25.39 ft-lb/lb\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No : 173" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "\n", + "#initialisation of variables\n", + "d= 0.5 \t#in\n", + "a= 165. \t#degrees\n", + "W= 7.35 \t#lb\n", + "W1= 500. \t#lb\n", + "t= 148. \t#sec\n", + "g= 32.2 \t#ft/sec**2\n", + "w= 62.3 \t#lb/ft**3\n", + "\n", + "#CALCULATIONS\n", + "Q= W1/(t*w)\n", + "v= Q*16*144/math.pi\n", + "dv= v*(1-math.cos(math.radians(a)))\n", + "F= dv*W1/(t*g)\n", + "r= W/F\n", + "k= (1-(W*t*g/(W1*v)))/math.cos(math.radians(a))\n", + "\n", + "#RESULTS\n", + "print 'k = %.3f '%(k)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "k = 0.788 \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No : 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "t= 0.25 \t#in\n", + "a= 30. \t#degrees\n", + "w= 480. \t#lb/ft**3\n", + "h= 2. \t#in\n", + "d= 0.5 \t#in\n", + "l= 6. \t#in\n", + "w1= 62.4 \t#lb/ft**3\n", + "g= 32.2 \t#ft/sec**2\n", + "\n", + "#CALCULATIONS\n", + "W= t*l**2*w/1728\n", + "M= w1*math.pi*d**2*math.cos(math.radians(a))/(g*4*144)\n", + "v= math.sqrt(W*(l/2)*math.sin(math.radians(a))/(M*2*(1./math.cos(math.radians(a)))))\n", + "\n", + "#RESULTS\n", + "print 'Velocity of jet = %.1f ft/sec'%(v)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of jet = 26.6 ft/sec\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "V= 90. \t#ft/sec\n", + "a= 30. \t#degrees\n", + "u= 45. \t#ft/sec\n", + "\n", + "#CALCULATIONS\n", + "w= V*math.cos(math.radians(a))\n", + "f= math.sqrt(V**2-w**2)\n", + "tanb= (math.atan(math.radians(f/(w-u))))\n", + "b = math.degrees(math.tan(tanb))\n", + "b = math.degrees(math.atan(b))\n", + "V1= math.sqrt(f**2+(u-f*1./math.tan(math.radians(b)))**2)\n", + "\n", + "#RESULTS\n", + "print \"B = %.2f degrees\"%b\n", + "print 'absolute velocity of water at the exit = %.1f ft/sec'%(V1)\n", + "\n", + "# rounding off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "B = 53.79 degrees\n", + "absolute velocity of water at the exit = 46.6 ft/sec\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#initialisation of variables\n", + "u= 734. \t#ft/sec\n", + "v= 2000. \t#ft/sec\n", + "g= 32.2 \t#ft/sec**2\n", + "da= 0.019 \t#kg/m**3\n", + "\n", + "#CALCULATIONS\n", + "W= g*v/(v-u)\n", + "A= W/(u*da)\n", + "\n", + "#RESULTS\n", + "print 'Weight of the air = %.1f lb/sec'%(W)\n", + "print ' Area of inlet = %.2f ft**2'%(A)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight of the air = 50.9 lb/sec\n", + " Area of inlet = 3.65 ft**2\n" + ] + } + ], + "prompt_number": 23 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Problems_In_Hydraulics/screenshots/1Hydrostatics.png b/Problems_In_Hydraulics/screenshots/1Hydrostatics.png Binary files differnew file mode 100755 index 00000000..816d8250 --- /dev/null +++ b/Problems_In_Hydraulics/screenshots/1Hydrostatics.png diff --git a/Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png b/Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png Binary files differnew file mode 100755 index 00000000..4c71e1c3 --- /dev/null +++ b/Problems_In_Hydraulics/screenshots/4OrificesAndNotches.png diff --git a/Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png b/Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png Binary files differnew file mode 100755 index 00000000..23e7a483 --- /dev/null +++ b/Problems_In_Hydraulics/screenshots/7FlowUnderVaryingHead.png |