{
 "metadata": {
  "name": "",
  "signature": "sha256:bc483af2aab74a69c5c0f5f640bdbb7d93b0bf6485c56961f1dfe2ffba52540b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter15-Equilibria in electrolytes"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg486"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "c1= 0.1 ##M\n",
      "c2= 0.2 ##M\n",
      "c3= 0.4 ##M\n",
      "n1= 1.\n",
      "n2= 2.\n",
      "##CALCULATIONS\n",
      "u1= 0.5*(c1*n1**2+c1*n1**2)\n",
      "u2= 0.5*(c3*n1**2+c2*n2**2)\n",
      "u3= 0.5*((c3+c1)*n1**2+c1*n1**2+c2*n2**2)\n",
      "##RESULTS\n",
      "print'%s %.2f %s'% ('Ionic strength =   ',u1,'')\n",
      "print'%s %.2f %s'% ('\\n Ionic strength =   ',u2,'')\n",
      "print'%s %.2f %s'% ('\\n Ionic strength =   ',u3,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ionic strength =    0.10 \n",
        "\n",
        " Ionic strength =    0.60 \n",
        "\n",
        " Ionic strength =    0.70 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg488"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "c1= 0.01 ##M\n",
      "c2= 0.001 ##M\n",
      "n= 2. ##moles\n",
      "k= -0.509\n",
      "n1= 1. ##moles\n",
      "##CALCULATIONS\n",
      "f1= 10**(k*math.sqrt(c1))\n",
      "f2= 10**(k*n*math.sqrt((c2*(n+n1))))\n",
      "##RESULTS\n",
      "print'%s %.2f %s'% ('activity coefficient =   ',f1,'')\n",
      "print'%s %.2f %s'% ('\\n activity coefficient =   ',f2,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "activity coefficient =    0.89 \n",
        "\n",
        " activity coefficient =    0.88 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg491"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "a= 6.4*10**-6 ##g ion per lit\n",
      "a1= 0.05\n",
      "n= 2.\n",
      "##CALCULATIONS\n",
      "Ksp= a**2*a1\n",
      "s= (Ksp/n**2)**(1./3.)\n",
      "##RESULTS\n",
      "print'%s %.2e %s'% ('Ks =  ',Ksp,'')\n",
      "print'%s %.2e %s'% ('\\n solubility of Ag2CrO4 = ',s,' mole per litre')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ks =   2.05e-12 \n",
        "\n",
        " solubility of Ag2CrO4 =  8.00e-05  mole per litre\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg494"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "s1= -0.0059 ##mole per litre\n",
      "x1= 0.0118 ##mole per lit\n",
      "x2= 0.0269 ##mole per litre\n",
      "##CALCULATIONS\n",
      "S= s1+math.sqrt(0.25*x1**2+x2**2)\n",
      "##RESULTS\n",
      "print'%s %.4f %s'% ('Solubility = ',S,' mole per litre')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Solubility =  0.0216  mole per litre\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg506"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "Ka= 1.752*10**-5\n",
      "c= 0.1 ##M\n",
      "##CALCULATIONS\n",
      "ch= math.sqrt(Ka*c)\n",
      "ch1= -0.5*Ka+math.sqrt(Ka*c)\n",
      "r= ch1/c\n",
      "##RESULTS\n",
      "print'%s %.2e %s'% ('CH+ = ',ch,' g ion per litre')\n",
      "print'%s %.3e %s'% ('\\n CH+ = ',ch1,' g ion per litre')\n",
      "print'%s %.2e %s'% ('\\n degree of dissociation = ',r,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "CH+ =  1.32e-03  g ion per litre\n",
        "\n",
        " CH+ =  1.315e-03  g ion per litre\n",
        "\n",
        " degree of dissociation =  1.31e-02 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg508"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "c1= 0.1 ##M\n",
      "cs= 0.05 ##M\n",
      "Ka= 1.75*10**-5\n",
      "##CALCULATIONS\n",
      "ch= Ka*c1/cs\n",
      "##RESULTS\n",
      "print'%s %.1e %s'% ('CH+ = ',ch,' g ion per litre')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "CH+ =  3.5e-05  g ion per litre\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg511"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "ch= 5.46*10**-5 ##g ion per litre\n",
      "ph= 8.752\n",
      "##CALCULATIONS\n",
      "pH= -math.log10(ch)\n",
      "ch1= 10**(-ph)\n",
      "##RESULTS\n",
      "print'%s %.2f %s'% ('pH = ',pH,'') \n",
      "print'%s %.2e %s'% ('\\n Hydrogen ion concentration = ',ch1,' g ion per litre') \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "pH =  4.26 \n",
        "\n",
        " Hydrogen ion concentration =  1.77e-09  g ion per litre\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex8-pg512"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Intitalisation of variables\n",
      "pt= 14.\n",
      "ph= 4.75\n",
      "##CALCULATIONS\n",
      "coh= 10**(-(pt-ph))\n",
      "##RESULTS\n",
      "print'%s %.2e %s'% ('COH- = ',coh,' g ion per litre') \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "COH- =  5.62e-10  g ion per litre\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}