{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 13 : Dilute solution laws"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 13.1  Page No : 478"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "weight = 10.     \t\t\t #weight of NaCl in grams\n",
      "volume = 1. \t    \t\t #volume of water in litres\n",
      "weight_water = 1000. \t\t\t #  weight of water in grams (Weight = Volume*Density, density of water  = 1g/cc = 1g/ml = 1000g/l)\n",
      "molwt_NaCl = 58.5 \t\t\t #molecular weight of NaCl in grams\n",
      "molwt_water = 18. \t\t\t #molecular weight of water in grams\n",
      "hf = 6.002; \t\t\t #enthalpy change of fusion in kJ/mol at 0 degree celsius\n",
      "P = 101.325; \t\t\t #pressure in kPa\n",
      "T = 273.15; \t\t\t # freezing point temperature of water at the given pressure in K\n",
      "R = 8.314; \t\t\t #universal gas constant in J/molK;\n",
      "\n",
      "# Calculations\n",
      "x2 = (weight/molwt_NaCl)/((weight/molwt_NaCl)+(weight_water/molwt_water))\n",
      "delt = (R*T**2*x2)/(hf*10**3)\n",
      "\n",
      "# Results\n",
      "print ' The depression in freezing point of water when 10g of NaCl solute is added  =  %0.2f K'%(delt);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The depression in freezing point of water when 10g of NaCl solute is added  =  0.32 K\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 13.2  Page No : 480"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "weight = 10.; \t\t    \t #weight of NaCl in grams\n",
      "volume = 1.; \t\t\t     #volume of water in litres\n",
      "weight_water = 1000.; \t\t\t #  weight of water in grams (Weight = Volume*Density, density of water  = 1g/cc = 1g/ml = 1000g/l)\n",
      "molwt_NaCl = 58.5; \t\t\t #molecular weight of NaCl in grams\n",
      "molwt_water = 18; \t\t\t #molecular weight of water in grams\n",
      "lat_ht = 2256.94; \t\t\t #latent heat of vaporization in kJ/kg at 100 degree celsius (obtained from steam tables)\n",
      "P = 101.325; \t\t\t #pressure in kPa\n",
      "T = 373.15; \t\t\t #boiling point temperature of water at the given pressure in K\n",
      "R = 8.314; \t\t\t #universal gas constant in J/molK\n",
      "\n",
      "# Calculations\n",
      "x2 = 0.0031\n",
      "hv = (lat_ht*molwt_water)/1000\n",
      "delt = (R*T**2*x2)/(hv*10**3)\n",
      "\n",
      "# Results\n",
      "print ' The elevation in boiling point of water when 10g of NaCl solute is added  =  %0.2f K'%(delt);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The elevation in boiling point of water when 10g of NaCl solute is added  =  0.09 K\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 13.3  Page No : 481"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "weight = 10.; \t\t\t #weight of NaCl in grams\n",
      "weight_water = 1000.; \t\t\t #  weight of water in grams\n",
      "molwt_NaCl = 58.5; \t\t\t #molecular weight of NaCl in grams\n",
      "molwt_water = 18.; \t\t\t #molecular weight of water in grams\n",
      "T = 300.; \t\t\t #prevailing temperature of water in K\n",
      "R = 8.314; \t\t\t #universal gas constant in (Pa m**3)/(mol K);\n",
      "v = 18*10**-6;\t\t\t #molar volume in m**3/mol\n",
      "\n",
      "# Calculations\n",
      "x2 = 0.0031\n",
      "pi = ((R*T*x2)/v)*10**-3\n",
      "\n",
      "# Results\n",
      "print ' The osmotic pressure of a solution conatining 10g of NaCl in 1000g of water at 300K  =  %0.2f kPa'%(pi);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The osmotic pressure of a solution conatining 10g of NaCl in 1000g of water at 300K  =  429.56 kPa\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 13.4  Page No : 483"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "# Variables\n",
      "temp = 20. \t\t\t # prevailing tempearture in degree celsius\n",
      "melt_temp = 80.05; \t\t\t # melting point of naphthalene in degree celsius\n",
      "hf = 18.574 \t\t\t # enthalpy of fusion in kJ/mol\n",
      "R = 8.314 \t\t\t # universal gas constant in J/molK\n",
      "\n",
      "# Calculations\n",
      "t = temp+273.15\n",
      "melt_t = melt_temp+273.15\n",
      "x2 = math.exp(((hf*10**3)/R)*((1./melt_t)-(1./t)))\n",
      "\n",
      "# Results\n",
      "print ' The ideal solubility of naphthalene at 20 degree celsius =  %0.4f'%(x2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The ideal solubility of naphthalene at 20 degree celsius =  0.2737\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 13.5  Page No : 483"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "t = 295.43; \t\t\t #prevailing temperature in K\n",
      "sat_p = 6.05; \t\t\t #Sasturation pressure of carbon dioxide at the prevailing temperature in MPa\n",
      "p = 0.1; \t\t\t #pressure at which solubility has to be determined in MPa\n",
      "\n",
      "# Calculations\n",
      "x2 = p/sat_p\n",
      "\n",
      "# Results\n",
      "print ' The solubility of carbon dioxide expressed in mole fraction of carbon dioxide in solution\\\n",
      " at 0.1MPa =  %0.4f'%(x2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The solubility of carbon dioxide expressed in mole fraction of carbon dioxide in solution at 0.1MPa =  0.0165\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}