{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 2 : Thermometry"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.1 pageno : 29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "li = 1.23;\t\t\t#length of melting ice in mm\n",
      "lf = 18.56;\t\t\t#length of melting ice reading in pressure of 74.24cm of mercury in mm\n",
      "l = 10.75;\t\t\t#length of melting ice at which temperature to be calculated\n",
      "mp = 0;\t\t\t#melting point in deg.C\n",
      "T = 50;\t\t\t#temperature of melting ice at which length to be calculated in deg.C\n",
      "\n",
      "# Calculations\n",
      "sp = 100-(76-74.24)/(2.7);\t\t\t#76cm of mercury steam point is 100 deg.C so at 74.24cm of mercury the steam point in deg.C\n",
      "t = (l-li)*(sp-mp)/(lf-li);\t\t\t#temperature at 10.75mm of melting ice in deg.C\n",
      "lt = ((T*(lf-li))/(sp-mp))+li;\t\t\t#length of ice at 50 deg.C\n",
      "\n",
      "# Result\n",
      "print 'the temperature of melting ice at 10.75mm of hg is %3.2f deg.C \\\n",
      " \\nthe length of ice corresponding to 50 deg.C is %3.2f mm of mercury'%(t,lt)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the temperature of melting ice at 10.75mm of hg is 54.58 deg.C  \n",
        "the length of ice corresponding to 50 deg.C is 9.95 mm of mercury\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.2 pageno : 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "p1 = 23.5;\t\t\t#pressure when immersed in liquid air in cm\n",
      "p2 = 75.;\t\t\t#pressure when immersed in ice in cm\n",
      "p3 = 102.4;\t\t\t#pressure when immersed in steam in cm\n",
      "T = 100.;\t\t\t#boiling point of temperature in deg.C\n",
      "\n",
      "# Calculations\n",
      "t = (p1-p2)*T/(p3-p2);\t\t\t#temperature of the liquid air in deg.C\n",
      "\n",
      "# Result\n",
      "print 'the temperature of liquid of air is %3.2f deg.C'%(t)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the temperature of liquid of air is -187.96 deg.C\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.3 pageno : 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "t1 = 283.;\t\t\t#temperature of bulb when pressure is h-2cm of hg in k\n",
      "t2 = 546.;\t\t\t#temperature of bulb when pressure is h-22cm of hg in k\n",
      "h1 = 2.;\t\t\t#differnce of mercury level at 283k in cm\n",
      "h2 = 22.;\t\t\t#differnce of mercury level at 546k in cm\n",
      "\n",
      "# Calculations\n",
      "h = ((h2*t1)+(h1*t2))/(t2-t1);\t\t\t#height of the barometer in cm\n",
      "\n",
      "# Result\n",
      "print 'height of the barometer is %3.2f cm'%(h)\n",
      "\n",
      "print \"Note : Answer in book is wrong. Please calculate manually and check.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "height of the barometer is 27.83 cm\n",
        "Note : Answer in book is wrong. Please calculate manually and check.\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "\n",
      "Example 2.4 pageno : 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "p0 = 76.;\t\t\t#pressure at 0 deg.C in cm of hg\n",
      "p1 = 228.;\t\t\t#pressure (76+152) at T deg.C in cm of hg\n",
      "t0 = 273.;\t\t\t#temperature of bulb in K\n",
      "\n",
      "# Calculations\n",
      "T = p1*t0/p0;\t\t\t#temperature at 228 cm of hg pressure in K\n",
      "\n",
      "# Result\n",
      "print 'the temperature of bulb is %3.2f K'%(T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the temperature of bulb is 819.00 K\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2.5 page no : 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "t1 = 0;\t\t\t    #temperature in deg.C\n",
      "t2 = 100;\t\t\t#temperature in deg.C\n",
      "t3 = 208;\t\t\t#temperature in deg.C\n",
      "r1 = 3.5;\t\t\t#resistance in ohms\n",
      "r2 = 5.2;\t\t\t#resistance in ohms\n",
      "r3 = 6.9;\t\t\t#resistance in ohms\n",
      "r4 = 9.4;\t\t\t#resistance in ohms\n",
      "\n",
      "# Calculations\n",
      "tpt = (r3-r1)*100/(r2-r1);\t\t\t#temperature in deg.C\n",
      "d = round((t3-tpt)/(2.08*1.08),2);\t\t\t#deflection\n",
      "tp = round((r4-r1)*100/(r2-r1),2);\t\t\t#temperature in deg.C\n",
      "t6 = (3.5*(((tp/100)**2)-tp/100))+tp;\t\t\t#temperature in deg.C\n",
      "t7 = (3.5*(((t6/100)**2)-t6/100))+tp;\t\t\t#temperature in deg.C\n",
      "t8 = (3.5*(((t7/100)**2)-t7/100))+tp;\t\t\t#temperature in deg.C\n",
      "t9 = (3.5*(((t8/100)**2)-t8/100))+tp;\t\t\t#temperature in deg.C\n",
      "\n",
      "#Result\n",
      "print 'the temperature of the bath is %3.2f deg.C'%(t9)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the temperature of the bath is 385.50 deg.C\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}