{
 "metadata": {
  "name": "",
  "signature": "sha256:78fe20b770d35c2d23108a58f50bb1579f3cddf4dfa3efb233fab2fa5b1b32cd"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3 : Kinematics of Fluid Motion"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.1 Page No : 83"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# variables\n",
      "v_mag = 3.;\n",
      "x = 8.;\n",
      "y = 6.;\n",
      "\n",
      "# calculations \n",
      "s = math.sqrt(x**2 + y**2);\n",
      "v = v_mag*s;\t\t# fps\n",
      "a_t = v_mag*s*v_mag;\t\t# ft/sec**2\n",
      "a_r = 0;\n",
      "a = math.sqrt(a_r**2 + a_t**2);\n",
      "\n",
      "# results \n",
      "print 'v = %d fps  a = %d ft/sec**2'%(v,a);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "v = 30 fps  a = 90 ft/sec**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.2 Page No : 83"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# variables\n",
      "v = 5;\t\t# fps\n",
      "a_t = 0;\n",
      "\n",
      "# calculations \n",
      "a_r = v**2 /2.;\t\t# ft/sec**2\n",
      "\n",
      "# results \n",
      "print 'Radial component of acceleration = %.1f ft/sec**2 \\nTangential component of acceleration = %d '%(a_r,a_t);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Radial component of acceleration = 12.5 ft/sec**2 \n",
        "Tangential component of acceleration = 0 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.3 Page No : 85"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# variables\t\t\n",
      "v = 5.;\t\t# fps\n",
      "r = 2.;\n",
      "theta = 60.;\t\t# degrees\n",
      "x = 1.;\n",
      "y = math.sqrt(3);\n",
      "v_t = v;\n",
      "v_r = 0;\n",
      "\n",
      "# calculations \n",
      "u = -v*y/(math.sqrt(x**2 + y**2));\n",
      "v = v*x/(math.sqrt(x**2 + y**2));\n",
      "a_x = -50*x/8;\n",
      "a_y = -50*y/8;\n",
      "a_r = -v_t**2 /r;\n",
      "a_t = v_r*v_t/r;\n",
      "\n",
      "# results \n",
      "print 'u = %.2f fps, v = %.2f fps'%(u,v);\n",
      "print ' v_r = %d, v_t = %d fps'%(v_r,v_t);\n",
      "print ' a_x = %.2f ft/sec**2, a_y = %.2f ft/sec**2'%(a_x,a_y);\n",
      "print ' a_r = %.1f ft/sec**2, a_t = %d'%(a_r,a_t);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "u = -4.33 fps, v = 2.50 fps\n",
        " v_r = 0, v_t = 5 fps\n",
        " a_x = -6.25 ft/sec**2, a_y = -10.83 ft/sec**2\n",
        " a_r = -12.5 ft/sec**2, a_t = 0\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.4 Page No : 88"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# variables\n",
      "w = 600.;\t\t# pounds\n",
      "l1 = 12.;\t\t#inches\n",
      "l2 = 8.;\t\t#inches\n",
      "\n",
      "# calculations \n",
      "Q = w/(62.4);\n",
      "V_12 = Q/(0.25*math.pi*(l1/12)**2);\n",
      "V_8 = Q/(0.25*math.pi*(l2/12)**2);\n",
      "\n",
      "# results \n",
      "print 'Q = %.2f cfs'%(Q);\n",
      "print 'V_12 = %.2f fps and V_8 = %.2f fps'%(V_12,V_8);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Q = 9.62 cfs\n",
        "V_12 = 12.24 fps and V_8 = 27.55 fps\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.5 Page No : 89"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\t\n",
      "# variables\n",
      "l = 12.;\t\t# inches\n",
      "W = 6.;\t\t# pounds\n",
      "w = 0.0624\t\t# lb/cuft\n",
      "l1 = 8.;\t\t# inches\n",
      "rho = 0.050;\t\t# lb/cuft\n",
      "\n",
      "# calculations \n",
      "Q_12 = W/w ;\n",
      "Q_8 = W/rho ;\n",
      "V_12 = Q_12/(0.25*math.pi*(l/12)**2);\n",
      "V_8 = Q_8/(0.25*math.pi*(l1/12)**2);\n",
      "\n",
      "# results \n",
      "print 'Q_12 = %.1f cfs, Q_8 = %d cfs'%(Q_12,Q_8);\n",
      "print ' V_12 = %.1f fps, V_8 = %.f fps'%(V_12,V_8);\n",
      "\n",
      "\t\t"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Q_12 = 96.2 cfs, Q_8 = 120 cfs\n",
        " V_12 = 122.4 fps, V_8 = 344 fps\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}