{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 17 : The boundary layer"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.1 page no : 519\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the boundary layer thickness\n",
      "#for the aeroplane\n",
      "\n",
      "# variables\n",
      "v=1.61*10**(-4)                 #ft**2/s\n",
      "x=2.                            #ft\n",
      "V=200.                          #miles/hr\n",
      "\n",
      "# calculation\n",
      "#1 mile = 5280 ft\n",
      "#1 hr = 3600 sec\n",
      "delta_aeroplane=5*(v*x/(V*5280/3600.0))**0.5\n",
      "\n",
      "# result\n",
      "print \"The boundary layer thickness for the aeroplane is %f ft\\n\"%delta_aeroplane\n",
      "#for the boat\n",
      "v1=1.08*10**(-5)                #ft**2/s\n",
      "x1=2.                           #ft\n",
      "V1=10.                          #miles/hr\n",
      "#1 mile = 5280 ft\n",
      "#1 hr = 3600 sec\n",
      "delta_boat=5*(v1*x1/(V1*5280/3600.0))**0.5\n",
      "print \"The boundary layer thickness for the boat is %f ft\"%delta_boat"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The boundary layer thickness for the aeroplane is 0.005239 ft\n",
        "\n",
        "The boundary layer thickness for the boat is 0.006068 ft\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.2 page no : 521\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the force required to tow a square metal plate by a boat\n",
      "\n",
      "# variables\n",
      "rho_water=998.2                     #Kg/m**3\n",
      "V=15.                               #km/hr\n",
      "v=1.004*10**(-6)                    #m**2/s\n",
      "l=1.                                #m length of plate\n",
      "\n",
      "#Calculations\n",
      "#1 km = 1000 m\n",
      "#1 hr = 3600 s\n",
      "Rx=(V*1000/3600.)*l/v               #dimentionless (reynold's number)\n",
      "Cf=1.328/Rx**0.5                    #dimentionless\n",
      "F=Cf*rho_water*(V*1000/3600.0)**2   #N\n",
      "\n",
      "#Result\n",
      "print \"The force required to tow the square plate is %f N\"%F"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The force required to tow the square plate is 11.297065 N\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.3 page no : 528\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the distance between the wall and edge of the laminar sublayer and buffer layer\n",
      "\n",
      "#Variables\n",
      "V=10.                          #ft/s\n",
      "l=0.25                         #ft\n",
      "v=1.08*10**(-5)                #ft**2/s\n",
      "f=0.0037                       #dimentionless (fanning friction factor)\n",
      "u01=5.                         #dimentionless\n",
      "y01=5.                         #dimentionless\n",
      "\n",
      "#Calculations\n",
      "R=V*l/v                        #dimentionless (reynold's number)\n",
      "u1=V*(f/2.0)**0.5              #ft/s\n",
      "r1=y01*v/u1                    #ft\n",
      "\n",
      "#for buffer layer\n",
      "u02=12.                        #dimentionless\n",
      "y02=26.                        #dimentionless\n",
      "r2=y02*v/u1                    #ft\n",
      "\n",
      "#Results\n",
      "print \"the distance between the wall and edge of the laminar sublayer is %f ft\\n\"%r1\n",
      "print \"the distance between the wall and edge of the buffer layer is %f ft\"%r2\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the distance between the wall and edge of the laminar sublayer is 0.000126 ft\n",
        "\n",
        "the distance between the wall and edge of the buffer layer is 0.000653 ft\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 17.4 page no : 530\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the boundary layer thickness and the drag on the plate\n",
      "\n",
      "# variables\n",
      "V=50.                          #ft/s\n",
      "l=20.                          #ft\n",
      "b=1.                            #ft\n",
      "v=1.08*10**(-5)                #ft**2/s\n",
      "\n",
      "# calculation and result\n",
      "R=V*l/v                        #dimentionless (reynold's number)\n",
      "delta=0.37*l/R**0.2            #ft\n",
      "print \"The boundary layer thichness at the end of the plate is %f ft\\n\"%delta\n",
      "Cf=0.072/R**0.2                #dimentionless\n",
      "rho_water=62.3                 #lbm/ft**3\n",
      "V=50.                          #ft/s\n",
      "#let A be the area of contact\n",
      "A=2*l*b                        #ft**2\n",
      "#1 lbf.s**2 = 32.2 lbm.ft\n",
      "F=(1/2.0)*Cf*rho_water*V**2*A/32.2             #lbf\n",
      "print \"The drag on the plate is %f lbf\"%F"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The boundary layer thichness at the end of the plate is 0.188763 ft\n",
        "\n",
        "The drag on the plate is 177.672178 lbf\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}