{
 "metadata": {
  "name": "",
  "signature": "sha256:d2599cf416e0a07710e4c3d128cbc7fa43fd432b07cfc1f586c709ffa82e3638"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10 : Forces on Immersed Bodies"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1 Page No : 301"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "nu = 0.001 \t#ft**2 /s\n",
      "L = 1.5 \t#ft\n",
      "U = 2.   \t#ft/s\n",
      "s = 0.925\n",
      "ro = 1.94\n",
      "b = 6.\n",
      "\t\n",
      "#calculations\n",
      "R = L*U/nu\n",
      "Cf = 1.328/math.sqrt(R)\n",
      "Ff = Cf*s*ro*U*b/12 *L\n",
      "delta = 4.91 *L/math.sqrt(R)\n",
      "T0 = 0.332*nu*s*ro*U/L *math.sqrt(R)\n",
      "print R\n",
      "#Results\n",
      "print \"Friction drag  =  %.3f lb\"%(Ff)\n",
      "print \" Thickness of boundary layer  =  %.4f ft\"%(delta)\n",
      "print \" Shear stress  =  %.4f lb/ft**2\"%(T0)\n",
      "\n",
      "#Similar calculations are done for SI units case"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "3000.0\n",
        "Friction drag  =  0.065 lb\n",
        " Thickness of boundary layer  =  0.1345 ft\n",
        " Shear stress  =  0.0435 lb/ft**2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2 Page No : 305"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "nu = 0.00015 \t#ft**2/s\n",
      "L = 35.      \t#ft\n",
      "U = 88.     \t#fps\n",
      "g = 32.2    \t#ft/s**2\n",
      "b = 10. \t    #ft\n",
      "w = 8.       \t#ft\n",
      "rho = 0.0725\n",
      "\t\n",
      "#calculations\n",
      "R = L*U/nu\n",
      "Cf = 0.455 /(math.log10(R))**2.58\n",
      "B = 2*b + w\n",
      "Ff = Cf*rho/g *U**2 /2 *L*B\n",
      "Rx = R/10**5\n",
      "delta = L*0.377 /(b* Rx**(0.2))\n",
      "T0 = 0.0587 *rho/g *U**2 /2 *(nu/(L*U))**(0.2)\n",
      "\t\n",
      "#Results\n",
      "print \"Frictional drag  =  %.1f lb\"%(Ff)\n",
      "print \" Thickness of  boundary layer  =  %.3f ft\"%(delta)\n",
      "print \" Shear stress  =  %.4f lb/ft**2\"%(T0)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frictional drag  =  22.9 lb\n",
        " Thickness of  boundary layer  =  0.455 ft\n",
        " Shear stress  =  0.0176 lb/ft**2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3 Page No : 308"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "nu = 0.0000166 \t#ft**2 /s\n",
      "U = 5.06 \t#fps\n",
      "L = 50. \t#ft\n",
      "g = 32.2\n",
      "dia = 10. \t#ft\n",
      "\t\n",
      "#calculations\n",
      "R = L*U/nu\n",
      "Cf = 0.0028\n",
      "Ff = Cf*64/g *U**2 /2 *math.pi*dia*L\n",
      "Rx = R/L\n",
      "ec = 26*nu/U *Rx**(0.25)\n",
      "Rx2 = Rx*L/2\n",
      "T02 = 0.0587*U**2 /2 /(Rx2)**(0.2)\n",
      "delta2 = 60*nu/math.sqrt(T02)\n",
      "\t\n",
      "#Results\n",
      "print \"Friction drag  =  %.f lb\"%(Ff)\n",
      "print \" Critical roughness  =  %.4f ft\"%(ec)\n",
      "print \" height of roughness  =  %.4f ft\"%(delta2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Friction drag  =  112 lb\n",
        " Critical roughness  =  0.0020 ft\n",
        " height of roughness  =  0.0056 ft\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.4 Page No : 314"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "Cd = 0.45\n",
      "rho = 0.0725/32.2\n",
      "V = 88.  \t#fps\n",
      "A = 8*10.\n",
      "\t\n",
      "#calculations\n",
      "Fd = Cd*rho*V**2 /2 *A\n",
      "Drag2 = 23\n",
      "D = Fd-Drag2\n",
      "\t\n",
      "#Results\n",
      "print \"Pressure drag  =  %.f lb\"%(D)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pressure drag  =  291 lb\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.5 Page No : 315"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from sympy import Symbol,solve\n",
      "import math\n",
      "\n",
      "#Initialization of variables\n",
      "Cd = 0.2\n",
      "D = 8.5/12 \t#in\n",
      "v = 1.57*10**-4\n",
      "rho = 0.00238\n",
      "\t\n",
      "#calculations\n",
      "A = (math.pi*D**2)/4\n",
      "#From trail and error method,\n",
      "V = 412 \t#fps\n",
      "R = (D*V)/v\n",
      "\n",
      "\t\n",
      "#Results\n",
      "print \"Free fall velocity  =  %.2e fps\"%(R)\n",
      "print \"Since the values of R and Cd check with the figure, V = 412 fps\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Free fall velocity  =  1.86e+06 fps\n",
        "Since the values of R and Cd check with the figure, V = 412 fps\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.6 Page No : 319"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#Initialization of variables\n",
      "nu = 1.15*10**-5 \t#m**2/s\n",
      "D = 2.*10**-3 \t    #m\n",
      "V = 15.         \t#m/s\n",
      "T = -20. \t        #C\n",
      "\t\n",
      "#calculations\n",
      "R = D*V/nu\n",
      "f = 0.2 *V/D *(1+T/R)\n",
      "\t\n",
      "#Results\n",
      "print \"Frequency of oscillation  =  %d Hz\"%(round(f,-2))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Frequency of oscillation  =  1500 Hz\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.7 Page No : 324"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "n = 90. \t#rpm\n",
      "R = 2. \n",
      "rho = 0.0765/32.2\n",
      "B = 25.\n",
      "U = 120. \t#fps\n",
      "\t\n",
      "#calculations\n",
      "vt = 2*math.pi*R*n/60\n",
      "T = 2*math.pi*R*vt\n",
      "Fl = rho*B*U*T\n",
      "theta = math.degrees(math.asin(-T/(4*math.pi*R*U)))\n",
      "\n",
      "#Results\n",
      "print \"Peripheral velocity = %.2f fpx\"%vt\n",
      "print \"Value of circulation  =  %.f ft62/s\"%(T)\n",
      "print \" Transverse or lift force  =  %d lb\"%(round(Fl,-1))\n",
      "print \" Position of stagnation points  =  %.1f degrees\"%(180-theta)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Peripheral velocity = 18.85 fpx\n",
        "Value of circulation  =  237 ft62/s\n",
        " Transverse or lift force  =  1690 lb\n",
        " Position of stagnation points  =  184.5 degrees\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.8 Page No : 331"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "B = 36. \t#ft\n",
      "c = 6.  \t#ft\n",
      "Cl = 0.8\n",
      "tau = 0.175 \n",
      "rho = 0.001756\n",
      "V = 300. \t#fps\n",
      "\t\n",
      "#calculations\n",
      "alphai = Cl/(math.pi*B/c) *(1+tau) *180/math.pi\n",
      "alpha = 5.4 \n",
      "lift = -5.6 \t#degrees\n",
      "alphao = alpha-alphai\n",
      "alphaod = alphao-lift\n",
      "alphaor = alphaod*math.pi/180\n",
      "eta = Cl/(2*math.pi*alphaor)\n",
      "Fl = Cl*rho*V**2 /2 *B*c\n",
      "Fd = 0.047/Cl *13680\n",
      "HP = Fd*V/550\n",
      "\t\n",
      "#Results\n",
      "print \"Friction coefficient  =  %.3f \"%(eta)\n",
      "print \" weight of the wing  =  %d lb\"%(round(Fl,-1))\n",
      "print \" Horsepower required  =  %d hp\"%(HP)\n",
      "\n",
      "# rounding off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Friction coefficient  =  0.896 \n",
        " weight of the wing  =  13650 lb\n",
        " Horsepower required  =  438 hp\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.9 Page No : 334"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#Initialization of variables\n",
      "k = 1.4\n",
      "R = 287.\n",
      "T = 249. \t#K\n",
      "v = 600. \t#velocity - m/s\n",
      "d = 0.2 \t#diameter - m\n",
      "\t\n",
      "#calculations\n",
      "c = math.sqrt(k*R*T)\n",
      "M = v/c\n",
      "Cd = 0.62\n",
      "rho = 47.22*10**3 /(R*T)\n",
      "Fd = Cd*rho*v**2 /2 *math.pi*d**2 /4\n",
      "\t\n",
      "#Results\n",
      "print \"Drag  =  %d N\"%(Fd)\n",
      "\n",
      "# note : answer is accurate"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Drag  =  2316 N\n"
       ]
      }
     ],
     "prompt_number": 15
    }
   ],
   "metadata": {}
  }
 ]
}