{
 "metadata": {
  "name": "",
  "signature": "sha256:927dbb23c2c4eb2bcfe9867be6353aeb4f4fc6596109258987a73bb6dbc2e748"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1 : Properties Of Fluids"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.1 Page No : 4"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#Initialization of variables\n",
      "sw = 62.4 \t#specific weight of water at ordinary pressure - lb/ft**3\n",
      "sw2 = 9.81 \t#specific weight of water at temperature - kN/m**3\n",
      "sg = 13.55 \t#specific weight of mercury \n",
      "g = 32.2   \t#ft/s**2\n",
      "\t\n",
      "#calculations\n",
      "dwater = sw/g\n",
      "dwater2 = sw2/(9.81)\n",
      "Gmercury = sg*sw\n",
      "Gmercury2 = sg*sw2\n",
      "dmercury = sg*dwater\n",
      "dmercury2 = sg*dwater2\n",
      "\t\n",
      "#Results\n",
      "print 'Density of water  =  %.2f slugs/ft**3'%(dwater)\n",
      "print ' Density of water  =  %.2f g/ml'%(dwater2)\n",
      "print ' Density of mercury  =  %.1f slugs/ft**3'%(dmercury)\n",
      "print ' Density of mercury  =  %.2f kN/m**3'%(dmercury2)\n",
      "print ' Specific weight of mercury  =  %d lb/ft**3'%(Gmercury+1)\n",
      "print ' Specific weight of mercury  =  %d kN/m**3'%(Gmercury2+1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Density of water  =  1.94 slugs/ft**3\n",
        " Density of water  =  1.00 g/ml\n",
        " Density of mercury  =  26.3 slugs/ft**3\n",
        " Density of mercury  =  13.55 kN/m**3\n",
        " Specific weight of mercury  =  846 lb/ft**3\n",
        " Specific weight of mercury  =  133 kN/m**3\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.2 Page No : 9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#Initialization of variables\n",
      "T = 460.+100 \t#R\n",
      "P = 15.       \t#psia\n",
      "MW = 32.     \t#lb\n",
      "g = 32.2\t    #ft/s**2\n",
      "ratio = 0.4\n",
      "\t\n",
      "#calculations\n",
      "R = 49710./32\n",
      "d = P*144/(R*T)\n",
      "Gamma = d*g\n",
      "volume = 1/d\n",
      "P2 = P*(1/ratio)**1.4\n",
      "P2f = P2*144\n",
      "T2 = P2f*ratio/(d*R) -460\n",
      "P3 = P/ratio\n",
      "\t\n",
      "#Results\n",
      "print ' part a'\n",
      "print ' Density of oxygen  =  %.5f slug/ft**3'%(d)\n",
      "print ' Specific weight of oxygen  =  %.2f lb/ft**3'%(Gamma)\n",
      "print ' Specific volume of oxygen  =  %d ft**3/slug'%(volume+1)\n",
      "print ' part b'\n",
      "print ' Final pressure of oxygen  =  %.1f psia '%(P2)\n",
      "print ' Final Temperature of oxygen  =  %d F '%(T2+2)\n",
      "print ' part 3'\n",
      "print ' Final pressure of oxygen  =  %.1f psia '%(P3)\n",
      "print ' Final Temperature of oxygen  =  %d F '%(T-460)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " part a\n",
        " Density of oxygen  =  0.00248 slug/ft**3\n",
        " Specific weight of oxygen  =  0.08 lb/ft**3\n",
        " Specific volume of oxygen  =  403 ft**3/slug\n",
        " part b\n",
        " Final pressure of oxygen  =  54.1 psia \n",
        " Final Temperature of oxygen  =  349 F \n",
        " part 3\n",
        " Final pressure of oxygen  =  37.5 psia \n",
        " Final Temperature of oxygen  =  100 F \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1.3 Page No : 10"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#Initialization of variables\n",
      "P = 600.*1000 \t#N/m**2\n",
      "T = 25.     \t#C\n",
      "M = 71. \t    #Kg\n",
      "\t\n",
      "#calculations\n",
      "R = 8312/M\n",
      "d = P/(R*(273+T))\n",
      "Gamma = d*9.81\n",
      "v = 1/d\n",
      "\n",
      "# results\n",
      "print 'Density of chlorine  =  %.1f kg/m**3'%(d)\n",
      "print ' Specific weight of chlorine  =  %d N/m**3'%(Gamma+1)\n",
      "print ' Specific volume of chlorine  =  %.3f m**3/Kg'%(v)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Density of chlorine  =  17.2 kg/m**3\n",
        " Specific weight of chlorine  =  169 N/m**3\n",
        " Specific volume of chlorine  =  0.058 m**3/Kg\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}