summaryrefslogtreecommitdiff
path: root/Problems_In_Hydraulics/ch9.ipynb
diff options
context:
space:
mode:
authornice2014-10-09 18:07:00 +0530
committernice2014-10-09 18:07:00 +0530
commit8048392490bd2efe0fdfa001945f663cba969841 (patch)
treec298682dfb22073b17d86791c5e7a756f4aa1a92 /Problems_In_Hydraulics/ch9.ipynb
parentb9ebc3adfe1cd0b17f061dd639a5c76329e09afa (diff)
downloadPython-Textbook-Companions-8048392490bd2efe0fdfa001945f663cba969841.tar.gz
Python-Textbook-Companions-8048392490bd2efe0fdfa001945f663cba969841.tar.bz2
Python-Textbook-Companions-8048392490bd2efe0fdfa001945f663cba969841.zip
updated books
Diffstat (limited to 'Problems_In_Hydraulics/ch9.ipynb')
-rwxr-xr-xProblems_In_Hydraulics/ch9.ipynb323
1 files changed, 323 insertions, 0 deletions
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