{
 "metadata": {
  "name": "",
  "signature": "sha256:30849a845cb23e6184901c441ceb4a2e2451d5db6a2c0f60dce1b23531e4d077"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : Similarity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1 Page No : 23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#initialisation of variables\n",
      "r= 4.\n",
      "l1= 4 \t#units long axis\n",
      "l2= 10 \t#units long axis\n",
      "\t\n",
      "#CALCULATIONS\n",
      "sxy= (4/r)\n",
      "sxy1= l1**2\n",
      "sxy2= l2**2\n",
      "\t\n",
      "#RESULTS\n",
      "print  'x**2+4*y**2 = %.f '%(sxy)\n",
      "print  ' x**2+4*y**2 = %.f '%(sxy1)\n",
      "print  ' x**2+4*y**2 = %.f '%(sxy2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "x**2+4*y**2 = 1 \n",
        " x**2+4*y**2 = 16 \n",
        " x**2+4*y**2 = 100 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3 Page No : 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "vo= 10 \t#ft/sec\n",
      "a= 0.5 \t#ft**-1\n",
      "b= 1 \t#ft\n",
      "x= -2 \t#ft\n",
      "y= 2 \t#ft\n",
      "b1= 2\n",
      "a1= 3./5 \t#ft\n",
      "\t\n",
      "#CALCULATIONS\n",
      "Vx= vo/(a*x**2+b)\n",
      "Vy= -2*a*b*vo*x*y/(a*x**2+b)**2\n",
      "V= math.sqrt(Vx**2+Vy**2)\n",
      "fx= -2*a*b**2*vo**2*x/(a*x**2+b)**3\n",
      "fy= 2*a*b**2*vo**2*y*(b-a*x**2)/(a*x**2+b)**4\n",
      "f= math.sqrt(fx**2+fy**2)\n",
      "r= b1**2/a1\n",
      "f1= f*r\n",
      "\t\n",
      "#RESULTS\n",
      "print  'Vx = %.2f ft/sec'%(Vx)\n",
      "print  ' Vy = %.2f ft/sec'%(Vy)\n",
      "print  ' V = %.2f ft/sec'%(V)\n",
      "print  ' fx = %.2f ft/sec**2'%(fx)\n",
      "print  ' fy = %.2f ft/sec**2'%(fy)\n",
      "print  ' f = %.2f ft/sec**2'%(f)\n",
      "print  ' r = %.2f in the present case'%(r)\n",
      "print  ' f1 = %.2f ft/sec**2'%(f1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Vx = 3.33 ft/sec\n",
        " Vy = 4.44 ft/sec\n",
        " V = 5.56 ft/sec\n",
        " fx = 7.41 ft/sec**2\n",
        " fy = -2.47 ft/sec**2\n",
        " f = 7.81 ft/sec**2\n",
        " r = 6.67 in the present case\n",
        " f1 = 52.05 ft/sec**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.4 Page No : 36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#initialisation of variables\n",
      "r= 1./5\n",
      "b1= 2 \t#ft\n",
      "a1= 3./5 \t#ft\n",
      "\t\n",
      "#CALCULATIONS\n",
      "r= (a1*b1)**2*r\n",
      "\t\n",
      "#RESULTS\n",
      "print  'ratio of resultant forces acting on coorresponding fluid elements = %.3f '%(r)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio of resultant forces acting on coorresponding fluid elements = 0.288 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 Page No : 44"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#initialisation of variables\n",
      "vos= 70. \t#ft/sec\n",
      "as1= 78. \t#ft density\n",
      "am= 72. \t#ft wind-tunnel\n",
      "ls1= 6. \t#ft strut section\n",
      "lm= 2.  \t#ft length\n",
      "um= 386. \t#ft/sec\n",
      "us= 372. \t#ft/sec\n",
      "dm= 0.4\n",
      "\t\n",
      "#CALCULATIONS\n",
      "vom= vos*as1*ls1*um/(am*lm*us)\n",
      "Ds= dm*(am/as1)*(us/um)**2\n",
      "\t\n",
      "#RESULTS\n",
      "print  'Air speed = %.f ft/sec'%(vom)\n",
      "print  ' Ds = %.3f lbf'%(Ds)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Air speed = 236 ft/sec\n",
        " Ds = 0.343 lbf\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.6 Page No : 45"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#initialisation of variables\n",
      "vom= 236. \t#ft/sec\n",
      "as1= 0.072 \t#ft\n",
      "am = 62.4 \t#ft density of water\n",
      "ls1= 2. \t#ft\n",
      "lm= 8. \t#ft\n",
      "um= 248. \t#ft/sec  viscosity\n",
      "us= 3.86 \t#ft/sec\n",
      "Pm= 0.4/3.3\n",
      "\t\n",
      "#CALCULATIONS\n",
      "voh= vom*as1*ls1*um/(am*lm*us)\n",
      "Ds= Pm*(as1/am)*(um/us)**2*(ls1/lm)*(lm-ls1)\n",
      "\t\n",
      "#RESULTS\n",
      "print  'Air speed = %.2f ft/sec'%(voh)\n",
      "print  ' Drag force = %.3f lbf'%(Ds)\n",
      "\n",
      "# note : rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Air speed = 4.37 ft/sec\n",
        " Drag force = 0.866 lbf\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.7 Page No : 51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#initialisation of variables\n",
      "To1= 540. \t#R temperature\n",
      "po3= 12.6 \t#lbf/in**2\n",
      "l3= 3.   \t#ft\n",
      "po1= 14.7 \t#lbf/in**2 pressure\n",
      "l1= 1.   \t#ft\n",
      "vo1= 500. \t#ft/sec velocity\n",
      "r= 0.83\n",
      "P1= 1.   \t#lbf/in**2 turbine blade\n",
      "\t\n",
      "#CALCULATIONS\n",
      "To3= To1*(po3*l3/(po1*l1))**r\n",
      "Vo3= vo1*math.sqrt(To3/To1)\n",
      "P3= P1*po3*l3/(po1*l1)\n",
      "\t\n",
      "#RESULTS\n",
      "print  'To3 = %.f R'%(To3)\n",
      "print  ' Vo3 = %.f ft/sec'%(Vo3)\n",
      "print  ' P3 = %.2f lbf/ft'%(P3)\n",
      "\n",
      "# note : book answers are not accurate."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "To3 = 1183 R\n",
        " Vo3 = 740 ft/sec\n",
        " P3 = 2.57 lbf/ft\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}