{
 "metadata": {
  "name": "",
  "signature": "sha256:2d895fa6539cb401c1ac187f55507dc2067d26b87e5503473e832266dbcbd295"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5 : Nature of Heat"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1  Page No : 159"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "v = 480.  # The velocity of a lead bullet in m/s\n",
      "Sp = 0.03  # Specific heat of lead cal/g-K\n",
      "\n",
      "# Calculations\n",
      "m = 10.  # Let us assume the mass of bullet in gms\n",
      "V = v * 100  # The velocity of the bullet in cm/s\n",
      "W = (1. / 2) * m * (V**2)  # The work done in ergs\n",
      "J = 4.2 * 10**7  # The mechanical equivalent of heat in ergs/calorie\n",
      "H = W / J  # The amount of heat produced in cals\n",
      "H1 = H / 2  # Half of the heat energy is used to raise the temperature of the bullet in cals\n",
      "t = H1 / (m * Sp)  # The rise in the temperature in degree centigrade\n",
      "\n",
      "# Output\n",
      "print 'The rise in the temperature is t = %3.2f degree centigrade ' % (t)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The rise in the temperature is t = 457.14 degree centigrade \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2  Page No : 162"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "t = 1.  # The increase in the temperature of a piece of aluminium in degree centigrade\n",
      "a = 6. * 10**23  # The number of atoms present in 27 g of aluminium in atoms\n",
      "Sp = 0.22  # The specific heat of aluminium in cal/g-K\n",
      "m = 27.  # The amount of aluminium in g\n",
      "J = 4.2 * 10**7  # The mechanical equivalent of heat in ergs/calorie\n",
      "\n",
      "# Calculations\n",
      "H = m * Sp * t  # Heat required to raise the temperature of 27 gms of aluminium by 1 degree centigrade in cals\n",
      "E = m * Sp * J  # Energy gained by atoms of aluminium in ergs\n",
      "E1 = E / a  # Increase in energy per atom of aluminium in ergs\n",
      "\n",
      "# Output\n",
      "print 'The increase in energy per atom of aluminium is %3.4g ergs ' % (E1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The increase in energy per atom of aluminium is 4.158e-16 ergs \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.3  Page No : 168"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "h = 50.  # The height from which water falls in metres\n",
      "m = 100.  # Let us assume the mass of the water in gms\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "J = 4.2 * 10**7  # The mechanical equivalent of heat in ergs/calorie\n",
      "\n",
      "# Calculations\n",
      "h1 = h * 100  # The height from which water falls in cm\n",
      "W = m * g * h1  # The work done in ergs\n",
      "t = W / (J * m)  # The rise in temperature of water in degree centigrade\n",
      "\n",
      "# Output\n",
      "print 'The rise in temperature of water is t = %3.3f degree centigrade ' % (t)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The rise in temperature of water is t = 0.117 degree centigrade \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.4  Page No : 174"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "v = 1.  # The volume of oxygen at N.T.P in cm**3\n",
      "d = 13.6  # The density of mercury in g/cm**3\n",
      "r = 4.62 * 10**4  # The R.M.S velocity of oxygen molecules at 0 degree centigrade in cm/s\n",
      "m = 52.8 * 10**-24  # Mass of one molecule of oxygen in g\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "\n",
      "# Calculations\n",
      "P = 76. * g * d  # The pressure in dynes/cm**2\n",
      "n = ((3 * P) / (m * r**2))  # Number of molecules in 1 cc of oxygen at N.T.P\n",
      "\n",
      "# Output\n",
      "print 'The number of molecules in 1 c.c of oxygen at N.T.P is n = %3.4g ' % (n)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of molecules in 1 c.c of oxygen at N.T.P is n = 2.696e+19 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.5  Page No : 177"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "t = -100  # The given temperature in degree centigrade\n",
      "\n",
      "# Calculations\n",
      "T1 = t + 273  # The given temperature in K\n",
      "m1 = 1.  # number of hydrogen molecules\n",
      "m2 = 16.  # number of oxygen molecules\n",
      "m = m2 / m1  # Number of oxygen molecules to the hydrogen molecules\n",
      "T2 = (T1 * m) - 273  # The temperature in degree centigrade\n",
      "\n",
      "# Output\n",
      "print 'The temperature at which the oxygen molecules have the same root mean square velocity  as that of hydrogen molecules is T2 = %3.0f degree centigrade ' % (T2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature at which the oxygen molecules have the same root mean square velocity  as that of hydrogen molecules is T2 = 2495 degree centigrade \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.6  Page No : 180"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "t = 27.  # The given temperature in degree centigrade\n",
      "d = 13.6  # The density of mercury in g/cm**3\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "m1 = 16.  # number of oxygen molecules\n",
      "D = 0.000089  # The density of hydrogen at N.T.P in g/cc\n",
      "T = 273.  # The temperature at N.T.P in K\n",
      "\n",
      "# Calculations\n",
      "P = 76. * g * d  # The pressure in dynes/cm**2\n",
      "p = m1 * D  # The density of oxygen at N.T.P in g/cc\n",
      "C = ((3 * P) / (p))**(1. / 2)  # The RMS velocity of oxygen molecule in cm/s\n",
      "T1 = t + T  # The given temperature in K\n",
      "# The RMS velocity of the molecules at 27 degree centigrade in cm/s\n",
      "C1 = C * (T1 / T)**(1. / 2)\n",
      "\n",
      "# Output\n",
      "print 'The RMS velocity of the oxygen molecules at 27 degree centigrade is C1 = %3.4g cm/s ' % (C1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The RMS velocity of the oxygen molecules at 27 degree centigrade is C1 = 4.843e+04 cm/s \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.7  Page No : 186"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "d = 13.6  # The density of mercury in g/cm**3\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "m = 3.2  # Mass of oxygen in gms\n",
      "t = 27.  # The given temperature in degree centigrade\n",
      "p = 76.  # The pressure in cm of Hg\n",
      "R = 8.31 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "\n",
      "# Calculations\n",
      "P = p * g * d  # The given pressure in dynes/cm**2\n",
      "T = t + 273  # The given temperature in K\n",
      "V = (T * R) / P  # Volume per g mol of oxygen in cc per g mol\n",
      "m1 = 32.  # Molecular weight of Oxygen\n",
      "V1 = V * (m / m1)  # Volume of 3.2 g of oxygen in cc\n",
      "\n",
      "# Output\n",
      "print 'The Volume occupied by 3.2 gms of Oxygen is V = %3.0f cc ' % (V1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Volume occupied by 3.2 gms of Oxygen is V = 2461 cc \n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.9  Page No : 193"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "v = 1.  # The volume of an Ideal gas at N.T.P in m**3\n",
      "d = 13.6  # The density of mercury in g/cm**3\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "p = 76.  # The pressure in cm of Hg\n",
      "R = 8.31 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "N = 6.023 * 10**23  # The Avogadro number\n",
      "T = 273.  # The temperature at N.T.P in K\n",
      "\n",
      "# Calculations\n",
      "P = p * g * d  # The given pressure in dynes/cm**2\n",
      "x = (P * N * 10**6) / (R * T)  # Number of molecules in one cubic metre volume\n",
      "\n",
      "# Output\n",
      "print 'The number of molecules in one cubic metre of an ideal gas at N.T.P is x = %3.4g ' % (x)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of molecules in one cubic metre of an ideal gas at N.T.P is x = 2.689e+25 \n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.10  Page No : 196"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "v = 1.  # The volume of an ideal gas in litre\n",
      "d = 13.6  # The density of mercury in g/cm**3\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "p = 76.  # The pressure in cm of Hg\n",
      "R = 8.31 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "N = 6.023 * 10**23  # The Avogadro number\n",
      "T = 273.  # The temperature at N.T.P in K\n",
      "t = 136.5  # The given temperature in degree centigrade\n",
      "p1 = 3.  # The given atmospheric pressure in atm pressure\n",
      "\n",
      "# Calculations\n",
      "T1 = T + t  # The given temperature in K\n",
      "P = p * g * d  # The given pressure in dynes/cm**2\n",
      "x = (p1 * P * N * 10**3) / (R * T1)  # Number of molecules in one litre volume\n",
      "\n",
      "# Output\n",
      "print 'The number of molecules in one litre of an ideal gas volume is x = %3.4g ' % (x)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of molecules in one litre of an ideal gas volume is x = 5.378e+22 \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.11  Page No : 203"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "v = 1.  # The volume of a gas in cc\n",
      "d = 13.6  # The density of mercury in g/cm**3\n",
      "p2 = 10.**-7  # The pressure in cm of Hg\n",
      "g = 980.  # Gravitational constant in gms/s**2\n",
      "p1 = 76.  # The pressure in cm of Hg\n",
      "R = 8.31 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "N = 6.023 * 10**23  # The Avogadro number\n",
      "T = 273.  # The temperature at N.T.P in K\n",
      "n1 = 2.7 * 10**19  # The number of molecules per cc of gas at N.T.P\n",
      "t2 = 0.  # The given temperature in degree centigrade\n",
      "t3 = 39.  # The given temperature in degree centigrade\n",
      "\n",
      "# Calculations\n",
      "P1 = p1 * g * d  # The given pressure in dynes/cm**2\n",
      "P2 = p2 * g * d  # The given pressure in dynes/cm**2\n",
      "# The number of molecules per cc of the gas at 0 degree centigrade\n",
      "n2 = n1 * (P2 / P1)\n",
      "T2 = t2 + 273  # The given temperature in K\n",
      "T3 = t3 + 273  # The given temperature in K\n",
      "# The number of molecules per cc of the gas at 398 degree centigrade\n",
      "n3 = n2 * (T2 / T3)\n",
      "\n",
      "# Output\n",
      "print 'The number of molecules per cc of the gas , \\n (1)at 0 degree centigrade and 10^-6 mm pressure of mercury is n2 = %3.4g \\n (2)at 39 degree centigrade and 10^-6 mm pressure of mercury is n3 = %3.4g' % (n2, n3)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of molecules per cc of the gas , \n",
        " (1)at 0 degree centigrade and 10^-6 mm pressure of mercury is n2 = 3.553e+10 \n",
        " (2)at 39 degree centigrade and 10^-6 mm pressure of mercury is n3 = 3.109e+10\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.12  Page No : 208"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "T = 300.  # The given temperature in K\n",
      "R = 8.3 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "\n",
      "# Calculations\n",
      "# The total random kinetic energy per gram -molecule of oxygen in joules\n",
      "E = ((3. / 2) * (R * T)) / 10**7\n",
      "\n",
      "# Output\n",
      "print 'The total random kinetic energy of one gm-molecule of oxygen at 300 K is K.E = %3.0f joules' % (E)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total random kinetic energy of one gm-molecule of oxygen at 300 K is K.E = 3735 joules\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.13  Page No : 213"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "T = 300.  # The given temperature in K\n",
      "k = 1.38 * 10**-16  # Boltzmann constant in erg/molecule-deg\n",
      "\n",
      "# Calculations\n",
      "E = (3. / 2) * k * T  # The average Kinetic energy of a molecule in ergs\n",
      "\n",
      "# Output\n",
      "print 'The Average Kinetic energy of a molecule of a gas at 300 K is K.E = %3.4g ergs ' % (E)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Average Kinetic energy of a molecule of a gas at 300 K is K.E = 6.21e-14 ergs \n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.14  Page No : 220"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "R = 8.32  # Universal gas constant in joules/mole-K\n",
      "t = 727.  # The given temperature in degree centigrade\n",
      "N = 6.06 * 10**23  # The Avogadro number\n",
      "\n",
      "# Calculations\n",
      "T = 273. + t  # The given temperature in K\n",
      "k = R / N  # Boltzmann constant in joules/mol-K\n",
      "E = (3. / 2) * k * T  # Mean translational kinetic energy per molecule in joules\n",
      "\n",
      "# Output\n",
      "print 'The mean translational kinetic energy per molecule is K.E = %3.4g joule ' % (E)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mean translational kinetic energy per molecule is K.E = 2.059e-20 joule \n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.15  Page No : 224"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "T = 300.  # The given temperature in K\n",
      "M = 28.  # Molecular weight of nitrogen in g\n",
      "R = 8.3 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "\n",
      "# Calculations\n",
      "E = (3. / 2) * R * T  # The total random kinetic energy of nitrogen in ergs\n",
      "# The total random kinetic energy of one gram of nitrogen at 300 K in joule\n",
      "E1 = E / (M * 10**7)\n",
      "\n",
      "# Output\n",
      "print 'The total random kinetic energy of one gram of nitrogen at 300 K is K.E = %3.1f joule ' % (E1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total random kinetic energy of one gram of nitrogen at 300 K is K.E = 133.4 joule \n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.16  Page No : 228"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "T = 200.  # The given temperature in K\n",
      "m = 2.  # Given mass of Helium in g\n",
      "M = 4.  # Molecular weight of helium in g\n",
      "R = 8.3 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "\n",
      "# Calculations\n",
      "# The energy for 2 g of helium in joules\n",
      "E = (m * (3. / 2) * (R * T) / (M)) / 10**7\n",
      "\n",
      "# Output\n",
      "print 'The total random kinetic energy of 2 g of helium at 200 K is K.E = %3.0f joules' % (E)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total random kinetic energy of 2 g of helium at 200 K is K.E = 1245 joules\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.17  Page No : 233"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "T = 300.  # The given temperature in K\n",
      "R = 8.3 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "M = 221.  # The molecular weight of mercury\n",
      "\n",
      "# Calculations\n",
      "# The root mean square velocity of a molecule of mercury vapour at 300 K\n",
      "# in cm/s\n",
      "C = ((3 * R * T) / (M))**(1. / 2)\n",
      "\n",
      "# Output\n",
      "print 'The root mean square velocity of a molecule of mercury vapour at 300 K is C = %3.4g cm/s ' % (C)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The root mean square velocity of a molecule of mercury vapour at 300 K is C = 1.839e+04 cm/s \n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.18  Page No : 239"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "T = 300.  # The given temperature in K\n",
      "M = 32.  # Molecular weight of oxygen\n",
      "R = 8.3 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "\n",
      "# Calculations\n",
      "# Total random kinetic energy of 1 g molecule of oxygen in ergs\n",
      "E = (3. / 2) * R * T\n",
      "# The required speed of one gram molecule of oxygen in cm/s\n",
      "v = ((E) * (2 / M))**(1. / 2)\n",
      "\n",
      "# Output\n",
      "print 'The required speed of one gram molecule of oxygen is v = %3.2g cm/s ' % (v)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required speed of one gram molecule of oxygen is v = 4.8e+04 cm/s \n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.19  Page No : 242"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "v = 8.  # The speed of the earths first satellite in km/s\n",
      "R = 8.3 * 10**7  # The Universal gas constant in ergs/g mol-K\n",
      "M = 2.  # Molecular weight of hydrogen\n",
      "\n",
      "# Calculations\n",
      "V = v * 10**5  # The speed of the earths first satellite in cm/s\n",
      "T = (M * V**2) / (3 * R)  # The temperature at which it becomes equal in K\n",
      "\n",
      "# Output\n",
      "print 'The temperature at which the r.m.s velocity of a hydrogen molecule  will be equal to the speed of earths first satellite is T = %3.4g K' % (T)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature at which the r.m.s velocity of a hydrogen molecule  will be equal to the speed of earths first satellite is T = 5141 K\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.20  Page No : 248"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "t1 = 0.  # The given temperature in degree centigrade\n",
      "\n",
      "# Calculations\n",
      "T1 = t1 + 273  # The given temperature in K\n",
      "# The temperature at which the r.m.s velocity of a gas be half its value\n",
      "# at 0 degree centigrade in K\n",
      "T2 = (1. / 2)**2 * T1\n",
      "T21 = T2 - 273  # The required temperature in degree centigrade\n",
      "\n",
      "# Output\n",
      "print 'The required temperature is  T2 = %3.2f K  (or) %3.2f degree centigrade ' % (T2, T21)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required temperature is  T2 = 68.25 K  (or) -204.75 degree centigrade \n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.21  Page No : 252"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Input data\n",
      "n = 1.66 * 10**-4  # The viscosity of the gas in dynes/cm**2\n",
      "C = 4.5 * 10**4  # The R.M.S velocity of the molecules in cm/s\n",
      "d = 1.25 * 10**-3  # The density of the gas in g/cc\n",
      "N = 6.023 * 10**23  # The Avogadro number\n",
      "V = 22400.  # The volume of a gas at N.T.P in cc\n",
      "pi = 3.142  # The mathematical constant of pi\n",
      "\n",
      "# Calculations\n",
      "L = (3 * n) / (d * C)  # The mean free path of the molecules of the gas in cm\n",
      "F = (C / L)  # The frequency collision in per sec\n",
      "n = N / V  # Number of molecules per cc\n",
      "# Molecular diameter of the gas molecules in cm\n",
      "D = 1. / ((1.414 * pi * n * L)**(1. / 2))\n",
      "\n",
      "# Output\n",
      "print '(1)The mean free path of the molecules of the gas is %3.0g cm \\n (2)The frequency of collision is N = %3.0g /sec \\n (3)Molecular diameter of the gas molecules is d = %3.0g cm ' % (L, F, D)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(1)The mean free path of the molecules of the gas is 9e-06 cm \n",
        " (2)The frequency of collision is N = 5e+09 /sec \n",
        " (3)Molecular diameter of the gas molecules is d = 3e-08 cm \n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.22  Page No : 255"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "n = 2.25 * 10**-4  # The viscosity of the gas in dynes/cm**2\n",
      "C = 4.5 * 10**4  # The RMS velocity of the molecules in cm/s\n",
      "d = 10.**-3  # The density of the gas in g/cc\n",
      "\n",
      "# Calculations\n",
      "L = (3 * n) / (d * C)  # The mean free path of the molecules in cm\n",
      "\n",
      "# Output\n",
      "print 'The mean free path of the molecules is %3g cm ' % (L)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mean free path of the molecules is 1.5e-05 cm \n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.23  Page No : 261"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Input data\n",
      "d = 2. * 10**-8  # The molecular diameter in cm\n",
      "n = 3. * 10**19  # The number of molecules per cc\n",
      "pi = 3.14  # Mathematical constant of pi\n",
      "\n",
      "# Calculations\n",
      "L = 1. / ((pi * (d)**2 * n))  # The mean free path of a gas molecule in cm\n",
      "\n",
      "# Output\n",
      "print 'The mean free path of a gas molecule is %3.0g cm ' % (L)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mean free path of a gas molecule is 3e-05 cm \n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.24  Page No : 265"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Input data\n",
      "p = 760.  # The given pressure in mm of Hg\n",
      "T = 273.  # The temperature of the chamber in K\n",
      "V = 22400.  # The volume of the gas at N.T.P in cc\n",
      "p1 = 10.**-6  # The pressure in the chamber in mm of mercury pressure\n",
      "N = 6.023 * 10**23  # The Avogadro number\n",
      "d = 2. * 10**-8  # Molecular diameter in cm\n",
      "pi = 3.14  # Mathematical constant of pi\n",
      "\n",
      "# Calculations\n",
      "# The number of molecules per cm**3 in the chamber in molecules/cm**3\n",
      "n = (N * p1) / (V * p)\n",
      "# The mean free path of the gas molecules in the chamber in cm\n",
      "L = 1. / (pi * (d)**2 * n)\n",
      "\n",
      "# Output\n",
      "print 'The mean free path of gas molecules in a chamber is %3.4g cm ' % (L)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mean free path of gas molecules in a chamber is 2.25e+04 cm \n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.25  Page No : 270"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Input data\n",
      "Tc = 132.  # The given temperature in K\n",
      "Pc = 37.2  # The given pressure in atms\n",
      "R = 82.07  # Universal gas constant in cm**3 atoms K**-1\n",
      "\n",
      "# Calculations\n",
      "# Vander Waals constant in atoms cm**6\n",
      "a = (27. / 64) * ((R)**2 * (Tc)**2) / Pc\n",
      "b = ((R * Tc) / (8 * Pc))  # Vander Waals constant in cm**3\n",
      "\n",
      "# Output\n",
      "print 'The Van der Waals constants are , \\n (1) a = %3.4g atoms cm^6 \\n (2) b = %3.2f cm^3 ' % (a, b)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Van der Waals constants are , \n",
        " (1) a = 1.331e+06 atoms cm^6 \n",
        " (2) b = 36.40 cm^3 \n"
       ]
      }
     ],
     "prompt_number": 24
    }
   ],
   "metadata": {}
  }
 ]
}