{
 "metadata": {
  "name": "",
  "signature": "sha256:a6125783e5c667dece42915a12b250cb19816611a67eefd7aa139b1763963ae5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 : Impact of Jets"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1 Page No : 164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "V = 25.        #m/s velocity\n",
      "F = 300.       # N\n",
      "g = 9.81       \n",
      "p = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p\n",
      "A = (F*g)/(w*V*V)\n",
      "V1 = 35\n",
      "F1 = (w*A*V1*V1)/(g)\n",
      "\n",
      "# Results \n",
      "print \"force in N on the plate if the velocity of the jet is increased to 35 m/sec\",F1\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force in N on the plate if the velocity of the jet is increased to 35 m/sec 588.0\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2 Page No : 164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "d = 0.05       # mm water \n",
      "V = 15.        #m/s velocity\n",
      "g = 9.81            \n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p1\n",
      "a = math.pi*d*d/4\n",
      "F = (w*a*V*V)/g\n",
      "u = 5\n",
      "F1 = (w*a*((V-u)**2))/g\n",
      "\n",
      "# Results \n",
      "print \"force in N on plate if plate is stationary\",round(F,3),\"N\"\n",
      "print \"force in N on plate if plate is moving in the direction of the jet\",round(F1,2),\"N\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force in N on plate if plate is stationary 441.786 N\n",
        "force in N on plate if plate is moving in the direction of the jet 196.35 N\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3 page no : 165"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "d = 0.03             #m diameter\n",
      "Fx = 900             # N \n",
      "x = 30.              #degree angle  \n",
      "g = 9.81             \n",
      "w = g*1000\n",
      "a = 3.142*d*d/4\n",
      "\n",
      "# Calculations \n",
      "V = ((Fx*g)/(w*a*math.sin(math.radians(x))*math.sin(math.radians(x))))**0.5\n",
      "Q = a*V\n",
      "\n",
      "# Results \n",
      "print \"rate of flow in m3/sec\",round((Q*1000),2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "rate of flow in m3/sec 50.45\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4 Page No : 166"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "d = 0.02     #m diameter\n",
      "V = 20.      #m/s, velocity \n",
      "x = 15.      #degree angle\n",
      "g = 9.81      \n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p1\n",
      "a = math.pi*d*d/4\n",
      "W = (w*a*V*V)/(g*math.sin(math.radians(x)))\n",
      "F1 = (w*a*V*V)/(2*g)\n",
      "\n",
      "# Results \n",
      "print \"weight of the plate in N\",round(W,3),\"N\"\n",
      "print \"force in N required at the lower edge of the plate : %.4f\"%F1,\"N\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "weight of the plate in N 485.527 N\n",
        "force in N required at the lower edge of the plate : 62.8319 N\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5 Page No : 167"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "d = 0.05       #m diameter\n",
      "V = 20.        #m/s velocity \n",
      "y = 120.       #degree angle\n",
      "x = 180.-y      \n",
      "g = 9.81\n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p1\n",
      "a = math.pi*d*d/4\n",
      "F = (w*a*V*V*(1+math.cos(math.radians(x))))/(g)\n",
      "\n",
      "# Results \n",
      "print \"force in N exerted by the water jet %.4f\"%F,\"N\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force in N exerted by the water jet 1178.0972 N\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6 Page No : 167"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "d = 0.05                  #m diameter\n",
      "V = 20.                   #m velocity\n",
      "u = 7.                    #m/s \n",
      "a = math.pi*d*d/4           \n",
      "g = 9.81\n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p1\n",
      "F = (w*a*V*V)/g\n",
      "F1 = (w*a*((V-u)**2))/g\n",
      "work = F1*u\n",
      "\n",
      "# Results \n",
      "print \"force in N if plate is fixed \",F\n",
      "print \"force in N if plate is moving with a velocity of 7 m/sec\",round(F1,2)\n",
      "print \"work done per sec by the jet\",round(work,3)\n",
      "\n",
      "# note : rounding off error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force in N if plate is fixed  785.398163397\n",
        "force in N if plate is moving with a velocity of 7 m/sec 331.83\n",
        "work done per sec by the jet 2322.815\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7 Page No : 168"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "W = 58.86             #N weighing\n",
      "d = 0.02              #m diameter  \n",
      "V = 5.                #m/s velocity\n",
      "z = 0.15              #m axis \n",
      "g = 9.81            \n",
      "p1 = 1000.    \n",
      "w = g*p1\n",
      "\n",
      "# Calculations \n",
      "a = math.pi*d*d/4\n",
      "F = (w*a*V*V)/g\n",
      "cog = 0.1\n",
      "x = 30\n",
      "P = (F*z)/cog\n",
      "F1 = ((P*cog*(math.cos(math.radians(x))))+(W*cog*(math.sin(math.radians(x)))))\n",
      "V1 = ((F1*g)/(w*a))**0.5\n",
      "\n",
      "# Results \n",
      "print \"velocity in m/sec of the jet if the plate is deflected through 30 degree\",round(V1,2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "velocity in m/sec of the jet if the plate is deflected through 30 degree 3.55\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8 Page No : 169"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "V = 25.                #m velocity\n",
      "u = 10.                #m velocity \n",
      "q = 0.001              #m**3/s\n",
      "g = 9.81\n",
      "p1 = 1000.\n",
      "w = g*p1\n",
      "x = 180.             #degree \n",
      "u1 = 8.              #m velocity\n",
      "\n",
      "# Calculations \n",
      "F1 = (w*q/g)*V*(1-math.cos(math.radians(x)))\n",
      "F2 = (w*q*((V-u)**2)*(1-math.cos(math.radians(x))))/(g*V)\n",
      "F3 = (w*q*(V-u1)*(1-math.cos(math.radians(x))))/g\n",
      "\n",
      "# Results \n",
      "print \"force of jet in N when,the cup is stationary,the cup is moving with velocity of 10m/sec,series of cup with velocity of 8m/sec\" ,\\\n",
      "F1,F2,F3\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force of jet in N when,the cup is stationary,the cup is moving with velocity of 10m/sec,series of cup with velocity of 8m/sec 50.0 18.0 34.0\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.9 Page No : 170"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "x1 = 30.          #m/s velocity\n",
      "V1 = 30.          #degree  \n",
      "Q = 0.001         \n",
      "g = 9.81\n",
      "w = g*1000.\n",
      "Vf1 = V1*math.sin(math.radians(x1))\n",
      "Vw1 = V1*math.cos(math.radians(x1))\n",
      "u = 15.\n",
      "x2 = 120.\n",
      "y1 = math.degrees(math.atan(Vf1/(Vw1-u)))\n",
      "Vr1 = ((Vf1*Vf1)+((Vw1-u)**2))**0.5\n",
      "z = u*math.sin(math.radians(x2))/Vr1\n",
      "y2 = 60-math.degrees(math.asin(z))\n",
      "V2 = Vr1*math.sin(math.radians(y2))/math.sin(math.radians(x2))\n",
      "Vw2 = V2*math.cos(math.radians(x2/2))\n",
      "W = (w*Q*(Vw1+Vw2)*u)/g\n",
      "n = W*2/(V1*V1)\n",
      "print \"angle of vane : %.3f degrees \\\n",
      "\\nwork done of water entering the vane : %.3f Nm/s \\\n",
      "\\nefficiency : %.2f %%\"%(y2,W,n*100)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "angle of vane : 15.670 degrees \n",
        "work done of water entering the vane : 433.194 Nm/s \n",
        "efficiency : 96.27 %\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.10 Page No : 172"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "Q = 0.283         #m**3/s, flow of water \n",
      "d = 0.05          #m diameter\n",
      "x = 170.          #angle \n",
      "u = 48.           #m/s velocity \n",
      "g = 9.81          \n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p1\n",
      "a = math.pi*d*d/4\n",
      "V1 = Q/a\n",
      "Vw1 = V1\n",
      "Vr1 = V1-u\n",
      "x1 = 0\n",
      "Vr2 = Vr1\n",
      "Vw2 = (Vr2*math.cos(math.radians(180-x)))-u\n",
      "Fx = (w*a*(V1-u)*(Vw1+Vw2))/g\n",
      "P = Fx*u/1000\n",
      "n = (P*1000*g*2)/(w*Q*V1*V1)\n",
      "\n",
      "# Results \n",
      "print \"force exerted by the jet : %.3f N \\\n",
      "\\npower developed by the vane : %.4f kW \\\n",
      "\\nefficiency : %.1f %%\"%(Fx,P,(n*100))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "force exerted by the jet : 36014.111 N \n",
        "power developed by the vane : 1728.6773 kW \n",
        "efficiency : 58.8 %\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.11 Page No : 174"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "y1 = 30.                 #angle\n",
      "y2 = 15.                 #angle  \n",
      "a = 13.*(10**-4)         #cm**2 \n",
      "x1 = 15.                 #incline\n",
      "V1 = 60.                 #m/s area moving \n",
      "\n",
      "# Calculations \n",
      "Vf1 = V1*math.sin(math.radians(y2))\n",
      "Vw1 = V1*math.cos(math.radians(y2))\n",
      "u = Vw1-(Vf1/math.tan(math.radians(y1)))\n",
      "Vw2 = u-(Vf1*math.cos(math.radians(y2))/math.sin(math.radians(y1)))\n",
      "Vf2 = (u-Vw2)*math.tan(math.radians(y2))\n",
      "V2 = (Vf2*Vf2+Vw2*Vw2)**0.5\n",
      "x2 = math.degrees(math.atan(Vf2/Vw2))\n",
      "g = 9.81\n",
      "p1 = 1000\n",
      "w = g*p1\n",
      "Fx = (w*a*V1*(Vw1-Vw2))/g\n",
      "Fy = (w*a*V1*(V1*math.sin(math.radians(y2))-V2*math.sin(math.radians(x2))))/g\n",
      "Fr = (Fx*Fx+Fy*Fy)**0.5\n",
      "o = math.degrees(math.atan(Fy/Fx))\n",
      "\n",
      "# Results \n",
      "print \"velocity of the vane : %.4f m/s \\\n",
      "\\ndirection of velocity at exit : %.4f m/s \\\n",
      "\\nresultant force : %.4f N \\\n",
      "\\nangle between forces : %.1f degrees\"%(u,V2,Fr,o)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "velocity of the vane : 31.0583 m/s \n",
        "direction of velocity at exit : 8.1078 m/s \n",
        "resultant force : 4476.2818 N \n",
        "angle between forces : 7.5 degrees\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.12 Page No : 177"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "V1 = 13.             # m/s\n",
      "y1 = 30.                  \n",
      "y2 = y1\n",
      "u = 4.5              # m/s\n",
      "g = 9.81\n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "w = g*p1\n",
      "Q = 0.001\n",
      "x1 = math.degrees(math.acos(0.9394))\n",
      "Vw1 = V1*math.cos(math.radians(x1))\n",
      "Vr1 = (Vw1-u)/math.cos(math.radians(y1))\n",
      "Vw2 = Vr1*math.cos(math.radians(y1))-u\n",
      "Vf2 = Vr1*math.sin(math.radians(y1))\n",
      "V2 = (Vf2*Vf2+Vw2*Vw2)**0.5\n",
      "x2 = math.degrees(math.atan(Vf2/Vw2))\n",
      "W = (w*Q*(Vw1+Vw2)*u)/g\n",
      "\n",
      "# Results \n",
      "print \"direction of velocity : %.3f \\\n",
      "\\nvelocity of water at exit : %.3f m/s \\\n",
      "\\ndirection of work : %.3f \\\n",
      "\\nmagnitude of work done per kg of water : %.3f\"%(x1,V2,x2,W)\n",
      "\n",
      "# note : rounding off errors."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "direction of velocity : 20.049 \n",
        "velocity of water at exit : 5.490 m/s \n",
        "direction of work : 54.193 \n",
        "magnitude of work done per kg of water : 69.410\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.13 Page No : 179"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "V1 = 40.         #m/s velocity\n",
      "u = 12.          #m/s  \n",
      "x1 = 20.         #angle\n",
      "x2 = 90.         #velocity   \n",
      "\n",
      "# Calculations \n",
      "Vw1 = V1*math.cos(math.radians(x1))\n",
      "Vf1 = V1*math.sin(math.radians(x1))\n",
      "y1 = math.degrees(math.atan(Vf1/(Vw1-u)))\n",
      "Vr1 = Vf1/math.sin(math.radians(y1))\n",
      "Vr2 = 0.9*Vr1\n",
      "y2 = math.degrees(math.acos(u/Vr2))\n",
      "W = 1*Vw1*u\n",
      "n = W/(V1*V1*0.5*1)\n",
      "\n",
      "# Results \n",
      "print \"vane angle at the exit : %.4f and %.4f \\\n",
      "\\nwork done on the vane per kg of water : %.4f N m/s\\\n",
      "\\nefficiency : %.2f %%\"%(y1,y2,W,(n*100))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "vane angle at the exit : 28.1318 and 62.6435 \n",
        "work done on the vane per kg of water : 451.0525 N m/s\n",
        "efficiency : 56.38 %\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.14 Page No : 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "d = 0.05           #m diameter\n",
      "V1 = 25.           #m/s velocity \n",
      "x1 = 30.           #angle\n",
      "x = 50.            #angle\n",
      "x2 = x1+x\n",
      "g = 10.           #m/s**2\n",
      "p1 = 1000.\n",
      "\n",
      "# Calculations \n",
      "a = 3.142*d*d/4\n",
      "w = g*p1\n",
      "Fx = (w*a*V1*V1*(math.cos(math.radians(x1))-math.cos(math.radians(x2))))/g\n",
      "Fy = (w*a*V1*V1*(math.sin(math.radians(x1))-math.sin(math.radians(x2))))/g\n",
      "F = (Fx*Fx+Fy*Fy)**0.5\n",
      "z = math.degrees(math.atan(-Fy/Fx))\n",
      "\n",
      "# Results \n",
      "print \"resultant force %.3f and %.3f \\\n",
      "\\nangle made by the resultant force with the horizontal  : %.4f\"%(round(Fy,3),round(Fx,3),round(z,4))\n",
      "\n",
      "# note : It seems book answers are wrong. Kindly check."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "resultant force -595.026 and 849.785 \n",
        "angle made by the resultant force with the horizontal  : 35.0000\n"
       ]
      }
     ],
     "prompt_number": 44
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.15 Page No : 182"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "x1 = 0.          \n",
      "x2 = 60.         # angle\n",
      "V1 = 30.         #m/s velocity\n",
      "V2 = 25.         #m/s velocity \n",
      "m = 0.8          #Kg/s nozzle \n",
      "\n",
      "# Calculations \n",
      "Fx = m*((V1*math.cos(math.radians(x1)))-(V2*math.cos(math.radians(x2))))\n",
      "Fy = m*((V1*math.sin(math.radians(x1)))-(V2*math.sin(math.radians(x2))))\n",
      "R = (Fx*Fx+Fy*Fy)**0.5\n",
      "z = math.degrees(math.atan(-Fy/Fx))\n",
      "\n",
      "# Results \n",
      "print \"magnitude and direction of resultant force  :\",round(R,3),round(z,4)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnitude and direction of resultant force  : 22.271 51.0517\n"
       ]
      }
     ],
     "prompt_number": 46
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}