{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 : Equations of Motion for a Fluid Element"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.1.1 page no : 127"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "\n",
      "F= 100. \t\t#lbf\n",
      "a= 20. \t\t\t#ft/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "m= F*32.2/a\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' mass of the body = %.f lb'%(m)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " mass of the body = 161 lb\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.1.2 Page no : 127"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "\n",
      "m= 5. \t\t\t#lb\n",
      "a= 200. \t\t\t#cm/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "F= m*a/(32.2*30.5)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' Force on the body = %.2f lbf'%(F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Force on the body = 1.02 lbf\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.1.3 page no : 128"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "\n",
      "m= 1. \t\t\t#gm\n",
      "g= 327. \t\t#cm/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "F=m*g/981.\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' Force on the body = %.2f gf'%(F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Force on the body = 0.33 gf\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.2.1 page no : 129"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "\n",
      "w= 0.0764 \t\t\t#lbf/ft**3\n",
      "u= 88. \t\t\t#ft/sec\n",
      "g= 32.2 \t\t\t#ft/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "q= w*u**2./(2*g)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  ' dynamic pressure of air = %.2f lbf/ft**2'%(q)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " dynamic pressure of air = 9.19 lbf/ft**2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.3.1 page no: 132"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "    \n",
      "#initialisation of variables\n",
      "\n",
      "p= 60. \t\t\t#lbf/in**2\n",
      "w= 62.4 \t\t\t#lbf/ft**3\n",
      "l= 1. \t\t\t#ft\n",
      "g= 32.2 \t\t\t#ft/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "i= p*144./(w*l)\n",
      "a= i*g\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  'accelaration of fluid = %.f ft/sec**2'%(a)\n",
      "print 'Answer in book is wrong please check manually.'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "accelaration of fluid = 4458 ft/sec**2\n",
        "Answer in book is wrong please check manually.\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.3.2 page no : 133"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "import math \n",
      "import numpy\n",
      "\n",
      "w= 60. \t\t\t#re/min\n",
      "d= 1. \t\t\t#ft\n",
      "g= 32.2 \t\t#ft/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "a= w**2.*d*4.*math.pi**2./(2.*60**2)\n",
      "i= a/g\n",
      "o= math.degrees(numpy.arctan(i))\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  'slope ofthe free surface = %.1f degrees'%(o)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "slope ofthe free surface = 31.5 degrees\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.3.3 page no : 134"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "import math \n",
      "\n",
      "H= 50. \t\t\t#ft\n",
      "l= 200. \t\t\t#ft\n",
      "g= 32.2 \t\t\t#ft/sec**2\n",
      "\t\t\t\n",
      "#CALCU;ATIONS\n",
      "i= H/l\n",
      "a= i*g\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  'accelaration = %.2f ft/sec**2'%(a)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "accelaration = 8.05 ft/sec**2\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.7.2 page no :145"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "import math \n",
      "\n",
      "g= 32.2 \t\t\t#ft/sec**2\n",
      "h= 12. \t\t\t#in\n",
      "r= 10. \t\t\t#in\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "w= math.sqrt(2*g*(r/12)*(12/r)**2)*(60/(2*math.pi))\n",
      "P= h+(r/4.)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  'speed of rotation = %.f rev/min'%(w)\n",
      "print  ' maximum pressure head = %.1f in of water'%(P)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "speed of rotation = 84 rev/min\n",
        " maximum pressure head = 14.5 in of water\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.8.1 page no : 147"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "import math \n",
      "\n",
      "l= 6. \t\t\t#ft\n",
      "g= 32.2 \t\t\t#ft/sec**2\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "T= 2*math.pi*math.sqrt(l/g)\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  'natural period ofthe system = %.2f sec'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "natural period ofthe system = 2.71 sec\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 6.8.2 page no : 151"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialisation of variables\n",
      "import math \n",
      "\n",
      "l= 6. \t\t\t#ft\n",
      "g= 32.2 \t\t#ft/sec**2\n",
      "l1= 6. \t\t\t#ft\n",
      "l2= 6. \t\t\t#ft\n",
      "l3= 34.\t\t\t#ft\n",
      "\t\t\t\n",
      "#CALCULATIONS\n",
      "a= -((l1+l2-l3)/l)*g\n",
      "w= math.sqrt(a/4.5)*(60/(2*math.pi))\n",
      "\t\t\t\n",
      "#RESULTS\n",
      "print  'maximum speed = %.1f cycles/min'%(w)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum speed = 48.9 cycles/min\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}