{
 "metadata": {
  "name": "",
  "signature": "sha256:4f7d90cd7b10a2be32d6f9985c84b88b7895b54f53fda509a7ab6972ab90144a"
 },
 "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"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "weight = 981. \t\t\t #weight of payload in N\n",
      "gmoon = 1.62;\t\t\t #acceleration due to gravity on the moon in m/s**2\n",
      "g = 9.81;\t\t\t     #acceleration due to gravity on earth\n",
      "\n",
      "# Calculations\n",
      "mass = weight/g;        \t\t\t # Calculations of mass of the payload in kg (calculated as F = m*g)\n",
      "weightmoon = mass*gmoon;\t\t\t # Calculations of weight of payload on the moon in N\n",
      "\n",
      "# Results\n",
      "print ' The weight of payload on the moon =  %d N'%(weightmoon);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The weight of payload on the moon =  162 N\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.2  Page No : 7"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "# Variables\n",
      "l = 15.;\t\t\t #length of the child's head in cm\n",
      "b = 12.;\t\t\t #breadth of the child's head in cm\n",
      "p = 101325.;\t\t\t #atmospheric pressure in Pa\n",
      "\n",
      "# Calculations\n",
      "area = (l*b)/(10**4);\t\t\t # Calculations of area of the child's head in m**2\n",
      "force = p*area;\t\t\t # Calculations of force exerted on the child's head due to atmospheric air in N\n",
      "\n",
      "# Results\n",
      "print ' The force exerted on the childs head due to atmospheric air =  %.2f N'%(force);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The force exerted on the childs head due to atmospheric air =  1823.85 N\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 1.3  Page No : 7"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "# Variables\n",
      "rho_water = 1000.;\t\t\t #density of water flowing through the pipeline in kg/m**3\n",
      "rho_manomtr = 1595.;\t\t #density of manometric fluid (carbon tetrachloride) in kg/m**3\n",
      "l = 40.;\t        \t\t #length between the selected sections in cm\n",
      "theta = 45.\t\t\t         #inclination of the manometer in degrees\n",
      "g = 9.81;\t        \t\t #acceleration due to gravity in m/s**2\n",
      "\n",
      "# Calculations\n",
      "delp = (l/100.)*math.sin((theta*math.pi)/180.)*g*(rho_manomtr-rho_water);   # Calculations of pressure drop between the required sections in Pa\n",
      "\n",
      "# Results\n",
      "print ' The pressure drop between the required sections =  %.2f Pa'%delp\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The pressure drop between the required sections =  1650.94 Pa\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}