summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter2_2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics/chapter2_2.ipynb')
-rw-r--r--Engineering_Physics/chapter2_2.ipynb388
1 files changed, 388 insertions, 0 deletions
diff --git a/Engineering_Physics/chapter2_2.ipynb b/Engineering_Physics/chapter2_2.ipynb
new file mode 100644
index 00000000..95f30057
--- /dev/null
+++ b/Engineering_Physics/chapter2_2.ipynb
@@ -0,0 +1,388 @@
+{
+ "metadata": {
+ "name": "chapter2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Electron Theory of Metals"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.1, Page number 69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the Fermi function\n\n#import module\nimport math\n\n#Calculation\n# given that E-Ef = kT\n# fermi function FE = 1/(1+exp((E-Ef)/kT)\n# therefore FE = 1/(1+exp(kT/kT));\n# FE = 1/(1+exp(1))\nFE=1/(1+math.exp(1));\nFE=math.ceil(FE*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"fermi function is\",FE);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('fermi function is', 0.27)\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.2, Page number 69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the Fermi function\n\n#import module\nimport math\n\n#Calculation\n# given that E-Ef = kT\n# fermi function FE = 1/(1+exp((E-Ef)/kT)\n# therefore FE = 1/(1+exp(kT/kT));\n# FE = 1/(1+exp(1))\nFE=1/(1+math.exp(1));\nFE=math.ceil(FE*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"fermi function is\",FE);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('fermi function is', 0.269)\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.3, Page number 69"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nFE=10/100; #fermi function is 10%\nEf=5.5; #fermi energy of silver in eV\nk=1.38*10**-23;\n\n#Calculation\nE=Ef+(Ef/100);\n#FE=1/(1+math.exp((E-Ef)/(k*T)))\n#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))\n#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))\n#therefore log((1/FE)-1) = (E-Ef)/(k*T)\n#therefore T = (E-Ef)/(k*math.log((1/FE)-1))\n#let X=E-Ef; \nX=E-Ef; #energy in eV\nX=X*1.6*10**-19; #energy in J\nT = (X/(k*math.log((1/FE)-1)));\nT=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"temperature in K is\",T);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('temperature in K is', 290.23)\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.4, Page number 70 **************************************"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\n#let X=E-Ef\nX=0.5; #E-Ef=0.5 in eV\n\n#Calculation\nX=X*1.6*10**-19; #X in J\nFE=1/100; #fermi function is 1% \nk=1.38*10**-23;\n#FE=1/(1+exp(X/(k*T)))\n#therefore 1/FE = 1+math.exp(X/(k*T))\n#therefore (1/FE)-1 = math.exp(X/(k*T))\n#therefore log((1/FE)-1) = X/(k*T)\n#but log(x) = 2.303*math.log10(x)\n#therefore T = X/(k*math.log((1/FE)-1))\n#but log(x)=2.303*math.log10(x)\n#therefore T = X/(k*2.303*math.log10((1/FE)-1))\nT = X/(k*2.303*math.log10((1/FE)-1));\n\n#Result\nprint(\"temperature in K is\",T);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('temperature in K is', 1261.3505710887953)\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.5, Page number 71 *******"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the density and mobility of electrons in silver\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nrho_s=10.5*10**3; #density in kg/m^3\nNA=6.02*10**26; #avagadro number per kmol\nMA=107.9; \n\n#Calculation\nn=(rho_s*NA)/MA;\nsigma=6.8*10**7;\ne=1.6*10**-19; #charge in coulomb\nmew=sigma/(n*e);\nmew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"density of electrons is\",n);\nprint(\"mobility of electrons in silver in m^2/Vs is\",mew);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('density of electrons is', 5.85820203892493e+28)\n('mobility of electrons in silver in m^2/Vs is', 0.007255)\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.6, Page number 71 ***"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the mobility and average time of collision of electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=8.92*10**3; #density in kg/m^3\nrho=1.73*10**-8; #resistivity in ohm-m\nm=9.1*10**-31; #mass in kg\nw=63.5; #atomic weight\ne=1.6*10**-19; #charge in coulomb\nA=6.02*10**26; #avagadro number\n\n#Calculation\nn=(d*A)/w;\nmew=1/(rho*n*e);\ntow=m/(n*(e**2)*rho);\nmew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"mobility of electrons in Copper in m/Vs is\",mew);\nprint(\"average time of collision of electrons in copper in sec is\",tow);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('mobility of electrons in Copper in m/Vs is', 0.004273)\n('average time of collision of electrons in copper in sec is', 2.4297841992299697e-14)\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.7, Page number 72"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the relaxation time of conduction electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nrho=1.54*10**-8; #resistivity in ohm-m\nn=5.8*10**28; #electron/m^3\nm=9.108*10**-31; #mass in kg\ne=1.602*10**-19; #charge in coulomb\n\n#Calculation\ntow=m/(n*(e**2)*rho);\n\n#Result\nprint(\"relaxation time of conduction electrons in sec is\",tow);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('relaxation time of conduction electrons in sec is', 3.973281032516849e-14)\n"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.8, Page number 73"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nFE=10/100; #fermi function is 10%\nEf=5.5; #fermi energy of silver in eV\nk=1.38*10**-23;\n\n#Calculation\nE=Ef+(Ef/100);\n#FE=1/(1+math.exp((E-Ef)/(k*T)))\n#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))\n#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))\n#therefore log((1/FE)-1) = (E-Ef)/(k*T)\n#therefore T = (E-Ef)/(k*math.log((1/FE)-1))\n#let X=E-Ef; \nX=E-Ef; #energy in eV\nX=X*1.6*10**-19; #energy in J\nT = (X/(k*math.log((1/FE)-1)));\nT=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"temperature in K is\",T);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('temperature in K is', 290.23)\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.9, Page number 73"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the Fermi distribution function\n\n#import module\nimport math\n\n#Calculation\n# given that E-Ef = kT\n# fermi function FpE = 1/(1+exp((E-Ef)/kT)\n# therefore FpE = 1/(1+exp(kT/kT));\n# FpE = 1/(1+exp(1))\nFpE=1/(1+math.exp(1));\nFpE=math.ceil(FpE*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"fermi function is\",FpE);\n#the presence of electron at that energy level is not certain",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('fermi function is', 0.27)\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.10, Page number 74 ****************************"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the number of states per unit volume\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nm=9.1*10**-31; #mass in kg\nh=6.626*10**-34;\nA=(8*m)**(3/2);\n\n#Calculation\nB=math.pi/(2*h**3);\nEfeV=3.10; #fermi energy in eV\nEf=EfeV*1.6*10**-19; #fermi energy in J\nEFeV=EfeV+0.02; #energy after interval in eV\nEF=EFeV*1.6*10**-19; #energy after interval in J\nfunction Q=f(E),Q=A*B*math.sqrt(E),endfunction\nI=intg(Ef,EF,f)\n\n#Result\nprint(\"number of energy states per unit volume is\",I);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "ename": "SyntaxError",
+ "evalue": "invalid syntax (<ipython-input-25-15d658985351>, line 18)",
+ "output_type": "pyerr",
+ "traceback": [
+ "\u001b[1;36m File \u001b[1;32m\"<ipython-input-25-15d658985351>\"\u001b[1;36m, line \u001b[1;32m18\u001b[0m\n\u001b[1;33m function Q=f(E),Q=A*B*math.sqrt(E),endfunction\u001b[0m\n\u001b[1;37m ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.11, Page number 74"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the mean free path of electron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nT=300; #temperature in K\nn=8.5*10**28; #density per m^3\nrho=1.69*10**-8; #resistivity in ohm/m^3\nme=9.11*10**-31; #mass of electron in kg\ne=1.6*10**-19; #charge in coulomb\nKB=1.38*10**-23; #boltzmann constant in J/k\n\n#Calculation\nlamda=math.sqrt(3*KB*me*T)/(n*(e**2)*rho);\n\n#Result\nprint(\"mean free path of electron in m is\",lamda);\n\n#answer given in the book is wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('mean free path of electron in m is', 2.892506814374228e-09)\n"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.12, Page number 75"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the relaxation time of conduction electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nrho=1.43*10**-8; #resistivity in ohm-m\nn=6.5*10**28; #electron/m^3\nm=9.11*10**-34; #mass in kg\ne=1.6*10**-19; #charge in coulomb\n\n#Calculation\ntow=m/(n*(e**2)*rho);\n\n#Result\nprint(\"relaxation time of conduction electrons in sec is\",tow);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('relaxation time of conduction electrons in sec is', 3.8285032275416887e-17)\n"
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.13, Page number 75 ******"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the mobility and average time of collision of electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=8.92*10**3; #density in kg/m^3\nrho=1.73*10**-8; #resistivity in ohm-m\nm=9.1*10**-31; #mass in kg\nM=63.5; #atomic weight\ne=1.6*10**-19; #charge in coulomb\nA=6.02*10**26; #avagadro number\n\n#Calculation\nn=(d*A)/M;\nmew=1/(rho*n*e);\ntow=m/(n*(e**2)*rho);\nmew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"mobility of electrons in Copper in m/Vs is\",mew);\nprint(\"average time of collision of electrons in copper in sec is\",tow);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('mobility of electrons in Copper in m/Vs is', 0.004273)\n('average time of collision of electrons in copper in sec is', 2.4297841992299697e-14)\n"
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.14, Page number 76"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the order of magnitude of velocity of molecules\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nMH=1.008*2*1.67*10**-27; #mass in kg\nT=30; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nKB=1.38*10**-23; #boltzmann constant in J/k\nKE=(3/2)*KB*T; #kinetic energy in J\nKEeV=KE*6.24*10**18; #kinetic energy in eV\ncbar=math.sqrt((3*KB*T)/MH);\n\n#Result\nprint(\"average kinetic energy in J is\",KE);\nprint(\"average kinetic energy in eV is\",KEeV);\nprint(\"velocity of molecules in m/s is\",cbar);\n\n#answers for average kinetic energy in eV and velocity of electrons given in the book are wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('average kinetic energy in J is', 6.2720999999999986e-21)\n('average kinetic energy in eV is', 0.039137903999999994)\n('velocity of molecules in m/s is', 1930.269663853336)\n"
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.15, Page number 77 ****"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the velocity of an electron and proton\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEe=10; #electron kinetic energy in eV\nEp=10; #proton kinetic energy in eV\nme=9.1*10**-31; #mass of electron in kg\nmp=1.67*10**-27; #mass of proton in kg\n\n#Calculation\nEeeV=Ee*1.6*10**-19; #electron kinetic energy in J\nEpeV=Ep*1.6*10**-19; #proton kinetic energy in J\ncebar=math.sqrt((2*EeeV)/me);\ncpbar=math.sqrt((2*EpeV)/mp);\n\n#Result\nprint(\"velocity of electron in m/s is\",cebar);\nprint(\"velocity of proton in m/s is\",cpbar);\n\n#answers given in the book are wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('velocity of electron in m/s is', 1875228.9237539817)\n('velocity of proton in m/s is', 43774.05241316662)\n"
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.16, Page number 77"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the drift velocity of free electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nA=10; #area of cross section in mm^2\nA=A*10**-6; #area of cross section in m^2\ni=100; #current in amp\nn=8.5*10**28; #number of electrons per mm^3\ne=1.6*10**-19; #electron charge in coulumb\n\n#Calculation\nvd=1/(n*A*e);\n\n#Result\nprint(\"drift velocity in m/s is\",vd);\n\n#answer given in the book is wrong",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('drift velocity in m/s is', 7.3529411764705884e-06)\n"
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 2.17, Page number 78"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "# To calculate the thermal conductivity of copper\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\ntow=3*10**-14; #relaxation time in sec\nn=8*10**28; #density of electrons per m^3\nKB=1.38*10**-23; #boltzmann constant in J/k\nT=0; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nm=9.1*10**-31; #mass of electron in kg\nsigma_T=((3*n*tow*(KB**2)*T)/(2*m));\nsigma_T=math.ceil(sigma_T*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"thermal conductivity of copper in ohm-1 is\",sigma_T);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('thermal conductivity of copper in ohm-1 is', 205.68)\n"
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file