{
 "metadata": {
  "name": "",
  "signature": "sha256:8d5a686096634f879e0f7f78f59d72e8ae896018a8aa4a7b249e0ce878bb62b8"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 : Entropy relationships and applications"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.1 Page No : 155"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "import math \n",
      "k1 = 6.2\n",
      "k2 = 1.33*10**-3\n",
      "k3 = 6.78*10**4\n",
      "T1 = 800. \t\t\t#C\n",
      "T2 = 300. \t\t\t#C\n",
      "\n",
      "# Calculations\n",
      "dS = k1*math.log(T1/T2)+k2*(T1-T2)-0.5*k3*(T1**-2-T2**-2)\n",
      "\n",
      "# Results\n",
      "print  'Entropy increase  = %.2f cal deg**-1 g atom**-1'%(dS)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Entropy increase  = 7.07 cal deg**-1 g atom**-1\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2 Page No : 159"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "T = 77.32 \t\t\t#K\n",
      "p = 1    \t\t\t#atm\n",
      "Tc  = 126 \t\t\t#K\n",
      "Pc = 33.5 \t\t\t#atm\n",
      "Mo = 32 \t\t\t#gms\n",
      "mo = 27 \t\t\t#gms\n",
      "R = 1.98 \t\t\t#cl/mol K\n",
      "\n",
      "# Calculations\n",
      "dS = (mo)*R*Tc**3/(Mo*Pc*T**3)\n",
      "\n",
      "# Results\n",
      "print  'Entropy increase  = %.3f cal deg**-1'%(dS)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Entropy increase  = 0.216 cal deg**-1\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3 Page No : 160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "R = 1.987 \t\t\t#cal deg**-1 mole**-1\n",
      "T = 25   \t\t\t#C\n",
      "Pc = 49.7 \t\t\t#atm\n",
      "m = 128 \t\t\t#gms\n",
      "pc = 49.7 \t\t\t#atm\n",
      "Tc = 154.3 \t\t\t#K\n",
      "m1 = 9 \t    \t\t#gms\n",
      "m2 = 18\n",
      "\n",
      "# Calculations\n",
      "dH = (m1*R*Tc/(m*pc))*(1-m2*(Tc/(273.15+T))**2)*-1\n",
      "\n",
      "# Results\n",
      "print  'Enthalpy  = %.2f cal mole**-1'%(dH)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Enthalpy  = 1.66 cal mole**-1\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4 Page No : 165"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "a = 1.39 \t\t\t#lit**2\n",
      "p = 200. \t\t\t#atm\n",
      "R = 0.082 \t\t\t#lit-atm /mol K\n",
      "T = 298. \t\t\t#K\n",
      "\n",
      "# Calculations\n",
      "dC = (1+(2*a*p/(R*T)**2))\n",
      "\n",
      "# Results\n",
      "print  'Cp-Cv  = %.2f *R lit-atm mole**-1 K**-1'%(dC)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cp-Cv  = 1.93 *R lit-atm mole**-1 K**-1\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.5 Page No : 165"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "P = 200. \t\t\t#atm\n",
      "Tc = 126. \t\t\t#k\n",
      "T = 25. \t\t\t#C\n",
      "Pc = 33.5 \t\t\t#atm\n",
      "M = 27. \t\t\t#gms\n",
      "m = 16. \t\t\t#gms\n",
      "\n",
      "# Calculations\n",
      "dC = (1+(M*Tc**3*P/(m*Pc*(273.2+T)**3)))\n",
      "\n",
      "# Results\n",
      "print  'Cp-Cv  = %.2f *R cal mole**-1 K**-1'%(dC)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cp-Cv  = 1.76 *R cal mole**-1 K**-1\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6 Page No : 167"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "T = 25.          \t\t\t#C\n",
      "b = 0.785*10**-6 \t\t\t#atm**-1\n",
      "a = 49.2*10**-6 \t\t\t#deg**-1\n",
      "d = 8.93 \t\t        \t#gm/cc\n",
      "aw = 63.57 \t\t\t        #gms\n",
      "\n",
      "# Calculations\n",
      "dC = a**2*(273.2+T)*aw*0.0242/(b*d)\n",
      "\n",
      "# Results\n",
      "print  'Cp-Cv  = %.3f cal deg**-1g atom**-1'%(dC)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cp-Cv  = 0.158 cal deg**-1g atom**-1\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7 Page No : 169"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "import math \n",
      "p = 100 \t\t\t#atm\n",
      "T = 25.  \t\t\t#C\n",
      "a = 1.38\n",
      "b = 3.92*10**-2 \t\t\t#lit atm\n",
      "R = 0.082 \t\t\t#lit-atm mole**-1 K**-1\n",
      "Tc = 126 \t\t\t#K\n",
      "Pc = 33.5 \t\t\t#atm\n",
      "M = 81. \t\t\t#gms\n",
      "m = 32. \t\t\t#gms\n",
      "\n",
      "# Calculations\n",
      "dC = a*2*p/(R*(273+T)**2)\n",
      "dC1 = M*R*Tc**3*p/(m*Pc*(273+T)**3)\n",
      "\n",
      "# Results\n",
      "print  'Cp-Cp*  = %.3f lit atm deg**-1 mole**-1'%(dC)\n",
      "print  ' Cp-Cp*  = %.3f lit atm deg**-1 mole**-1'%(dC1)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cp-Cp*  = 0.038 lit atm deg**-1 mole**-1\n",
        " Cp-Cp*  = 0.047 lit atm deg**-1 mole**-1\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8 Page No : 172"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Cp = 8.21*0.0413 \t\t\t#lit-atm deg**-1 mole**-1\n",
      "V = 8.64*28*10**-3 \t\t\t#lit\n",
      "r = 1.199\n",
      "\n",
      "# Calculations\n",
      "u = V*(r-1)/Cp\n",
      "\n",
      "# Results\n",
      "print  'Joule-thomson coefficient  = %.3f deg atm**-1'%(u)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Joule-thomson coefficient  = 0.142 deg atm**-1\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.9 Page No : 173"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "Cp = 8.21*0.0413 \t\t\t#lit-atm\n",
      "R = 0.0821 \t\t\t#lit-atm deg**-1 mole**-1\n",
      "p = 100 \t\t\t#atm\n",
      "T = 20. \t\t\t#C\n",
      "a = 1.39 \n",
      "b = 3.92*10**-2 \t\t\t#lit-atm**2 mole\n",
      "\n",
      "# Calculations\n",
      "u = (1/Cp)*((2*a/(R*(273+T)))-b-(3*a*b*p/(R**2*(273+T)**2)))\n",
      "\n",
      "# Results\n",
      "print  'Joule-thomson coefficient  = %.3f deg atm**-1'%(u)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Joule-thomson coefficient  = 0.142 deg atm**-1\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}