diff options
author | Trupti Kini | 2016-03-17 23:30:24 +0600 |
---|---|---|
committer | Trupti Kini | 2016-03-17 23:30:24 +0600 |
commit | 7d10afb628b5d7d6ca4e773a4b0af7daf8486590 (patch) | |
tree | 8ef747e21c838c15775d5fa3f61010902a698a0f /Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta | |
parent | f41fe1567ea73d4876295d3f7b412b4f312cf9f8 (diff) | |
download | Python-Textbook-Companions-7d10afb628b5d7d6ca4e773a4b0af7daf8486590.tar.gz Python-Textbook-Companions-7d10afb628b5d7d6ca4e773a4b0af7daf8486590.tar.bz2 Python-Textbook-Companions-7d10afb628b5d7d6ca4e773a4b0af7daf8486590.zip |
Added(A)/Deleted(D) following books
A Basic_Engineering_Thermodynamics_by_Rayner_Joel/README.txt
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter1.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter10.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter11.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter12.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter13.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter14.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter2.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter3.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter4.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter5.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter6.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter8.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter9.ipynb
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/1.png
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/2.png
A Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/3.png
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter2_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter3_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter4_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter6_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter7_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter8_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/Chapter9_1.ipynb
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/screenshots/chapter2_1.png
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/screenshots/chapter3_1.png
A High_Voltage_Engineering_by_V_Kamaraju_,_M_S_Naidu/screenshots/chapter4_1.png
A Introduction_to_Electrical_Engineering_by_Er._J.P._Navani_&_Er._Sonal_Sapra/README.txt
Diffstat (limited to 'Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta')
16 files changed, 7518 insertions, 0 deletions
diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter1.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter1.ipynb new file mode 100644 index 00000000..a67214ab --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter1.ipynb @@ -0,0 +1,164 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1: Bonding in Solids" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 1.1, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "potential energy is -3.981 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "x=9*10**9; \n", + "r0=2.81*10**-10; #equilibrium distance(m)\n", + "A=1.748; #madelung constant\n", + "n=9; #repulsive exponent value\n", + "\n", + "#Calculations\n", + "U0=-(x*A*e/r0)*(1-1/n); #potential energy(eV)\n", + "\n", + "#Result\n", + "print \"potential energy is\",round(U0/2,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 1.2, Page number 10" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ionic cohesive energy is -6.45 eV\n", + "atomic cohesive energy is -6.17 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "x=9*10**9; \n", + "r0=3.56*10**-10; #equilibrium distance(m)\n", + "A=1.763; #madelung constant\n", + "n=10.5; #repulsive exponent value\n", + "IE=3.89; #ionisation energy(eV)\n", + "EA=-3.61; #electron affinity(eV)\n", + "\n", + "#Calculations\n", + "U0=-(x*A*e/r0)*(1-1/n); #ionic cohesive energy(eV)\n", + "U=U0+IE+EA; #atomic cohesive energy(eV)\n", + "\n", + "#Result\n", + "print \"ionic cohesive energy is\",round(U0,2),\"eV\"\n", + "print \"atomic cohesive energy is\",round(U,2),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 1.3, Page number 11" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "binding energy is 669 *10**3 kJ/kmol\n", + "answer 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", + "N=6.02*10**26; #Avagadro Number\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "x=9*10**9; \n", + "r0=0.324*10**-9; #equilibrium distance(m)\n", + "A=1.748; #madelung constant\n", + "n=9.5; #repulsive exponent value\n", + "\n", + "#Calculations\n", + "U0=(A*e*x/r0)*(1-1/n); \n", + "U=round(U0,2)*N*e*10**-3; #binding energy(kJ/kmol)\n", + "\n", + "#Result\n", + "print \"binding energy is\",int(U/10**3),\"*10**3 kJ/kmol\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter10.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter10.ipynb new file mode 100644 index 00000000..f35b79e3 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter10.ipynb @@ -0,0 +1,788 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 10: Dielectric Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.1, Page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permittivity is 5.86\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "P=4.3*10**-8; #polarisation(per cm**2)\n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "E=1000; #electric field(V/m)\n", + "\n", + "#Calculations\n", + "epsilonr=1+(P/(epsilon0*E)); #relative permittivity\n", + "\n", + "#Result\n", + "print \"relative permittivity is\",round(epsilonr,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.2, Page number 276" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electric displacement is 36 *10**-6 C/m**2\n", + "polarisation is 27 *10**-6 C/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=4;\n", + "epsilon0=9*10**-12; #relative permeability(F/m)\n", + "E=10**6; #electric field(V/m)\n", + "\n", + "#Calculations\n", + "D=k*epsilon0*E; #electric displacement(C/m**2)\n", + "P=epsilon0*E*(k-1); #polarisation(C/m**2)\n", + "\n", + "#Result\n", + "print \"electric displacement is\",int(D*10**6),\"*10**-6 C/m**2\"\n", + "print \"polarisation is\",int(P*10**6),\"*10**-6 C/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.3, Page number 277" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electric field is 0.113 N/C\n", + "polarisation is 4e-12 C/m**2\n", + "induced dipole moment is 2e-18 cm\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=5;\n", + "epsilon0=8.86*10**-12; #relative permeability(F/m)\n", + "D=5*10**-12; #electric displacement(C/m**2)\n", + "V=0.5*10**-6;\n", + "\n", + "#Calculations\n", + "E=D/(k*epsilon0); #electric field(N/C)\n", + "P=D*(1-(1/k)); #polarisation(C/m**2)\n", + "dm=P*V; #induced dipole moment(cm)\n", + "\n", + "#Result\n", + "print \"electric field is\",round(E,3),\"N/C\"\n", + "print \"polarisation is\",P,\"C/m**2\"\n", + "print \"induced dipole moment is\",dm,\"cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example number 10.4, Page number 277" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dipole moment is 2.43 *10**-41 coul x metre\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=1.000074;\n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "E=1; #electric field(N/C)\n", + "n=2.69*10**25; #molecular density\n", + "\n", + "#Calculations\n", + "p=epsilon0*E*(k-1)/n; #dipole moment(coulx metre)\n", + "\n", + "#Result\n", + "print \"dipole moment is\",round(p*10**41,2),\"*10**-41 coul x metre\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.5, Page number 278" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dipole moment is 3.97 *10**-36 coul-metre\n", + "atomic polarizability is 4.4 *10**-41 coul-m**2/volt\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=1.000134;\n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "E=90000; #electric field(N/C)\n", + "N=6.023*10**26; #avagadro number\n", + "\n", + "#Calculations\n", + "n=N/22.4;\n", + "p=epsilon0*E*(k-1)/n; #dipole moment(coul-metre)\n", + "alpha=p/E; #atomic polarizability(coul-m**2/volt)\n", + "\n", + "#Result\n", + "print \"dipole moment is\",round(p*10**36,2),\"*10**-36 coul-metre\"\n", + "print \"atomic polarizability is\",round(alpha*10**41,1),\"*10**-41 coul-m**2/volt\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.6, Page number 278" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electric field is 1.43 *10**3 volt/m\n", + "electric displacement is 8.9e-08 C/m**2\n", + "dipole moment is 7.6 *10**-8 C/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "k=7;\n", + "epsilon0=8.9*10**-12; #relative permeability(F/m)\n", + "V0=100; #potential difference(V)\n", + "d=10**-2; #displacement(m)\n", + "\n", + "#Calculations\n", + "E0=V0/d; #electric field intensity(volt/m)\n", + "E=E0/k; #electric field(N/C)\n", + "D=k*E*epsilon0; #electric displacement(C/m**2)\n", + "p=epsilon0*E*(k-1); #dipole moment(coul-metre)\n", + "\n", + "#Result\n", + "print \"electric field is\",round(E/10**3,2),\"*10**3 volt/m\"\n", + "print \"electric displacement is\",D,\"C/m**2\"\n", + "print \"dipole moment is\",round(p*10**8,1),\"*10**-8 C/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.7, Page number 279" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant is 5.0\n", + "permittivity is 44.25 *10**-12 coul**2/nt-m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "chi=35.4*10**-12; #electric susceptibility(coul**2/nt-m**2)\n", + "\n", + "#Calculations\n", + "k=1+(chi/epsilon0); #dielectric constant\n", + "epsilon=epsilon0*k; #permittivity(coul**2/nt-m**2) \n", + "\n", + "#Result\n", + "print \"dielectric constant is\",k\n", + "print \"permittivity is\",round(epsilon*10**12,2),\"*10**-12 coul**2/nt-m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.8, Page number 279" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dipole moment is 2.4437 *10**-41 C/m**2\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "E=100; #electric field(N/C)\n", + "epsilonr=1.000074; #dielectric constant\n", + "n=2.68*10**27; #density\n", + "\n", + "#Calculations\n", + "p=epsilon0*E*(epsilonr-1)/n; #dipole moment(coul-metre)\n", + "\n", + "#Result\n", + "print \"dipole moment is\",round(p*10**41,4),\"*10**-41 C/m**2\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.9, Page number 287" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 1.6557 *10**-41 Fm**2\n", + "relative permittivity is 1.0018\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "R=0.053*10**-9; #radius(nm)\n", + "N=9.8*10**26; #number of atoms\n", + "\n", + "#Calculations\n", + "alphae=4*math.pi*epsilon0*R**3; #electronic polarizability(Fm**2)\n", + "epsilonr=1+(4*math.pi*N*R**3); #relative permittivity\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**41,4),\"*10**-41 Fm**2\"\n", + "print \"relative permittivity is\",round(epsilonr,4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.10, Page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 2.242e-41 Fm**2\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "epsilonr=1.0000684; #dielectric constant\n", + "N=2.7*10**25; #number of atoms\n", + "\n", + "#Calculations\n", + "alphae=epsilon0*(epsilonr-1)/N; #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",alphae,\"Fm**2\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.11, Page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant is 1.339\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.854*10**-12; #relative permeability(F/m)\n", + "alphae=10**-40; #dielectric polarizability(Fm**2)\n", + "N=3*10**28; #number of atoms\n", + "\n", + "#Calculations\n", + "epsilonr=1+(N*alphae/epsilon0); #dielectric constant\n", + "\n", + "#Result\n", + "print \"dielectric constant is\",round(epsilonr,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.12, Page number 288" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 7.9 *10**-40 Fm**2\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #relative permeability(F/m)\n", + "epsilonr=1.0024; #dielectric constant\n", + "N=2.7*10**25; #number of atoms\n", + "\n", + "#Calculations\n", + "alphae=epsilon0*(epsilonr-1)/N; #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**40,1),\"*10**-40 Fm**2\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.13, Page number 289" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of electron cloud is 5.86 *10**-11 m\n", + "displacement is 6.99987 *10**-17 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilonr=1.0000684; #dielectric constant\n", + "N=2.7*10**25; #number of atoms\n", + "X=1/(9*10**9);\n", + "E=10**6; #electric field(V/m)\n", + "Z=2; #atomic number\n", + "e=1.6*10**-19; #electron charge(coulomb)\n", + "\n", + "#Calculations\n", + "R=((epsilonr-1)/(4*math.pi*N))**(1/3); #radius of electron cloud(m)\n", + "x=X*E*R**3/(Z*e); #displacement(m)\n", + "\n", + "#Result\n", + "print \"radius of electron cloud is\",round(R*10**11,2),\"*10**-11 m\"\n", + "print \"displacement is\",round(x*10**17,5),\"*10**-17 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.14, Page number 293" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant is 1.38\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #dielectric constant\n", + "N=3*10**28; #number of atoms\n", + "alphae=10**-40; #dielectric polarizability(Fm**2)\n", + "\n", + "#Calculations\n", + "x=N*alphae/(3*epsilon0);\n", + "epsilonr=(1+(2*x))/(1-x); #dielectric constant\n", + "\n", + "#Result\n", + "print \"dielectric constant is\",round(epsilonr,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.15, Page number 294" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dielectric constant is 3.8\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #dielectric constant\n", + "Na=6.023*10**26; #number of atoms\n", + "M=32; #atomic mass\n", + "alphae=3.28*10**-40; #dielectric polarizability(Fm**2)\n", + "rho=2.08*10**3; #density(kg/m**3)\n", + "\n", + "#Calculations\n", + "x=Na*rho*alphae/(M*3*epsilon0);\n", + "epsilonr=(1+(2*x))/(1-x); #dielectric constant\n", + "\n", + "#Result\n", + "print \"dielectric constant is\",round(epsilonr,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.16, Page number 294" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "electronic polarizability is 3.29 *10**-40 Fm**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilon0=8.85*10**-12; #dielectric constant\n", + "Na=6.02*10**26; #number of atoms\n", + "epsilonr=3.75; #dielectric constant\n", + "M=32; #atomic mass\n", + "rho=2050; #density(kg/m**3)\n", + "gama=1/3; #internal field constant\n", + "\n", + "#Calculations\n", + "N=Na*rho/M; #number of atoms\n", + "alphae=((epsilonr-1)/(epsilonr+2))*(3*epsilon0/N); #electronic polarizability(Fm**2)\n", + "\n", + "#Result\n", + "print \"electronic polarizability is\",round(alphae*10**40,2),\"*10**-40 Fm**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.17, Page number 295" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio between electronic and ionic polarizability is 1.738\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilonr=4.94; #dielectric constant\n", + "n2=2.69;\n", + "\n", + "#Calculations\n", + "x=(epsilonr-1)/(epsilonr+2);\n", + "y=(n2-1)/(n2+2);\n", + "alpha=1/((x/y)-1); #ratio between electronic and ionic polarizability\n", + "\n", + "#Result\n", + "print \"ratio between electronic and ionic polarizability is\",round(alpha,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 10.18, Page number 296" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percentage of ionic polarizability is 51.4 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "epsilonr=5.6; #dielectric constant\n", + "n=1.5;\n", + "\n", + "#Calculations\n", + "x=(epsilonr+2)/(epsilonr-1);\n", + "y=(n**2-1)/(n**2+2);\n", + "alpha=(1-(x*y))*100; #percentage of ionic polarizability\n", + "\n", + "#Result\n", + "print \"percentage of ionic polarizability is\",round(alpha,1),\"%\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter11.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter11.ipynb new file mode 100644 index 00000000..57b9883e --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter11.ipynb @@ -0,0 +1,417 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 11: Magnetic Properties" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.1, Page number 312" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 318.3\n", + "susceptibility is 317.3\n", + "answer 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", + "mew0=4*math.pi*10**-7;\n", + "B=0.2; #magnetic induction(web/m**2)\n", + "H=500; #magnetic field intensity(amp/m)\n", + "\n", + "#Calculation\n", + "mewr=B/(mew0*H); #relative permeability\n", + "chi=mewr-1; #susceptibility\n", + "\n", + "#Result\n", + "print \"relative permeability is\",round(mewr,1)\n", + "print \"susceptibility is\",round(chi,1)\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.2, Page number 312" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 1.00000000948\n", + "absolute permeability is 1.257 *10**-6\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew0=4*math.pi*10**-7;\n", + "chi=948*10**-11; #susceptibility\n", + "\n", + "#Calculation\n", + "mewr=1+chi; #relative permeability\n", + "mew=mewr*mew0; #absolute permeability\n", + "\n", + "#Result\n", + "print \"relative permeability is\",mewr\n", + "print \"absolute permeability is\",round(mew*10**6,3),\"*10**-6\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.3, Page number 312" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 2154\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H=6.5*10**-4; #magnetizing force(amp/m)\n", + "M=1.4; #magnetic field(T)\n", + "\n", + "#Calculation\n", + "chi=M/H; \n", + "mewr=1+chi; #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability is\",int(mewr)\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.4, Page number 312" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "relative permeability is 16\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H=220; #magnetizing force(amp/m)\n", + "M=3300; #magnetic field(T)\n", + "\n", + "#Calculation\n", + "chi=(M/H)+1; #relative permeability\n", + "\n", + "#Result\n", + "print \"relative permeability is\",int(chi)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.5, Page number 313" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "permeability of rod is 0.625 *10**-3 weber/amp.m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H=1600; #magnetizing force(amp/m)\n", + "phi=4*10**-4; #flux(weber)\n", + "A=4*10**-4; #area(m**2)\n", + "\n", + "#Calculation\n", + "B=phi/A;\n", + "mew=B/H; #permeability of rod(weber/amp.m)\n", + "\n", + "#Result\n", + "print \"permeability of rod is\",mew*10**3,\"*10**-3 weber/amp.m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.6, Page number 313" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetisation of material is 1.5 *10**3 A/m\n", + "flux density is 1.259 T\n", + "answer 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", + "H=10**6; #magnetizing force(amp/m)\n", + "mew0=4*math.pi*10**-7;\n", + "chi=1.5*10**-3; #susceptibility\n", + "\n", + "#Calculation\n", + "M=chi*H; #magnetisation of material(A/m)\n", + "B=mew0*(M+H); #flux density(T)\n", + "\n", + "#Result\n", + "print \"magnetisation of material is\",M/10**3,\"*10**3 A/m\"\n", + "print \"flux density is\",round(B,3),\"T\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.7, Page number 313" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "flux density is 2.0 *10**-2 weber/metre**2\n", + "magnetic intensity is 32 amp-turn/metre\n", + "permeability of ring is 6250.0 *10**-7 weber/amp-metre\n", + "relative permeability is 497.4\n", + "magnetic susceptibility is 496\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew0=4*math.pi*10**-7;\n", + "phi=2*10**-6; #flux(weber)\n", + "A=10**-4; #area(m**2)\n", + "N=300; #number of turns\n", + "l=30*10**-2; #length(m)\n", + "i=0.032; #current(ampere)\n", + "\n", + "#Calculation\n", + "B=phi/A; #flux density(weber/metre**2)\n", + "n=N/l;\n", + "H=n*i; #magnetic intensity(amp-turn/metre)\n", + "mew=B/H; #permeability of ring(weber/amp-metre)\n", + "mewr=mew/mew0; #relative permeability\n", + "chi=mewr-1; #magnetic susceptibility\n", + "\n", + "#Result\n", + "print \"flux density is\",B*10**2,\"*10**-2 weber/metre**2\"\n", + "print \"magnetic intensity is\",int(H),\"amp-turn/metre\"\n", + "print \"permeability of ring is\",mew*10**7,\"*10**-7 weber/amp-metre\"\n", + "print \"relative permeability is\",round(mewr,1)\n", + "print \"magnetic susceptibility is\",int(chi)\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.8, Page number 316" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic moment is 9.53 *10**-24 A-m**2\n", + "answer 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=6.5*10**15; #frequency(Hz)\n", + "r=0.54*10**-10; #radius(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "\n", + "#Calculation\n", + "mew_m=e*new*math.pi*r**2; #magnetic moment(A-m**2)\n", + "\n", + "#Result\n", + "print \"magnetic moment is\",round(mew_m*10**24,2),\"*10**-24 A-m**2\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 11.9, Page number 317" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "bohr's magneton is 9.29 *10**-24 J/T\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9.1*10**-31; #mass(kg)\n", + "h=6.64*10**-34; #plank's constant(Js)\n", + "\n", + "#Calculation\n", + "mewb=e*h/(4*math.pi*m); #bohr's magneton(J/T)\n", + "\n", + "#Result\n", + "print \"bohr's magneton is\",round(mewb*10**24,2),\"*10**-24 J/T\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter12.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter12.ipynb new file mode 100644 index 00000000..cbd461c2 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter12.ipynb @@ -0,0 +1,364 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 12: Lasers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.1, Page number 360" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of photon is 1.96 eV\n", + "momentum of photon is 1.05 *10**-27 kg m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "c=3*10**8; #velocity of matter wave(m/s)\n", + "h=6.62*10**-34; #plank's constant(Js)\n", + "lamda=6328*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "E=h*c/(lamda*e); #energy of photon(eV)\n", + "p=h/lamda; #momentum of photon(kg m/s)\n", + "\n", + "#Result\n", + "print \"energy of photon is\",round(E,2),\"eV\"\n", + "print \"momentum of photon is\",round(p*10**27,2),\"*10**-27 kg m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.2, Page number 360" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of laser pulse is 7.94 joule\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of matter wave(m/s)\n", + "h=6.62*10**-34; #plank's constant(Js)\n", + "lamda=7000*10**-10; #wavelength(m)\n", + "n=2.8*10**19; #number of ions\n", + "\n", + "#Calculation\n", + "E=n*h*c/lamda; #energy of laser pulse(joule)\n", + "\n", + "#Result\n", + "print \"energy of laser pulse is\",round(E,2),\"joule\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.3, Page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of oscillations is 5 *10**4\n", + "coherence time is 9.82 *10**-11 s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of matter wave(m/s)\n", + "l=2.945*10**-2;\n", + "lamda=5890*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "n=l/lamda; #number of oscillations\n", + "tow_c=l/c; #coherence time(s)\n", + "\n", + "#Result\n", + "print \"number of oscillations is\",int(n/10**4),\"*10**4\"\n", + "print \"coherence time is\",round(tow_c*10**11,2),\"*10**-11 s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.4, Page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intensity of beam is 7.5 kW/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "P=10*10**-3; #power(W)\n", + "d=1.3*10**-3; #diameter(m)\n", + "\n", + "#Calculation\n", + "I=4*P/(math.pi*d**2); #intensity of beam(W/m**2)\n", + "\n", + "#Result\n", + "print \"intensity of beam is\",round(I/10**3,1),\"kW/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.5, Page number 361" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of ions is 3.49 *10**18\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of matter wave(m/s)\n", + "h=6.62*10**-34; #plank's constant(Js)\n", + "lamda=6940*10**-10; #wavelength(m)\n", + "P=1; #power(J)\n", + "\n", + "#Calculation\n", + "n=P*lamda/(h*c); #number of ions\n", + "\n", + "#Result\n", + "print \"number of ions is\",round(n/10**18,2),\"*10**18\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.6, Page number 362" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "population ratio is e** -80\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c=3*10**8; #velocity of matter wave(m/s)\n", + "h=6.62*10**-34; #plank's constant(Js)\n", + "lamda=6*10**-7; #wavelength(m)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "k=8.6*10**-5;\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculation\n", + "E=h*c/(lamda*e); #energy(eV)\n", + "N=-E/(k*T); #population ratio\n", + "\n", + "#Result\n", + "print \"population ratio is e**\",int(N)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.7, Page number 362" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "coherence length is 11.36 km\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=10.66*10**-6; #wavelength(m)\n", + "delta_lamda=10**-5*10**-9; #line width(m)\n", + "\n", + "#Calculation\n", + "cl=lamda**2/delta_lamda; #coherence length(m)\n", + "\n", + "#Result\n", + "print \"coherence length is\",round(cl/10**3,2),\"km\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 12.8, Page number 362" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "areal speed is 0.117 *10**-8 m**2\n", + "intensity of image is 428.48 *10**5 watt/m**2\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", + "lamda=7000*10**-10; #wavelength(m)\n", + "d=5*10**-3; #aperture(m)\n", + "f=0.2; #focal length(m)\n", + "P=50*10**-3; #power(W)\n", + "\n", + "#Calculation\n", + "d_theta=1.22*lamda/d; #angular speed(radian)\n", + "A=(d_theta*f)**2; #areal speed(m**2)\n", + "I=P/A; #intensity of image(watt/m**2)\n", + "\n", + "#Result\n", + "print \"areal speed is\",round(A*10**8,3),\"*10**-8 m**2\"\n", + "print \"intensity of image is\",round(I/10**5,2),\"*10**5 watt/m**2\"\n", + "print \"answer given in the book is wrong\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter13.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter13.ipynb new file mode 100644 index 00000000..12870058 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter13.ipynb @@ -0,0 +1,721 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 13: Fibre Optics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.1, Page number 375" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.24413\n", + "maximum entrance angle is 14.13 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1.5; #core refractive index\n", + "n2=1.48; #cladding refractive index\n", + "n=1;\n", + "\n", + "#Calculations\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "i0=math.asin(NA/n); #maximum entrance angle(radian)\n", + "i0=i0*180/math.pi; #maximum entrance angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,5)\n", + "print \"maximum entrance angle is\",round(i0,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example number 13.2, Page number 376" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core refractive index is 1.6025\n", + "acceptance angle is 8.6 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n0=1.33; #water refractive index\n", + "n2=1.59; #cladding refractive index\n", + "NA=0.2; #numerical aperture\n", + "\n", + "#Calculations\n", + "n1=math.sqrt(NA**2+n2**2); #core refractive index \n", + "NA=math.sqrt(n1**2-n2**2)/n0; #numerical aperture\n", + "i0=math.asin(NA); #acceptance angle(radian)\n", + "i0=i0*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"core refractive index is\",round(n1,4)\n", + "print \"acceptance angle is\",round(i0,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.3, Page number 376" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.304\n", + "acceptance angle is 17.7 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1.36; #core refractive index\n", + "delta=0.025; #relative difference\n", + "\n", + "#Calculations\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "i0=math.asin(NA); #acceptance angle(radian)\n", + "i0=i0*180/math.pi; #acceptance angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)\n", + "print \"acceptance angle is\",round(i0,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.4, Page number 376" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.3873\n", + "acceptance angle is 22.79 degrees\n", + "critical angle is 75.16 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1.5; #core refractive index\n", + "n2=1.45; #cladding refractive index\n", + "\n", + "#Calculations\n", + "delta=(n1-n2)/n1; #relative difference\n", + "NA=n1*math.sqrt(2*delta); #numerical aperture\n", + "i0=math.asin(NA); #acceptance angle(radian)\n", + "i0=i0*180/math.pi; #acceptance angle(degrees)\n", + "theta_c=math.asin(n2/n1); #critical angle(radian)\n", + "theta_c=theta_c*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"acceptance angle is\",round(i0,2),\"degrees\"\n", + "print \"critical angle is\",round(theta_c,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.5, Page number 377" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core refractive index is 1.42\n", + "cladding refractive index is 1.407\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "NA=0.22; #numerical aperture\n", + "delta=0.012; #relative difference\n", + "\n", + "#Calculations\n", + "N=1-delta;\n", + "n1=math.sqrt(NA**2/(1-N**2)); #core refractive index\n", + "n2=N*n1; #cladding refractive index\n", + "\n", + "#Result\n", + "print \"core refractive index is\",round(n1,2)\n", + "print \"cladding refractive index is\",round(n2,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.6, Page number 377" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acceptance angle is 23.6 degrees\n", + "critical angle is 81.9 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "NA=0.40; #numerical aperture\n", + "delta=1/100; #relative difference\n", + "\n", + "#Calculations\n", + "i0=math.asin(NA); #acceptance angle(radians)\n", + "i0=i0*180/math.pi; #acceptance angle(degrees)\n", + "N=1-delta;\n", + "thetac=math.asin(N); #critical angle(radians)\n", + "thetac=thetac*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"acceptance angle is\",round(i0,1),\"degrees\"\n", + "print \"critical angle is\",round(thetac,1),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.7, Page number 378" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "core refractive index is 1.5\n", + "cladding refractive index is 1.3\n", + "numerical aperture is 0.75\n", + "answer for numerical aperture varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "vf=3*10**8; #velocity of light in free space(m/s)\n", + "vc=2*10**8; #velocity of light in core(m/s)\n", + "thetac=60*math.pi/180; #critical angle(radians)\n", + "\n", + "#Calculations\n", + "n1=vf/vc; #core refractive index\n", + "n2=n1*math.sin(thetac); #cladding refractive index\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "\n", + "#Result\n", + "print \"core refractive index is\",n1\n", + "print \"cladding refractive index is\",round(n2,1)\n", + "print \"numerical aperture is\",NA\n", + "print \"answer for numerical aperture varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.8, Page number 378" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.3905\n", + "acceptance angle is 23.0 degrees\n", + "critical angle is 75.4 degrees\n", + "number of reflections per metre is 5206\n", + "answer for number of reflections in the textbook is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "n1=1.55; #core refractive index\n", + "n2=1.50; #cladding refractive index\n", + "d=50*10**-6; #core diameter(micro m)\n", + "\n", + "#Calculations\n", + "NA=math.sqrt(n1**2-n2**2); #numerical aperture\n", + "i0=math.asin(NA); #acceptance angle(radians)\n", + "i0=i0*180/math.pi; #acceptance angle(degrees)\n", + "thetac=math.asin(n2/n1); #critical angle(radians)\n", + "theta_c=thetac*180/math.pi; #critical angle(degrees)\n", + "x=d*math.tan(thetac);\n", + "n=1/x; #number of reflections per metre \n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,4)\n", + "print \"acceptance angle is\",round(i0),\"degrees\"\n", + "print \"critical angle is\",round(theta_c,1),\"degrees\"\n", + "print \"number of reflections per metre is\",int(n)\n", + "print \"answer for number of reflections in the textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.9, Page number 379" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "numerical aperture is 0.375\n", + "critical angle is 75.93 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "delta=0.03; #relative difference\n", + "i0=22*math.pi/180; #acceptance angle(radians)\n", + "\n", + "#Calculations\n", + "NA=math.sin(i0); #numerical aperture\n", + "N=1-delta;\n", + "thetac=math.asin(N); #critical angle(radians)\n", + "theta_c=thetac*180/math.pi; #critical angle(degrees)\n", + "\n", + "#Result\n", + "print \"numerical aperture is\",round(NA,3)\n", + "print \"critical angle is\",round(theta_c,2),\"degrees\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.10, Page number 379" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of light in fibre core is 2.48 *10**8 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "delta=0.0045; #relative difference\n", + "i0=0.115; #acceptance angle(radians)\n", + "v=3*10**8; #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "NA=math.sin(i0); #numerical aperture\n", + "n1=NA/math.sqrt(2*delta); #core refractive index\n", + "vcore=v/n1; #velocity of light in fibre core(m/s)\n", + "\n", + "#Result\n", + "print \"velocity of light in fibre core is\",round(vcore/10**8,3),\"*10**8 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.11, Page number 381" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diameter of core is 3.79 *10**-6 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V=2.405; #V-number\n", + "lamda=8500*10**-10; #wavelength(m)\n", + "n1=1.48; #core refractive index\n", + "n2=1.47; #cladding refractive index\n", + "\n", + "#Calculations\n", + "d=V*lamda/(math.pi*math.sqrt(n1**2-n2**2)); #diameter of core(m)\n", + "\n", + "#Result\n", + "print \"diameter of core is\",round(d*10**6,2),\"*10**-6 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.12, Page number 381" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum radius for fibre is 3.76 micro m\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V=2.405; #V-number\n", + "lamda=1300*10**-3; #wavelength(micro m)\n", + "n1=1.466; #core refractive index\n", + "n2=1.46; #cladding refractive index\n", + "\n", + "#Calculations\n", + "r=V*lamda/(2*math.pi*math.sqrt(n1**2-n2**2)); #maximum radius for fibre(micro m)\n", + "\n", + "#Result\n", + "print \"maximum radius for fibre is\",round(r,2),\"micro m\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.13, Page number 381" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diameter of fibre core is 91.5 micro m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "lamda=1.3; #wavelength(micro m)\n", + "n1=1.5; #core refractive index\n", + "Nm=1100; #number of modes\n", + "delta=0.01; #refractive index difference\n", + "\n", + "#Calculations\n", + "d=lamda*math.sqrt(Nm/delta)/(math.pi*n1); #diameter of fibre core(micro m)\n", + "\n", + "#Result\n", + "print \"diameter of fibre core is\",round(d,1),\"micro m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.14, Page number 382" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of guided modes is 459.0\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "lamda=1.1*10**-6; #wavelength(m)\n", + "r=60/2*10**-6; #radius(m)\n", + "NA=0.25; #numerical aperture\n", + "\n", + "#Calculations\n", + "V=2*math.pi*r*NA/lamda; \n", + "Nm=V**2/4; #number of guided modes\n", + "\n", + "#Result\n", + "print \"number of guided modes is\",round(Nm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.15, Page number 387" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fibre loss is 12.0412 dB/km\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "L=500/1000; #length(km)\n", + "P0byPi=25/100; #optical power\n", + "\n", + "#Calculations\n", + "dB=-10*math.log10(P0byPi)/L; #fibre loss(dB/km)\n", + "\n", + "#Result\n", + "print \"fibre loss is\",round(dB,4),\"dB/km\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 13.16, Page number 387" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "output power is 2.005 micro W\n", + "answer given in the textbook is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "L=10; #length(km)\n", + "dB=2.3; #fibre loss(dB/km)\n", + "Pi=400; #input power(micro W)\n", + "\n", + "#Calculations\n", + "P0=10**(-dB*L/10)*Pi; #output power(micro W)\n", + "\n", + "#Result\n", + "print \"output power is\",round(P0,3),\"micro W\"\n", + "print \"answer given in the textbook is wrong\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter14.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter14.ipynb new file mode 100644 index 00000000..e4dadc87 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter14.ipynb @@ -0,0 +1,226 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 14: Acoustics of Buildings and Acoustic Quieting" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 14.1, Page number 399" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "total absorption in hall is 825.0 OWU\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V=7500; #volume(m**3)\n", + "T=1.5; #time(sec)\n", + "\n", + "#Calculations\n", + "aS=0.165*V/T; #total absorption in hall(OWU)\n", + "\n", + "#Result\n", + "print \"total absorption in hall is\",aS,\"OWU\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 14.2, Page number 399" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverberation time when hall is empty is 2.08 sec\n", + "reverberation time with full capacity of audience is 0.362 sec\n", + "reverberation time with audience in cushioned chairs is 0.42 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V=1500; #volume(m**3)\n", + "A1=112; #area of plastered walls(m**2)\n", + "A2=130; #area of wooden floor(m**2)\n", + "A3=170; #area of plastered ceiling(m**2)\n", + "A4=20; #area of wooden door(m**2)\n", + "n=100; #number of cushioned chairs\n", + "A5=120; #area of audience(m**2)\n", + "C1=0.03; #coefficient of absorption in plastered walls\n", + "C2=0.06; #coefficient of absorption in wooden floor\n", + "C3=0.04; #coefficient of absorption in plastered ceiling\n", + "C4=0.06; #coefficient of absorption in wooden door\n", + "C5=1.0; #coefficient of absorption in cushioned chairs\n", + "C6=4.7; #coefficient of absorption in audience\n", + "\n", + "#Calculations\n", + "a1=A1*C1; #absorption due to plastered walls\n", + "a2=A2*C2; #absorption due to wooden floor\n", + "a3=A3*C3; #absorption due to plastered ceiling\n", + "a4=A4*C4; #absorption due to wooden door\n", + "a5=n*C5; #absorption due to cushioned chairs\n", + "a6=A5*C6; #absorption due to audience \n", + "aS=a1+a2+a3+a4+a5; #total absorption in hall\n", + "T1=0.165*V/aS; #reverberation time when hall is empty(sec)\n", + "T2=0.165*V/(aS+a6); #reverberation time with full capacity of audience(sec)\n", + "T3=0.165*V/((n*C6)+aS); #reverberation time with audience in cushioned chairs(sec)\n", + "\n", + "#Result\n", + "print \"reverberation time when hall is empty is\",round(T1,2),\"sec\"\n", + "print \"reverberation time with full capacity of audience is\",round(T2,3),\"sec\"\n", + "print \"reverberation time with audience in cushioned chairs is\",round(T3,2),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 14.3, Page number 401" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average sound absorption coefficient is 0.24\n", + "reverberation time is 1.8 sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "V=1200; #volume(m**3)\n", + "a1=220; #area of wall(m**2)\n", + "a2=120; #area of floor(m**2)\n", + "a3=120; #area of ceiling(m**2)\n", + "C1=0.03; #coefficient of absorption in wall\n", + "C2=0.80; #coefficient of absorption in floor\n", + "C3=0.06; #coefficient of absorption in ceiling\n", + "\n", + "#Calculations\n", + "A1=a1*C1; #absorption due to plastered walls\n", + "A2=a2*C2; #absorption due to wooden floor\n", + "A3=a3*C3; #absorption due to plastered ceiling\n", + "aS=a1+a2+a3; #total absorption in hall\n", + "abar=(A1+A2+A3)/aS; #average sound absorption coefficient\n", + "AS=abar*aS; #total absorption of room(metric sabines)\n", + "T=0.165*V/AS; #reverberation time(sec)\n", + "\n", + "#Result\n", + "print \"average sound absorption coefficient is\",round(abar,2)\n", + "print \"reverberation time is\",round(T,1),\"sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 14.4, Page number 401" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "acoustic power is 1.4e-06 watt\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "I0=10**-12; #standard intensity level(watt/m**2)\n", + "A=1.4; #area(m**2)\n", + "il=60; #intensity level(decibels)\n", + "\n", + "#Calculations\n", + "x=10**(il/10);\n", + "I=x*10**-12; #intensity level(watt/m**2)\n", + "Ap=I*A; #acoustic power(watt)\n", + "\n", + "#Result\n", + "print \"acoustic power is\",Ap,\"watt\"\n", + "print \"answer in the book is wrong\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter2.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter2.ipynb new file mode 100644 index 00000000..6819c543 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter2.ipynb @@ -0,0 +1,1256 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 2: Crystal Structure " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.1, Page number 27" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "volume density is 1249.04 kg/m**3\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=28; #atomic weight of Si\n", + "N=6.023*10**23; #avagadro number\n", + "a=5.3*10**-10; #lattice constant(m)\n", + "n=4;\n", + "\n", + "#Calculations\n", + "V=a**3; #volume(m**3)\n", + "m=M/(N*10**3); #mass(kg)\n", + "rho=n*m/V; #volume density(kg/m**3)\n", + "\n", + "#Result\n", + "print \"volume density is\",round(rho,2),\"kg/m**3\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.2, Page number 27" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms per unit cell is 2\n", + "the lattice is BCC\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=55.85; #atomic weight\n", + "N=6.023*10**23; #avagadro number\n", + "a=2.9*10**-8; #lattice constant(m)\n", + "rho=7.87; #volume density(gm/cc)\n", + "\n", + "#Calculations\n", + "n=rho*N*a**3/M; #number of atoms per unit cell\n", + "\n", + "#Result\n", + "print \"number of atoms per unit cell is\",int(n)\n", + "print \"the lattice is BCC\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.3, Page number 28" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of unit cells is 5.019 *10**22\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=120; #atomic mass\n", + "N=6.023*10**23; #avagadro number\n", + "n=2;\n", + "g=20; #mass(gm)\n", + "\n", + "#Calculations\n", + "u=n*M/N; \n", + "nu=g/u; #number of unit cells\n", + "\n", + "#Result\n", + "print \"number of unit cells is\",round(nu/10**22,3),\"*10**22\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.4, Page number 33" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 2 1 0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "a=1;\n", + "b=2;\n", + "c=float(\"inf\"); #intercepts\n", + "\n", + "#Calculation\n", + "lcm=a*b/gcd(a,b);\n", + "h=int(lcm/a);\n", + "k=int(lcm/b);\n", + "l=int(lcm/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.5, Page number 33" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 3 2 1 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "a=2;\n", + "b=3;\n", + "c=6; #intercepts\n", + "\n", + "#Calculation\n", + "lcm_ab=a*b/gcd(a,b); #lcm of a and b\n", + "lcm=lcm_ab*c/gcd(lcm_ab,c); #lcm of a,b and c\n", + "h=int(lcm/a);\n", + "k=int(lcm/b);\n", + "l=int(lcm/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.6, Page number 33" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices are ( 3 4 0 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "a=4;\n", + "b=3;\n", + "c=float(\"inf\"); #intercepts\n", + "\n", + "#Calculation\n", + "lcm=a*b/gcd(a,b);\n", + "h=int(lcm/a);\n", + "k=int(lcm/b);\n", + "l=int(lcm/c); #miller indices\n", + "\n", + "#Result\n", + "print \"miller indices are (\",h,k,l,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.7, Page number 33" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of intercepts is 6 -2 3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "h=1;\n", + "k=-3;\n", + "l=2; #miller indices\n", + "\n", + "#Calculation\n", + "lcm_hk=h*k/gcd(h,k); #lcm of h and k\n", + "lcm=lcm_hk*l/gcd(lcm_hk,l); #lcm of h,k and l\n", + "l1=int(lcm/h);\n", + "l2=int(lcm/k);\n", + "l3=int(lcm/l); #intercepts\n", + "\n", + "#Result\n", + "print \"ratio of intercepts is\",l1,l2,l3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.8, Page number 34" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intercept on Y axis is 1.2 angstrom\n", + "intercept on Z axis is 4.0 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=1.2;\n", + "b=1.8;\n", + "c=2.0; #crystal primitives\n", + "x=2;\n", + "y=3;\n", + "z=1; #intercepts \n", + "h=1.2; #intercept on X axis\n", + "\n", + "#Calculations\n", + "h1=a/x;\n", + "k1=b/y;\n", + "l1=c/z;\n", + "k=h*h1/k1; #intercept on Y axis\n", + "l=h*l1/h1; #intercept on Z-axis\n", + "\n", + "#Result\n", + "print \"intercept on Y axis is\",k,\"angstrom\"\n", + "print \"intercept on Z axis is\",l,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.9, Page number 39" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing in 1st plane is 1.762 angstrom\n", + "interplanar spacing in 2nd plane is 1.246 angstrom\n", + "interplanar spacing in 3rd plane is 2.0347 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r=1.246; #atomic radius(angstrom)\n", + "h1=2; #intercept on X axis\n", + "k1=0; #intercept on Y axis\n", + "l1=0; #intercept on Z-axis\n", + "h2=2; #intercept on X axis\n", + "k2=2; #intercept on Y axis\n", + "l2=0; #intercept on Z-axis\n", + "h3=1; #intercept on X axis\n", + "k3=1; #intercept on Y axis\n", + "l3=1; #intercept on Z-axis\n", + "\n", + "#Calculations\n", + "a=2*math.sqrt(2)*r; #lattice constant\n", + "d1=a/math.sqrt(h1**2+k1**2+l1**2); #interplanar spacing in 1st plane(angstrom)\n", + "d2=a/math.sqrt(h2**2+k2**2+l2**2); #interplanar spacing in 2nd plane(angstrom)\n", + "d3=a/math.sqrt(h3**2+k3**2+l3**2); #interplanar spacing in 3rd plane(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing in 1st plane is\",round(d1,3),\"angstrom\"\n", + "print \"interplanar spacing in 2nd plane is\",d2,\"angstrom\"\n", + "print \"interplanar spacing in 3rd plane is\",round(d3,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.10, Page number 39" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing in 1st plane is a/math.sqrt( 2 ) angstrom\n", + "interplanar spacing in 2nd plane is a/math.sqrt( 2 ) angstrom\n", + "interplanar spacing in 3rd plane is a/math.sqrt( 6 ) angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h1=0; #intercept on X axis\n", + "k1=1; #intercept on Y axis\n", + "l1=1; #intercept on Z-axis\n", + "h2=1; #intercept on X axis\n", + "k2=0; #intercept on Y axis\n", + "l2=1; #intercept on Z-axis\n", + "h3=1; #intercept on X axis\n", + "k3=1; #intercept on Y axis\n", + "l3=2; #intercept on Z-axis\n", + "\n", + "#Calculations\n", + "d1=h1**2+k1**2+l1**2; #interplanar spacing in 1st plane(angstrom)\n", + "d2=h2**2+k2**2+l2**2; #interplanar spacing in 2nd plane(angstrom)\n", + "d3=h3**2+k3**2+l3**2; #interplanar spacing in 3rd plane(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing in 1st plane is a/math.sqrt(\",d1,\") angstrom\"\n", + "print \"interplanar spacing in 2nd plane is a/math.sqrt(\",d2,\") angstrom\"\n", + "print \"interplanar spacing in 3rd plane is a/math.sqrt(\",d3,\") angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.11, Page number 40" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 1.12 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=4.2; #lattice constant(angstrom)\n", + "h=3; #intercept on X axis\n", + "k=2; #intercept on Y axis\n", + "l=1; #intercept on Z-axis\n", + "\n", + "#Calculations\n", + "d=a/math.sqrt(h**2+k**2+l**2); #interplanar spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.12, Page number 40" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "miller indices in 1st case are ( 1 1 1 )\n", + "miller indices in 2nd case are ( 3 2 1 )\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from fractions import gcd\n", + "\n", + "#Variable declaration\n", + "a1=1;\n", + "b1=1;\n", + "c1=1; #intercepts in 1st case\n", + "a2=2;\n", + "b2=3;\n", + "c2=6; #intercepts in 2nd case\n", + "\n", + "#Calculation\n", + "lcm_a1b1=a1*b1/gcd(a1,b1); #lcm of a1 and b1\n", + "lcm1=lcm_ab*c1/gcd(lcm_a1b1,c1); #lcm of a1,b1 and c1\n", + "h1=int(lcm1/a1);\n", + "k1=int(lcm1/b1);\n", + "l1=int(lcm1/c1); #miller indices in 1st case\n", + "lcm_a2b2=a2*b2/gcd(a2,b2); #lcm of a2 and b2\n", + "lcm2=lcm_a2b2*c2/gcd(lcm_a2b2,c2); #lcm of a2,b2 and c2\n", + "h2=int(lcm2/a2);\n", + "k2=int(lcm2/b2);\n", + "l2=int(lcm2/c2); #miller indices in 2nd case\n", + "\n", + "#Result\n", + "print \"miller indices in 1st case are (\",h1,k1,l1,\")\"\n", + "print \"miller indices in 2nd case are (\",h2,k2,l2,\")\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.14, Page number 47" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of crystal is 8.929 gm/cm**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "M=63.5; #atomic weight(gm/mol)\n", + "N=6.023*10**23; #avagadro number\n", + "r=1.278*10**-8; #atomic radius(cm)\n", + "n=4;\n", + "\n", + "#Calculations\n", + "m=M/N; #mass(g)\n", + "a=4*r/math.sqrt(2); #lattice constant(cm)\n", + "V=a**3; #volume(m**3)\n", + "rho=n*m/V; #density of crystal(g/cm**3)\n", + "\n", + "#Result\n", + "print \"density of crystal is\",round(rho,3),\"gm/cm**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.15, Page number 47" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum radius is 0.155 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r=1; #assume\n", + "\n", + "#Calculations\n", + "a=4*r/math.sqrt(3); #lattice constant\n", + "R=(a-(2*r))/2; #minimum radius \n", + "\n", + "#Result\"\n", + "print \"minimum radius is\",round(R,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.16, Page number 48" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum radius is 0.414 r\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r=1; #assume\n", + "\n", + "#Calculations\n", + "a=4*r/math.sqrt(2); #lattice constant\n", + "R=(a/2)-r; #maximum radius \n", + "\n", + "#Result\"\n", + "print \"maximum radius is\",round(R,3),\"r\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.17, Page number 48" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "percent volume change is 0.5 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "r1=1.258*10**-10; #atomic radius(m)\n", + "r2=1.292*10**-10; #atomic radius(m)\n", + "n1=2;\n", + "n2=4;\n", + "\n", + "#Calculations\n", + "a1=4*r1/math.sqrt(3); #lattice constant(m)\n", + "V1=a1**3/n1; #volume(m**3)\n", + "a2=2*math.sqrt(2)*r2; #lattice constant(m)\n", + "V2=a2**3/n2; #volume(m**3)\n", + "V=(V1-V2)*100/V1; #percent volume change\n", + "\n", + "#Result\"\n", + "print \"percent volume change is\",round(V,1),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.18, Page number 51" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of atoms is 1.77 *10**29\n", + "density of diamond is 3535.7 kg/m**3\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=0.356*10**-9; #cube edge(m)\n", + "M=12.01; #atomic weight\n", + "N=6.023*10**26; #avagadro number\n", + "\n", + "#Calculations\n", + "n=8/a**3; #number of atoms\n", + "m=M/N; #mass(kg)\n", + "rho=m*n; #density of diamond(kg/m**3)\n", + "\n", + "#Result\"\n", + "print \"number of atoms is\",round(n/10**29,2),\"*10**29\"\n", + "print \"density of diamond is\",round(rho,1),\"kg/m**3\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.19, Page number 54 Theoritical" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.20, Page number 55" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "volume of unit cell is 9.356 *10**-29 m**3\n", + "density of zinc is 6960 kg/m**3\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "a=0.27*10**-9; #lattice constant(m)\n", + "c=0.494*10**-9; #height of cell(m)\n", + "M=65.37; #atomic weight\n", + "N=6.023*10**26; #avagadro number\n", + "n=6; #number of atoms\n", + "\n", + "#Calculations\n", + "V=3*math.sqrt(3)*a**2*c/2; #volume of unit cell(m**3)\n", + "rho=n*M/(N*V); #density of zinc(kg/m**3)\n", + "\n", + "#Result\"\n", + "print \"volume of unit cell is\",round(V*10**29,3),\"*10**-29 m**3\"\n", + "print \"density of zinc is\",int(rho),\"kg/m**3\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.21, Page number 57" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of Si is 2.33 gm/cm**3\n", + "density of GaAs is 5.324 gm/cm**3\n", + "answer 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", + "a1=5.43*10**-8; #lattice constant(cm)\n", + "M1=28.1; #atomic weight\n", + "N=6.023*10**23; #avagadro number\n", + "n1=8; #number of atoms\n", + "a2=5.65*10**-8; #lattice constant(cm)\n", + "M2=144.6; #atomic weight\n", + "n2=4; #number of atoms\n", + "\n", + "#Calculations\n", + "rho1=n1*M1/(N*a1**3); #density of Si(gm/cm**3)\n", + "rho2=n2*M2/(N*a2**3); #density of GaAs(gm/cm**3)\n", + "\n", + "#Result\"\n", + "print \"density of Si is\",round(rho1,2),\"gm/cm**3\"\n", + "print \"density of GaAs is\",round(rho2,3),\"gm/cm**3\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.22, Page number 58" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 4 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "rho=6250; #density(kg/m**3)\n", + "M=60.2; #molecular weight\n", + "N=6.02*10**26; #avagadro number\n", + "n=4; #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",int(a*10**10),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.23, Page number 58" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of copper is 8938 kg/m**3\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r=1.278*10**-8; #atomic radius(cm)\n", + "M=63.54; #molecular weight\n", + "N=6.02*10**23; #avagadro number\n", + "n=4; #number of atoms\n", + "\n", + "#Calculations\n", + "a=4*r/math.sqrt(2); #lattice constant(cm)\n", + "rho=n*M*10**3/(N*a**3); #density(kg/m**3)\n", + "\n", + "#Result\n", + "print \"density of copper is\",int(rho),\"kg/m**3\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.24, Page number 58" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 2.867 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=7870; #density(kg/m**3)\n", + "M=55.8; #molecular weight\n", + "N=6.02*10**26; #avagadro number\n", + "n=2; #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(m)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.25, Page number 59" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "radius of atom is 1.414 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=6.23; #density(gm/cc)\n", + "M=60; #molecular weight\n", + "N=6.023*10**23; #avagadro number\n", + "n=4; #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(cm)\n", + "r=a*math.sqrt(2)*10**8/4; #radius of atom(angstrom)\n", + "\n", + "#Result\n", + "print \"radius of atom is\",round(r,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.26, Page number 59" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between ions is 3.8 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=2.48; #density(gm/cc)\n", + "M=58; #molecular weight\n", + "N=6.023*10**23; #avagadro number\n", + "n=4; #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(cm)\n", + "r=a*math.sqrt(2)*10**8/4; #radius of atom(angstrom)\n", + "d=2*r; #distance between ions(angstrom)\n", + "\n", + "#Result\n", + "print \"distance between ions is\",round(d,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.27, Page number 59" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "distance between ions is 2.55 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=8.96; #density(gm/cc)\n", + "M=63.5; #molecular weight\n", + "N=6.02*10**23; #avagadro number\n", + "n=4; #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(cm)\n", + "d=a/math.sqrt(2)*10**8; #distance between ions(angstrom)\n", + "\n", + "#Result\n", + "print \"distance between ions is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.28, Page number 60" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "packing factor is 0.68\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=5.96; #density(gm/cc)\n", + "M=50; #molecular weight\n", + "N=6.023*10**23; #avagadro number\n", + "n=2; #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n*M/(rho*N))**(1/3); #lattice constant(cm)\n", + "r=a*math.sqrt(3)/4; #radius of atom(angstrom)\n", + "pf=n*(4/3)*math.pi*r**3/a**3; #packing factor\n", + "\n", + "#Result\n", + "print \"packing factor is\",round(pf,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.29, Page number 61" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "packing fraction is 68 %\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=1; #assume\n", + "n=2; #number of atoms\n", + "\n", + "#Calculations\n", + "r=a*math.sqrt(3)/4; #radius of atom\n", + "V=4*math.pi*r**3/3; #volume\n", + "f=n*V*100/a**3; #packing fraction\n", + "\n", + "#Result\n", + "print \"packing fraction is\",int(f),\"%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 2.30, Page number 61" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant is 3.22 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Vd=3*10**22; #density(gm/cc)\n", + "n=8*(1/8); #number of atoms\n", + "\n", + "#Calculations\n", + "a=(n/Vd)**(1/3); #lattice constant(cm)\n", + "\n", + "#Result\n", + "print \"lattice constant is\",round(a*10**8,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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter3.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter3.ipynb new file mode 100644 index 00000000..8e4123db --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter3.ipynb @@ -0,0 +1,655 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3: X-ray Diffraction" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example number 3.1, Page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 0.97938 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.82*10**-10; #lattice spacing(m)\n", + "theta=10; #glancing angle(degree)\n", + "n=1; #order\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "lamda=2*d*math.sin(theta)/n; #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,5),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.2, Page number 80" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 1.262 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=3.035*10**-10; #lattice spacing(m)\n", + "theta=12; #glancing angle(degree)\n", + "n=1; #order\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "lamda=2*d*math.sin(theta)/n; #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",round(lamda*10**10,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.3, Page number 81" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelengths are 1.464 angstrom and 1.6525 angstrom\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.81; #lattice spacing(angstrom)\n", + "theta1=15.1; #glancing angle(degree)\n", + "theta2=17.1; #glancing angle(degree)\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "lamda1=2*d*math.sin(theta1); #wavelength(angstrom)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "lamda2=2*d*math.sin(theta2); #wavelength(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelengths are\",round(lamda1,3),\"angstrom and\",round(lamda2,4),\"angstrom\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.4, Page number 81" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "separation between lattice planes is 4.035 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.54; #wavelength(angstrom)\n", + "theta=11; #glancing angle(degree)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=lamda/(2*math.sin(theta)); #separation between lattice planes(angstrom)\n", + "\n", + "#Result\n", + "print \"separation between lattice planes is\",round(d,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.5, Page number 81" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 1.84 angstrom\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamdaB=0.92; #wavelength(angstrom)\n", + "theta1=30; #glancing angle(degree)\n", + "theta2=60; #glancing angle(degree)\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "lamdaA=2*lamdaB*math.sin(theta1)/math.sin(theta1); #wavelength of line A(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength is\",lamdaA,\"angstrom\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.6, Page number 81" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debroglie wavelength is 0.7406 *10**-10 metre\n", + "velocity is 9.793 *10**6 m/sec\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.4086*10**-10; #lattice spacing(m)\n", + "theta=65; #glancing angle(degree)\n", + "h=6.6*10**-34; #plank's constant(Js)\n", + "m=9.1*10**-31; #mass(kg)\n", + "n=1;\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "lamda=2*d*math.sin(theta)/n; #debroglie wavelength(m)\n", + "v=h/(m*lamda); #velocity(m/sec)\n", + "\n", + "#Result\n", + "print \"debroglie wavelength is\",round(lamda*10**10,4),\"*10**-10 metre\"\n", + "print \"velocity is\",round(v/10**6,3),\"*10**6 m/sec\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.7, Page number 82" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "longest wavelength is 5.64 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=2.82*10**-10; #lattice spacing(m)\n", + "sintheta=1; \n", + "n=1;\n", + "\n", + "#Calculation\n", + "lamda_max=2*d*sintheta/n; #longest wavelength(m)\n", + "\n", + "#Result\n", + "print \"longest wavelength is\",lamda_max*10**10,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.8, Page number 82" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "glancing angle is 26.599 degree\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d=0.842*10**-10; #lattice spacing(m)\n", + "theta1=8+(35/60); #glancing angle(degree)\n", + "n1=1; #order\n", + "n2=3; #order\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "theta3=math.asin(n2*math.sin(theta1)); #glancing angle(radian)\n", + "theta3=theta3*180/math.pi; #glancing angle(degree)\n", + "\n", + "#Result\n", + "print \"glancing angle is\",round(theta3,3),\"degree\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.9, Page number 82" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 1.804 angstrom\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=0.58; #wavelength(angstrom)\n", + "theta1=6+(45/60); #glancing angle(degree)\n", + "theta2=9+(15/60); #glancing angle(degree)\n", + "theta3=13; #glancing angle(degree)\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "theta3=theta3*math.pi/180; #angle(radian)\n", + "x1=lamda/(2*math.sin(theta1));\n", + "x2=lamda/(2*math.sin(theta2));\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(x2,3),\"angstrom\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.10, Page number 83" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice spacing is 2.7882 angstrom\n", + "avagadro number is 6.2337 *10**26 mol/k-mole\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=1.3922; #wavelength(angstrom)\n", + "n=1;\n", + "theta=14+(27/60)+(26/(60*60)); #glancing angle(degree)\n", + "M=58.454; #molecular weight\n", + "rho=2163; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda/(2*math.sin(theta)); #lattice spacing(angstrom)\n", + "d_m=d*10**-10; #lattice spacing(m)\n", + "N=M/(2*rho*d_m**3); #avagadro number(mol/k-mole)\n", + "\n", + "#Result\n", + "print \"lattice spacing is\",round(d,4),\"angstrom\"\n", + "print \"avagadro number is\",round(N/10**26,4),\"*10**26 mol/k-mole\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.11, Page number 84" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of angles of incidence are 0.104 : 0.2108 : 0.3123 which is nothing but 1.0 : 2.0 : 3.0\n", + "angles of incidence should be 1st, 2nd and 3rd orders\n", + "spacing is 2.804 *10**-10 m\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda=0.586*10**-10; #wavelength(m)\n", + "theta1=5+(58/60); #glancing angle(degree)\n", + "theta2=12+(10/60); #glancing angle(degree)\n", + "theta3=18+(12/60); #glancing angle(degree)\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "theta3=theta3*math.pi/180; #angle(radian)\n", + "x1=math.sin(theta1);\n", + "x2=math.sin(theta2);\n", + "x3=math.sin(theta3);\n", + "d1=lamda/(2*math.sin(theta1)); #spacing for 1st order(m)\n", + "d2=2*lamda/(2*math.sin(theta2)); #spacing for 2nd order(m)\n", + "d3=3*lamda/(2*math.sin(theta3)); #spacing for 3rd order(m)\n", + "d=(d1+d2+d3)/3; #spacing(m)\n", + "\n", + "#Result\n", + "print \"ratio of angles of incidence are\",round(x1,3),\":\",round(x2,4),\":\",round(x3,4),\"which is nothing but\",round(x1,1)*10,\":\",round(x2,1)*10,\":\",round(x3,1)*10\n", + "print \"angles of incidence should be 1st, 2nd and 3rd orders\"\n", + "print \"spacing is\",round(d*10**10,3),\"*10**-10 m\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.12, Page number 84" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of angles of incidence are 0 : 1.413 : 1.744\n", + "the crystal is a simple cubic crystal\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "theta1=5+(23/60); #glancing angle(degree)\n", + "theta2=7+(37/60); #glancing angle(degree)\n", + "theta3=9+(25/60); #glancing angle(degree)\n", + "\n", + "#Calculation\n", + "theta1=theta1*math.pi/180; #angle(radian)\n", + "theta2=theta2*math.pi/180; #angle(radian)\n", + "theta3=theta3*math.pi/180; #angle(radian)\n", + "x1=math.sin(theta1);\n", + "X1=1/(10*x1);\n", + "x2=math.sin(theta2)/x1;\n", + "x3=math.sin(theta3)/x1;\n", + "\n", + "#Result\n", + "print \"ratio of angles of incidence are\",int(x1),\":\",round(x2,3),\":\",round(x3,3)\n", + "print \"the crystal is a simple cubic crystal\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.13, Page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "spacing of crystal is 0.38 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.62*10**-34; #planck's constant(J sec)\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9*10**-31; #mass(kg) \n", + "E=344; #energy(volts)\n", + "n=1;\n", + "theta=60; #angle(degrees)\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*e*E); #wavelength(m)\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda*10**10/(2*math.sin(theta)); #spacing of crystal(angstrom)\n", + "\n", + "#Result\n", + "print \"spacing of crystal is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 3.14, Page number 85" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice parameter is 4.1 angstrom\n", + "radius of atom is 1.45 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=2;\n", + "k=2;\n", + "l=0;\n", + "n=1;\n", + "theta=32; #angle(degrees)\n", + "lamda=1.54*10**-10; #wavelength(m)\n", + "\n", + "#Calculation\n", + "theta=theta*math.pi/180; #angle(radian)\n", + "d=n*lamda*10**10/(2*math.sin(theta)); #spacing of crystal(angstrom)\n", + "a=d*math.sqrt(h**2+k**2+l**2); #lattice parameter(angstrom)\n", + "r=a/(2*math.sqrt(2)); #radius of atom(angstrom)\n", + "\n", + "#Result\n", + "print \"lattice parameter is\",round(a,1),\"angstrom\"\n", + "print \"radius of atom is\",round(r,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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter4.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter4.ipynb new file mode 100644 index 00000000..8059dc45 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter4.ipynb @@ -0,0 +1,161 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 4: Defects in Crystals" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Example number 4.1, Page number 97" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fraction of vacancy sites at 1000 C is 8.4663 *10**-7\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T1=773; #temperature(K)\n", + "T2=1273; #temperature(K)\n", + "n=1*10**-10; #fraction of vacancy sites\n", + "\n", + "#Calculations\n", + "X=round(T1*math.log(n)/T2,3);\n", + "x=math.exp(X); #fraction of vacancy sites at 1000 C\n", + "\n", + "#Result\n", + "print \"fraction of vacancy sites at 1000 C is\",round(x*10**7,4),\"*10**-7\"\n", + "print \"answer varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 4.2, Page number 98" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy required is 1.971 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=273+25; #temperature(K)\n", + "m=4; \n", + "n=5*10**11; #density(per m**3)\n", + "V=(2*2.82*10**-10)**3; #volume(m**3)\n", + "kB=8.625*10**-5;\n", + "\n", + "#Calculations\n", + "N=m/V;\n", + "Ep=2*kB*T*math.log(N/n);\n", + "\n", + "#Result\n", + "print \"energy required is\",round(Ep,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 4.3, Page number 99" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of frenkel defects is 2.802 *10**-3\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T1=273+20; #temperature(K)\n", + "T2=273+300; #temperature(K)\n", + "Ei=1.4; #energy(eV)\n", + "kB=8.625*10**-5;\n", + "\n", + "#Calculations\n", + "x=(1/(2*T1))-(1/(2*T2));\n", + "n=1/math.exp((Ei/(2.303*kB))*x); #ratio of frenkel defects\n", + "\n", + "#Result\n", + "print \"ratio of frenkel defects is\",round(n*10**3,3),\"*10**-3\"\n", + "print \"answer in the book is wrong\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter5.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter5.ipynb new file mode 100644 index 00000000..f109b167 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter5.ipynb @@ -0,0 +1,357 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 5: Elements of Statistical Mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.1, Page number 129" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 5959 K\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "b=2.92*10**-3; #value of b(mK)\n", + "lamda=4900*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "T=b/lamda; #temperature(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",int(T),\"K\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.2, Page number 129" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature is 5454 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=1500; #temperature(K)\n", + "lamda=5500; #wavelength(m)\n", + "lamda_m=20000; #wavelength(m)\n", + "\n", + "#Calculations\n", + "T_dash=lamda_m*T/lamda; #temperature of sun(K)\n", + "\n", + "#Result\n", + "print \"temperature is\",int(T_dash),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.3, Page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 48283 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=327+273; #temperature(K)\n", + "b=2.897*10**-3; #value of b(mK)\n", + "\n", + "#Calculations\n", + "lamda_m=b/T; #wavelength(m)\n", + "\n", + "#Result\n", + "print \"wavelength is\",int(lamda_m*10**10),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.4, Page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength is 2.92 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=10**7; #temperature(K)\n", + "b=0.292; #value of b(cmK)\n", + "\n", + "#Calculations\n", + "lamda_m=b/T; #wavelength(cm)\n", + "\n", + "#Result\n", + "print \"wavelength is\",lamda_m*10**8,\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.5, Page number 130" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature of moon is 200 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=1127+273; #temperature(K)\n", + "lamda_m=2*10**-6; #wavelength(m)\n", + "lamda=14*10**-6; #wavelength(m)\n", + "\n", + "#Calculations\n", + "Tm=lamda_m*T/lamda; #temperature of moon(K)\n", + "\n", + "#Result\n", + "print \"temperature of moon is\",int(Tm),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.6, Page number 131" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature of sun is 6097 K\n", + "temperature of moon is 207 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "lamda_m=4753*10**-10; #wavelength(m)\n", + "lamda=14*10**-6; #wavelength(m)\n", + "b=0.2898*10**-2; #value of constant(mK)\n", + "\n", + "#Calculations\n", + "Ts=b/lamda_m; #temperature of sun(K) \n", + "Tm=b/lamda; #temperature of moon(K)\n", + "\n", + "#Result\n", + "print \"temperature of sun is\",int(Ts),\"K\"\n", + "print \"temperature of moon is\",int(Tm),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.7, Page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "maximum kinetic energy is 6.48 *10**4 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9*10**-31; #mass(kg)\n", + "h=6.624*10**-34; #plank's constant(Js)\n", + "n=5.86*10**28; #density(electrons/m**3)\n", + "k=8.6*10**-5;\n", + "\n", + "#Calculations\n", + "ef=(h**2/(8*m))*(3*n/math.pi)**(2/3); #energy(J)\n", + "ef=ef/e; #energy(eV)\n", + "theta_f=ef/k; #maximum kinetic energy(K)\n", + "\n", + "#Result\n", + "print \"maximum kinetic energy is\",round(theta_f/10**4,2),\"*10**4 K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 5.8, Page number 140" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fermi energy is 3.187 eV\n", + "answer varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "e=1.6*10**-19; #charge(coulomb)\n", + "m=9*10**-31; #mass(kg)\n", + "h=6.62*10**-34; #plank's constant(Js)\n", + "rho=970; #density(kg/m**3)\n", + "N0=6.02*10**26; #avagadro number\n", + "A=23; #atomic weight\n", + "\n", + "#Calculations\n", + "n=rho*N0/A; #concentration(electrons/m**3)\n", + "ef=(h**2/(8*m))*(3*n/math.pi)**(2/3); #fermi energy(J)\n", + "ef=ef/e; #fermi energy(eV)\n", + "\n", + "#Result\n", + "print \"fermi energy is\",round(ef,3),\"eV\"\n", + "print \"answer varies due to rounding off errors\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter6.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter6.ipynb new file mode 100644 index 00000000..c9abc449 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter6.ipynb @@ -0,0 +1,1649 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 6: Principles of Quantum Mechanics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.1, Page number 157" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength of ball is 6.625e-34 m\n", + "de-broglie wavelength of proton is 1.8 angstrom\n", + "de-broglie wavelength of electron is 2.27 *10**14 m\n", + "answer for de-broglie wavelength of electron in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.625*10**-34; #planck's constant(J-sec)\n", + "m=0.05; #mass(kg)\n", + "v=20; #velocity(m/sec)\n", + "mp=1.67*10**-27; #mass of proton(kg)\n", + "vp=2200; #velocity of proton(m/sec)\n", + "me=9.11*10**-31; #mass of electron(kg)\n", + "E=10*1.602*10**-19; #kinetic energy(J)\n", + "\n", + "#Calculations\n", + "lamda_ball=h/(m*v); #de-broglie wavelength of ball(m)\n", + "lamda_p=h*10**10/(mp*vp); #de-broglie wavelength of proton(angstrom)\n", + "lamda_e=h/(2*me*E); #de-broglie wavelength of electron(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength of ball is\",lamda_ball,\"m\"\n", + "print \"de-broglie wavelength of proton is\",round(lamda_p,2),\"angstrom\"\n", + "print \"de-broglie wavelength of electron is\",round(lamda_e/10**14,2),\"*10**14 m\"\n", + "print \"answer for de-broglie wavelength of electron in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.2, Page number 158" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength in 1st case is 1.225 angstrom\n", + "de-broglie wavelength in 2nd case is 0.1225 angstrom\n", + "de-broglie wavelength in 3rd case is 0.153 angstrom\n", + "de-broglie wavelength in 4th case is 0.1225 angstrom\n", + "de-broglie wavelength in 5th case is 0.3963 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "m=1.673*10**-27; #mass of proton(kg)\n", + "v=10**4; #velocity of proton(m/sec)\n", + "V1=100; #potential difference in 1st case(V)\n", + "V2=10000; #potential difference in 2nd case(V)\n", + "V3=6400; #potential difference in 3rd case(V)\n", + "\n", + "\n", + "#Calculations\n", + "lamda1=12.25/math.sqrt(V1) #de-broglie wavelength in 1st case(angstrom)\n", + "lamda2=12.25/math.sqrt(V2) #de-broglie wavelength in 2nd case(angstrom)\n", + "lamda3=12.25/math.sqrt(V3) #de-broglie wavelength in 3rd case(angstrom)\n", + "lamda4=12.25/math.sqrt(V2) #de-broglie wavelength in 4th case(angstrom)\n", + "lamda5=h/(m*v); #de-broglie wavelength of proton(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength in 1st case is\",lamda1,\"angstrom\"\n", + "print \"de-broglie wavelength in 2nd case is\",lamda2,\"angstrom\"\n", + "print \"de-broglie wavelength in 3rd case is\",round(lamda3,3),\"angstrom\"\n", + "print \"de-broglie wavelength in 4th case is\",lamda4,\"angstrom\"\n", + "print \"de-broglie wavelength of proton is\",round(lamda5*10**10,4),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.3, Page number 158" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength of proton is 2.64 *10**-14 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "m=1.67*10**-27; #mass of proton(kg)\n", + "vc=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "v=vc/20; #velocity of proton(m/sec)\n", + "lamda=h/(m*v); #de-broglie wavelength of proton(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength of proton is\",round(lamda*10**14,2),\"*10**-14 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.4, Page number 159" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of neutron is 8.13 *10**-2 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.60*10**-34; #planck's constant(J-sec)\n", + "m=1.674*10**-27; #mass of proton(kg)\n", + "lamda=10**-10; #de-broglie wavelength(m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "E=h**2/(2*m*lamda**2); #energy of neutron(J)\n", + "E=E/e; #energy of neutron(eV)\n", + "\n", + "#Result\n", + "print \"energy of neutron is\",round(E*10**2,2),\"*10**-2 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.5, Page number 159" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "energy of electron is 167217.6 eV\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "lamda=3*10**-12; #de-broglie wavelength(m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "E=h**2/(2*m*lamda**2); #energy of electron(J)\n", + "E=E/e; #energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"energy of electron is\",round(E,1),\"eV\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.6, Page number 159" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "kinetic energy of electron is 4.34 *10**-6 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "lamda=5896*10**-10; #de-broglie wavelength(m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "K=h**2/(2*m*lamda**2); #energy of electron(J)\n", + "K=K/e; #kinetic energy of electron(eV)\n", + "\n", + "#Result\n", + "print \"kinetic energy of electron is\",round(K*10**6,2),\"*10**-6 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.7, Page number 160" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage is 934.9 V\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "lamda=0.4*10**-10; #de-broglie wavelength(m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "V=h**2/(2*m*e*lamda**2); #voltage(V)\n", + "\n", + "#Result\n", + "print \"voltage is\",round(V,1),\"V\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.8, Page number 160" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "velocity of neutron is 3.97 *10**3 m/sec\n", + "kinetic energy of neutron is 0.08225 eV\n", + "answer for kinetic energy 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; #planck's constant(J-sec)\n", + "m=1.67*10**-27; #mass of neutron(kg)\n", + "lamda=10**-10; #de-broglie wavelength(m)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "v=h/(m*lamda); #velocity of neutron(m/sec)\n", + "E=m*v**2/(2*e); #kinetic energy of neutron(eV)\n", + "\n", + "#Result\n", + "print \"velocity of neutron is\",round(v/10**3,2),\"*10**3 m/sec\"\n", + "print \"kinetic energy of neutron is\",round(E,5),\"eV\"\n", + "print \"answer for kinetic energy in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.9, Page number 161" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of photon is 12.4 angstrom\n", + "wavelength of electron is 0.39 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "E=1000; #energy of electron(eV)\n", + "\n", + "#Calculations\n", + "lamda_p=h*c*10**10/(E*e); #wavelength of photon(angstrom)\n", + "lamda_e=h*10**10/math.sqrt(2*m*E*e); #wavelength of electron(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of photon is\",round(lamda_p,1),\"angstrom\"\n", + "print \"wavelength of electron is\",round(lamda_e,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.10, Page number 161" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of photo-electron is 0.1 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "lamda=0.82*10**-10; #wavelength(m)\n", + "\n", + "#Calculations\n", + "E=h*c/lamda; #energy(J)\n", + "lamda=h*10**10/math.sqrt(2*m*E); #wavelength of photo-electron(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of photo-electron is\",round(lamda,1),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.11, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of electron is 0.0242 angstrom\n", + "answer 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", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "lamda=h*10**10/(m*c); #wavelength of electron(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of electron is\",round(lamda,4),\"angstrom\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.12, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength of neutron is 2.86 *10**-18 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.625*10**-34; #planck's constant(J-sec)\n", + "m=1.675*10**-27; #mass of neutron(kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "E=10**14; #energy of neutron(eV)\n", + "\n", + "#Calculations\n", + "v=math.sqrt(2*E*e/m); #velocity(m/sec)\n", + "lamda=h/(m*v); #de-broglie wavelength of neutron(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength of neutron is\",round(lamda*10**18,2),\"*10**-18 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.13, Page number 162" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength of neutron is 7.998 *10**-15 m\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.625*10**-34; #planck's constant(J-sec)\n", + "m=1.675*10**-27; #mass of neutron(kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "E=12.8*10**6; #energy of neutron(eV)\n", + "\n", + "#Calculations\n", + "v=math.sqrt(2*E*e/m); #velocity(m/sec)\n", + "lamda=h/(m*v); #de-broglie wavelength of neutron(m)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength of neutron is\",round(lamda*10**15,3),\"*10**-15 m\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.14, Page number 163" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "de-broglie wavelength of proton is 0.0004 angstrom\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "mp=1836*m; #mass of photon(kg)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "E=m*c**2; #energy(J)\n", + "v=math.sqrt(2*E/mp); #velocity(m/sec)\n", + "lamda=h*10**10/(mp*v); #de-broglie wavelength of proton(angstrom)\n", + "\n", + "#Result\n", + "print \"de-broglie wavelength of proton is\",round(lamda,4),\"angstrom\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.15, Page number 163" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength of thermal neutron is 1.777 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.60*10**-34; #planck's constant(J-sec)\n", + "m=1.67*10**-27; #mass of neutron(kg)\n", + "k=8.6*10**-5; #boltzmann constant(eV/deg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculations\n", + "lamda=h*10**10/math.sqrt(2*m*k*e*T); #wavelength of thermal neutron(angstrom)\n", + "\n", + "#Result\n", + "print \"wavelength of thermal neutron is\",round(lamda,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.16, Page number 164" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 1.78 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "mn=1.67*10**-27; #mass of neutron(kg)\n", + "k=1.38*10**-23; #boltzmann constant(eV/deg)\n", + "T=300; #temperature(K)\n", + "\n", + "#Calculations\n", + "E=k*T; #energy(J)\n", + "p=math.sqrt(2*mn*E); #momentum\n", + "d=h*10**10/p; #interplanar spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,2),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.17, Page number 164" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "interplanar spacing is 0.38 angstrom\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "m=9*10**-31; #mass of neutron(kg)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "V=344; #potential difference(V)\n", + "theta=60*math.pi/180; #angle(radian)\n", + "\n", + "#Calculations\n", + "d=h*10**10/(2*math.sin(theta)*math.sqrt(2*m*e*V)); #interplanar spacing(angstrom)\n", + "\n", + "#Result\n", + "print \"interplanar spacing is\",round(d,2),\"angstrom\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.18, Page number 171" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 1.65e-24 kg m/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "deltax=4*10**-10; #uncertainity in position of electron(m)\n", + "\n", + "#Calculations\n", + "delta_px=h/deltax; #uncertainity in momentum(kg m/sec)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",delta_px,\"kg m/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.19, Page number 171" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in position of electron is 0.02418 m\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "v=600; #speed(m/sec)\n", + "a=0.005/100; #accuracy(%)\n", + "\n", + "#Calculations\n", + "deltav=v*a; #uncertainity in speed(kg m/sec)\n", + "delta_px=m*deltav; #uncertainity in momentum(kg m/sec)\n", + "deltax=h/delta_px; #uncertainity in position of electron(m)\n", + "\n", + "#Result\n", + "print \"uncertainity in position of electron is\",round(deltax,5),\"m\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.20, Page number 172 Theoritical " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.21, Page number 172" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in momentum is 6.63e-23 kg m/sec\n", + "uncertainity in velocity is 7.286 *10**7 m/sec\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "m0=9.1*10**-31; #mass of electron(kg)\n", + "deltax=0.1*10**-10; #uncertainity in position of electron(m)\n", + "\n", + "#Calculations\n", + "delta_p=h/deltax; #uncertainity in momentum(kg m/sec)\n", + "delta_v=delta_p/m0; #uncertainity in velocity(m/sec)\n", + "\n", + "#Result\n", + "print \"uncertainity in momentum is\",delta_p,\"kg m/sec\"\n", + "print \"uncertainity in velocity is\",round(delta_v/10**7,3),\"*10**7 m/sec\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.22, Page number 172" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in velocity is 1835\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "me=9.10*10**-31; #mass of electron(kg)\n", + "mp=1.67*10**-27; #mass of electron(kg)\n", + "\n", + "#Calculations\n", + "uv=mp/me; #uncertainity in velocity\n", + "\n", + "#Result\n", + "print \"uncertainity in velocity is\",int(uv)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.23, Page number 172" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "smallest possible uncertainity in position of electron is 0.019 angstrom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "m0=9*10**-31; #mass of electron(kg)\n", + "v=3*10**7; #velocity of electron(m/sec)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "deltax_min=h*10**10*math.sqrt(1-(v**2/c**2))/(4*math.pi*m0*v); #smallest possible uncertainity in position of electron(angstrom)\n", + "\n", + "#Result\n", + "print \"smallest possible uncertainity in position of electron is\",round(deltax_min,3),\"angstrom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.24, Page number 173" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum uncertainity in velocity of electron is 7.3 *10**5 m/s\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "m=9*10**-31; #mass of electron(kg)\n", + "deltax_max=10*10**-10; #length of box(m)\n", + "\n", + "#Calculations\n", + "deltavx_min=h/(deltax_max*m); #minimum uncertainity in velocity of electron(m/s)\n", + "\n", + "#Result\n", + "print \"minimum uncertainity in velocity of electron is\",round(deltavx_min/10**5,1),\"*10**5 m/s\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.25 Page number 173" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "time required is 1.9 *10**-8 second\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "dlamda=10**-4*10**-10; #width(m)\n", + "lamda=6000*10**-10; #wavelength(m)\n", + "c=3*10**8; #velocity of light(m/sec)\n", + "\n", + "#Calculations\n", + "delta_t=lamda**2/(2*math.pi*c*dlamda); #time required(second)\n", + "\n", + "#Result\n", + "print \"time required is\",round(delta_t*10**8,1),\"*10**-8 second\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.26 Page number 174" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in position of electron is 1.6903 *10**-8 m\n", + "answer 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; #planck's constant(J-sec)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "v=3.5*10**7; #speed(cm/sec)\n", + "a=0.0098/100; #accuracy(%)\n", + "\n", + "#Calculations\n", + "deltav=v*a; #uncertainity in speed(kg m/sec)\n", + "delta_p=m*deltav; #uncertainity in momentum(kg m/sec)\n", + "deltax=h/(4*math.pi*delta_p); #uncertainity in position of electron(m)\n", + "\n", + "#Result\n", + "print \"uncertainity in position of electron is\",round(deltax*10**8,4),\"*10**-8 m\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.27 Page number 174" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in position of dust particle is 9.58 *10**-10 m\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.62*10**-34; #planck's constant(J-sec)\n", + "m=10**-6; #mass of electron(kg)\n", + "deltav=5.5*10**-20; #speed(m/sec)\n", + "\n", + "#Calculations\n", + "delta_p=m*deltav; #uncertainity in momentum(kg m/sec)\n", + "deltax=h/(4*math.pi*delta_p); #uncertainity in position of dust particle(m)\n", + "\n", + "#Result\n", + "print \"uncertainity in position of dust particle is\",round(deltax*10**10,2),\"*10**-10 m\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.28 Page number 175" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "uncertainity in energy is 3.3 *10**-4 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "delta_t=10**-12; #life time(s)\n", + "hby2pi=1.054*10**-34; \n", + "e=1.6*10**-19; #charge of electron(c)\n", + "\n", + "#Calculations\n", + "deltaE=hby2pi/(2*e*delta_t); #uncertainity in energy(eV)\n", + "\n", + "#Result\n", + "print \"uncertainity in energy is\",round(deltaE*10**4,1),\"*10**-4 eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.29 Page number 175" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum uncertainity in frequency is 8.0 *10**6 s-1\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "delta_t=10**-8; #life time(s)\n", + "\n", + "#Calculations\n", + "deltav=1/(4*math.pi*delta_t); #minimum uncertainity in frequency(s-1)\n", + "\n", + "#Result\n", + "print \"minimum uncertainity in frequency is\",round(deltav/10**6),\"*10**6 s-1\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.30 Page number 175" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "minimum energy is 13.18997 keV\n", + "answer 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", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "delta_t=2.5*10**-14*10**-6; #life time(s)\n", + "\n", + "#Calculations\n", + "deltaE=h*10**-3/(4*math.pi*delta_t*e); #minimum energy(keV)\n", + "\n", + "#Result\n", + "print \"minimum energy is\",round(deltaE,5),\"keV\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.31 Page number 183" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "least energy is 37.649 eV\n", + "answer 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; #planck's constant(J-sec)\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "L=10**-10; #width(m)\n", + "m=9.11*10**-31; #mass of electron(kg)\n", + "\n", + "\n", + "#Calculations\n", + "E1=h**2/(8*m*e*L**2); #least energy(eV)\n", + "\n", + "#Result\n", + "print \"least energy is\",round(E1,3),\"eV\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.32 Page number 184" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1st least energy is 6 eV\n", + "2nd least energy is 24 eV\n", + "3rd least energy is 54 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "L=2.5*10**-10; #width(m)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "\n", + "#Calculations\n", + "E=h**2/(8*m*e*L**2); #energy(eV)\n", + "E1=n1**2*h**2/(8*m*e*L**2); #1st least energy(eV)\n", + "E2=n2**2*h**2/(8*m*e*L**2); #2nd least energy(eV)\n", + "E3=n3**2*h**2/(8*m*e*L**2); #3rd least energy(eV)\n", + "\n", + "#Result\n", + "print \"1st least energy is\",int(E1),\"eV\"\n", + "print \"2nd least energy is\",int(E2),\"eV\"\n", + "print \"3rd least energy is\",int(E3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.33 Page number 184" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "wavelength in 1st energy state is 20 angstrom\n", + "wavelength in 2nd energy state is 10 angstrom\n", + "wavelength in 3rd energy state is 6.67 angstrom\n", + "1st least energy is 0.38 eV\n", + "2nd least energy is 1.5095 eV\n", + "3rd least energy is 3.396 eV\n", + "answers for 2nd and 3rd least energies varies due to rounding off errors\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "L=10**-9; #width(m)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "\n", + "#Calculations\n", + "lamda1=2*L*10**10/n1; #wavelength in 1st energy state(angstrom)\n", + "lamda2=2*L*10**10/n2; #wavelength in 2nd energy state(angstrom)\n", + "lamda3=2*L*10**10/n3; #wavelength in 3rd energy state(angstrom)\n", + "E=h**2/(8*m*e*L**2); #energy(eV)\n", + "E1=n1**2*h**2/(8*m*e*L**2); #1st least energy(eV)\n", + "E2=n2**2*h**2/(8*m*e*L**2); #2nd least energy(eV)\n", + "E3=n3**2*h**2/(8*m*e*L**2); #3rd least energy(eV)\n", + "\n", + "#Result\n", + "print \"wavelength in 1st energy state is\",int(lamda1),\"angstrom\"\n", + "print \"wavelength in 2nd energy state is\",int(lamda2),\"angstrom\"\n", + "print \"wavelength in 3rd energy state is\",round(lamda3,2),\"angstrom\"\n", + "print \"1st least energy is\",round(E1,2),\"eV\"\n", + "print \"2nd least energy is\",round(E2,4),\"eV\"\n", + "print \"3rd least energy is\",round(E3,3),\"eV\"\n", + "print \"answers for 2nd and 3rd least energies varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.34 Page number 185" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1st least energy is 37.69 eV\n", + "2nd least energy is 150 eV\n", + "energy difference between ground state and 1st excited state is 113.08 eV\n", + "answer 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", + "h=6.626*10**-34; #planck's constant(J-sec)\n", + "e=1.60*10**-19; #charge of electron(c)\n", + "L=10**-10; #width(m)\n", + "m=9.1*10**-31; #mass of electron(kg)\n", + "n1=1;\n", + "n2=2;\n", + "\n", + "#Calculations\n", + "E=h**2/(8*m*e*L**2); #energy(eV)\n", + "E1=n1**2*h**2/(8*m*e*L**2); #1st least energy(eV)\n", + "E2=n2**2*h**2/(8*m*e*L**2); #2nd least energy(eV)\n", + "Ed=E2-E1; #energy difference between ground state and 1st excited state(eV)\n", + "\n", + "#Result\n", + "print \"1st least energy is\",round(E1,2),\"eV\"\n", + "print \"2nd least energy is\",int(E2),\"eV\"\n", + "print \"energy difference between ground state and 1st excited state is\",round(Ed,2),\"eV\"\n", + "print \"answer in the book varies due to rounding off errors\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.35 Page number 185" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1st least energy is 3.4 *10**-45 eV\n", + "2nd least energy is 13.6 *10**-45 eV\n", + "3rd least energy is 30.6 *10**-45 eV\n", + "energy levels are so close to each other that the energy states cannot be observed\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.6*10**-34; #planck's constant(J-sec)\n", + "e=1.6*10**-19; #charge of electron(c)\n", + "L=10**-1; #width(m)\n", + "m=10**-2; #mass of electron(kg)\n", + "n1=1;\n", + "n2=2;\n", + "n3=3;\n", + "\n", + "#Calculations\n", + "E=h**2/(8*m*e*L**2); #energy(eV)\n", + "E1=n1**2*h**2/(8*m*e*L**2); #1st least energy(eV)\n", + "E2=n2**2*h**2/(8*m*e*L**2); #2nd least energy(eV)\n", + "E3=n3**2*h**2/(8*m*e*L**2); #3rd least energy(eV)\n", + "\n", + "#Result\n", + "print \"1st least energy is\",round(E1*10**45,1),\"*10**-45 eV\"\n", + "print \"2nd least energy is\",round(E2*10**45,1),\"*10**-45 eV\"\n", + "print \"3rd least energy is\",round(E3*10**45,1),\"*10**-45 eV\"\n", + "print \"energy levels are so close to each other that the energy states cannot be observed\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.36 Page number 186" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mass of particle is 9.3 *10**-31 kg\n", + "quantum state is 10.4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "h=6.63*10**-34; #planck's constant(J-sec)\n", + "e=1.602*10**-19; #charge of electron(c)\n", + "L=0.2*10**-9; #width(m)\n", + "n5=5;\n", + "En=10**3; #energy(eV)\n", + "E5=230; #energy of particle(eV)\n", + "\n", + "#Calculations2\n", + "E5=230*e; #energy(J)\n", + "E1=E5/n5**2; #energy in 1st state(J)\n", + "m=h**2/(8*E1*L**2); #mass of particle(kg)\n", + "n=math.sqrt(En*e/E1); #quantum state\n", + "\n", + "#Result\n", + "print \"mass of particle is\",round(m*10**31,1),\"*10**-31 kg\"\n", + "print \"quantum state is\",round(n,1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.37 Page number 186" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "probability of finding the particle is 0.4\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "L=25*10**-10; #width(m)\n", + "deltax=5*10**-10; #interval(m)\n", + "\n", + "#Calculations2\n", + "P=2*deltax/L; #probability of finding the particle\n", + "\n", + "#Result\n", + "print \"probability of finding the particle is\",P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 6.38 Page number 187" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "probability of finding the particle is 0.0161 a**2\n", + "expectation value of position of particle is 0.25 a**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration \n", + "a=1; #assume\n", + "\n", + "#Calculations2\n", + "def zintg(x):\n", + " return (a*x)**2 \n", + "\n", + "P=quad(zintg,0.35,0.45)[0] #probability of finding the particle\n", + "\n", + "def zintg(x):\n", + " return x*(a*x)**2 \n", + "\n", + "X=quad(zintg,0,1)[0] #expectation value of position of particle\n", + "\n", + "#Result\n", + "print \"probability of finding the particle is\",round(P,4),\"a**2\"\n", + "print \"expectation value of position of particle is\",X,\"a**2\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter8.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter8.ipynb new file mode 100644 index 00000000..a109c8d1 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter8.ipynb @@ -0,0 +1,518 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 8: Semiconductor Physics" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.1, Page number 229" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ratio of density of electrons is 0.227\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.5*10**19; #concentration(per m**3)\n", + "d=4.4*10**28; #density(per m**3)\n", + "n=4*10**8; #number of Ge atoms\n", + "\n", + "#Calculation\n", + "Na=d/n; #density of acceptor atoms\n", + "np=ni**2/Na; \n", + "npbyni=np/ni; #ratio of density of electrons\n", + "\n", + "#Result\n", + "print \"ratio of density of electrons is\",round(npbyni,3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.2, Page number 230" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hole concentration is 1.44e+16 holes/m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "ni=2.4*10**19; #concentration(per m**3)\n", + "d=4*10**28; #density(per m**3)\n", + "n=10**6; #number of Ge atoms\n", + "\n", + "#Calculation\n", + "Nd=d/n; #density of acceptor atoms\n", + "np=ni**2/Nd; #hole concentration(holes/m**3)\n", + "\n", + "#Result\n", + "print \"hole concentration is\",np,\"holes/m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.3, Page number 230" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of holes and electrons is 3.352 *10**19 per m**3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "me=9.1*10**-31; #mass of electron(kg)\n", + "kb=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "h=6.62*10**-34; #planck's constant\n", + "Eg=0.7; #band gap(eV)\n", + "e=1.6*10**-19; #charge(c)\n", + "\n", + "#Calculation\n", + "x=2*math.pi*me*kb*T/(h**2); \n", + "n=2*(x**(3/2))*math.exp(-Eg*e/(2*kb*T)); #density of holes and electrons(per m**3)\n", + "\n", + "#Result\n", + "print \"density of holes and electrons is\",round(n/10**19,3),\"*10**19 per m**3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.4, Page number 231" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "position of Fermi level is 0.35 eV\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "kb=1.38*10**-23; #boltzmann constant\n", + "T=300; #temperature(K)\n", + "m=6;\n", + "Eg=0.7; #band gap(eV)\n", + "\n", + "#Calculation\n", + "x=3*kb*T*math.log(m)/4;\n", + "EF=(Eg/2)+x; #position of Fermi level(eV)\n", + "\n", + "#Result\n", + "print \"position of Fermi level is\",EF,\"eV\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.5, Page number 231" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "position of Fermi level is 0.33 eV\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=300; #temperature(K)\n", + "T2=330; #temperature(K)\n", + "E=0.3; #band gap(eV)\n", + "\n", + "#Calculation\n", + "Ec_Ef=T2*E/T1; #position of Fermi level(eV)\n", + "\n", + "#Result\n", + "print \"position of Fermi level is\",Ec_Ef,\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.6, Page number 239" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall coefficient is 3.045 *10**-4 m**3/C\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=2.05*10**22; #charge carrier density\n", + "e=1.602*10**-19; #charge of electron\n", + "\n", + "#Calculation\n", + "RH=1/(n*e); #hall coefficient(m**3/C)\n", + "\n", + "#Result\n", + "print \"hall coefficient is\",round(RH*10**4,3),\"*10**-4 m**3/C\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.7, Page number 239" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall coefficient is -0.125 *10**-9 m**3/C\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n=5*10**28; #charge carrier density\n", + "e=1.6*10**-19; #charge of electron\n", + "\n", + "#Calculation\n", + "RH=-1/(n*e); #hall coefficient(m**3/C)\n", + "\n", + "#Result\n", + "print \"hall coefficient is\",round(RH*10**9,3),\"*10**-9 m**3/C\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.8, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall coefficient is -0.245 *10**-9 m**3/C\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a=4.28*10**-10; #side(m)\n", + "e=1.6*10**-19; #charge of electron\n", + "\n", + "#Calculation\n", + "n=2/(a**3);\n", + "RH=-1/(n*e); #hall coefficient(m**3/C)\n", + "\n", + "#Result\n", + "print \"hall coefficient is\",round(RH*10**9,3),\"*10**-9 m**3/C\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.9, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall coefficient is 2.7 *10**-4 m**3/C\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=9*10**-3; #resistivity(ohm m)\n", + "mew=0.03; #mobility(m**2/Vs)\n", + "\n", + "#Calculation\n", + "sigma=1/rho;\n", + "RH=mew/sigma; #hall coefficient(m**3/C)\n", + "\n", + "#Result\n", + "print \"hall coefficient is\",RH*10**4,\"*10**-4 m**3/C\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.10, Page number 240" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "density of charge carrier is 1.73611 *10**22 per m**3\n", + "mobility is 0.04 m**2/Vs\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=9*10**-3; #resistivity(ohm m)\n", + "RH=3.6*10**-4; #hall coefficient(m**3/C)\n", + "e=1.6*10**-19; #charge of electron\n", + "\n", + "#Calculation\n", + "sigma=1/rho;\n", + "rho=1/RH; \n", + "n=rho/e; #density of charge carrier(per m**3)\n", + "mew=sigma*RH; #mobility(m**2/Vs)\n", + "\n", + "#Result\n", + "print \"density of charge carrier is\",round(n/10**22,5),\"*10**22 per m**3\"\n", + "print \"mobility is\",mew,\"m**2/Vs\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.11, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "charge carrier concentration is 6.25e+22 m**-3\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge of electron\n", + "z=0.3*10**-3; #thickness(m)\n", + "VH=1*10**-3; #hall voltage(V)\n", + "Ix=10*10**-3; #current(A)\n", + "Bz=0.3; #magnetic field(T)\n", + "\n", + "#Calculation\n", + "n=Ix*Bz/(VH*z*e); #charge carrier concentration(m**-3)\n", + "\n", + "#Result\n", + "print \"charge carrier concentration is\",n,\"m**-3\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 8.12, Page number 241" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hall angle is 1.0704 degrees\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "rho=0.00912; #resistivity(ohm m)\n", + "RH=3.55*10**-4; #hall coefficient(m**3/C)\n", + "B=0.48; #flux density(Wb/m**2)\n", + "\n", + "#Calculation\n", + "sigma=1/rho;\n", + "theta_H=math.atan(sigma*B*RH); #hall angle(radian)\n", + "theta_H=theta_H*180/math.pi; #hall angle(degrees)\n", + "\n", + "#Result\n", + "print \"hall angle is\",round(theta_H,4),\"degrees\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter9.ipynb b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter9.ipynb new file mode 100644 index 00000000..8f38e89c --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/Chapter9.ipynb @@ -0,0 +1,242 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 9: Physics of Semiconductor Devices" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 9.1, Page number 256" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "value of current is 120.73 micro A\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "I0=0.3; #current(micro A)\n", + "V=0.15; #voltage(V)\n", + "\n", + "#Calculations\n", + "I=I0*(math.exp(40*V)-1); #value of current(micro A)\n", + "\n", + "#Result\n", + "print \"value of current is\",round(I,2),\"micro A\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 9.2, Page number 256" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "reverse saturation current is 5.043 nA\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "I=10*10**-3; #current(A)\n", + "V=0.75; #voltage(V)\n", + "T=300; #temperature(K)\n", + "eta=2;\n", + "\n", + "#Calculations\n", + "VT=T/11600;\n", + "I0=I*10**9/(math.exp(V/(eta*VT))-1); #reverse saturation current(nA)\n", + "\n", + "#Result\n", + "print \"reverse saturation current is\",round(I0,3),\"nA\"\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 9.3, Page number 256" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage applied is 0.3336 V\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "J=10**5; #current density(amp/m**2)\n", + "T=300; #temperature(K)\n", + "eta=1;\n", + "J0=250*10**-3; #saturation current density(A/m**2)\n", + "\n", + "#Calculations\n", + "VT=T/11600;\n", + "x=(J/J0)+1;\n", + "V=math.log(x)*VT; #voltage applied(V)\n", + "\n", + "#Result\n", + "print \"voltage applied is\",round(V,4),\"V\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 9.4, Page number 257" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rectification ratio is 343\n", + "answer in the book is wrong\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "I0=4*10**-6; #current(A)\n", + "T=273+25; #temperature(K)\n", + "V=0.15; #voltage(V)\n", + "eta=1;\n", + "\n", + "#Calculations\n", + "VT=T/11600;\n", + "IF=I0*(math.exp(V/VT)-1); #forward current(A)\n", + "IR=I0*(math.exp(-V/VT)-1); #reverse current(A)\n", + "r=-IF/IR; #rectification ratio\n", + "\n", + "#Result\n", + "print \"rectification ratio is\",int(r)\n", + "print \"answer in the book is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Example number 9.5, Page number 257" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "voltage applied is -0.06 Volt\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration \n", + "T=300; #temperature(K)\n", + "eta=1;\n", + "I0=1;\n", + "I=-0.9*I0; #saturation current density(A/m**2)\n", + "\n", + "#Calculations\n", + "VT=T/11600;\n", + "x=(I/I0)+1;\n", + "V=math.log(x)*VT; #voltage applied(V)\n", + "\n", + "#Result\n", + "print \"voltage applied is\",round(V,2),\"Volt\"" + ] + } + ], + "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 +} diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/1.png b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/1.png Binary files differnew file mode 100644 index 00000000..fe58b5e3 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/1.png diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/2.png b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/2.png Binary files differnew file mode 100644 index 00000000..2b071bb5 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/2.png diff --git a/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/3.png b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/3.png Binary files differnew file mode 100644 index 00000000..186feee5 --- /dev/null +++ b/Engineering_Physics_by_S.L.Gupta,_Sanjeev_Gupta/screenshots/3.png |