{ "metadata": { "name": "", "signature": "sha256:1671a89ef38b6b7afbc72d0d6b374367e1ac4b1abd5ab2d480c98bd2b6a92ca8" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 14: Ensemble and Molecular Partition Function" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.1, Page Number 332" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "l = 0.01 #Box length, m \n", "n1,n2 = 2,1 #Energy levels states\n", "m = 5.31e-26 #mass of oxygen molecule, kg\n", "\n", "#Calculations \n", "dE = (n1+n2)*h**2/(8*m*l**2)\n", "dEcm = dE/(h*c*1e2)\n", "#Results\n", "print 'Difference in energy levels is %3.2e J or %3.2e 1/cm'%(dE,dEcm)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Difference in energy levels is 3.10e-38 J or 1.56e-15\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.2, Page Number 333" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi, sqrt\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "v = 1.0 #Volume, L\n", "T = 298.0 #Temeprature of Ar, K\n", "m = 6.63e-26 #Mass of Argon molecule, kg \n", "\n", "#Calculations \n", "GAMA = h/sqrt(2*pi*m*k*T)\n", "v = v*1e-3\n", "qT3D = v/GAMA**3\n", "\n", "#Results\n", "print 'Thermal wave length is %3.2e m and\\nTranslational partition function is %3.2e'%(GAMA,qT3D)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Thermal wave length is 1.60e-11 m and\n", "Translational partition function is 2.44e+29\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.4, Page Number 338" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi, sqrt\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "J = 4 #Rotational energy level\n", "B = 8.46 #Spectrum, 1/cm\n", "\n", "#Calculations \n", "T = (2*J+1)**2*h*c*100*B/(2*k)\n", "#Results\n", "print 'Spectrum will be observed at %4.0f K'%(T)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Spectrum will be observed at 494 K\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.5, Page Number 340" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import exp\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "B = 60.589 #Spectrum for H2, 1/cm\n", "T = 1000 #Temperture of Hydrogen, K\n", "#Calculations \n", "qR = k*T/(2*h*c*100*B)\n", "qRs = 0.0\n", "#for J in range(101):\n", "# print J\n", "# if (J%2 == 0):\n", "# qRs = qRs + (2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T)\n", "# else:\n", "# qRs = qRs + 3*(2*J+1)*exp(-h*c*100*B*J*(J+1)/(k*T))\n", "#print qRs/4\n", "\n", "#Results\n", "print 'Rotation partition function of H2 at %4.0f is %4.3f'%(T,qR)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rotation partition function of H2 at 1000 is 5.729\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.6, Page Number 341" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "B = 0.0374 #Spectrum for H2, 1/cm\n", "T = 100.0 #Temperture of Hydrogen, K\n", "sigma = 2.\n", "#Calculations\n", "ThetaR = h*c*100*B/k\n", "qR = T/(sigma*ThetaR)\n", "\n", "#Results\n", "print 'Rotation partition function of H2 at %4.0f K is %4.3f'%(T,qR)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rotation partition function of H2 at 100 K is 928.121\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.7, Page Number 342" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi, sqrt\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "Ba = 1.48 #Spectrum for OCS, 1/cm\n", "Bb = [2.84,0.191,0.179] #Spectrum for ONCI, 1/cm\n", "Bc = [9.40,1.29,1.13] #Spectrum for CH2O, 1/cm\n", "T = 298.0 #Temperture of Hydrogen, K\n", "sigmab = 1\n", "sigmac = 2\n", "\n", "#Calculations\n", "qRa = k*T/(h*c*100*Ba)\n", "qRb = (sqrt(pi)/sigmab)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bb[0])*sqrt(1/Bb[1])*sqrt(1/Bb[2])\n", "qRc = (sqrt(pi)/sigmac)*(k*T/(h*c*100))**(3./2)*sqrt(1/Bc[0])*sqrt(1/Bc[1])*sqrt(1/Bc[2])\n", "\n", "#Results\n", "print 'Rotation partition function for OCS, ONCI, CH2O at %4.0f K are %4.0f, %4.0f, and %4.0f respectively'%(T,qRa,qRb,qRc)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rotation partition function for OCS, ONCI, CH2O at 298 K are 140, 16926, and 712 respectively\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.8, Page Number 344" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import pi, exp\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "Ba = 1.48 #Frequency for OCS, 1/cm\n", "Bb = [2.84,0.191,0.179] #Frequency for ONCI, 1/cm\n", "Bc = [9.40,1.29,1.13] #Frequency for CH2O, 1/cm\n", "T298 = 298.0 #Temperture of Hydrogen, K\n", "T1000 = 1000 #Temperture of Hydrogen, K\n", "nubar = 208\n", "\n", "#Calculations\n", "qv298 = 1./(1.-exp(-h*c*100*nubar/(k*T298)))\n", "qv1000 = 1./(1.-exp(-h*c*100*nubar/(k*T1000)))\n", "\n", "#Results\n", "print 'Vibrational partition function for I2 at %4d and %4d are %4.2f K and %4.2f respectively'%(T298, T1000,qv298, qv1000)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Vibrational partition function for I2 at 298 and 1000 are 1.58 K and 3.86 respectively\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.9, Page Number 346" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import exp\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "T = 298 #Temeprature, K\n", "nubar = [450, 945, 1100] #Vibrational mode frequencies for OClO, 1/cm\n", "\n", "#Calculations\n", "Qv = 1.\n", "for i in nubar:\n", " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", " Qv = Qv*qv\n", "#Results\n", "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At 450 1/cm the q = 1.128\n", "At 945 1/cm the q = 1.010\n", "At 1100 1/cm the q = 1.005\n", "Total Vibrational partition function for OClO at 298.0 K is 1.146 respectively\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.10, Page Number 348" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import exp\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "T = 298 #Temeprature, K\n", "nubar = 917 #Vibrational mode frequencies for F2, 1/cm\n", "\n", "#Calculations\n", "ThetaV = h*c*100*nubar/k\n", "Th = 10*ThetaV\n", "qv = 1/(1.-exp(-ThetaV/Th))\n", "\n", "#Results\n", "print 'Vibrational partition function for F2 at %4.1f K is %4.3f'%(T, qv)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Vibrational partition function for F2 at 298.0 K is 10.508\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.11, Page Number 348" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import exp\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "T = 1000 #Temeprature, K\n", "nubar = [1388, 667.4,667.4,2349] #Vibrational mode frequencies for CO2, 1/cm\n", "\n", "#Calculations\n", "Qv = 1.\n", "for i in nubar:\n", " qv = 1./(1.-exp(-h*c*100*i/(k*T)))\n", " print 'At %4.0f 1/cm the q = %4.3f'%(i,qv)\n", " Qv = Qv*qv\n", "#Results\n", "print 'Total Vibrational partition function for OClO at %4.1f K is %4.3f'%(T, Qv)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At 1388 1/cm the q = 1.157\n", "At 667 1/cm the q = 1.619\n", "At 667 1/cm the q = 1.619\n", "At 2349 1/cm the q = 1.035\n", "Total Vibrational partition function for OClO at 1000.0 K is 3.139\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example Problem 14.12, Page Number 352" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from math import exp\n", "\n", "#Variable Declarations\n", "h = 6.626e-34 #Planks constant, J.s\n", "k = 1.38e-23 #Boltzman constant, J/K\n", "c = 3.0e8 #speed of light, m/s\n", "\n", "T = 298. #Temeprature, K\n", "n = [0,1,2,3,4,5,6,7,8] #Energy levels\n", "E0 = [0,137.38,323.46,552.96,2112.28,2153.21,2220.11,2311.36,2424.78] #Energies, 1/cm\n", "g0 = [4,6,8,10,2,4,6,8,10]\n", "\n", "#Calculations\n", "qE = 0.0\n", "for i in range(9):\n", " a =g0[i]*exp(-h*c*100*E0[i]/(k*T))\n", " qE = qE + a\n", "\n", "#Results\n", "print 'Electronic partition function for F2 at %4.1f K is %4.2f'%(T, qE)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Electronic partition function for F2 at 298.0 K is 9.45\n" ] } ], "prompt_number": 26 } ], "metadata": {} } ] }