{
 "metadata": {
  "name": "",
  "signature": "sha256:cda743da280474e0339734ce945527afbcb8983c5386e8ae01ef3be6064b84d0"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1 : Fundamental Concepts"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1  Page No : 8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#C = (5/9)*(F-32);\n",
      "#F = 32+(9*C/5);\n",
      "#Letting C = F in equation;\n",
      "#F = (5/9)*(F-32);\n",
      "#Therefore\n",
      "F = -160/4;           \t\t\t#fahrenheit\n",
      "\n",
      "# Results\n",
      "print \"Both fahrenheit and celsius temperature scales indicate same temperature at %.2f\"%(F);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Both fahrenheit and celsius temperature scales indicate same temperature at -40.00\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2  Page No : 18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Mm = 0.0123\t\t\t#Unit:lb \t\t\t#Mass of the moon;\n",
      "Me = 1 \t    \t\t#Unit:lb \t\t\t#Mass of the earth;\n",
      "Dm = 0.273 \t\t\t#Unit:feet \t\t\t#Diameter of the moon;\n",
      "De = 1. \t    \t\t#Unit:feet \t\t\t#Diameter of the earth;\n",
      "Rm = Dm/2; \t\t\t#Radius of the moon; \t\t\t#Unit:feet\n",
      "Re = De/2; \t\t\t#Radius of the earth; \t\t\t#Unit:feet\n",
      "\n",
      "#F = (K*M1*M2)/d**2 \t\t\t#Law of universal gravitation;\n",
      "#Fe = (K*Me*m)/Re**2; \t\t\t#Fe = Force exerted on the mass;\n",
      "#Fm = (K*Mm*m)/Rm**2; \t\t\t#Fm = Force exerted on the moon;\n",
      "F = (Me/Mm)*(Rm/Re)**2; \t\t\t#F = Fe/Fm;\n",
      "print \"Relation of force exerted on earth to mass is\"\n",
      "print \"Fe/Fm  = %.2f\"%F"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relation of force exerted on earth to mass is\n",
        "Fe/Fm  = 6.06\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.3  Page No : 20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "M = 5;            \t\t\t#Unit:kg \t\t\t#mass of body;\n",
      "g = 9.81;         \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
      "\n",
      "# Calculations\n",
      "W = M*g;          \t\t\t#W = the weight of the body \t\t\t#Unit:Newton \t\t\t# 1 N =  1 kg*m/s**2\n",
      "\n",
      "# Results\n",
      "print \"The weight of the body is %.2f N\"%(W);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The weight of the body is 49.05 N\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.4  Page No : 21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "print \"Solution for a\";\n",
      "#given\n",
      "M  =  10.            \t\t\t#Unit:kg \t\t\t#mass of body;\n",
      "g  =  9.5           \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
      "W  =  M*g;          \t\t\t#W  =  the weight of the body; \t\t\t#Unit:Newton \t\t\t# 1 N  =   1 kg*m/s**2\n",
      "print \"The weight of the body is %.2f N\"%(W);\n",
      "\n",
      "print \"Solution for b\";\n",
      "#Given\n",
      "F  =  10;           \t\t\t#Unit:Newton \t\t\t#Horizontal Force\n",
      "a  =  F/M;          \t\t\t\t\t\t#\t\t\t#newton's second law of motion\n",
      "print \"The horizontal acceleration of the body is %.2f m/s**2\"%(a);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Solution for a\n",
        "The weight of the body is 95.00 N\n",
        "Solution for b\n",
        "The horizontal acceleration of the body is 1.00 m/s**2\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.5  Page No : 25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Conversion Problem\n",
      "# 1 inch = 0.0254 meter so, 1 = 0.0254 meter/inch    \t\t\t#Eq.1\n",
      "# 1 ft = 12 inch so, 1 = 12 inch/ft.........\t\t\t#Eq.2\n",
      "#Multiplying Eq.1 & Eq.2  \t\t\t# We get 1 = 0.0254*12 meter/ft\n",
      "#Taking Square both side\n",
      "#1**2 = (0.0254*12)**2  meter**2/ft**2\n",
      "print \"1 ft**2 = %.2f meter**2\"%((0.0254*12)**2); "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "1 ft**2 = 0.09 meter**2\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.7  Page No : 33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#The Specific gravity of mercury is 13.6 \t\t\t#Given\n",
      "#Converting the unit of weight of grams per cubic centimeter to pounds per cubic foot\n",
      "# 1 lbf = 454 gram \t\t\t#1 inch =  2.54 cm\n",
      "#So 1 gram = 1/454 lbf and 1 ft = 12*2.54 cm\n",
      "#Gamma = (gram/cm**3)*(lb/gram)*(cm**3/ft**3) = lb/ft**3\n",
      "#Gamma = (1 gram/cm**3)*(1 lbf/454 gram)*(2.54*12)**3 *cm**3/ft**3\n",
      "Gamma = (1./454)*(2.54*12)**3; \t\t\t#lbf/ft**3 \t\t\t#conversion factor\n",
      "print \"Conversion Factor = %.2f\"%Gamma\n",
      "p = (1./12)*(Gamma*13.6); \t\t\t#lbf/ft**2 \t\t\t#gage pressure\n",
      "p = (1./12)*Gamma*13.6*(1./144) \t\t\t#ft**2/inch**2 \t\t\t#gage pressure\n",
      "print \"Guage Pressure is %.2f psi\"%(p);\n",
      "print \"Local atmospheric pressure is 14.7 psia\";\n",
      "P = p+14.7; \t\t\t#Pressure on the base of the column \t\t\t#Unit:psia\n",
      "print \" So Pressure on the base of the column is %.2f psia\"%(P);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Conversion Factor = 62.37\n",
        "Guage Pressure is 0.49 psi\n",
        "Local atmospheric pressure is 14.7 psia\n",
        " So Pressure on the base of the column is 15.19 psia\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.8  Page No : 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Rho = 13.595; \t\t\t#Unit: kg/m**3 \t\t\t#The density of mercury\n",
      "h = 25.4; \t\t\t#Unit: mm \t\t\t#Height of column of mercury\n",
      "g = 9.806; \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
      "\n",
      "#Solution\n",
      "p = Rho*g*h; \t\t\t#P = Pressure at the base of a column of mercury \t\t\t#Unit:Pa\n",
      "\n",
      "# Results\n",
      "print \"Pressure at the base of a column of mercury is %.2f Pa\"%(p);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pressure at the base of a column of mercury is 3386.14 Pa\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.9  Page No : 34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Patm = 30.0; \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n",
      "Vacuum = 26.5;  \t\t\t#in.  \t\t\t#vaccum pressure\n",
      "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n",
      "# 1 inch mercury exerts a pressure of 0.491 psi\n",
      "p = Pabs*0.491; \t\t\t#Absolute pressure in psia\n",
      "\n",
      "# Results\n",
      "print \"Absolute pressure of mercury in is %.2f psia\"%(p);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Absolute pressure of mercury in is 1.72 psia\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.10  Page No : 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Rho = 2000; \t\t\t#Unit: kg/m**3 \t\t\t#The density of fluid\n",
      "h = -10; \t\t\t#Unit: mm \t\t\t#Height of column of fluid \t\t\t#the height is negative because it is measured up from the base\n",
      "g = 9.6 \t\t\t#Unit:m/s**2 \t\t\t#the local acceleration of gravity\n",
      "\n",
      "#Solution\n",
      "p = -Rho*g*h; \t\t\t#P = Pressure at the base of a column of fluid \t\t\t#Unit:Pa\n",
      "\n",
      "# Results\n",
      "print \"Pressure at the base of a column of fluid is %.2f Pa\"%(p);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pressure at the base of a column of fluid is 192000.00 Pa\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.11  Page No : 35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "Patm = 30.0 \t\t\t#in. \t\t\t#pressure of mercury at smath.radians(numpy.arcmath.tan(ard temperature\n",
      "Vacuum = 26.5  \t\t\t#in.  \t\t\t#vaccum pressure\n",
      "Pabs = Patm-Vacuum; \t\t\t#Absolute pressure of mercury \t\t\t#in.\n",
      "\n",
      "# (3.5 inch* (ft/12 inch) * (13.6*62.4)LBf/ft**3 * kg/2.2 LBf * 9.806 N/kg)/((12 inch**2/ft**2) * (0.0254 m/inch)**2)\n",
      "p = (3.5*(1./12)*13.6*62.4*(1/2.2)*9.806)/(12**2*0.0254**2*1000); \t\t\t#kPa \t\t\t#Absolute pressure in psia\n",
      "\n",
      "# Results\n",
      "print \"Absolute pressure of mercury is %.2f kPa\"%(p)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Absolute pressure of mercury is 11.88 kPa\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}