{
 "metadata": {
  "name": "",
  "signature": "sha256:24494f10d2186cdcb9bb7efdf5bb782c5e073da13a9c9e6466d2071310209ca3"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1 : Introduction"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.1 page no : 6\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#variables\n",
      "m_total=100.0;                           #lbm\n",
      " \n",
      "m_sand=0.7*m_total;                      #lbm\n",
      "m_water=0.3*m_total;                     #lbm\n",
      "rho_sand=165.0;                          #lbm/ft^3\n",
      "rho_water=62.3;                          #lbm/ft^3\n",
      "\n",
      "#calculation\n",
      "#rho=mass/volume\n",
      "rho_mud=m_total/((m_sand/rho_sand)+(m_water/rho_water));\n",
      "\n",
      "#result\n",
      "print \"The density of mud=\" ,rho_mud, \"lbm/ft^3\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The density of mud= 110.401675438 lbm/ft^3\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.2 page no : 8\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math\n",
      "\n",
      "# variables\n",
      "D1=25.15                                  #mm\n",
      "D2=27.62                                  #mm\n",
      "dr=0.5*(D2-D1)                            #mm\n",
      "f=10.                                     #rpm\n",
      "\n",
      "# calculations\n",
      "Vo=math.pi*D1*f/60.                       #mm/s\n",
      "#Let D denote d/dr\n",
      "DV=Vo/dr                                  #s^-1\n",
      "tow=0.005                                 #Nm\n",
      "L=92.37                                   #mm\n",
      "s=2*tow/D1**2/(math.pi)/L*(10**6) #N/m^2\n",
      "\n",
      "# result\n",
      "print \"The stress at the surface of the inner cylinder is %f N/m^2\"%s "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The stress at the surface of the inner cylinder is 0.054481 N/m^2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.3 page no : 15\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# variablees\n",
      "l=0.10;                                #m (length of sliding part)\n",
      "f=0.00589;                             #N (pull due to 0.6 gm of mass)\n",
      "\n",
      "#calculation\n",
      "f_onefilm=f/2;                         #N\n",
      "#surface tension=(force for one film)/(length)\n",
      "sigma=f_onefilm/l;\n",
      "\n",
      "# result\n",
      "print \"The surface tension of fluid is\",sigma,\"N/m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The surface tension of fluid is 0.02945 N/m\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.4 page no : 20\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# variables\n",
      "V=327.               #miles/hr\n",
      "#1 mile = 5280 ft\n",
      "#1 hour = 3600 sec\n",
      "\n",
      "# calculation\n",
      "V1=V*5280/3600.0#ft/s\n",
      "\n",
      "# result\n",
      "print \"327 miles/hr = %f ft/s\"%V1"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "327 miles/hr = 479.600000 ft/s\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.5 page no : 21\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# variables\n",
      "t=2.6            #hr\n",
      "#1 hr = 3600 s\n",
      "\n",
      "# calculations\n",
      "t1=2.6*3600      #s\n",
      "\n",
      "# result\n",
      "print \"2.6 hours = %f seconds\"%t1"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "2.6 hours = 9360.000000 seconds\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.6 page no : 24\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#\n",
      "# variables\n",
      "m=10.                #lbm\n",
      "F=3.5                #lbf\n",
      "#1 lbf.s^2 = 32.2 lbm.ft\n",
      "#1 min = 60 sec\n",
      "\n",
      "# calculations\n",
      "a=F*32.2*60**2/m     #ft/min^2\n",
      "\n",
      "# result\n",
      "print \"The acceleration provided is %f ft/min^2\" % a"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The acceleration provided is 40572.000000 ft/min^2\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.7 page no : 24\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# variables\n",
      "I=50000.                            #Ampere or Coulumbs/sec\n",
      "#1 hr = 3600 sec\n",
      "I1=50000*3600.                      #C/hr\n",
      "\n",
      "#calculation\n",
      "#96500 C = 1 gm.eq\n",
      "#1 mole of aluminium = 3 gm.eq\n",
      "#1 mole of aluminium = 27 gm\n",
      "m=I1*(1.0/96500)*(27/3.0)/1000.0    #Kg/hr\n",
      "\n",
      "#result\n",
      "print \"the wt of metallic aluminium deposited in an electrolytic cell is %f Kg/hr\"%m"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the wt of metallic aluminium deposited in an electrolytic cell is 16.787565 Kg/hr\n"
       ]
      }
     ],
     "prompt_number": 9
    }
   ],
   "metadata": {}
  }
 ]
}