{
 "metadata": {
  "name": "",
  "signature": "sha256:f00e66b23ba11c1502ba60271f6e9b549183dbf77dfd61ae21a7394bb7c1f4ce"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 19 - Photochemistry"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1 - pg 488"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Overall transmittance\n",
      "#Initialization of variables\n",
      "r1=0.727\n",
      "r2=0.407\n",
      "#calculations\n",
      "r3=r1*r2\n",
      "#results\n",
      "print '%s %.3f' %(\"Overall transmittance = \",r3)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Overall transmittance =  0.296\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2 - pg 488"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Extinction coefficient\n",
      "import math\n",
      "#Initialization of variables\n",
      "r=0.450\n",
      "c=0.02 #M\n",
      "l=4 #cm\n",
      "#calculations\n",
      "e=-math.log10(r) /(c*l)\n",
      "#results\n",
      "print '%s %.2f %s' %(\"Extinction coefficient =\",e,\"litres mole^-1 cm^-1\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Extinction coefficient = 4.33 litres mole^-1 cm^-1\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3 - pg 488"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Transmittance of the solution\n",
      "#Initialization of variables\n",
      "import math\n",
      "from math import log10\n",
      "r1=0.850\n",
      "r2=0.50\n",
      "#calculations\n",
      "Da=-log10(r1)\n",
      "Db=-log10(r2)\n",
      "D=Da+Db\n",
      "r3=10**(-D)\n",
      "#results\n",
      "print '%s %.3f' %(\"Transmittance of solution =\",r3)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transmittance of solution = 0.425\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4 - pg 491"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Extinction coefficient\n",
      "#Initialization of variables\n",
      "c=0.000025 #M\n",
      "l=2 #cm\n",
      "D=0.417\n",
      "#calculations\n",
      "e=D/(c*l)\n",
      "#result\n",
      "print '%s %d %s' %(\"Extinction coefficient =\",e,\" liters mole^-1 cm^-1\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Extinction coefficient = 8340  liters mole^-1 cm^-1\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5 - pg 491"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Kc for dissociation\n",
      "#Initialization of variables\n",
      "c=0.5 #M\n",
      "c1=0.000025 #M\n",
      "D2=0.280\n",
      "D1=0.417\n",
      "#calculations\n",
      "c2=D2*c1/(D1)\n",
      "dC=c1-c2\n",
      "SCN=c- 6*c2 -4*dC\n",
      "K=dC*SCN**2 /c2\n",
      "#results\n",
      "print '%s %.2f %s' %(\"Kc for dissociation =\",K,\" M^2\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Kc for dissociation = 0.12  M^2\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6 - pg 492"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the value of m\n",
      "#Initialization of variables\n",
      "import math\n",
      "from math import log\n",
      "D2=0.249\n",
      "D1=0.172\n",
      "a2=0.00752\n",
      "a1=0.00527\n",
      "#calculations\n",
      "m=(log(D2) -log(D1))/(log(a2) - log(a1))\n",
      "#results\n",
      "print '%s %.2f' %(\"m = \",m)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "m =  1.04\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7 - pg 495"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Increase in optical density\n",
      "#Initialization of variables\n",
      "c=0.1 #M\n",
      "V=100 #ml\n",
      "v1=25 #ml\n",
      "D=0.980\n",
      "d1=0.090\n",
      "d2=0.150\n",
      "#calculations\n",
      "a=v1*c/V\n",
      "b=(V-v1)*c/V\n",
      "Da=a*d1/c\n",
      "Db=b*d2/c\n",
      "Ddash=Da+Db\n",
      "dD=D-Ddash\n",
      "#results\n",
      "print '%s %.3f' %(\"Increase in optical density =\",dD)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Increase in optical density = 0.845\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8 - pg 496"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the value of lambda for the reaction to occur\n",
      "#Initialization of variables\n",
      "E=50000. #cal/mol\n",
      "#calculations\n",
      "lam=2.8593/E\n",
      "#results\n",
      "print '%s %d %s' %(\"For the reaction to occur lambda <\",lam*10**8,\"A\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For the reaction to occur lambda < 5718 A\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9 - pg 497"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Amount of reactant disappeared\n",
      "#Initialization of variables\n",
      "lam=3000*10**-8 #cm\n",
      "ield=0.420\n",
      "Et=70000 #cal\n",
      "#calculations\n",
      "E=2.8593/lam\n",
      "n=ield*Et/E\n",
      "#results\n",
      "print '%s %.3f %s' %(\"Amount of reactant disappeared =\",n,\" mol\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amount of reactant disappeared = 0.308  mol\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}