{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 4: Elements of Statistical Mechanics and Principles of Quantum Mechanics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 1, Page number 4-41" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "average energy of oscillator is 2.948 *10**-21 joule\n", "answer given in the book varies due to rounding off errors\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "new=5.6*10**12; #frequency(Hz)\n", "h=6.625*10**-34; #plank constant\n", "kB=1.38*10**-23; #boltzmann constant\n", "T=330; #temperature(K) \n", "\n", "#Calculation\n", "x=h*new/(kB*T); \n", "E=h*new/(math.exp(x)-1); #average energy of oscillator(joule)\n", "\n", "#Result\n", "print \"average energy of oscillator is\",round(E*10**21,3),\"*10**-21 joule\"\n", "print \"answer given in the book varies due to rounding off errors\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 2, Page number 4-41" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "energy density per unit wavelength is 7.13 Jm-4\n", "answer given in the book is wrong\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "h=6.63*10**-34; #plank constant\n", "kB=1.38*10**-23; #boltzmann constant\n", "T=1500; #temperature(K) \n", "c=3*10**8; #velocity of light(m/sec)\n", "lamda=6000*10**-10; #wavelength(m)\n", "\n", "#Calculation\n", "new=c/lamda;\n", "x=h*new/(kB*T); \n", "y=math.exp(x)-1; #average energy of oscillator(joule)\n", "Ulamda=8*math.pi*h*new/(y*lamda**4); #energy density per unit wavelength(Jm-4)\n", "\n", "#Result\n", "print \"energy density per unit wavelength is\",round(Ulamda,2),\"Jm-4\"\n", "print \"answer given in the book is wrong\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 3, Page number 4-41" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "wavelength is 0.0275 nm\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "e=1.6*10**-19; #charge(c)\n", "m=9.1*10**-31; #mass(kg)\n", "h=6.63*10**-34; #plank constant\n", "E=2000; #energy(eV)\n", "\n", "#Calculation\n", "lamda=h/math.sqrt(2*m*E*e); #wavelength(m)\n", "\n", "#Result\n", "print \"wavelength is\",round(lamda*10**9,4),\"nm\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 4, Page number 4-42" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "velocity is 438.9 *10**4 m/s\n", "kinetic energy is 54.78 eV\n", "answer for energy given in the book is wrong\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "lamda=1.66*10**-10; #wavelength(m)\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E=h**2/(2*m*e*lamda**2); #kinetic energy(eV)\n", "v=h/(m*lamda); #velocity(m/s)\n", "\n", "#Result\n", "print \"velocity is\",round(v*10**-4,1),\"*10**4 m/s\"\n", "print \"kinetic energy is\",round(E,2),\"eV\"\n", "print \"answer for energy given in the book is wrong\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 5, Page number 4-42" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ground state energy is 37.7377 eV\n", "energy of 1st excited state is 150.95 eV\n", "energy of 2nd excited state is 339.6395 eV\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=1*10**-10; #length(m)\n", "n2=2;\n", "n3=3;\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #ground state energy(eV)\n", "E2=n2**2*E1; #energy of 1st excited state(eV)\n", "E3=n3**2*E1; #energy of 2nd excited state(eV)\n", "\n", "#Result\n", "print \"ground state energy is\",round(E1,4),\"eV\"\n", "print \"energy of 1st excited state is\",round(E2,2),\"eV\"\n", "print \"energy of 2nd excited state is\",round(E3,4),\"eV\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 6, Page number 4-43" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "minimum energy is 2.3586 eV\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=4*10**-10; #length(m)\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #minimum energy(eV)\n", "\n", "#Result\n", "print \"minimum energy is\",round(E1,4),\"eV\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 7, Page number 4-43" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "wavelength of electron waves is 0.01 nm\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=15*10**3; #accelerated voltage(V)\n", "\n", "#Calculation\n", "lamda=1.227/math.sqrt(V); #wavelength of electron waves(nm)\n", "\n", "#Result\n", "print \"wavelength of electron waves is\",round(lamda,2),\"nm\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 8, Page number 4-43" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "minimum energy is 150.95 eV\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=0.05*10**-9; #length(m)\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #minimum energy(eV)\n", "\n", "#Result\n", "print \"minimum energy is\",round(E1,2),\"eV\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 9, Page number 4-44" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "minimum energy is 4.2 eV\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=3*10**-10; #length(m)\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #minimum energy(eV)\n", "\n", "#Result\n", "print \"minimum energy is\",round(E1,1),\"eV\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 10, Page number 4-44" ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "de broglie wavelength is 8488 nm\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "me=9.1*10**-31; #mass(kg)\n", "h=6.63*10**-34; #plank constant\n", "mn=1.676*10**-27; #mass(kg)\n", "\n", "#Calculation\n", "lamdan=h*10**9/math.sqrt(4*mn*me); #de broglie wavelength(nm) \n", "\n", "#Result\n", "print \"de broglie wavelength is\",int(lamdan),\"nm\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 11, Page number 4-44" ] }, { "cell_type": "code", "execution_count": 42, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ground state energy is 9.43 eV\n", "energy of 1st excited state is 37.738 eV\n", "energy of 2nd excited state is 150.95 eV\n", "answers for energy of 1st and 2nd states given in the book are wrong\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=2*10**-10; #length(m)\n", "n2=2;\n", "n4=4;\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #minimum energy(eV)\n", "E2=n2**2*E1; #energy of 1st excited state(eV)\n", "E4=n4**2*E1; #energy of 2nd excited state(eV)\n", "\n", "#Result\n", "print \"ground state energy is\",round(E1,2),\"eV\"\n", "print \"energy of 1st excited state is\",round(E2,3),\"eV\"\n", "print \"energy of 2nd excited state is\",round(E4,2),\"eV\"\n", "print \"answers for energy of 1st and 2nd states given in the book are wrong\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 12, Page number 4-45" ] }, { "cell_type": "code", "execution_count": 44, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "spacing of crystal is 0.382 angstrom\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "n=1;\n", "e=1.6*10**-19; #charge(c)\n", "m=9.1*10**-31; #mass(kg)\n", "h=6.63*10**-34; #plank constant\n", "V=344; #energy(eV)\n", "theta=60*math.pi/180; #angle(radian)\n", "\n", "#Calculation\n", "d=h*10**10/(2*math.sin(theta)*math.sqrt(2*m*V*e)); #spacing of crystal(angstrom)\n", "\n", "#Result\n", "print \"spacing of crystal is\",round(d,3),\"angstrom\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 13, Page number 4-45" ] }, { "cell_type": "code", "execution_count": 47, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ground state energy is 37.696 eV\n", "energy of 2nd excited state is 339.27 eV\n", "energy required to pump an electron is 301.57 eV\n", "answer given in the book is wrong\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=1*10**-10; #length(m)\n", "n3=3;\n", "m=9.11*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #ground state energy(eV)\n", "E3=n3**2*E1; #energy of 2nd excited state(eV)\n", "E=E3-E1; #energy required to pump an electron(eV) \n", "\n", "#Result\n", "print \"ground state energy is\",round(E1,3),\"eV\"\n", "print \"energy of 2nd excited state is\",round(E3,2),\"eV\"\n", "print \"energy required to pump an electron is\",round(E,2),\"eV\"\n", "print \"answer given in the book is wrong\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 14, Page number 4-46" ] }, { "cell_type": "code", "execution_count": 48, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "minimum energy is 9.43 eV\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "L=2*10**-10; #length(m)\n", "m=9.1*10**-31; #mass(kg)\n", "e=1.6*10**-19; #charge(c)\n", "h=6.63*10**-34; #plank constant\n", "\n", "#Calculation\n", "E1=h**2/(8*m*e*L**2); #minimum energy(eV)\n", "\n", "#Result\n", "print \"minimum energy is\",round(E1,2),\"eV\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example number 15, Page number 4-46" ] }, { "cell_type": "code", "execution_count": 52, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "wavelength of electron waves is 0.31 angstrom\n" ] } ], "source": [ "#importing modules\n", "import math\n", "from __future__ import division\n", "\n", "#Variable declaration\n", "V=1600; #accelerated voltage(V)\n", "\n", "#Calculation\n", "lamda=1.227*10/math.sqrt(V); #wavelength of electron waves(angstrom)\n", "\n", "#Result\n", "print \"wavelength of electron waves is\",round(lamda,2),\"angstrom\"" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }