diff options
author | debashisdeb | 2014-06-20 15:42:42 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-20 15:42:42 +0530 |
commit | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch) | |
tree | f54eab21dd3d725d64a495fcd47c00d37abed004 /Engineering_Physics/Chapter_8.ipynb | |
parent | a78126bbe4443e9526a64df9d8245c4af8843044 (diff) | |
download | Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2 Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip |
removing problem statements
Diffstat (limited to 'Engineering_Physics/Chapter_8.ipynb')
-rw-r--r-- | Engineering_Physics/Chapter_8.ipynb | 332 |
1 files changed, 296 insertions, 36 deletions
diff --git a/Engineering_Physics/Chapter_8.ipynb b/Engineering_Physics/Chapter_8.ipynb index 40606862..be4820c5 100644 --- a/Engineering_Physics/Chapter_8.ipynb +++ b/Engineering_Physics/Chapter_8.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 8" + "name": "", + "signature": "sha256:a97623c1294ef4fbd99f1423addadcfc2341e13ca402c26d0b2a69dd71e1782a" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,44 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Conducting materials" + "source": [ + "Conducting materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.1, Page number 231" + "source": [ + "Example number 8.1, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electrical resistivity\n\n#Variable declaration\nm=9.1*10**-31; #mass of the electron in kg\nn=2.533*10**28; #concentration of electrons per m^3\ne=1.6*10**-19;\ntow_r=3.1*10**-14; #relaxation time in sec\n\n#Calculation\nrho=m/(n*(e**2*tow_r));\n\n#Result\nprint(\"electrical resistivity in ohm metre is\",rho);", + "input": [ + " \n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "n=2.533*10**28; #concentration of electrons per m^3\n", + "e=1.6*10**-19;\n", + "tow_r=3.1*10**-14; #relaxation time in sec\n", + "\n", + "#Calculation\n", + "rho=m/(n*(e**2*tow_r));\n", + "\n", + "#Result\n", + "print(\"electrical resistivity in ohm metre is\",rho);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n" + "text": [ + "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n" + ] } ], "prompt_number": 1 @@ -38,19 +58,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.2, Page number 231" + "source": [ + "Example number 8.2, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap of semiconductor\n\n#importing modules\nimport math\n\n#Variable declaration\ns=3.75*10**3; #slope\nk=1.38*10**-23;\n\n#Calculation\nEg=2*k*s;\nEg=Eg/(1.6*10**-19); #converting J to eV\nEg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"band gap of semiconductor in eV is\",Eg);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "s=3.75*10**3; #slope\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "Eg=2*k*s;\n", + "Eg=Eg/(1.6*10**-19); #converting J to eV\n", + "Eg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of semiconductor in eV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of semiconductor in eV is', 0.647)\n" + "text": [ + "('band gap of semiconductor in eV is', 0.647)\n" + ] } ], "prompt_number": 3 @@ -59,19 +99,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.3, Page number 231" + "source": [ + "Example number 8.3, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of occupation of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nT=989; #temperature in C\nk=1.38*10**-23;\n#let E-EF be E\nE=0.5; #occupied level of electron in eV\n\n#Calculation\nT=T+273; #temperature in K\nE=E*1.6*10**-19; #converting eV to J\n#let fermi=dirac distribution function f(E) be f\nf=1/(1+math.exp(E/(k*T)));\nf=math.ceil(f*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"probability of occupation of electrons is\",f);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=989; #temperature in C\n", + "k=1.38*10**-23;\n", + "#let E-EF be E\n", + "E=0.5; #occupied level of electron in eV\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "E=E*1.6*10**-19; #converting eV to J\n", + "#let fermi=dirac distribution function f(E) be f\n", + "f=1/(1+math.exp(E/(k*T)));\n", + "f=math.ceil(f*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"probability of occupation of electrons is\",f);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of occupation of electrons is', 0.011)\n" + "text": [ + "('probability of occupation of electrons is', 0.011)\n" + ] } ], "prompt_number": 4 @@ -80,19 +144,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.4, Page number 232" + "source": [ + "Example number 8.4, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the drift velocity of free electrons\n\n#Variable declaration\nmew_e=0.0035; #mobility of electrons in m^2/Vs\nE=0.5; #electric field strength in V/m\n\n#Calculation\nvd=mew_e*E;\nvd=vd*10**3;\n\n#Result\nprint(\"drift velocity of free electrons in m/sec is\",vd,\"*10**-3\");\n\n#answer given in the book is wrong", + "input": [ + " \n", + "mew_e=0.0035; #mobility of electrons in m^2/Vs\n", + "E=0.5; #electric field strength in V/m\n", + "\n", + "#Calculation\n", + "vd=mew_e*E;\n", + "vd=vd*10**3;\n", + "\n", + "#Result\n", + "print(\"drift velocity of free electrons in m/sec is\",vd,\"*10**-3\");\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n" + "text": [ + "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n" + ] } ], "prompt_number": 1 @@ -101,19 +182,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.5, Page number 232" + "source": [ + "Example number 8.5, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mobility of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**23; #avagadro number\ne=1.6*10**-19;\nrho=1.73*10**-8; #resistivity of Cu in ohm metre\nw=63.5; #atomic weight \nd=8.92*10**3; #density in kg/m^3\n\n#Calculation\nd=d*10**3;\nsigma=1/rho;\nsigmaa=sigma/10**7;\nsigmaa=math.ceil(sigmaa*10**3)/10**3; #rounding off to 3 decimals\nn=(d*A)/w;\nmew=sigma/(n*e); #mobility of electrons\nmew=mew*10**3;\nmew=math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"electrical conductivity in ohm-1 m-1\",sigmaa,\"*10**7\");\nprint(\"concentration of carriers per m^3\",n);\nprint(\"mobility of electrons in m^2/Vsec is\",mew,\"*10**-3\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**23; #avagadro number\n", + "e=1.6*10**-19;\n", + "rho=1.73*10**-8; #resistivity of Cu in ohm metre\n", + "w=63.5; #atomic weight \n", + "d=8.92*10**3; #density in kg/m^3\n", + "\n", + "#Calculation\n", + "d=d*10**3;\n", + "sigma=1/rho;\n", + "sigmaa=sigma/10**7;\n", + "sigmaa=math.ceil(sigmaa*10**3)/10**3; #rounding off to 3 decimals\n", + "n=(d*A)/w;\n", + "mew=sigma/(n*e); #mobility of electrons\n", + "mew=mew*10**3;\n", + "mew=math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"electrical conductivity in ohm-1 m-1\",sigmaa,\"*10**7\");\n", + "print(\"concentration of carriers per m^3\",n);\n", + "print(\"mobility of electrons in m^2/Vsec is\",mew,\"*10**-3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical conductivity in ohm-1 m-1', 5.781, '*10**7')\n('concentration of carriers per m^3', 8.459250393700786e+28)\n('mobility of electrons in m^2/Vsec is', 4.2708, '*10**-3')\n" + "text": [ + "('electrical conductivity in ohm-1 m-1', 5.781, '*10**7')\n", + "('concentration of carriers per m^3', 8.459250393700786e+28)\n", + "('mobility of electrons in m^2/Vsec is', 4.2708, '*10**-3')\n" + ] } ], "prompt_number": 16 @@ -122,19 +235,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.6, Page number 232" + "source": [ + "Example number 8.6, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fermi energy\n\n#importing modules\nimport math\n\n#Variable declaration\nn=18.1*10**28; #concentration of electrons per m^3\nh=6.62*10**-34; #planck constant in Js\nme=9.1*10**-31; #mass of electron in kg\n\n#Calculation\nX=h**2/(8*me);\nE_F0=X*(((3*n)/math.pi)**(2/3));\nE_F0=E_F0/(1.6*10**-19); #converting J to eV\n\n#Result\nprint(\"Fermi energy in eV is\",E_F0);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=18.1*10**28; #concentration of electrons per m^3\n", + "h=6.62*10**-34; #planck constant in Js\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "X=h**2/(8*me);\n", + "E_F0=X*(((3*n)/math.pi)**(2/3));\n", + "E_F0=E_F0/(1.6*10**-19); #converting J to eV\n", + "\n", + "#Result\n", + "print(\"Fermi energy in eV is\",E_F0);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Fermi energy in eV is', 3.762396978021977e-19)\n" + "text": [ + "('Fermi energy in eV is', 3.762396978021977e-19)\n" + ] } ], "prompt_number": 18 @@ -143,19 +279,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.7, Page number 233" + "source": [ + "Example number 8.7, Page number 233" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the concentration of free electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nE_F0=5.5; #fermi energy in eV\nh=6.63*10**-34; #planck constant in Js\nme=9.1*10**-31; #mass of electron in kg\n\n#Calculation\nE_F0=E_F0*1.6*10**-19; #converting eV to J\nn=((2*me*E_F0)**(3/2))*((8*math.pi)/(3*h**3));\n\n#Result\nprint(\"concentration of free electrons per unit volume of silver per m^3 is\",n);\n\n#answer given in the book is wrong\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E_F0=5.5; #fermi energy in eV\n", + "h=6.63*10**-34; #planck constant in Js\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "E_F0=E_F0*1.6*10**-19; #converting eV to J\n", + "n=((2*me*E_F0)**(3/2))*((8*math.pi)/(3*h**3));\n", + "\n", + "#Result\n", + "print(\"concentration of free electrons per unit volume of silver per m^3 is\",n);\n", + "\n", + "#answer given in the book is wrong\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of free electrons per unit volume of silver per m^3 is', 4.603965704817037e+52)\n" + "text": [ + "('concentration of free electrons per unit volume of silver per m^3 is', 4.603965704817037e+52)\n" + ] } ], "prompt_number": 19 @@ -164,19 +322,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.8, Page number 233" + "source": [ + "Example number 8.8, Page number 233" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of an electron\n\n#importing modules\nimport math\n\n#Variable declaration\nEg=1.07; #energy gap of silicon in eV\nk=1.38*10**-23;\nT=298; #temperature in K\n\n#Calculation\nEg=Eg*1.6*10**-19; #converting eV to J\n#let the probability of electron f(E) be X\n#X=1/(1+exp((E-Ef)/(k*T)))\n#but E=Ec and Ec-Ef=Eg/2\nX=1/(1+math.exp(Eg/(2*k*T)))\n\n#Result\nprint(\"probability of an electron thermally excited is\",X);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Eg=1.07; #energy gap of silicon in eV\n", + "k=1.38*10**-23;\n", + "T=298; #temperature in K\n", + "\n", + "#Calculation\n", + "Eg=Eg*1.6*10**-19; #converting eV to J\n", + "#let the probability of electron f(E) be X\n", + "#X=1/(1+exp((E-Ef)/(k*T)))\n", + "#but E=Ec and Ec-Ef=Eg/2\n", + "X=1/(1+math.exp(Eg/(2*k*T)))\n", + "\n", + "#Result\n", + "print(\"probability of an electron thermally excited is\",X);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of an electron thermally excited is', 9.122602463573379e-10)\n" + "text": [ + "('probability of an electron thermally excited is', 9.122602463573379e-10)\n" + ] } ], "prompt_number": 21 @@ -185,19 +366,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.9, Page number 234" + "source": [ + "Example number 8.9, Page number 234" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fermi energy and temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nm=9.1*10**-31; #mass of the electron in kg\nvf=0.86*10**6; #fermi velocity in m/sec\n\n#Calculation\nEfj=(m*vf**2)/2;\nEf=Efj/(1.6*10**-19); #converting J to eV\nEf=math.ceil(Ef*10**3)/10**3; #rounding off to 3 decimals\nTf=Efj/k;\nTf=Tf/10**4;\nTf=math.ceil(Tf*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"fermi energy of metal in J is\",Efj);\nprint(\"fermi energy of metal in eV is\",Ef);\nprint(\"fermi temperature in K is\",Tf,\"*10**4\");\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "vf=0.86*10**6; #fermi velocity in m/sec\n", + "\n", + "#Calculation\n", + "Efj=(m*vf**2)/2;\n", + "Ef=Efj/(1.6*10**-19); #converting J to eV\n", + "Ef=math.ceil(Ef*10**3)/10**3; #rounding off to 3 decimals\n", + "Tf=Efj/k;\n", + "Tf=Tf/10**4;\n", + "Tf=math.ceil(Tf*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"fermi energy of metal in J is\",Efj);\n", + "print(\"fermi energy of metal in eV is\",Ef);\n", + "print(\"fermi temperature in K is\",Tf,\"*10**4\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi energy of metal in J is', 3.3651800000000002e-19)\n('fermi energy of metal in eV is', 2.104)\n('fermi temperature in K is', 2.4386, '*10**4')\n" + "text": [ + "('fermi energy of metal in J is', 3.3651800000000002e-19)\n", + "('fermi energy of metal in eV is', 2.104)\n", + "('fermi temperature in K is', 2.4386, '*10**4')\n" + ] } ], "prompt_number": 24 @@ -206,19 +415,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.10, Page number 234" + "source": [ + "Example number 8.10, Page number 234" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Lorentz number\n\n#Variable declaration\nsigma=5.82*10**7; #electrical conductivity in ohm^-1m^-1\nK=387; #thermal conductivity of Cu in W/mK\nT=27; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nL=K/(sigma*T);\n\n#Result\nprint(\"lorentz number in W ohm/K^2 is\",L);\n", + "input": [ + " \n", + "#Variable declaration\n", + "sigma=5.82*10**7; #electrical conductivity in ohm^-1m^-1\n", + "K=387; #thermal conductivity of Cu in W/mK\n", + "T=27; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "L=K/(sigma*T);\n", + "\n", + "#Result\n", + "print(\"lorentz number in W ohm/K^2 is\",L);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n" + "text": [ + "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n" + ] } ], "prompt_number": 25 @@ -227,19 +453,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.11, Page number 235" + "source": [ + "Example number 8.11, Page number 235" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electrical conductivity, thermal conductivity and Lorentz number\n\n#importing modules\nimport math\n\n#Variable declaration\nm=9.1*10**-31; #mass of the electron in kg\ne=1.6*10**-19;\nk=1.38*10**-23;\nn=8.49*10**28; #concentration of electrons in Cu per m^3\ntow_r=2.44*10**-14; #relaxation time in sec\nT=20; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nsigma=(n*(e**2)*tow_r)/m;\nsigmaa=sigma/10**7;\nsigmaa=math.ceil(sigmaa*10**4)/10**4; #rounding off to 4 decimals\nK=(n*(math.pi**2)*(k**2)*T*tow_r)/(3*m);\nK=math.ceil(K*100)/100; #rounding off to 2 decimals\nL=K/(sigma*T);\n\n#Result\nprint(\"electrical conductivity in ohm^-1 m^-1 is\",sigmaa,\"*10**7\");\nprint(\"thermal conductivity in W/mK is\",K);\nprint(\"Lorentz number in W ohm/K^2 is\",L);\n\n#answer for lorentz number given in the book is wrong\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "e=1.6*10**-19;\n", + "k=1.38*10**-23;\n", + "n=8.49*10**28; #concentration of electrons in Cu per m^3\n", + "tow_r=2.44*10**-14; #relaxation time in sec\n", + "T=20; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "sigma=(n*(e**2)*tow_r)/m;\n", + "sigmaa=sigma/10**7;\n", + "sigmaa=math.ceil(sigmaa*10**4)/10**4; #rounding off to 4 decimals\n", + "K=(n*(math.pi**2)*(k**2)*T*tow_r)/(3*m);\n", + "K=math.ceil(K*100)/100; #rounding off to 2 decimals\n", + "L=K/(sigma*T);\n", + "\n", + "#Result\n", + "print(\"electrical conductivity in ohm^-1 m^-1 is\",sigmaa,\"*10**7\");\n", + "print(\"thermal conductivity in W/mK is\",K);\n", + "print(\"Lorentz number in W ohm/K^2 is\",L);\n", + "\n", + "#answer for lorentz number given in the book is wrong\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical conductivity in ohm^-1 m^-1 is', 5.8277, '*10**7')\n('thermal conductivity in W/mK is', 417.89)\n('Lorentz number in W ohm/K^2 is', 2.4473623172034308e-08)\n" + "text": [ + "('electrical conductivity in ohm^-1 m^-1 is', 5.8277, '*10**7')\n", + "('thermal conductivity in W/mK is', 417.89)\n", + "('Lorentz number in W ohm/K^2 is', 2.4473623172034308e-08)\n" + ] } ], "prompt_number": 29 @@ -247,7 +507,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] |