diff options
author | debashisdeb | 2014-06-20 15:42:42 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-20 15:42:42 +0530 |
commit | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch) | |
tree | f54eab21dd3d725d64a495fcd47c00d37abed004 /Engineering_Physics_Marikani | |
parent | a78126bbe4443e9526a64df9d8245c4af8843044 (diff) | |
download | Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2 Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip |
removing problem statements
Diffstat (limited to 'Engineering_Physics_Marikani')
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_1.ipynb | 170 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_10.ipynb | 192 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_11.ipynb | 193 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_12.ipynb | 188 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_2.ipynb | 304 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_3.ipynb | 219 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_4.ipynb | 518 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_6.ipynb | 625 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_7.ipynb | 120 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_8.ipynb | 338 | ||||
-rw-r--r-- | Engineering_Physics_Marikani/Chapter_9.ipynb | 406 |
11 files changed, 2947 insertions, 326 deletions
diff --git a/Engineering_Physics_Marikani/Chapter_1.ipynb b/Engineering_Physics_Marikani/Chapter_1.ipynb index 4392ba50..a6934dcd 100644 --- a/Engineering_Physics_Marikani/Chapter_1.ipynb +++ b/Engineering_Physics_Marikani/Chapter_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 1" + "name": "", + "signature": "sha256:dbcb8c7a4d852e94c64ae36b37434de99bb1000ca8d8a481769813b464811eeb" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Ultrasonics" + "source": [ + "Ultrasonics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.1, Page number 28 " + "source": [ + "Example number 1.1, Page number 28 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fundamental frequency of vibration\n\n#importing modules\nimport math\n\n#Variable declaration\nt=0.15*10**-2; #thickness of the quartz crystal in m\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nx=math.sqrt(Y/rho);\nf=x/(2*t);\nf=f*10**-6; #converting f from Hz to MHz\nf=math.ceil(f*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"fundamental frequency of vibration in MHz is\",f);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "t=0.15*10**-2; #thickness of the quartz crystal in m\n", + "Y=7.9*10**10; #young's modulus of quartz in N/m^2\n", + "rho=2650; #density of quartz in kg/m^3\n", + "\n", + "#Calculation\n", + "x=math.sqrt(Y/rho);\n", + "f=x/(2*t);\n", + "f=f*10**-6; #converting f from Hz to MHz\n", + "f=math.ceil(f*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"fundamental frequency of vibration in MHz is\",f);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fundamental frequency of vibration in MHz is', 1.819992)\n" + "text": [ + "('fundamental frequency of vibration in MHz is', 1.819992)\n" + ] } ], "prompt_number": 2 @@ -38,19 +64,57 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.2, Page number 28 " + "source": [ + "Example number 1.2, Page number 28 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fundamental frequency and the first overtone\n\n#importing modules\nimport math\n\n#Variable declaration\nt=1e-03; #thickness of the quartz crystal in m\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nx=math.sqrt(Y/rho);\np1=1; #for fundamental frequency p=1\nf1=(p1*x)/(2*t);\nF1=f1/10**6;\nF1=math.ceil(F1*10**5)/10**5; #rounding off to 5 decimals\nf_1=f1*10**-6; #converting f1 from Hz to MHz\nf_1=math.ceil(f_1*10**5)/10**5; #rounding off to 5 decimals\np2=2; #for first overtone p=2\nf2=(p2*x)/(2*t);\nF2=f2/10**6;\nF2=math.ceil(F2*10**5)/10**5; #rounding off to 5 decimals\nf_2=f2*10**-6; #converting f2 from Hz to MHz\nf_2=math.ceil(f_2*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"fundamental frequency in Hz is\",F1,\"*10**6\");\nprint(\"fundamental frequency in MHz is\",f_1);\nprint(\"frequency of the first overtone in Hz is\",F2,\"*10**6\");\nprint(\"frequency of the first overtone in MHz is\",f_2);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "t=1e-03; #thickness of the quartz crystal in m\n", + "Y=7.9*10**10; #young's modulus of quartz in N/m^2\n", + "rho=2650; #density of quartz in kg/m^3\n", + "\n", + "#Calculation\n", + "x=math.sqrt(Y/rho);\n", + "p1=1; #for fundamental frequency p=1\n", + "f1=(p1*x)/(2*t);\n", + "F1=f1/10**6;\n", + "F1=math.ceil(F1*10**5)/10**5; #rounding off to 5 decimals\n", + "f_1=f1*10**-6; #converting f1 from Hz to MHz\n", + "f_1=math.ceil(f_1*10**5)/10**5; #rounding off to 5 decimals\n", + "p2=2; #for first overtone p=2\n", + "f2=(p2*x)/(2*t);\n", + "F2=f2/10**6;\n", + "F2=math.ceil(F2*10**5)/10**5; #rounding off to 5 decimals\n", + "f_2=f2*10**-6; #converting f2 from Hz to MHz\n", + "f_2=math.ceil(f_2*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"fundamental frequency in Hz is\",F1,\"*10**6\");\n", + "print(\"fundamental frequency in MHz is\",f_1);\n", + "print(\"frequency of the first overtone in Hz is\",F2,\"*10**6\");\n", + "print(\"frequency of the first overtone in MHz is\",f_2);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fundamental frequency in Hz is', 2.72999, '*10**6')\n('fundamental frequency in MHz is', 2.72999)\n('frequency of the first overtone in Hz is', 5.45998, '*10**6')\n('frequency of the first overtone in MHz is', 5.45998)\n" + "text": [ + "('fundamental frequency in Hz is', 2.72999, '*10**6')\n", + "('fundamental frequency in MHz is', 2.72999)\n", + "('frequency of the first overtone in Hz is', 5.45998, '*10**6')\n", + "('frequency of the first overtone in MHz is', 5.45998)\n" + ] } ], "prompt_number": 1 @@ -59,19 +123,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.3, Page number 29 " + "source": [ + "Example number 1.3, Page number 29 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the velocity of ultrasonic wave\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda=589.3*10**-9; #wavelength of light in m\nf=100*10**6; #frequency of ultrasonic transducer in Hz\nn=1; #order of diffraction\ntheta=2.25; #angle of diffraction in degrees\ntheta=theta*0.0174532925; #converting degrees to radians\n\n#Calculation\nd=(n*lamda)/(2*math.sin(theta));\nd1=d*10**6; #converting d from m to micro m\nlamda1=2*d;\nv=f*lamda1;\nv=math.ceil(v*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"wavelength of ultrasonic wave in m is\",lamda1);\nprint(\"velocity of ultrasonic wave in m/sec\",int(v));", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda=589.3*10**-9; #wavelength of light in m\n", + "f=100*10**6; #frequency of ultrasonic transducer in Hz\n", + "n=1; #order of diffraction\n", + "theta=2.25; #angle of diffraction in degrees\n", + "theta=theta*0.0174532925; #converting degrees to radians\n", + "\n", + "#Calculation\n", + "d=(n*lamda)/(2*math.sin(theta));\n", + "d1=d*10**6; #converting d from m to micro m\n", + "lamda1=2*d;\n", + "v=f*lamda1;\n", + "v=math.ceil(v*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"wavelength of ultrasonic wave in m is\",lamda1);\n", + "print(\"velocity of ultrasonic wave in m/sec\",int(v));" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('wavelength of ultrasonic wave in m is', 1.5010258944908707e-05)\n('velocity of ultrasonic wave in m/sec', 1501)\n" + "text": [ + "('wavelength of ultrasonic wave in m is', 1.5010258944908707e-05)\n", + "('velocity of ultrasonic wave in m/sec', 1501)\n" + ] } ], "prompt_number": 19 @@ -80,19 +171,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.4, Page number 29 " + "source": [ + "Example number 1.4, Page number 29 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Doppler shifted frequency\n\n#importing modules\nimport math\n\n#Variable declaration\nf=2*10**6; #frequency of transducer in MHz\nv=3; #speed of blood in m/s\nc=800; #velocity of ultrasonic wave in m/s\ntheta=30; #angle of inclination in degrees\ntheta=theta*0.0174532925; #converting degrees to radians\n\n#Calculation\ndeltaf=(2*f*v*math.cos(theta))/c;\ndeltaf=deltaf*10**-6; #converting deltaf from Hz to MHz\ndeltaf=math.ceil(deltaf*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"doppler shifted frequency in MHz is\",deltaf);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "f=2*10**6; #frequency of transducer in MHz\n", + "v=3; #speed of blood in m/s\n", + "c=800; #velocity of ultrasonic wave in m/s\n", + "theta=30; #angle of inclination in degrees\n", + "theta=theta*0.0174532925; #converting degrees to radians\n", + "\n", + "#Calculation\n", + "deltaf=(2*f*v*math.cos(theta))/c;\n", + "deltaf=deltaf*10**-6; #converting deltaf from Hz to MHz\n", + "deltaf=math.ceil(deltaf*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"doppler shifted frequency in MHz is\",deltaf);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('doppler shifted frequency in MHz is', 0.012991)\n" + "text": [ + "('doppler shifted frequency in MHz is', 0.012991)\n" + ] } ], "prompt_number": 20 @@ -101,19 +215,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.5, Page number 30 " + "source": [ + "Example number 1.5, Page number 30 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the velocity of ultrasonic wave\n\n#importing modules\nimport math\n\n#Variable declaration\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nv=math.sqrt(Y/rho);\nv=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"velocity of ultrasonic waves in m/s is\",v);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Y=7.9*10**10; #young's modulus of quartz in N/m^2\n", + "rho=2650; #density of quartz in kg/m^3\n", + "\n", + "#Calculation\n", + "v=math.sqrt(Y/rho);\n", + "v=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"velocity of ultrasonic waves in m/s is\",v);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('velocity of ultrasonic waves in m/s is', 5459.975)\n" + "text": [ + "('velocity of ultrasonic waves in m/s is', 5459.975)\n" + ] } ], "prompt_number": 21 @@ -121,7 +255,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_10.ipynb b/Engineering_Physics_Marikani/Chapter_10.ipynb index d1968a2f..cad8c3fc 100644 --- a/Engineering_Physics_Marikani/Chapter_10.ipynb +++ b/Engineering_Physics_Marikani/Chapter_10.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 10" + "name": "", + "signature": "sha256:e2ed8f14e9384f32112bf8b476c63d65b4316d749e72b2c8fa7bc92794bf7f8a" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,51 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Magnetic materials" + "source": [ + "Magnetic materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.1, Page number 305" + "source": [ + "Example number 10.1, Page number 305" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the intensity of magnetisation and flux density\n\n#importing modules\nimport math\n\n#Variable declaration\nH=10**6; #magnetic field strength in A/m\nchi=0.5*10**-5; #magnetic susceptibility\n\n#Calculation\nmew0=4*math.pi*10**-7;\nM=chi*H;\nB=mew0*(M+H);\nB=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"intensity of magnetisation in A/m is\",M);\nprint(\"flux density in Wb/m^2 is\",B);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "H=10**6; #magnetic field strength in A/m\n", + "chi=0.5*10**-5; #magnetic susceptibility\n", + "\n", + "#Calculation\n", + "mew0=4*math.pi*10**-7;\n", + "M=chi*H;\n", + "B=mew0*(M+H);\n", + "B=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"intensity of magnetisation in A/m is\",M);\n", + "print(\"flux density in Wb/m^2 is\",B);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intensity of magnetisation in A/m is', 5.0)\n('flux density in Wb/m^2 is', 1.257)\n" + "text": [ + "('intensity of magnetisation in A/m is', 5.0)\n", + "('flux density in Wb/m^2 is', 1.257)\n" + ] } ], "prompt_number": 1 @@ -38,19 +65,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.2, Page number 306" + "source": [ + "Example number 10.2, Page number 306" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetic moment\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**23; #avagadro number\nmew0=4*math.pi*10**-7;\nw=58.7; #atomic weight of Ni\nB=0.65; #saturation magnetic induction in Wb/m^2\nrho=8906; #density in kg/m^3\n\n#Calculation\nrho=rho*10**3; #converting into gm/m^3\nN=(rho*A)/w;\nmew_m=B/(N*mew0);\n#mew_m/(9.27*10^-24) gives mew_m in mewB\nmew_m=mew_m/(9.27*10**-24);\nmew_m=math.ceil(mew_m*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"magnetic moment of Ni is\",mew_m,\"mew_b\");\n#that is mew_m=0.61 mew_b", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**23; #avagadro number\n", + "mew0=4*math.pi*10**-7;\n", + "w=58.7; #atomic weight of Ni\n", + "B=0.65; #saturation magnetic induction in Wb/m^2\n", + "rho=8906; #density in kg/m^3\n", + "\n", + "#Calculation\n", + "rho=rho*10**3; #converting into gm/m^3\n", + "N=(rho*A)/w;\n", + "mew_m=B/(N*mew0);\n", + "#mew_m/(9.27*10^-24) gives mew_m in mewB\n", + "mew_m=mew_m/(9.27*10**-24);\n", + "mew_m=math.ceil(mew_m*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic moment of Ni is\",mew_m,\"mew_b\");\n", + "#that is mew_m=0.61 mew_b" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic moment of Ni is', 0.611, 'mew_b')\n" + "text": [ + "('magnetic moment of Ni is', 0.611, 'mew_b')\n" + ] } ], "prompt_number": 5 @@ -59,19 +113,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.3, Page number 306" + "source": [ + "Example number 10.3, Page number 306" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the permeability\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0=4*math.pi*10**-7;\nH=1800; #magnetic field in A/m\nphi=3*10**-5; #magnetic flux in Wb\nA=0.2; #area of cross section in cm^2\n\n#Calculation\nA=A*10**-4; #area in m^2\nB=phi/A;\nmew_r=B/(mew_0*H);\nmew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"permeability of material is\",mew_r);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0=4*math.pi*10**-7;\n", + "H=1800; #magnetic field in A/m\n", + "phi=3*10**-5; #magnetic flux in Wb\n", + "A=0.2; #area of cross section in cm^2\n", + "\n", + "#Calculation\n", + "A=A*10**-4; #area in m^2\n", + "B=phi/A;\n", + "mew_r=B/(mew_0*H);\n", + "mew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"permeability of material is\",mew_r);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('permeability of material is', 663.146)\n" + "text": [ + "('permeability of material is', 663.146)\n" + ] } ], "prompt_number": 6 @@ -80,19 +157,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.4, Page number 307" + "source": [ + "Example number 10.4, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the saturation magnetisation \n\n#importing modules\nimport math\n\n#Variable declaration\nmew=18.4; #magnetic moment in mew_b\na=0.835; #lattice parameter in nm\n\n#Calculation\nmew=mew*9.27*10**-24;\na=a*10**-9; #converting nm to m\nV=a**3;\nM=mew/V;\nM=M/10**5;\nM=math.ceil(M*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"saturation magnetisation in A/m is\",M,\"*10**5\");", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew=18.4; #magnetic moment in mew_b\n", + "a=0.835; #lattice parameter in nm\n", + "\n", + "#Calculation\n", + "mew=mew*9.27*10**-24;\n", + "a=a*10**-9; #converting nm to m\n", + "V=a**3;\n", + "M=mew/V;\n", + "M=M/10**5;\n", + "M=math.ceil(M*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"saturation magnetisation in A/m is\",M,\"*10**5\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('saturation magnetisation in A/m is', 2.9299, '*10**5')\n" + "text": [ + "('saturation magnetisation in A/m is', 2.9299, '*10**5')\n" + ] } ], "prompt_number": 8 @@ -101,19 +201,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.5, Page number 307" + "source": [ + "Example number 10.5, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the value of B and M\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0=4*math.pi*10**-7;\nH=2*10**5; #magnetic field strength in A/m\nmew_r=1.01; #relative permeability\n\n#Calculation\nB=mew_0*mew_r*H;\nB=math.ceil(B*10**5)/10**5; #rounding off to 3 decimals\nM=(B/mew_0)-H;\nM=math.ceil(M*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"magnetic flux density in Wb/m^2 is\",B);\nprint(\"magnetisation in A/m is\",M);\n\n#answer for magnetisation given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0=4*math.pi*10**-7;\n", + "H=2*10**5; #magnetic field strength in A/m\n", + "mew_r=1.01; #relative permeability\n", + "\n", + "#Calculation\n", + "B=mew_0*mew_r*H;\n", + "B=math.ceil(B*10**5)/10**5; #rounding off to 3 decimals\n", + "M=(B/mew_0)-H;\n", + "M=math.ceil(M*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic flux density in Wb/m^2 is\",B);\n", + "print(\"magnetisation in A/m is\",M);\n", + "\n", + "#answer for magnetisation given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic flux density in Wb/m^2 is', 0.25385)\n('magnetisation in A/m is', 2007.42)\n" + "text": [ + "('magnetic flux density in Wb/m^2 is', 0.25385)\n", + "('magnetisation in A/m is', 2007.42)\n" + ] } ], "prompt_number": 9 @@ -122,19 +249,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.6, Page number 307" + "source": [ + "Example number 10.6, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetic flux density\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0=4*math.pi*10**-7;\nH=500; #magnetic field strength in A/m\nchi=1.2; #susceptibility\n\n#Calculation\nM=chi*H;\nB=mew_0*(M+H);\nB=B*10**3;\nB=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"magnetic flux density in Wb/m^2 is\",B,\"*10**-3\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0=4*math.pi*10**-7;\n", + "H=500; #magnetic field strength in A/m\n", + "chi=1.2; #susceptibility\n", + "\n", + "#Calculation\n", + "M=chi*H;\n", + "B=mew_0*(M+H);\n", + "B=B*10**3;\n", + "B=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic flux density in Wb/m^2 is\",B,\"*10**-3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic flux density in Wb/m^2 is', 1.3824, '*10**-3')\n" + "text": [ + "('magnetic flux density in Wb/m^2 is', 1.3824, '*10**-3')\n" + ] } ], "prompt_number": 14 @@ -142,7 +292,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_11.ipynb b/Engineering_Physics_Marikani/Chapter_11.ipynb index 6e1a896d..781b51dc 100644 --- a/Engineering_Physics_Marikani/Chapter_11.ipynb +++ b/Engineering_Physics_Marikani/Chapter_11.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 11" + "name": "", + "signature": "sha256:6c9d1e462fb51d212d5e8b8f597a34ef40452b9332c91d54e15e6a4dccd85074" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,48 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Dielectric materials" + "source": [ + "Dielectric materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.1, Page number 335" + "source": [ + "Example number 11.1, Page number 335" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative dielectric constant\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nA=10*10*10**-6; #area of capacitor in m^2\nd=2*10**-3; #distance of seperation in m\nC=10**-9; #capacitance in F\n\n#Calculation\nepsilon_r=(C*d)/(epsilon_0*A);\nepsilon_r=math.ceil(epsilon_r*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"dielectric constant of material is\",epsilon_r);\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "A=10*10*10**-6; #area of capacitor in m^2\n", + "d=2*10**-3; #distance of seperation in m\n", + "C=10**-9; #capacitance in F\n", + "\n", + "#Calculation\n", + "epsilon_r=(C*d)/(epsilon_0*A);\n", + "epsilon_r=math.ceil(epsilon_r*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"dielectric constant of material is\",epsilon_r);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('dielectric constant of material is', 2258.87)\n" + "text": [ + "('dielectric constant of material is', 2258.87)\n" + ] } ], "prompt_number": 1 @@ -38,19 +62,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.2, Page number 335" + "source": [ + "Example number 11.2, Page number 335" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability of atoms\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nepsilon_r=1.0000684; #dielectric constant of He gas\nN=2.7*10**25; #concentration of dipoles per m^3\n\n#Calculation\n#alpha_e=P/(N*E) and P=epsilon_0(epsilon_r-1)*E\n#therefore alpha_e=epsilon_0(epsilon_r-1)/N\nalpha_e=(epsilon_0*(epsilon_r-1))/N;\n\n#Result\nprint(\"electronic polarizability of He gas in Fm^2 is\",alpha_e);\n", + "input": [ + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "epsilon_r=1.0000684; #dielectric constant of He gas\n", + "N=2.7*10**25; #concentration of dipoles per m^3\n", + "\n", + "#Calculation\n", + "#alpha_e=P/(N*E) and P=epsilon_0(epsilon_r-1)*E\n", + "#therefore alpha_e=epsilon_0(epsilon_r-1)/N\n", + "alpha_e=(epsilon_0*(epsilon_r-1))/N;\n", + "\n", + "#Result\n", + "print(\"electronic polarizability of He gas in Fm^2 is\",alpha_e);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electronic polarizability of He gas in Fm^2 is', 2.2430133333322991e-41)\n" + "text": [ + "('electronic polarizability of He gas in Fm^2 is', 2.2430133333322991e-41)\n" + ] } ], "prompt_number": 2 @@ -59,19 +101,35 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.3, Page number 336" + "source": [ + "Example number 11.3, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the polarisation\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nepsilon_r=6; #dielectric constant\nE=100; #electric field intensity in V/m\n\n#Calculation\nP=epsilon_0*(epsilon_r-1)*E;\n\n#Result\nprint(\"polarization in C/m^2 is\",P);\n", + "input": [ + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "epsilon_r=6; #dielectric constant\n", + "E=100; #electric field intensity in V/m\n", + "\n", + "#Calculation\n", + "P=epsilon_0*(epsilon_r-1)*E;\n", + "\n", + "#Result\n", + "print(\"polarization in C/m^2 is\",P);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('polarization in C/m^2 is', 4.426999999999999e-09)\n" + "text": [ + "('polarization in C/m^2 is', 4.426999999999999e-09)\n" + ] } ], "prompt_number": 3 @@ -80,19 +138,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.4, Page number 336" + "source": [ + "Example number 11.4, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability of Ne\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nR=0.158; #radius of Ne in nm\n\n#Calculation\nR=R*10**-9; #converting nm to m\nalpha_e=4*math.pi*epsilon_0*R**3;\n\n#Result\nprint(\"electronic polarizability in Fm^2 is\",alpha_e);\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "R=0.158; #radius of Ne in nm\n", + "\n", + "#Calculation\n", + "R=R*10**-9; #converting nm to m\n", + "alpha_e=4*math.pi*epsilon_0*R**3;\n", + "\n", + "#Result\n", + "print(\"electronic polarizability in Fm^2 is\",alpha_e);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electronic polarizability in Fm^2 is', 4.3885458748002144e-40)\n" + "text": [ + "('electronic polarizability in Fm^2 is', 4.3885458748002144e-40)\n" + ] } ], "prompt_number": 5 @@ -101,19 +178,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.5, Page number 336" + "source": [ + "Example number 11.5, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the area of metal sheet\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nC=0.02; #capacitance in micro farad\nepsilon_r=6; #dielectric constant\nt=0.002; #thickness of mica in cm\nd=0.002; #thickness of metal sheet in cm\n\n#Calculation\nC=C*10**-6; #converting micro farad to farad\nd=d*10**-2; #converting cm to m\nA=(C*d)/(epsilon_0*epsilon_r);\nA=A*10**3;\nA=math.ceil(A*10**4)/10**4; #rounding off to 4 decimals\nA1=A*10; #converting m**2 to cm**2\nA1=math.ceil(A1*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"area of metal sheet in m^2 is\",A,\"*10**-3\");\nprint(\"area of metal sheet in cm^2 is\",A1);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "C=0.02; #capacitance in micro farad\n", + "epsilon_r=6; #dielectric constant\n", + "t=0.002; #thickness of mica in cm\n", + "d=0.002; #thickness of metal sheet in cm\n", + "\n", + "#Calculation\n", + "C=C*10**-6; #converting micro farad to farad\n", + "d=d*10**-2; #converting cm to m\n", + "A=(C*d)/(epsilon_0*epsilon_r);\n", + "A=A*10**3;\n", + "A=math.ceil(A*10**4)/10**4; #rounding off to 4 decimals\n", + "A1=A*10; #converting m**2 to cm**2\n", + "A1=math.ceil(A1*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"area of metal sheet in m^2 is\",A,\"*10**-3\");\n", + "print(\"area of metal sheet in cm^2 is\",A1);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('area of metal sheet in m^2 is', 7.5296, '*10**-3')\n('area of metal sheet in cm^2 is', 75.296)\n" + "text": [ + "('area of metal sheet in m^2 is', 7.5296, '*10**-3')\n", + "('area of metal sheet in cm^2 is', 75.296)\n" + ] } ], "prompt_number": 9 @@ -122,19 +229,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.6, Page number 336" + "source": [ + "Example number 11.6, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative permitivity of the crystal\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nE=1000; #electric field in V/m\nP=4.3*10**-8; #polarization in C/m^2\n\n#Calculation\nepsilon_r=(P/(E*epsilon_0)+1);\nepsilon_r=math.ceil(epsilon_r*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"dielectric constant is\",epsilon_r);\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "E=1000; #electric field in V/m\n", + "P=4.3*10**-8; #polarization in C/m^2\n", + "\n", + "#Calculation\n", + "epsilon_r=(P/(E*epsilon_0)+1);\n", + "epsilon_r=math.ceil(epsilon_r*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"dielectric constant is\",epsilon_r);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('dielectric constant is', 5.8566)\n" + "text": [ + "('dielectric constant is', 5.8566)\n" + ] } ], "prompt_number": 10 @@ -143,19 +270,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.7, Page number 337" + "source": [ + "Example number 11.7, Page number 337" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the polarisability of the material\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nchi=4.94; #relative susceptibility\nN=10**28; #number of dipoles per m^3\n\n#Calculation\n#polarisation P=N*alpha*E and P=epsilon_0*chi*E. equate the two equations\n#epsilon_0*chi*E=N*alpha*E\nalpha=(epsilon_0*chi)/N;\n\n#Result\nprint(\"polarisability of material in F/m^2 is\",alpha);\n", + "input": [ + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "chi=4.94; #relative susceptibility\n", + "N=10**28; #number of dipoles per m^3\n", + "\n", + "#Calculation\n", + "#polarisation P=N*alpha*E and P=epsilon_0*chi*E. equate the two equations\n", + "#epsilon_0*chi*E=N*alpha*E\n", + "alpha=(epsilon_0*chi)/N;\n", + "\n", + "#Result\n", + "print(\"polarisability of material in F/m^2 is\",alpha);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('polarisability of material in F/m^2 is', 4.373876e-39)\n" + "text": [ + "('polarisability of material in F/m^2 is', 4.373876e-39)\n" + ] } ], "prompt_number": 11 @@ -163,7 +308,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_12.ipynb b/Engineering_Physics_Marikani/Chapter_12.ipynb index 5d0b74d0..dba2b7b8 100644 --- a/Engineering_Physics_Marikani/Chapter_12.ipynb +++ b/Engineering_Physics_Marikani/Chapter_12.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 12" + "name": "", + "signature": "sha256:40ea4bb009666aeba2b07d31c3573a833c155d9ac8e902b20b5967865ae89dbb" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,48 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Superconducting Materials" + "source": [ + "Superconducting Materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.1, Page number 356" + "source": [ + "Example number 12.1, Page number 356" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical field\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=3.7; #critical temperature in K\nH0=0.0306; #magnetic field in T\nT=2; #temperature in K\n\n#Calculation\nHc=H0*(1-(T**2/Tc**2));\nHc=math.ceil(Hc*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"critical field in T is\",Hc);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=3.7; #critical temperature in K\n", + "H0=0.0306; #magnetic field in T\n", + "T=2; #temperature in K\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T**2/Tc**2));\n", + "Hc=math.ceil(Hc*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"critical field in T is\",Hc);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical field in T is', 0.02166)\n" + "text": [ + "('critical field in T is', 0.02166)\n" + ] } ], "prompt_number": 1 @@ -38,19 +62,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.2, Page number 356" + "source": [ + "Example number 12.2, Page number 356" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical field\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=7.26; #critical temperature in K\nH0=6.4*10**3; #magnetic field in T\nT=5; #temperature in K\n\n#Calculation\nHc=H0*(1-(T**2/Tc**2));\nHc=math.ceil(Hc*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"critical field in T is\",Hc);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=7.26; #critical temperature in K\n", + "H0=6.4*10**3; #magnetic field in T\n", + "T=5; #temperature in K\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T**2/Tc**2));\n", + "Hc=math.ceil(Hc*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"critical field in T is\",Hc);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical field in T is', 3364.385)\n" + "text": [ + "('critical field in T is', 3364.385)\n" + ] } ], "prompt_number": 2 @@ -59,19 +104,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.3, Page number 357" + "source": [ + "Example number 12.3, Page number 357" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the value of Tc\n\n#importing modules\nimport math\n\n#Variable declaration\nTc1=4.185; #critical temperature in K\nM1=199.5; #atomic mass\nM2=203.4; #atomic mass after changing\n\n#Calculation\n#according to maxwell equation Tc*M^0.5=constant\n#Tc1*M1^0.5=Tc2*M2^0.5\nTc2=(Tc1*M1**0.5)/M2**0.5;\nTc2=math.ceil(Tc2*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"critical temperature of Hg in K is\",Tc2);\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc1=4.185; #critical temperature in K\n", + "M1=199.5; #atomic mass\n", + "M2=203.4; #atomic mass after changing\n", + "\n", + "#Calculation\n", + "#according to maxwell equation Tc*M^0.5=constant\n", + "#Tc1*M1^0.5=Tc2*M2^0.5\n", + "Tc2=(Tc1*M1**0.5)/M2**0.5;\n", + "Tc2=math.ceil(Tc2*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"critical temperature of Hg in K is\",Tc2);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical temperature of Hg in K is', 4.144685)\n" + "text": [ + "('critical temperature of Hg in K is', 4.144685)\n" + ] } ], "prompt_number": 3 @@ -80,19 +147,54 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.4, Page number 357" + "source": [ + "Example number 12.4, Page number 357" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical current density\n\n#importing modules\nimport math\n\n#Variable declaration\nd=1; #diameter of wire in mm\nT=4.2; #temperature in K\nTc=7.18; #critical temperature in K\nH0=6.5*10**4; #magnetic field\n\n#Calculation\nd=d*10**-3; #diameter in m\nR=d/2;\nHc=H0*(1-(T**2/Tc**2));\nHC=Hc/10**4;\nHC=math.ceil(HC*10**3)/10**3; #rounding off to 2 decimals\nIc=2*math.pi*R*Hc;\nIc=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\nA=math.pi*R**2;\nJ=Ic/A;\nJ=J/10**8;\nJ=math.ceil(J*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"critical magnetic field at 4.2K in A/m is\",HC,\"*10**4\");\nprint(\"critical current in A is\",Ic);\nprint(\"critical current density in A/m^2 is\",J,\"*10**8\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "d=1; #diameter of wire in mm\n", + "T=4.2; #temperature in K\n", + "Tc=7.18; #critical temperature in K\n", + "H0=6.5*10**4; #magnetic field\n", + "\n", + "#Calculation\n", + "d=d*10**-3; #diameter in m\n", + "R=d/2;\n", + "Hc=H0*(1-(T**2/Tc**2));\n", + "HC=Hc/10**4;\n", + "HC=math.ceil(HC*10**3)/10**3; #rounding off to 2 decimals\n", + "Ic=2*math.pi*R*Hc;\n", + "Ic=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\n", + "A=math.pi*R**2;\n", + "J=Ic/A;\n", + "J=J/10**8;\n", + "J=math.ceil(J*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"critical magnetic field at 4.2K in A/m is\",HC,\"*10**4\");\n", + "print(\"critical current in A is\",Ic);\n", + "print(\"critical current density in A/m^2 is\",J,\"*10**8\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical magnetic field at 4.2K in A/m is', 4.276, '*10**4')\n('critical current in A is', 134.33)\n('critical current density in A/m^2 is', 1.71035, '*10**8')\n" + "text": [ + "('critical magnetic field at 4.2K in A/m is', 4.276, '*10**4')\n", + "('critical current in A is', 134.33)\n", + "('critical current density in A/m^2 is', 1.71035, '*10**8')\n" + ] } ], "prompt_number": 15 @@ -101,19 +203,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.5, Page number 358" + "source": [ + "Example number 12.5, Page number 358" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the frequency of radiation\n\n#importing modules\nimport math\n\n#Variable declaration\ne=1.6*10**-19;\nh=6.626*10**-34;\nV=6; #voltage applied in micro volts\n\n#Calculation\nV=V*10**-6; #converting micro volts to volts\nnew=(2*e*V)/h;\nnew=new/10**9;\nnew=math.ceil(new*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"frequency of ac signal in Hz is\",new,\"*10**9\");", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19;\n", + "h=6.626*10**-34;\n", + "V=6; #voltage applied in micro volts\n", + "\n", + "#Calculation\n", + "V=V*10**-6; #converting micro volts to volts\n", + "new=(2*e*V)/h;\n", + "new=new/10**9;\n", + "new=math.ceil(new*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"frequency of ac signal in Hz is\",new,\"*10**9\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('frequency of ac signal in Hz is', 2.8977, '*10**9')\n" + "text": [ + "('frequency of ac signal in Hz is', 2.8977, '*10**9')\n" + ] } ], "prompt_number": 16 @@ -122,19 +246,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.6, Page number 358" + "source": [ + "Example number 12.6, Page number 358" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap\n\n#importing modules\nimport math\n\n#Variable declaration\nKb=1.38*10**-23;\nTc=7.19; #critical temperature in K\n\n#Calculation\nEg=3.5*Kb*Tc;\nEg=Eg/(1.6*10**-19); #converting J to eV\nEg=Eg*10**3; #converting eV into milli eV\nEg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"band gap of superconducting lead in meV is\",Eg);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Kb=1.38*10**-23;\n", + "Tc=7.19; #critical temperature in K\n", + "\n", + "#Calculation\n", + "Eg=3.5*Kb*Tc;\n", + "Eg=Eg/(1.6*10**-19); #converting J to eV\n", + "Eg=Eg*10**3; #converting eV into milli eV\n", + "Eg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of superconducting lead in meV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of superconducting lead in meV is', 2.171)\n" + "text": [ + "('band gap of superconducting lead in meV is', 2.171)\n" + ] } ], "prompt_number": 17 @@ -142,7 +288,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_2.ipynb b/Engineering_Physics_Marikani/Chapter_2.ipynb index f57dc5cb..b54dc631 100644 --- a/Engineering_Physics_Marikani/Chapter_2.ipynb +++ b/Engineering_Physics_Marikani/Chapter_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 2" + "name": "", + "signature": "sha256:86128ebcddc1aace30166722ef06d4489b2c11f53b2c59c5d439d37f83881533" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,54 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Laser" + "source": [ + "Laser" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.1, Page number 59 " + "source": [ + "Example number 2.1, Page number 59 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of photons emitted by laser\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nlamda=632.8*10**-9; #wavelength in m\nP=5*10**-3; #output power in W\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\nN=P/E; #number of photons emitted\n\n\n#Result\nprint(\"energy of one photon in eV is\",E_eV);\nprint(\"number of photons emitted per second is\",N);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "lamda=632.8*10**-9; #wavelength in m\n", + "P=5*10**-3; #output power in W\n", + "\n", + "#Calculation\n", + "E=(h*c)/lamda; #energy of one photon\n", + "E_eV=E/(1.6*10**-19); #converting J to eV\n", + "E_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n", + "N=P/E; #number of photons emitted\n", + "\n", + "\n", + "#Result\n", + "print(\"energy of one photon in eV is\",E_eV);\n", + "print(\"number of photons emitted per second is\",N);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of one photon in eV is', 1.964)\n('number of photons emitted per second is', 1.5917094275077976e+16)\n" + "text": [ + "('energy of one photon in eV is', 1.964)\n", + "('number of photons emitted per second is', 1.5917094275077976e+16)\n" + ] } ], "prompt_number": 1 @@ -38,19 +68,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.2, Page number 60" + "source": [ + "Example number 2.2, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy of emitted photons\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nlamda=632.8*10**-9; #wavelength in m\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n\n#Result\nprint(\"energy of one photon in eV is\",E_eV);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "lamda=632.8*10**-9; #wavelength in m\n", + "\n", + "#Calculation\n", + "E=(h*c)/lamda; #energy of one photon\n", + "E_eV=E/(1.6*10**-19); #converting J to eV\n", + "E_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"energy of one photon in eV is\",E_eV);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of one photon in eV is', 1.964)\n" + "text": [ + "('energy of one photon in eV is', 1.964)\n" + ] } ], "prompt_number": 2 @@ -59,19 +111,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.3, Page number 60" + "source": [ + "Example number 2.3, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the value of E3\n\n#importing modules\nimport math\n\n#Variable declaration\nE1=0; #value of 1st energy level in eV\nE2=1.4; #value of 2nd energy level in eV\nlamda=1.15*10**-6;\nh=6.626*10**-34;\nc=3*10**8;\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE3=E2+E_eV;\nE3=math.ceil(E3*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"value of E3 in eV is\",E3);\n\n#answer given in the book for E3 is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E1=0; #value of 1st energy level in eV\n", + "E2=1.4; #value of 2nd energy level in eV\n", + "lamda=1.15*10**-6;\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "\n", + "#Calculation\n", + "E=(h*c)/lamda; #energy of one photon\n", + "E_eV=E/(1.6*10**-19); #converting J to eV\n", + "E3=E2+E_eV;\n", + "E3=math.ceil(E3*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"value of E3 in eV is\",E3);\n", + "\n", + "#answer given in the book for E3 is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('value of E3 in eV is', 2.49)\n" + "text": [ + "('value of E3 in eV is', 2.49)\n" + ] } ], "prompt_number": 3 @@ -80,19 +159,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.4, Page number 60" + "source": [ + "Example number 2.4, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of laser beam\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nE2=3.2; #value of higher energy level in eV\nE1=1.6; #value of lower energy level in eV\n\n#Calculation\nE=E2-E1; #energy difference in eV\nE_J=E*1.6*10**-19; #converting E from eV to J\nlamda=(h*c)/E_J; #wavelength of photon\n\n#Result\nprint(\"energy difference in eV\",E);\nprint(\"wavelength of photon in m\",lamda);\n", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "E2=3.2; #value of higher energy level in eV\n", + "E1=1.6; #value of lower energy level in eV\n", + "\n", + "#Calculation\n", + "E=E2-E1; #energy difference in eV\n", + "E_J=E*1.6*10**-19; #converting E from eV to J\n", + "lamda=(h*c)/E_J; #wavelength of photon\n", + "\n", + "#Result\n", + "print(\"energy difference in eV\",E);\n", + "print(\"wavelength of photon in m\",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy difference in eV', 1.6)\n('wavelength of photon in m', 7.76484375e-07)\n" + "text": [ + "('energy difference in eV', 1.6)\n", + "('wavelength of photon in m', 7.76484375e-07)\n" + ] } ], "prompt_number": 6 @@ -101,19 +202,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.5, Page number 60" + "source": [ + "Example number 2.5, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of laser beam\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nE=1.42*1.6*10**-19; #band gap of GaAs in J\n\n#Calculation\nlamda=(h*c)/E; #wavelength of laser\n\n#Result\nprint(\"wavelength of laser emitted by GaAs in m\",lamda);\n", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "E=1.42*1.6*10**-19; #band gap of GaAs in J\n", + "\n", + "#Calculation\n", + "lamda=(h*c)/E; #wavelength of laser\n", + "\n", + "#Result\n", + "print(\"wavelength of laser emitted by GaAs in m\",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)\n" + "text": [ + "('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)\n" + ] } ], "prompt_number": 8 @@ -122,19 +240,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.6, Page number 61" + "source": [ + "Example number 2.6, Page number 61" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative population of energy levels\n\n#importing modules\nimport math\n\n#Variable declaration\nT=300; #temperature in K\nlamda=500*10**-9; #wavelength in m\nh=6.626*10**-34;\nc=3*10**8;\nk=1.38*10**-23;\n\n#Calculation\n#from maxwell and boltzmann law, relative population is given by\n#N1/N2=exp(-E1/kT)/exp(-E2/kT)\n#hence N1/N2=exp(-(E1-E2)/kT)=exp((h*new)/(k*T));\n#new=c/lambda\nR=(h*c)/(lamda*k*T);\nRP=math.exp(R);\n\n#Result\nprint(\"relative population between N1 and N2 is\",RP);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=300; #temperature in K\n", + "lamda=500*10**-9; #wavelength in m\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "#from maxwell and boltzmann law, relative population is given by\n", + "#N1/N2=exp(-E1/kT)/exp(-E2/kT)\n", + "#hence N1/N2=exp(-(E1-E2)/kT)=exp((h*new)/(k*T));\n", + "#new=c/lambda\n", + "R=(h*c)/(lamda*k*T);\n", + "RP=math.exp(R);\n", + "\n", + "#Result\n", + "print(\"relative population between N1 and N2 is\",RP);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('relative population between N1 and N2 is', 5.068255595981255e+41)\n" + "text": [ + "('relative population between N1 and N2 is', 5.068255595981255e+41)\n" + ] } ], "prompt_number": 9 @@ -143,19 +288,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.7, Page number 61" + "source": [ + "Example number 2.7, Page number 61" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To examine the possibility of stimulated emission\n\n#importing modules\nimport math\n\n#Variable declaration\nT=300; #temperature in K\nh=6.626*10**-34;\nc=3*10**8;\nk=1.38*10**-23;\nlamda=600*10**-9; #wavelength in m\n\n#Calculation\nR=(h*c)/(lamda*k*T);\nRs=1/(math.exp(R)-1);\n\n#Result\nprint(\"the ratio between stimulated emission to spontaneous emission is\",Rs);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=300; #temperature in K\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "k=1.38*10**-23;\n", + "lamda=600*10**-9; #wavelength in m\n", + "\n", + "#Calculation\n", + "R=(h*c)/(lamda*k*T);\n", + "Rs=1/(math.exp(R)-1);\n", + "\n", + "#Result\n", + "print(\"the ratio between stimulated emission to spontaneous emission is\",Rs);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)\n" + "text": [ + "('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)\n" + ] } ], "prompt_number": 11 @@ -164,19 +332,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.8, Page number 62" + "source": [ + "Example number 2.8, Page number 62" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the efficiency of a He-Ne laser\n\n#importing modules\nimport math\n\n#Variable declaration\nP=5*10**-3; #output power in W\nI=10*10**-3; #current in A\nV=3*10**3; #voltage in V\n\n#Calculation\ne=(P*100)/(I*V);\ne=math.ceil(e*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"efficiency of laser in % is\",e);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "P=5*10**-3; #output power in W\n", + "I=10*10**-3; #current in A\n", + "V=3*10**3; #voltage in V\n", + "\n", + "#Calculation\n", + "e=(P*100)/(I*V);\n", + "e=math.ceil(e*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"efficiency of laser in % is\",e);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('efficiency of laser in % is', 0.016667)\n" + "text": [ + "('efficiency of laser in % is', 0.016667)\n" + ] } ], "prompt_number": 14 @@ -185,19 +374,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.9, Page number 62" + "source": [ + "Example number 2.9, Page number 62" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the intensity of laser beam\n\n#importing modules\nimport math\n\n#Variable declaration\nP=1e-03; #output power in W\nd=1e-06; #diameter in m\n\n#Calculation\nr=d/2; #radius in m\nI=P/(math.pi*r**2); #intensity\nI=I/10**9;\nI=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intensity of laser in W/m^2 is\",I,\"*10**9\");", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "P=1e-03; #output power in W\n", + "d=1e-06; #diameter in m\n", + "\n", + "#Calculation\n", + "r=d/2; #radius in m\n", + "I=P/(math.pi*r**2); #intensity\n", + "I=I/10**9;\n", + "I=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"intensity of laser in W/m^2 is\",I,\"*10**9\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intensity of laser in W/m^2 is', 1.2733, '*10**9')\n" + "text": [ + "('intensity of laser in W/m^2 is', 1.2733, '*10**9')\n" + ] } ], "prompt_number": 1 @@ -206,19 +416,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.10, Page number 62" + "source": [ + "Example number 2.10, Page number 62" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angular speed and divergence of laser beam\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda=632.8*10**-9; #wavelength in m\nD=5; #distance in m\nd=1*10**-3; #diameter in m\n\n#Calculation\ndeltatheta=lamda/d; #angular speed\ndelta_theta=deltatheta*10**4;\nr=D*deltatheta;\nr1=r*10**3; #converting r from m to mm\nA=math.pi*r**2; #area of the spread\n\n#Result \nprint(\"angular speed in radian is\",delta_theta,\"*10**-4\");\nprint(\"radius of the spread in mm is\",r1);\nprint(\"area of the spread in m^2 is\",A);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda=632.8*10**-9; #wavelength in m\n", + "D=5; #distance in m\n", + "d=1*10**-3; #diameter in m\n", + "\n", + "#Calculation\n", + "deltatheta=lamda/d; #angular speed\n", + "delta_theta=deltatheta*10**4;\n", + "r=D*deltatheta;\n", + "r1=r*10**3; #converting r from m to mm\n", + "A=math.pi*r**2; #area of the spread\n", + "\n", + "#Result \n", + "print(\"angular speed in radian is\",delta_theta,\"*10**-4\");\n", + "print(\"radius of the spread in mm is\",r1);\n", + "print(\"area of the spread in m^2 is\",A);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('angular speed in radian is', 6.328, '*10**-4')\n('radius of the spread in mm is', 3.164)\n('area of the spread in m^2 is', 3.1450157329451454e-05)\n" + "text": [ + "('angular speed in radian is', 6.328, '*10**-4')\n", + "('radius of the spread in mm is', 3.164)\n", + "('area of the spread in m^2 is', 3.1450157329451454e-05)\n" + ] } ], "prompt_number": 2 @@ -226,7 +464,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_3.ipynb b/Engineering_Physics_Marikani/Chapter_3.ipynb index 59daaddd..7496a57a 100644 --- a/Engineering_Physics_Marikani/Chapter_3.ipynb +++ b/Engineering_Physics_Marikani/Chapter_3.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 3" + "name": "", + "signature": "sha256:3f2462cfb429298e26fc6bf563d665947cd211731889b95d7dd1a2db3452c286" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,47 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Fibre Optics" + "source": [ + "Fibre Optics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.1, Page number 98 " + "source": [ + "Example number 3.1, Page number 98 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture of an optical fibre\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1.6; #refractive index of core\nn2=1.5; #refractive index of cladding\n\n#Calculation\nNA=math.sqrt((n1**2)-(n2**2));\nNA=math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"the numerical aperture of the fibre is\",NA);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1.6; #refractive index of core\n", + "n2=1.5; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA=math.sqrt((n1**2)-(n2**2));\n", + "NA=math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"the numerical aperture of the fibre is\",NA);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the numerical aperture of the fibre is', 0.5568)\n" + "text": [ + "('the numerical aperture of the fibre is', 0.5568)\n" + ] } ], "prompt_number": 4 @@ -38,19 +61,54 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.2, Page number 98 " + "source": [ + "Example number 3.2, Page number 98 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture and acceptance angle of a fibre\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1.54; #refractive index of core\nn2=1.5; #refractive index of cladding\nn0=1;\n\n#Calculation\nNA=math.sqrt((n1**2)-(n2**2)); #numerical aperture of fibre\nNA=math.ceil(NA*10**5)/10**5; #rounding off to 5 decimals\nalpha=math.asin(NA/n0); #acceptance angle in radians\nalpha=alpha*57.2957795; #converting radians to degrees\nalpha=math.ceil(alpha*10**5)/10**5; #rounding off to 5 decimals\ndeg=int(alpha); #converting to degrees\nt=60*(alpha-deg); \nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"the numerical aperture of the fibre is\",NA);\nprint(\"the acceptance angle of the fibre in degrees is\",alpha);\nprint(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n\n#answer for the angle given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1.54; #refractive index of core\n", + "n2=1.5; #refractive index of cladding\n", + "n0=1;\n", + "\n", + "#Calculation\n", + "NA=math.sqrt((n1**2)-(n2**2)); #numerical aperture of fibre\n", + "NA=math.ceil(NA*10**5)/10**5; #rounding off to 5 decimals\n", + "alpha=math.asin(NA/n0); #acceptance angle in radians\n", + "alpha=alpha*57.2957795; #converting radians to degrees\n", + "alpha=math.ceil(alpha*10**5)/10**5; #rounding off to 5 decimals\n", + "deg=int(alpha); #converting to degrees\n", + "t=60*(alpha-deg); \n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"the numerical aperture of the fibre is\",NA);\n", + "print(\"the acceptance angle of the fibre in degrees is\",alpha);\n", + "print(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n", + "\n", + "#answer for the angle given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the numerical aperture of the fibre is', 0.34872)\n('the acceptance angle of the fibre in degrees is', 20.40905)\n('acceptance angle of the fibre is', 20, 'degrees', 24, 'minutes', 32.581, 'seconds')\n" + "text": [ + "('the numerical aperture of the fibre is', 0.34872)\n", + "('the acceptance angle of the fibre in degrees is', 20.40905)\n", + "('acceptance angle of the fibre is', 20, 'degrees', 24, 'minutes', 32.581, 'seconds')\n" + ] } ], "prompt_number": 7 @@ -59,19 +117,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.3, Page number 99" + "source": [ + "Example number 3.3, Page number 99" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical angle\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1.6; #refractive index of core\nn2=1.49; #refractive index of cladding\n\n#Calculation\nthetac=math.asin(n2/n1); #critical angle in radians\nthetac=thetac*57.2957795; #converting radians to degrees\ntheta_c=math.ceil(thetac*10**3)/10**3; #rounding off to 3 decimals\ndeg=int(thetac); #converting to degrees\nt=60*(thetac-deg); \nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical angle of the fibre in degrees is\",theta_c);\nprint(\"critical angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1.6; #refractive index of core\n", + "n2=1.49; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "thetac=math.asin(n2/n1); #critical angle in radians\n", + "thetac=thetac*57.2957795; #converting radians to degrees\n", + "theta_c=math.ceil(thetac*10**3)/10**3; #rounding off to 3 decimals\n", + "deg=int(thetac); #converting to degrees\n", + "t=60*(thetac-deg); \n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical angle of the fibre in degrees is\",theta_c);\n", + "print(\"critical angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical angle of the fibre in degrees is', 68.631)\n('critical angle of the fibre is', 68, 'degrees', 37, 'minutes', 49.85, 'seconds')\n" + "text": [ + "('the critical angle of the fibre in degrees is', 68.631)\n", + "('critical angle of the fibre is', 68, 'degrees', 37, 'minutes', 49.85, 'seconds')\n" + ] } ], "prompt_number": 10 @@ -80,19 +166,54 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.4, Page number 99" + "source": [ + "Example number 3.4, Page number 99" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the acceptance angle of a fibre\n\n#importing modules\nimport math\n\n#Variable declaration\nNA=0.15; #numerical aperture\nn2=1.55; #refractive index of cladding\nn0=1.33; #refractive index of water\n\n#Calculation\nn1=math.sqrt((NA**2)+(n2**2)); #refractive index\nn_1=math.ceil(n1*10**5)/10**5; #rounding off to 5 decimals\nalpha=math.asin(math.sqrt(n1**2-n2**2)/n0); #acceptance angle in radians\nalpha=alpha*57.2957795; #converting radians to degrees\nalphaa=math.ceil(alpha*10**3)/10**3; #rounding off to 3 decimals\ndeg=int(alpha); #converting to degrees\nt=60*(alpha-deg); \nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"refractive index of the core is\",n_1);\nprint(\"the acceptance angle of the fibre in degrees is\",alphaa);\nprint(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n\n#answer for acceptance angle given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA=0.15; #numerical aperture\n", + "n2=1.55; #refractive index of cladding\n", + "n0=1.33; #refractive index of water\n", + "\n", + "#Calculation\n", + "n1=math.sqrt((NA**2)+(n2**2)); #refractive index\n", + "n_1=math.ceil(n1*10**5)/10**5; #rounding off to 5 decimals\n", + "alpha=math.asin(math.sqrt(n1**2-n2**2)/n0); #acceptance angle in radians\n", + "alpha=alpha*57.2957795; #converting radians to degrees\n", + "alphaa=math.ceil(alpha*10**3)/10**3; #rounding off to 3 decimals\n", + "deg=int(alpha); #converting to degrees\n", + "t=60*(alpha-deg); \n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"refractive index of the core is\",n_1);\n", + "print(\"the acceptance angle of the fibre in degrees is\",alphaa);\n", + "print(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n", + "\n", + "#answer for acceptance angle given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('refractive index of the core is', 1.55725)\n('the acceptance angle of the fibre in degrees is', 6.476)\n('acceptance angle of the fibre is', 6, 'degrees', 28, 'minutes', 32.55, 'seconds')\n" + "text": [ + "('refractive index of the core is', 1.55725)\n", + "('the acceptance angle of the fibre in degrees is', 6.476)\n", + "('acceptance angle of the fibre is', 6, 'degrees', 28, 'minutes', 32.55, 'seconds')\n" + ] } ], "prompt_number": 13 @@ -101,19 +222,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.5, Page number 100" + "source": [ + "Example number 3.5, Page number 100" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the refractive index of cladding\n\n#importing modules\nimport math\n\n#Variable declaration\nNA=0.26; #numerical aperture\nn1=1.5; #refractive index of core\nd=100; #core diameter in micro meter\n\n#Calculation\nd=100*(10**-6); #core diameter in metre\nn2=math.sqrt((n1**2)-(NA**2));\nn2=math.ceil(n2*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"refractive index of the cladding is\",n2);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA=0.26; #numerical aperture\n", + "n1=1.5; #refractive index of core\n", + "d=100; #core diameter in micro meter\n", + "\n", + "#Calculation\n", + "d=100*(10**-6); #core diameter in metre\n", + "n2=math.sqrt((n1**2)-(NA**2));\n", + "n2=math.ceil(n2*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"refractive index of the cladding is\",n2);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('refractive index of the cladding is', 1.4773)\n" + "text": [ + "('refractive index of the cladding is', 1.4773)\n" + ] } ], "prompt_number": 16 @@ -122,19 +265,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.6, Page number 100" + "source": [ + "Example number 3.6, Page number 100" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the refractive indices of core and cladding\n\n#importing modules\nimport math\n\n#Variable declaration\nNA=0.26; #numerical aperture\ndelta=0.015; #refractive index difference\n\n#Calculation\n#NA=math.sqrt(n1**2-n2**2)\n#let A=n1**2-n2**2\n#therefore A=NA**2\nA=NA**2;\n#delta=(n1**2-n2**2)/2*(n1**2)\n#let 2*(n1**2) be B\n#therefore B=A/delta\nB=A/delta;\nn1=math.sqrt(B/2);\nn1=math.ceil(n1*100)/100; #rounding off to 2 decimals\nn2=math.sqrt(n1**2-NA**2);\nn2=math.ceil(n2*10**3)/10**3; #rounding off to 4 decimals\n\n#Result\nprint(\"refractive index of the core is\",n1);\nprint(\"refractive index of the cladding is\",n2);\n\n#answer for refractive index of cladding given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA=0.26; #numerical aperture\n", + "delta=0.015; #refractive index difference\n", + "\n", + "#Calculation\n", + "#NA=math.sqrt(n1**2-n2**2)\n", + "#let A=n1**2-n2**2\n", + "#therefore A=NA**2\n", + "A=NA**2;\n", + "#delta=(n1**2-n2**2)/2*(n1**2)\n", + "#let 2*(n1**2) be B\n", + "#therefore B=A/delta\n", + "B=A/delta;\n", + "n1=math.sqrt(B/2);\n", + "n1=math.ceil(n1*100)/100; #rounding off to 2 decimals\n", + "n2=math.sqrt(n1**2-NA**2);\n", + "n2=math.ceil(n2*10**3)/10**3; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"refractive index of the core is\",n1);\n", + "print(\"refractive index of the cladding is\",n2);\n", + "\n", + "#answer for refractive index of cladding given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('refractive index of the core is', 1.51)\n('refractive index of the cladding is', 1.488)\n" + "text": [ + "('refractive index of the core is', 1.51)\n", + "('refractive index of the cladding is', 1.488)\n" + ] } ], "prompt_number": 19 @@ -142,7 +319,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_4.ipynb b/Engineering_Physics_Marikani/Chapter_4.ipynb index 02198aef..d2b8123c 100644 --- a/Engineering_Physics_Marikani/Chapter_4.ipynb +++ b/Engineering_Physics_Marikani/Chapter_4.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 4" + "name": "", + "signature": "sha256:e581747b76e15afc0096179446c0fbd68c3566f21f4931be3d8fc722fc1225b8" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Quantum Physics" + "source": [ + "Quantum Physics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.1, Page number 133 " + "source": [ + "Example number 4.1, Page number 133 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the change in wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.63*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nphi=135; #angle of scattering in degrees\nphi=phi*0.0174532925 #converting degrees to radians \n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n\n#Result\nprint(\"change in wavelength in metres is\",delta_lamda);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "phi=135; #angle of scattering in degrees\n", + "phi=phi*0.0174532925 #converting degrees to radians \n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "\n", + "#Result\n", + "print(\"change in wavelength in metres is\",delta_lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('change in wavelength in metres is', 4.1458307496867315e-12)\n" + "text": [ + "('change in wavelength in metres is', 4.1458307496867315e-12)\n" + ] } ], "prompt_number": 6 @@ -38,19 +63,65 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.2, Page number 134 " + "source": [ + "Example number 4.2, Page number 134 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the compton shift, wavelength,energy and angle\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.63*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nlamda=2; #wavelength in angstrom\nlamdaA=lamda*10**-10; #converting lamda from Angstrom to m\nphi=90; #angle of scattering in degrees\nphi=phi*0.0174532925 #converting degrees to radians \n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\ndelta_lamda=delta_lamda*10**10; #converting delta_lamda from m to Angstrom\ndelta_lamda=math.ceil(delta_lamda*10**5)/10**5; #rounding off to 5 decimals\nlamda_dash=delta_lamda+lamda;\nlamdaA_dash=lamda_dash*10**-10; #converting lamda_dash from Angstrom to m\n#energy E=h*new-h*new_dash\nE=h*c*((1/lamdaA)-(1/lamdaA_dash));\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\nnew=c/lamda;\nnew_dash=c/lamda_dash;\ntheta=math.atan((h*new*math.sin(phi))/((h*new)-(h*new_dash*math.cos(phi))));\ntheta=theta*57.2957795; #converting radians to degrees\n\n#Result\nprint(\"change in compton shift in Angstrom is\",delta_lamda);\nprint(\"wavelength of scattered photons in Angstrom is\",lamda_dash);\nprint(\"energy of recoiling electron in J is\",E);\nprint(\"energy of recoiling electron in eV is\",EeV);\nprint(\"angle at which recoiling electron appears in degrees is\",int(theta));\n\n#answers given in the book are wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=2; #wavelength in angstrom\n", + "lamdaA=lamda*10**-10; #converting lamda from Angstrom to m\n", + "phi=90; #angle of scattering in degrees\n", + "phi=phi*0.0174532925 #converting degrees to radians \n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "delta_lamda=delta_lamda*10**10; #converting delta_lamda from m to Angstrom\n", + "delta_lamda=math.ceil(delta_lamda*10**5)/10**5; #rounding off to 5 decimals\n", + "lamda_dash=delta_lamda+lamda;\n", + "lamdaA_dash=lamda_dash*10**-10; #converting lamda_dash from Angstrom to m\n", + "#energy E=h*new-h*new_dash\n", + "E=h*c*((1/lamdaA)-(1/lamdaA_dash));\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "new=c/lamda;\n", + "new_dash=c/lamda_dash;\n", + "theta=math.atan((h*new*math.sin(phi))/((h*new)-(h*new_dash*math.cos(phi))));\n", + "theta=theta*57.2957795; #converting radians to degrees\n", + "\n", + "#Result\n", + "print(\"change in compton shift in Angstrom is\",delta_lamda);\n", + "print(\"wavelength of scattered photons in Angstrom is\",lamda_dash);\n", + "print(\"energy of recoiling electron in J is\",E);\n", + "print(\"energy of recoiling electron in eV is\",EeV);\n", + "print(\"angle at which recoiling electron appears in degrees is\",int(theta));\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('change in compton shift in Angstrom is', 0.02429)\n('wavelength of scattered photons in Angstrom is', 2.02429)\n('energy of recoiling electron in J is', 1.1933272900621974e-17)\n('energy of recoiling electron in eV is', 74.482)\n('angle at which recoiling electron appears in degrees is', 45)\n" + "text": [ + "('change in compton shift in Angstrom is', 0.02429)\n", + "('wavelength of scattered photons in Angstrom is', 2.02429)\n", + "('energy of recoiling electron in J is', 1.1933272900621974e-17)\n", + "('energy of recoiling electron in eV is', 74.482)\n", + "('angle at which recoiling electron appears in degrees is', 45)\n" + ] } ], "prompt_number": 10 @@ -59,19 +130,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.3, Page number 135" + "source": [ + "Example number 4.3, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the compton shift, wavelength of the scattered photon\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nphi=60; #angle of scattering in degrees\nphi=phi*0.0174532925; #converting degrees to radians\nE=10**6; #energy of photon in eV\nE=E*1.6*10**-19; #converting eV into J\n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\ndelta_lamda=delta_lamda*10**10; #converting metre to angstrom\ndelta_lamda=math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\nlamda=(h*c)/E;\nlamdaA=lamda*10**10; #converting metre to angstrom\nlamda_dash=delta_lamda+lamdaA;\nlamda_dash=math.ceil(lamda_dash*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"compton shift in angstrom is\",delta_lamda);\nprint(\"energy of incident photon in m\",lamda);\nprint(\"wavelength of scattered photons in angstrom is\",lamda_dash);\n\n#answer for wavelength of scattered photon given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "phi=60; #angle of scattering in degrees\n", + "phi=phi*0.0174532925; #converting degrees to radians\n", + "E=10**6; #energy of photon in eV\n", + "E=E*1.6*10**-19; #converting eV into J\n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "delta_lamda=delta_lamda*10**10; #converting metre to angstrom\n", + "delta_lamda=math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "lamda=(h*c)/E;\n", + "lamdaA=lamda*10**10; #converting metre to angstrom\n", + "lamda_dash=delta_lamda+lamdaA;\n", + "lamda_dash=math.ceil(lamda_dash*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"compton shift in angstrom is\",delta_lamda);\n", + "print(\"energy of incident photon in m\",lamda);\n", + "print(\"wavelength of scattered photons in angstrom is\",lamda_dash);\n", + "\n", + "#answer for wavelength of scattered photon given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('compton shift in angstrom is', 0.0122)\n('energy of incident photon in m', 1.242375e-12)\n('wavelength of scattered photons in angstrom is', 0.025)\n" + "text": [ + "('compton shift in angstrom is', 0.0122)\n", + "('energy of incident photon in m', 1.242375e-12)\n", + "('wavelength of scattered photons in angstrom is', 0.025)\n" + ] } ], "prompt_number": 13 @@ -80,19 +187,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.4, Page number 135" + "source": [ + "Example number 4.4, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of photons emitted\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda=5893; #wavelength in angstrom\nP=60; #output power in Watt\n\n#Calculation\nlamda=lamda*10**-10; #wavelength in metre\nE=(h*c)/lamda;\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**4)/10**4; #rounding off to 4 decimals\nN=P/E;\n\n#Result\nprint(\"energy of photon in J is\",E);\nprint(\"energy of photon in eV is\",EeV);\nprint(\"number of photons emitted per se cond is\",N);\n\n#answer for energy in eV given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=5893; #wavelength in angstrom\n", + "P=60; #output power in Watt\n", + "\n", + "#Calculation\n", + "lamda=lamda*10**-10; #wavelength in metre\n", + "E=(h*c)/lamda;\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**4)/10**4; #rounding off to 4 decimals\n", + "N=P/E;\n", + "\n", + "#Result\n", + "print(\"energy of photon in J is\",E);\n", + "print(\"energy of photon in eV is\",EeV);\n", + "print(\"number of photons emitted per se cond is\",N);\n", + "\n", + "#answer for energy in eV given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of photon in J is', 3.373154590191753e-19)\n('energy of photon in eV is', 2.1054)\n('number of photons emitted per se cond is', 1.7787503773015396e+20)\n" + "text": [ + "('energy of photon in J is', 3.373154590191753e-19)\n", + "('energy of photon in eV is', 2.1054)\n", + "('number of photons emitted per se cond is', 1.7787503773015396e+20)\n" + ] } ], "prompt_number": 15 @@ -101,19 +239,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.5, Page number 136" + "source": [ + "Example number 4.5, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the momentum, energy and mass of a photon\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda=10; #wavelength in angstrom\n\n#Calculation\nlamda=lamda*10**-10; #wavelength in metre\nE=(h*c)/lamda;\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=EeV*10**-3; #converting eV to keV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\nP=h/lamda;\nM=h/(lamda*c);\n\n#Result\nprint(\"energy of photon in J is\",E);\nprint(\"energy of photon in keV is\",EeV);\nprint(\"momentum in kg m/sec is\",P);\nprint(\"mass of photon in kg is\",M);\n\n#answer for energy of photon in keV given in the book is wrong by 1 decimal", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=10; #wavelength in angstrom\n", + "\n", + "#Calculation\n", + "lamda=lamda*10**-10; #wavelength in metre\n", + "E=(h*c)/lamda;\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=EeV*10**-3; #converting eV to keV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "P=h/lamda;\n", + "M=h/(lamda*c);\n", + "\n", + "#Result\n", + "print(\"energy of photon in J is\",E);\n", + "print(\"energy of photon in keV is\",EeV);\n", + "print(\"momentum in kg m/sec is\",P);\n", + "print(\"mass of photon in kg is\",M);\n", + "\n", + "#answer for energy of photon in keV given in the book is wrong by 1 decimal" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of photon in J is', 1.9878e-16)\n('energy of photon in keV is', 1.241)\n('momentum in kg m/sec is', 6.626e-25)\n('mass of photon in kg is', 2.2086666666666664e-33)\n" + "text": [ + "('energy of photon in J is', 1.9878e-16)\n", + "('energy of photon in keV is', 1.241)\n", + "('momentum in kg m/sec is', 6.626e-25)\n", + "('mass of photon in kg is', 2.2086666666666664e-33)\n" + ] } ], "prompt_number": 18 @@ -122,19 +294,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.6, Page number 136" + "source": [ + "Example number 4.6, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\ne=1.602*10**-19;\nV=1.25; #potential difference in kV\n\n#Calculation\nV=V*10**3; #converting kV to V\nlamda=h/math.sqrt(2*m*e*V);\nlamda=lamda*10**10; #converting metre to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "e=1.602*10**-19;\n", + "V=1.25; #potential difference in kV\n", + "\n", + "#Calculation\n", + "V=V*10**3; #converting kV to V\n", + "lamda=h/math.sqrt(2*m*e*V);\n", + "lamda=lamda*10**10; #converting metre to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 0.3471)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 0.3471)\n" + ] } ], "prompt_number": 21 @@ -143,19 +339,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.7, Page number 136" + "source": [ + "Example number 4.7, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nE=45; #energy of electron in eV\nE=E*1.6*10**-19; #energy in J\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\n\n#Calculation\nlamda=h/math.sqrt(2*m*E);\nlamda=lamda*10**10; #converting metres to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E=45; #energy of electron in eV\n", + "E=E*1.6*10**-19; #energy in J\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E);\n", + "lamda=lamda*10**10; #converting metres to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 1.8305)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 1.8305)\n" + ] } ], "prompt_number": 24 @@ -164,19 +381,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.8, Page number 137" + "source": [ + "Example number 4.8, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nv=10**7; #velocity of electron in m/sec\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\n\n#Calculation\nlamda=h/(m*v);\nlamda=lamda*10**10; #converting metres to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "v=10**7; #velocity of electron in m/sec\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "\n", + "#Calculation\n", + "lamda=h/(m*v);\n", + "lamda=lamda*10**10; #converting metres to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 0.7282)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 0.7282)\n" + ] } ], "prompt_number": 25 @@ -185,19 +423,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.9, Page number 137" + "source": [ + "Example number 4.9, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength of alpha particle\n\n#importing modules\nimport math\n\n#Variable declaration\nV=1000; #potential difference in V\nh=6.626*10**-34; #plancks constant in Js\nm=1.67*10**-27; #mass of proton in kg\ne=1.6*10**-19; #charge of electron in J\n\n#Calculation\nlamda=h/math.sqrt(2*m*e*V);\n\n#Result\nprint(\"de Broglie wavelength of alpha particle in metre is\",lamda);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "V=1000; #potential difference in V\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=1.67*10**-27; #mass of proton in kg\n", + "e=1.6*10**-19; #charge of electron in J\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*e*V);\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength of alpha particle in metre is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n" + "text": [ + "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n" + ] } ], "prompt_number": 26 @@ -206,19 +465,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.10, Page number 138" + "source": [ + "Example number 4.10, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of finding the particle\n\n#importing modules\nimport math\n\n#Variable declaration\nL=25; #width of potential in armstrong\ndelta_x=0.05; #interval in armstrong\nn=1; #particle is in its least energy\nx=L/2; #particle is at the centre\npi=180; #angle in degrees\n\n#Calculation\npi=pi*0.0174532925; #angle in radians\nL=L*10**-10; #width in m\ndelta_x=delta_x*10**-10; #interval in m\n#probability P = integration of (A**2)*(math.sin(n*pi*x/L))**2*delta_x\n#but A=math.sqrt(2/L)\n#since the particle is in a small interval integration need not be applied\n#therefore P=2*(L**(-1))*(math.sin(n*pi*x/L))**2*delta_x\nP=2*(L**(-1))*((math.sin(n*pi*x/L))**2)*delta_x;\nP=math.ceil(P*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"probability of finding the particle is\",P);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "L=25; #width of potential in armstrong\n", + "delta_x=0.05; #interval in armstrong\n", + "n=1; #particle is in its least energy\n", + "x=L/2; #particle is at the centre\n", + "pi=180; #angle in degrees\n", + "\n", + "#Calculation\n", + "pi=pi*0.0174532925; #angle in radians\n", + "L=L*10**-10; #width in m\n", + "delta_x=delta_x*10**-10; #interval in m\n", + "#probability P = integration of (A**2)*(math.sin(n*pi*x/L))**2*delta_x\n", + "#but A=math.sqrt(2/L)\n", + "#since the particle is in a small interval integration need not be applied\n", + "#therefore P=2*(L**(-1))*(math.sin(n*pi*x/L))**2*delta_x\n", + "P=2*(L**(-1))*((math.sin(n*pi*x/L))**2)*delta_x;\n", + "P=math.ceil(P*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"probability of finding the particle is\",P);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of finding the particle is', 0.004)\n" + "text": [ + "('probability of finding the particle is', 0.004)\n" + ] } ], "prompt_number": 27 @@ -227,19 +515,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.11, Page number 138" + "source": [ + "Example number 4.11, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of electron in eV\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=((n**2)*h**2)/(8*m*L**2);\nEeV=E/(1.6*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of electron in J is\",E);\nprint(\"lowest energy of electron in eV is\",EeV);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=((n**2)*h**2)/(8*m*L**2);\n", + "EeV=E/(1.6*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of electron in J is\",E);\n", + "print(\"lowest energy of electron in eV is\",EeV);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of electron in J is', 6.030752197802197e-18)\n('lowest energy of electron in eV is', 37.693)\n" + "text": [ + "('lowest energy of electron in J is', 6.030752197802197e-18)\n", + "('lowest energy of electron in eV is', 37.693)\n" + ] } ], "prompt_number": 28 @@ -248,19 +562,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.12, Page number 139" + "source": [ + "Example number 4.12, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of the system\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=(2*(n**2)*h**2)/(8*m*L**2);\nE=E/(1.6*10**-19); #converting J to eV\nE=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of system in eV is\",E);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=(2*(n**2)*h**2)/(8*m*L**2);\n", + "E=E/(1.6*10**-19); #converting J to eV\n", + "E=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of system in eV is\",E);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of system in eV is', 75.385)\n" + "text": [ + "('lowest energy of system in eV is', 75.385)\n" + ] } ], "prompt_number": 29 @@ -269,19 +607,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.13, Page number 139" + "source": [ + "Example number 4.13, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of the system and quantum numbers\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\n#according to pauli's exclusion principle, 1st electron occupies n1=1 and second electron occupies n2=2\nn1=1;\nn2=2;\nE=((2*(n1**2)*h**2)/(8*m*L**2))+(((n2**2)*h**2)/(8*m*L**2));\nE=E/(1.6*10**-19); #converting J to eV\nE=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of system in eV is\",E);\nprint(\"quantum numbers are\");\nprint(\"n=1,l=0,mL=0,mS=+1/2\");\nprint(\"n=1,l=0,mL=0,mS=-1/2\");\nprint(\"n=2,l=0,mL=0,mS=+1/2\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "#according to pauli's exclusion principle, 1st electron occupies n1=1 and second electron occupies n2=2\n", + "n1=1;\n", + "n2=2;\n", + "E=((2*(n1**2)*h**2)/(8*m*L**2))+(((n2**2)*h**2)/(8*m*L**2));\n", + "E=E/(1.6*10**-19); #converting J to eV\n", + "E=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of system in eV is\",E);\n", + "print(\"quantum numbers are\");\n", + "print(\"n=1,l=0,mL=0,mS=+1/2\");\n", + "print(\"n=1,l=0,mL=0,mS=-1/2\");\n", + "print(\"n=2,l=0,mL=0,mS=+1/2\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of system in eV is', 226.154)\nquantum numbers are\nn=1,l=0,mL=0,mS=+1/2\nn=1,l=0,mL=0,mS=-1/2\nn=2,l=0,mL=0,mS=+1/2\n" + "text": [ + "('lowest energy of system in eV is', 226.154)\n", + "quantum numbers are\n", + "n=1,l=0,mL=0,mS=+1/2\n", + "n=1,l=0,mL=0,mS=-1/2\n", + "n=2,l=0,mL=0,mS=+1/2\n" + ] } ], "prompt_number": 30 @@ -290,19 +662,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.14, Page number 140" + "source": [ + "Example number 4.14, Page number 140" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mass of the particle\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nL=100; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=0.025; #lowest energy in eV\nE=E*(1.6*10**-19); #converting eV to J\nm=((n**2)*h**2)/(8*E*L**2);\n\n#Result\nprint(\"mass of the particle in kg is\",m);", + "input": [ + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "L=100; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=0.025; #lowest energy in eV\n", + "E=E*(1.6*10**-19); #converting eV to J\n", + "m=((n**2)*h**2)/(8*E*L**2);\n", + "\n", + "#Result\n", + "print(\"mass of the particle in kg is\",m);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mass of the particle in kg is', 1.3719961249999998e-31)\n" + "text": [ + "('mass of the particle in kg is', 1.3719961249999998e-31)\n" + ] } ], "prompt_number": 31 @@ -311,19 +702,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.15, Page number 141" + "source": [ + "Example number 4.15, Page number 141" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy density\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nT=6000; #temperature in K\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda1=450; #wavelength in nm\nlamda2=460; #wavelength in nm\n\n#Calculation\nlamda1=lamda1*10**-9; #converting nm to metre\nlamda2=lamda2*10**-9; #converting nm to metre\nnew1=c/lamda1;\nnew2=c/lamda2;\nnew=(new1+new2)/2;\nA=math.exp((h*new)/(k*T));\nrho_v=(8*math.pi*h*new**3)/(A*c**3);\n\n#Result\nprint(\"energy density of the black body in J/m^3 is\",rho_v);\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "T=6000; #temperature in K\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda1=450; #wavelength in nm\n", + "lamda2=460; #wavelength in nm\n", + "\n", + "#Calculation\n", + "lamda1=lamda1*10**-9; #converting nm to metre\n", + "lamda2=lamda2*10**-9; #converting nm to metre\n", + "new1=c/lamda1;\n", + "new2=c/lamda2;\n", + "new=(new1+new2)/2;\n", + "A=math.exp((h*new)/(k*T));\n", + "rho_v=(8*math.pi*h*new**3)/(A*c**3);\n", + "\n", + "#Result\n", + "print(\"energy density of the black body in J/m^3 is\",rho_v);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy density of the black body in J/m^3 is', 9.033622836188887e-16)\n" + "text": [ + "('energy density of the black body in J/m^3 is', 9.033622836188887e-16)\n" + ] } ], "prompt_number": 32 @@ -331,7 +753,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_6.ipynb b/Engineering_Physics_Marikani/Chapter_6.ipynb index 1445b978..637c4652 100644 --- a/Engineering_Physics_Marikani/Chapter_6.ipynb +++ b/Engineering_Physics_Marikani/Chapter_6.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 6" + "name": "", + "signature": "sha256:97390494eb98d975fe0c29b984e91803cff6529592b1c9d0fc798d125a0d2ea9" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,54 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Crystallography" + "source": [ + "Crystallography" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.1, Page number 185" + "source": [ + "Example number 6.1, Page number 185" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the density of diamond\n\n#importing modules\nimport math\n\n#Variable declaration\nr=0.071; #radius in nm\nN=6.022*10**26; \n\n#Calculation\nr=r*10**-9; #converting r from nm to m\n#mass of carbon atom m = 12/N\nm=12/N;\n#mass of diamond M = 8*mass of one carbon atom\nM=8*m;\n#volume of diamond V = (8*r/sqrt(3))^3\nV=(8*r/math.sqrt(3))**3;\nd=M/V; #density in kg/m^3\nd=math.ceil(d*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"density of diamond in kg/m^3 is\",d);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r=0.071; #radius in nm\n", + "N=6.022*10**26; \n", + "\n", + "#Calculation\n", + "r=r*10**-9; #converting r from nm to m\n", + "#mass of carbon atom m = 12/N\n", + "m=12/N;\n", + "#mass of diamond M = 8*mass of one carbon atom\n", + "M=8*m;\n", + "#volume of diamond V = (8*r/sqrt(3))^3\n", + "V=(8*r/math.sqrt(3))**3;\n", + "d=M/V; #density in kg/m^3\n", + "d=math.ceil(d*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"density of diamond in kg/m^3 is\",d);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of diamond in kg/m^3 is', 4520.31)\n" + "text": [ + "('density of diamond in kg/m^3 is', 4520.31)\n" + ] } ], "prompt_number": 3 @@ -38,19 +68,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.2, Page number 185" + "source": [ + "Example number 6.2, Page number 185" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the percentage volume change\n\n#importing modules\nimport math\n\n#Variable declaration\naBCC=0.332; #lattice constant in nm\naHCP=0.296; #lattice constant in nm\nc=0.468; #c in nm\n\n#Calculation\naBCC=aBCC*10**-9; #converting nm to m\nVbcc=aBCC**3;\naHCP=aHCP*10**-9; #converting nm to m\nc=c*10**-9; #converting nm to m\nVhcp=6*(math.sqrt(3)/4)*aHCP**2*c;\nV=Vhcp-Vbcc;\nVch=(V*100)/Vbcc;\nVch=math.ceil(Vch*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"percentage change in volume is\",Vch);\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "aBCC=0.332; #lattice constant in nm\n", + "aHCP=0.296; #lattice constant in nm\n", + "c=0.468; #c in nm\n", + "\n", + "#Calculation\n", + "aBCC=aBCC*10**-9; #converting nm to m\n", + "Vbcc=aBCC**3;\n", + "aHCP=aHCP*10**-9; #converting nm to m\n", + "c=c*10**-9; #converting nm to m\n", + "Vhcp=6*(math.sqrt(3)/4)*aHCP**2*c;\n", + "V=Vhcp-Vbcc;\n", + "Vch=(V*100)/Vbcc;\n", + "Vch=math.ceil(Vch*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"percentage change in volume is\",Vch);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('percentage change in volume is', 191.12)\n" + "text": [ + "('percentage change in volume is', 191.12)\n" + ] } ], "prompt_number": 4 @@ -59,19 +118,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.3, Page number 186" + "source": [ + "Example number 6.3, Page number 186" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the density\n\n#importing modules\nimport math\n\n#Variable declaration\nr=1.278; #atomic radius of Cu in Angstrom\nA=63.54; #atomic weight of Cu\nn=4; #for FCC n=4\nNa=6.022*10**26;\n\n#Calculation\nr=r*10**-10; #converting atomic radius from Angstrom to m\na=2*math.sqrt(2)*r; \nrho=(n*A)/(Na*a**3);\nrho=math.ceil(rho*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"density of Cu in kg/m^3 is\",rho);\n\n#answer given in the book is wrong", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r=1.278; #atomic radius of Cu in Angstrom\n", + "A=63.54; #atomic weight of Cu\n", + "n=4; #for FCC n=4\n", + "Na=6.022*10**26;\n", + "\n", + "#Calculation\n", + "r=r*10**-10; #converting atomic radius from Angstrom to m\n", + "a=2*math.sqrt(2)*r; \n", + "rho=(n*A)/(Na*a**3);\n", + "rho=math.ceil(rho*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"density of Cu in kg/m^3 is\",rho);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of Cu in kg/m^3 is', 8935.92)\n" + "text": [ + "('density of Cu in kg/m^3 is', 8935.92)\n" + ] } ], "prompt_number": 6 @@ -80,19 +164,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.4, Page number 186" + "source": [ + "Example number 6.4, Page number 186" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the distance between adjacent atoms\n\n#importing modules\nimport math\nimport numpy as np\n\n#Variable declaration\nrho=2180; #density of NaCl in kg/m^3\nwNa=23; #atomic weight of Na\nwCl=35.5; #atomic weight of Cl\nn=4; #for FCC n=4\nNa=6.022*10**26;\n\n#Calculation\nA=wNa+wCl; #molecular weight of NaCl\nx=np.reciprocal(3.);\na=((n*A)/(Na*rho))**x;\n\n#Result\nprint(\"interatomic distance in NaCl in m is\",a); \n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "rho=2180; #density of NaCl in kg/m^3\n", + "wNa=23; #atomic weight of Na\n", + "wCl=35.5; #atomic weight of Cl\n", + "n=4; #for FCC n=4\n", + "Na=6.022*10**26;\n", + "\n", + "#Calculation\n", + "A=wNa+wCl; #molecular weight of NaCl\n", + "x=np.reciprocal(3.);\n", + "a=((n*A)/(Na*rho))**x;\n", + "\n", + "#Result\n", + "print(\"interatomic distance in NaCl in m is\",a); \n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interatomic distance in NaCl in m is', 5.6278114346454509e-10)\n" + "text": [ + "('interatomic distance in NaCl in m is', 5.6278114346454509e-10)\n" + ] } ], "prompt_number": 7 @@ -101,19 +210,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.5, Page number 187" + "source": [ + "Example number 6.5, Page number 187" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the interplanar spacing\n\n#importing modules\nimport math\n\n#Variable declaration\na=0.42; #lattice constant in nm\nh1=1;\nk1=0;\nl1=1; #indices of the plane (101)\nh2=2;\nk2=2;\nl2=1; #indices of the plane (221)\n\n#Calculation\na=a*10**-9; #converting from nm to m\nd1=a/math.sqrt((h1**2)+(k1**2)+(l1**2)); #interplanar spacing for plane (101)\nd1=d1*10**9; #converting from m to nm\nd1=math.ceil(d1*10**5)/10**5; #rounding off to 5 decimals\nd2=a/math.sqrt((h2**2)+(k2**2)+(l2**2)); #interplanar spacing for plane (221)\nd2=d2*10**9; #converting from m to nm\n\n#Result\nprint(\"interplanar spacing for (101) in nm is\",d1);\nprint(\"interplanar spacing for (221) in nm is\",d2);\n\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a=0.42; #lattice constant in nm\n", + "h1=1;\n", + "k1=0;\n", + "l1=1; #indices of the plane (101)\n", + "h2=2;\n", + "k2=2;\n", + "l2=1; #indices of the plane (221)\n", + "\n", + "#Calculation\n", + "a=a*10**-9; #converting from nm to m\n", + "d1=a/math.sqrt((h1**2)+(k1**2)+(l1**2)); #interplanar spacing for plane (101)\n", + "d1=d1*10**9; #converting from m to nm\n", + "d1=math.ceil(d1*10**5)/10**5; #rounding off to 5 decimals\n", + "d2=a/math.sqrt((h2**2)+(k2**2)+(l2**2)); #interplanar spacing for plane (221)\n", + "d2=d2*10**9; #converting from m to nm\n", + "\n", + "#Result\n", + "print(\"interplanar spacing for (101) in nm is\",d1);\n", + "print(\"interplanar spacing for (221) in nm is\",d2);\n", + "\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interplanar spacing for (101) in nm is', 0.29699)\n('interplanar spacing for (221) in nm is', 0.14)\n" + "text": [ + "('interplanar spacing for (101) in nm is', 0.29699)\n", + "('interplanar spacing for (221) in nm is', 0.14)\n" + ] } ], "prompt_number": 8 @@ -122,19 +263,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.6, Page number 187" + "source": [ + "Example number 6.6, Page number 187" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To identify the axial intercepts\n\n#Variable declaration\nh1=1;\nk1=0;\nl1=2; #indices for plane (102)\nh2=2;\nk2=3;\nl2=1; #indices for plane (231)\nh3=3;\nk3=-1;\nl3=2; #indices for plane (31'2)\n\n#Calculation\n#intercepts made by the plane is a/h, b/k, c/l\n#for plane (102) intercepts are a/1=a, b/0=infinite, c/2\n#for plane (231) intercepts are a/2, b/3, c/1=c\n#for plane (31'2) intercepts are a/3=a, b/-1=-b, c/2\n\n#Result\nprint(\"for plane (102) intercepts are a/1=a, b/0=infinite, c/2\");\nprint(\"for plane (231) intercepts are a/2, b/3, c/1=c\");\nprint(\"for plane (312) intercepts are a/3=a, b/-1=-b, c/2\");\n", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "h1=1;\n", + "k1=0;\n", + "l1=2; #indices for plane (102)\n", + "h2=2;\n", + "k2=3;\n", + "l2=1; #indices for plane (231)\n", + "h3=3;\n", + "k3=-1;\n", + "l3=2; #indices for plane (31'2)\n", + "\n", + "#Calculation\n", + "#intercepts made by the plane is a/h, b/k, c/l\n", + "#for plane (102) intercepts are a/1=a, b/0=infinite, c/2\n", + "#for plane (231) intercepts are a/2, b/3, c/1=c\n", + "#for plane (31'2) intercepts are a/3=a, b/-1=-b, c/2\n", + "\n", + "#Result\n", + "print(\"for plane (102) intercepts are a/1=a, b/0=infinite, c/2\");\n", + "print(\"for plane (231) intercepts are a/2, b/3, c/1=c\");\n", + "print(\"for plane (312) intercepts are a/3=a, b/-1=-b, c/2\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "for plane (102) intercepts are a/1=a, b/0=infinite, c/2\nfor plane (231) intercepts are a/2, b/3, c/1=c\nfor plane (312) intercepts are a/3=a, b/-1=-b, c/2\n" + "text": [ + "for plane (102) intercepts are a/1=a, b/0=infinite, c/2\n", + "for plane (231) intercepts are a/2, b/3, c/1=c\n", + "for plane (312) intercepts are a/3=a, b/-1=-b, c/2\n" + ] } ], "prompt_number": 10 @@ -143,19 +314,58 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.7, Page number 188" + "source": [ + "Example number 6.7, Page number 188" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angle between 2 planes\n\n#importing modules\nimport math\n\n#Variable declaration\nu1=1;\nv1=1;\nw1=1; #indices for plane (111)\nu2=2;\nv2=1;\nw2=2; #indices for plane (212)\n\n#Calculation\nA=u1*u2+v1*v2+w1*w2; \nB1=math.sqrt((u1**2)+(v1**2)+(w1**2));\nB2=math.sqrt((u2**2)+(v2**2)+(w2**2));\nB=A/(B1*B2);\nB=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\ntheta=math.acos(B); #angle in radian\ntheta=theta*57.2957795; #converting radian to degrees\ntheeta=math.ceil(theta*10**3)/10**3; #rounding off to 3 decimals\ndeg=int(theta); #converting to degrees\nt=60*(theta-deg);\nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"angle between the planes in degrees is\",theeta);\nprint(\"angle between the planes is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "u1=1;\n", + "v1=1;\n", + "w1=1; #indices for plane (111)\n", + "u2=2;\n", + "v2=1;\n", + "w2=2; #indices for plane (212)\n", + "\n", + "#Calculation\n", + "A=u1*u2+v1*v2+w1*w2; \n", + "B1=math.sqrt((u1**2)+(v1**2)+(w1**2));\n", + "B2=math.sqrt((u2**2)+(v2**2)+(w2**2));\n", + "B=A/(B1*B2);\n", + "B=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n", + "theta=math.acos(B); #angle in radian\n", + "theta=theta*57.2957795; #converting radian to degrees\n", + "theeta=math.ceil(theta*10**3)/10**3; #rounding off to 3 decimals\n", + "deg=int(theta); #converting to degrees\n", + "t=60*(theta-deg);\n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"angle between the planes in degrees is\",theeta);\n", + "print(\"angle between the planes is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('angle between the planes in degrees is', 15.783)\n('angle between the planes is', 15, 'degrees', 46, 'minutes', 57.85, 'seconds')\n" + "text": [ + "('angle between the planes in degrees is', 15.783)\n", + "('angle between the planes is', 15, 'degrees', 46, 'minutes', 57.85, 'seconds')\n" + ] } ], "prompt_number": 13 @@ -164,12 +374,14 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.8, Page number 188" + "source": [ + "Example number 6.8, Page number 188" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#sketching the crystallographic planes", + "input": [], "language": "python", "metadata": {}, "outputs": [], @@ -179,19 +391,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.9, Page number 189" + "source": [ + "Example number 6.9, Page number 189" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lattice constant\n\n#importing modules\nimport math\n\n#Variable declaration\nd=0.2338; #interplanar distance in nm\nh=-1;\nk=1;\nl=1; #indices of the plane (1'11)\n\n#Calculation\nd=d*10**-9; #converting from nm to m\na=d*math.sqrt((h**2)+(k**2)+(l**2));\na=a*10**9; #converting lattice constant from m to nm\na=math.ceil(a*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"lattice constant in nm is\",a);\n\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "d=0.2338; #interplanar distance in nm\n", + "h=-1;\n", + "k=1;\n", + "l=1; #indices of the plane (1'11)\n", + "\n", + "#Calculation\n", + "d=d*10**-9; #converting from nm to m\n", + "a=d*math.sqrt((h**2)+(k**2)+(l**2));\n", + "a=a*10**9; #converting lattice constant from m to nm\n", + "a=math.ceil(a*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"lattice constant in nm is\",a);\n", + "\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lattice constant in nm is', 0.40496)\n" + "text": [ + "('lattice constant in nm is', 0.40496)\n" + ] } ], "prompt_number": 15 @@ -200,19 +436,64 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.10, Page number 189" + "source": [ + "Example number 6.10, Page number 189" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To show that for a simple cubic system d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n\n#importing modules\nimport math\n\n#variable declaration\nh1=1;\nk1=0;\nl1=0; #indices for plane (100)\nh2=1;\nk2=1;\nl2=0; #indices for plane (110)\nh3=1;\nk3=1;\nl3=1; #indices for plane (111)\n\n#Calculation\n#d=a/math.sqrt((h**2)+(k**2)+(l**2))\n#d100=a/math.sqrt((h1**2)+(k1**2)+(l1**2))\nx1=math.sqrt((h1**2)+(k1**2)+(l1**2));\n#d100=a/x1 = a/1 = a\n#d110=a/math.sqrt((h2**2)+(k2**2)+(l2**2))\nx2=math.sqrt((h2**2)+(k2**2)+(l2**2));\nx2=math.ceil(x2*10**4)/10**4; #rounding off to 4 decimals\n#d110=a/x2 = a/sqrt(2)\n#d111=a/math.sqrt((h3**2)+(k3**2)+(l3**2))\nx3=math.sqrt((h3**2)+(k3**2)+(l3**2));\nx3=math.ceil(x3*10**4)/10**4; #rounding off to 4 decimals\n#d111=a/x3 = a/sqrt(3)\n#hence d100:d110:d111=a:a/sqrt(2):a/sqrt(3)\n#multiplying RHS by sqrt(6) we get d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n\n#Result\nprint(\"value of x1 is\",x1);\nprint(\"value of x2 is\",x2);\nprint(\"value of x3 is\",x3);\nprint(\"d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "h1=1;\n", + "k1=0;\n", + "l1=0; #indices for plane (100)\n", + "h2=1;\n", + "k2=1;\n", + "l2=0; #indices for plane (110)\n", + "h3=1;\n", + "k3=1;\n", + "l3=1; #indices for plane (111)\n", + "\n", + "#Calculation\n", + "#d=a/math.sqrt((h**2)+(k**2)+(l**2))\n", + "#d100=a/math.sqrt((h1**2)+(k1**2)+(l1**2))\n", + "x1=math.sqrt((h1**2)+(k1**2)+(l1**2));\n", + "#d100=a/x1 = a/1 = a\n", + "#d110=a/math.sqrt((h2**2)+(k2**2)+(l2**2))\n", + "x2=math.sqrt((h2**2)+(k2**2)+(l2**2));\n", + "x2=math.ceil(x2*10**4)/10**4; #rounding off to 4 decimals\n", + "#d110=a/x2 = a/sqrt(2)\n", + "#d111=a/math.sqrt((h3**2)+(k3**2)+(l3**2))\n", + "x3=math.sqrt((h3**2)+(k3**2)+(l3**2));\n", + "x3=math.ceil(x3*10**4)/10**4; #rounding off to 4 decimals\n", + "#d111=a/x3 = a/sqrt(3)\n", + "#hence d100:d110:d111=a:a/sqrt(2):a/sqrt(3)\n", + "#multiplying RHS by sqrt(6) we get d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n", + "\n", + "#Result\n", + "print(\"value of x1 is\",x1);\n", + "print(\"value of x2 is\",x2);\n", + "print(\"value of x3 is\",x3);\n", + "print(\"d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('value of x1 is', 1.0)\n('value of x2 is', 1.4143)\n('value of x3 is', 1.7321)\nd100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n" + "text": [ + "('value of x1 is', 1.0)\n", + "('value of x2 is', 1.4143)\n", + "('value of x3 is', 1.7321)\n", + "d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n" + ] } ], "prompt_number": 16 @@ -221,19 +502,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.11, Page number 190" + "source": [ + "Example number 6.11, Page number 190" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the ratio of intercepts in a simple cubic crystal\n\n#variable declaration\nh=2;\nk=3;\nl=1; #indices for plane (231)\n\n#Calculation\n#intercepts made by the plane is a/h, b/k, c/l\n#for a cubic unit cell, a=b=c\n#for plane (231) intercepts are a/2, a/3, a/1 = a\n#ratio of the intercepts is 1/2:1/3:1\n#LCM is 6. multiplying by LCM, we get ratio l1:l2:l3 = 3:2:6\n\n#Result\nprint(\"l1:l2:l3 = 3:2:6\");", + "input": [ + "\n", + "\n", + "#variable declaration\n", + "h=2;\n", + "k=3;\n", + "l=1; #indices for plane (231)\n", + "\n", + "#Calculation\n", + "#intercepts made by the plane is a/h, b/k, c/l\n", + "#for a cubic unit cell, a=b=c\n", + "#for plane (231) intercepts are a/2, a/3, a/1 = a\n", + "#ratio of the intercepts is 1/2:1/3:1\n", + "#LCM is 6. multiplying by LCM, we get ratio l1:l2:l3 = 3:2:6\n", + "\n", + "#Result\n", + "print(\"l1:l2:l3 = 3:2:6\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "l1:l2:l3 = 3:2:6\n" + "text": [ + "l1:l2:l3 = 3:2:6\n" + ] } ], "prompt_number": 17 @@ -242,19 +544,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.12, Page number 190" + "source": [ + "Example number 6.12, Page number 190" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the lengths of intercepts along Y and Z axes\n\n#variable declaration\nh=1;\nk=2;\nl=3; #indices for plane (123)\nl1=0.8; #l1 in armstrong\na=0.8; #a in armstrong\nb=1.2; #b in armstrong\nc=1.5; #c in armstrong\n\n#Calculation\n#intercepts made by the plane is a/h, b/k, c/l\n#for plane (123) intercepts are a/1 = a, b/2, c/3\n#ratio of the intercepts l1:l2:l3 = a:b/2:c/3\n#thus 0.8:l2:l3 = 0.8:1.2/2:1.5/3\nl2=1.2/2; #l2 in armstrong\nl3=1.5/3; #l3 in armstrong\n\n#Result\nprint(\"value of l2 in armstrong is\",l2);\nprint(\"value of l3 in armstrong is\",l3);", + "input": [ + "\n", + "\n", + "#variable declaration\n", + "h=1;\n", + "k=2;\n", + "l=3; #indices for plane (123)\n", + "l1=0.8; #l1 in armstrong\n", + "a=0.8; #a in armstrong\n", + "b=1.2; #b in armstrong\n", + "c=1.5; #c in armstrong\n", + "\n", + "#Calculation\n", + "#intercepts made by the plane is a/h, b/k, c/l\n", + "#for plane (123) intercepts are a/1 = a, b/2, c/3\n", + "#ratio of the intercepts l1:l2:l3 = a:b/2:c/3\n", + "#thus 0.8:l2:l3 = 0.8:1.2/2:1.5/3\n", + "l2=1.2/2; #l2 in armstrong\n", + "l3=1.5/3; #l3 in armstrong\n", + "\n", + "#Result\n", + "print(\"value of l2 in armstrong is\",l2);\n", + "print(\"value of l3 in armstrong is\",l3);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('value of l2 in armstrong is', 0.6)\n('value of l3 in armstrong is', 0.5)\n" + "text": [ + "('value of l2 in armstrong is', 0.6)\n", + "('value of l3 in armstrong is', 0.5)\n" + ] } ], "prompt_number": 18 @@ -263,19 +593,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.13, Page number 191" + "source": [ + "Example number 6.13, Page number 191" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the nearest neighbour distance\n\n#Calculation\n#in simple cubic unit cell, corner atom is the nearest neighbour to another corner atom. \n#Hence nearest neighbour distance is a.\n#in BCC the body centered atom is the nearest neighbour to a corner atom.\n#the distance between body centered atom and corner atom is 2r\n#but r=sqrt(3)*a/4\n#distance = 2*sqrt(3)*a/4 = sqrt(3)*a/2\n#in FCC the face centered atom is the nearest neighbour to a corner atom.\n#the distance between face centered atom and corner atom is 2r\n#but r = a/sqrt(8)\n#distance = 2*a/sqrt(8) = a/sqrt(2)\n\n#Result\nprint(\"in simple cubic unit cell nearest neighbour distance is a\");\nprint(\"in body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\");\nprint(\"in face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\");", + "input": [ + "\n", + "\n", + "#Calculation\n", + "#in simple cubic unit cell, corner atom is the nearest neighbour to another corner atom. \n", + "#Hence nearest neighbour distance is a.\n", + "#in BCC the body centered atom is the nearest neighbour to a corner atom.\n", + "#the distance between body centered atom and corner atom is 2r\n", + "#but r=sqrt(3)*a/4\n", + "#distance = 2*sqrt(3)*a/4 = sqrt(3)*a/2\n", + "#in FCC the face centered atom is the nearest neighbour to a corner atom.\n", + "#the distance between face centered atom and corner atom is 2r\n", + "#but r = a/sqrt(8)\n", + "#distance = 2*a/sqrt(8) = a/sqrt(2)\n", + "\n", + "#Result\n", + "print(\"in simple cubic unit cell nearest neighbour distance is a\");\n", + "print(\"in body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\");\n", + "print(\"in face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "in simple cubic unit cell nearest neighbour distance is a\nin body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\nin face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\n" + "text": [ + "in simple cubic unit cell nearest neighbour distance is a\n", + "in body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\n", + "in face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\n" + ] } ], "prompt_number": 19 @@ -284,19 +639,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.14, Page number 191" + "source": [ + "Example number 6.14, Page number 191" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the spacing of the lattice plane\n\n#importing modules\nimport math\n\n#variable declaration\na=2.04; #lattice parameter in armstrong\nh=2;\nk=1;\nl=2; #indices for plane (212)\n\n#Calculation\na=a*10**-10; #converting from armstrong to m\nd=a/math.sqrt((h**2)+(k**2)+(l**2));\nd=d*10**10; #converting from m to armstrong\nd=math.ceil(d*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"interplanar distance in armstrong is\",d);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "a=2.04; #lattice parameter in armstrong\n", + "h=2;\n", + "k=1;\n", + "l=2; #indices for plane (212)\n", + "\n", + "#Calculation\n", + "a=a*10**-10; #converting from armstrong to m\n", + "d=a/math.sqrt((h**2)+(k**2)+(l**2));\n", + "d=d*10**10; #converting from m to armstrong\n", + "d=math.ceil(d*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"interplanar distance in armstrong is\",d);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interplanar distance in armstrong is', 0.681)\n" + "text": [ + "('interplanar distance in armstrong is', 0.681)\n" + ] } ], "prompt_number": 20 @@ -305,19 +684,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.15, Page number 191" + "source": [ + "Example number 6.15, Page number 191" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of atoms per unit cell\n\n#importing modules\nimport math\n\n#variable declaration\nr=1.278; #radius of Cu in armstrong\nM=63.54; #atomic weight of Cu\nrho=8980; #density in kg/m^3\nNa=6.022*10**26;\n\n#Calculation\nr=r*10**-10; #radius in m\na=math.sqrt(8)*r;\nn=(rho*Na*a**3)/M;\n\n#Result\nprint(\"interatomic distance in m is\",a);\nprint(\"number of atoms per Cu unit cell is\",int(n));", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "r=1.278; #radius of Cu in armstrong\n", + "M=63.54; #atomic weight of Cu\n", + "rho=8980; #density in kg/m^3\n", + "Na=6.022*10**26;\n", + "\n", + "#Calculation\n", + "r=r*10**-10; #radius in m\n", + "a=math.sqrt(8)*r;\n", + "n=(rho*Na*a**3)/M;\n", + "\n", + "#Result\n", + "print(\"interatomic distance in m is\",a);\n", + "print(\"number of atoms per Cu unit cell is\",int(n));" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interatomic distance in m is', 3.6147298654256317e-10)\n('number of atoms per Cu unit cell is', 4)\n" + "text": [ + "('interatomic distance in m is', 3.6147298654256317e-10)\n", + "('number of atoms per Cu unit cell is', 4)\n" + ] } ], "prompt_number": 21 @@ -326,19 +730,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.16, Page number 192" + "source": [ + "Example number 6.16, Page number 192" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Miller indices \n\n#variable declaration\na=0.429;\nb=1;\nc=0.379; #intercepts of an orthorhombic crystal\n\n#Calculation\n#ratio of intercepts are 0.214:1:0.188 = (a/0.429)*0.214:1:(c/0.379)*0.188 = a/2:b:c/2\n#thus the coefficients are 1/2:1:1/2. inverses are 2,1,2.\n#thus miller indices for the first plane are (212)\n#ratio of intercepts are 0.858:1:0.754 = (a/0.429)*0.0.858:1:(c/0.379)*0.754 = 2a:b:2c\n#thus the coefficients are 2:1:2. inverses are 1/2,1,1/2. LCM is 2. multiplying with LCM we get 1,2,1\n#thus miller indices for the second plane are (121)\n#ratio of intercepts are 0.429:infinite:0.126 = (a/0.429)*0.429:infinite:(c/0.379)*0.126 = a:infiniteb:c/3\n#thus the coefficients are 1:infinte:1/3. inverses are 1,0,3.\n#thus miller indices for the third plane are (103)\n\n#Result\nprint(\"miller indices for the first plane are (212)\");\nprint(\"miller indices for the second plane are (121)\");\nprint(\"miller indices for the third plane are (103)\");\n", + "input": [ + "\n", + "\n", + "#variable declaration\n", + "a=0.429;\n", + "b=1;\n", + "c=0.379; #intercepts of an orthorhombic crystal\n", + "\n", + "#Calculation\n", + "#ratio of intercepts are 0.214:1:0.188 = (a/0.429)*0.214:1:(c/0.379)*0.188 = a/2:b:c/2\n", + "#thus the coefficients are 1/2:1:1/2. inverses are 2,1,2.\n", + "#thus miller indices for the first plane are (212)\n", + "#ratio of intercepts are 0.858:1:0.754 = (a/0.429)*0.0.858:1:(c/0.379)*0.754 = 2a:b:2c\n", + "#thus the coefficients are 2:1:2. inverses are 1/2,1,1/2. LCM is 2. multiplying with LCM we get 1,2,1\n", + "#thus miller indices for the second plane are (121)\n", + "#ratio of intercepts are 0.429:infinite:0.126 = (a/0.429)*0.429:infinite:(c/0.379)*0.126 = a:infiniteb:c/3\n", + "#thus the coefficients are 1:infinte:1/3. inverses are 1,0,3.\n", + "#thus miller indices for the third plane are (103)\n", + "\n", + "#Result\n", + "print(\"miller indices for the first plane are (212)\");\n", + "print(\"miller indices for the second plane are (121)\");\n", + "print(\"miller indices for the third plane are (103)\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "miller indices for the first plane are (212)\nmiller indices for the second plane are (121)\nmiller indices for the third plane are (103)\n" + "text": [ + "miller indices for the first plane are (212)\n", + "miller indices for the second plane are (121)\n", + "miller indices for the third plane are (103)\n" + ] } ], "prompt_number": 12 @@ -347,19 +780,66 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.17, Page number 193" + "source": [ + "Example number 6.17, Page number 193" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of atoms per unit area\n\n#importing modules\nimport math\nimport numpy as np\n\n#variable declaration\nh1=1;\nk1=0;\nl1=0; #indices of the first plane (100)\nh2=1;\nk2=1;\nl2=0; #indices of the second plane (110)\nh3=1;\nk3=1;\nl3=1; #indices of the third plane (111)\n\n#Calculation\nn_1=np.reciprocal(4.);\nn_2=np.reciprocal(2.);\nn_3=np.reciprocal(6.);\nn1=(n_1*4)+1; #number of atoms per unit cell in (100)\n#number of atoms per m^2 is 2/a**2. but a=sqrt(8)*r.\n#hence number of atoms per m^2 is 1/(4*r**2)\nn2=(n_1*4)+(2*n_2); #number of atoms per unit cell in (110)\n#number of atoms per m^2 is 1/a*sqrt(2)*a. but a=sqrt(8)*r.\n#hence number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\nn3=(n_3*3)+(3*n_2); #number of atoms per unit cell in (111)\n#number of atoms per m^2 is 2/(sqrt(3)/4)*a**2. but a=4*r.\n#hence number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n\n#Result\nprint(\"number of atoms per unit cell in (100)\",n1);\nprint(\"number of atoms per m^2 is 1/(4*r**2)\");\nprint(\"number of atoms per unit cell in (110)\",n2);\nprint(\"number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\");\nprint(\"number of atoms per unit cell in (111)\",n3);\nprint(\"number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\");\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "import numpy as np\n", + "\n", + "#variable declaration\n", + "h1=1;\n", + "k1=0;\n", + "l1=0; #indices of the first plane (100)\n", + "h2=1;\n", + "k2=1;\n", + "l2=0; #indices of the second plane (110)\n", + "h3=1;\n", + "k3=1;\n", + "l3=1; #indices of the third plane (111)\n", + "\n", + "#Calculation\n", + "n_1=np.reciprocal(4.);\n", + "n_2=np.reciprocal(2.);\n", + "n_3=np.reciprocal(6.);\n", + "n1=(n_1*4)+1; #number of atoms per unit cell in (100)\n", + "#number of atoms per m^2 is 2/a**2. but a=sqrt(8)*r.\n", + "#hence number of atoms per m^2 is 1/(4*r**2)\n", + "n2=(n_1*4)+(2*n_2); #number of atoms per unit cell in (110)\n", + "#number of atoms per m^2 is 1/a*sqrt(2)*a. but a=sqrt(8)*r.\n", + "#hence number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\n", + "n3=(n_3*3)+(3*n_2); #number of atoms per unit cell in (111)\n", + "#number of atoms per m^2 is 2/(sqrt(3)/4)*a**2. but a=4*r.\n", + "#hence number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n", + "\n", + "#Result\n", + "print(\"number of atoms per unit cell in (100)\",n1);\n", + "print(\"number of atoms per m^2 is 1/(4*r**2)\");\n", + "print(\"number of atoms per unit cell in (110)\",n2);\n", + "print(\"number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\");\n", + "print(\"number of atoms per unit cell in (111)\",n3);\n", + "print(\"number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('number of atoms per unit cell in (100)', 2.0)\nnumber of atoms per m^2 is 1/(4*r**2)\n('number of atoms per unit cell in (110)', 2.0)\nnumber of atoms per m^2 is 1/(8*sqrt(2)*r**2)\n('number of atoms per unit cell in (111)', 2.0)\nnumber of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n" + "text": [ + "('number of atoms per unit cell in (100)', 2.0)\n", + "number of atoms per m^2 is 1/(4*r**2)\n", + "('number of atoms per unit cell in (110)', 2.0)\n", + "number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\n", + "('number of atoms per unit cell in (111)', 2.0)\n", + "number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n" + ] } ], "prompt_number": 22 @@ -368,19 +848,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.18, Page number 194" + "source": [ + "Example number 6.18, Page number 194" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the atomic packing fraction and ionic packing fraction of NaCl\n\n#importing modules\nimport math\n\n#variable declaration\nr=0.97; #radius of Na+ ion in armstrong\nR=1.81; #radius of Cl- ion in armstrong\n\n#Calculation\n#atomic packing factor=packing density PD\n#PD=Volume of atoms/Volume of unit cell\n#volume of unit cell=a**3\n#volume of atoms=number of atoms*volume of 1 atom = 4*(4/3)*math.pi*r**3\n#but r=a/sqrt(8). hence PD = 4*(4/3)*math.pi*(a/(2*sqrt(2)))**3*(1/a**3) = 0.74\n#atomic packing factor = 0.74\nr=r*10**-10; #radius of Na+ ion in m\nR=R*10**-10; #radius of Cl- ion in m\nVna = (4*4*math.pi*r**3)/3; #volume of Na atoms\nVcl = (4*4*math.pi*R**3)/3; #volume of Cl atoms \nV=(2*(r+R))**3; #volume of unit cell\nIPF=(Vna+Vcl)/V; #ionic packing factor\nIPF=math.ceil(IPF*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"atomic packing factor = 0.74\");\nprint(\"ionic packing factor of NaCl crystal is\",IPF);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "r=0.97; #radius of Na+ ion in armstrong\n", + "R=1.81; #radius of Cl- ion in armstrong\n", + "\n", + "#Calculation\n", + "#atomic packing factor=packing density PD\n", + "#PD=Volume of atoms/Volume of unit cell\n", + "#volume of unit cell=a**3\n", + "#volume of atoms=number of atoms*volume of 1 atom = 4*(4/3)*math.pi*r**3\n", + "#but r=a/sqrt(8). hence PD = 4*(4/3)*math.pi*(a/(2*sqrt(2)))**3*(1/a**3) = 0.74\n", + "#atomic packing factor = 0.74\n", + "r=r*10**-10; #radius of Na+ ion in m\n", + "R=R*10**-10; #radius of Cl- ion in m\n", + "Vna = (4*4*math.pi*r**3)/3; #volume of Na atoms\n", + "Vcl = (4*4*math.pi*R**3)/3; #volume of Cl atoms \n", + "V=(2*(r+R))**3; #volume of unit cell\n", + "IPF=(Vna+Vcl)/V; #ionic packing factor\n", + "IPF=math.ceil(IPF*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"atomic packing factor = 0.74\");\n", + "print(\"ionic packing factor of NaCl crystal is\",IPF);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "atomic packing factor = 0.74\n('ionic packing factor of NaCl crystal is', 0.6671)\n" + "text": [ + "atomic packing factor = 0.74\n", + "('ionic packing factor of NaCl crystal is', 0.6671)\n" + ] } ], "prompt_number": 24 @@ -388,7 +901,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_7.ipynb b/Engineering_Physics_Marikani/Chapter_7.ipynb index c59443c9..706a4598 100644 --- a/Engineering_Physics_Marikani/Chapter_7.ipynb +++ b/Engineering_Physics_Marikani/Chapter_7.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 7" + "name": "", + "signature": "sha256:f1c728f94d30127360e83c10a55164d3b256772685ed9e2e28ae6d78b3f4a0ae" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,60 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Crystal Imperfections" + "source": [ + "Crystal Imperfections" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.1, Page number 207 " + "source": [ + "Example number 7.1, Page number 207 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of vacancies and vacancy fraction\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nEv=0.98; #energy in eV/atom\nT1=900; #temperature in C\nT2=1000;\nA=6.022*10**26; #avagadro's constant\nw=196.9; #atomic weight in g/mol\nd=18.63; #density in g/cm^3\n\n#Calculation\nEv=Ev*1.6*10**-19; #converting eV to J\nd=d*10**3; #converting g/cm^3 into kg/m^3\nN=(A*d)/w;\nn=N*math.exp(-Ev/(k*T1));\n#let valency fraction n/N be V\nV=math.exp(-Ev/(k*T2));\n\n#Result\nprint(\"concentration of atoms per m^3 is\",N);\nprint(\"number of vacancies per m^3 is\",n);\nprint(\"valency fraction is\",V);\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "Ev=0.98; #energy in eV/atom\n", + "T1=900; #temperature in C\n", + "T2=1000;\n", + "A=6.022*10**26; #avagadro's constant\n", + "w=196.9; #atomic weight in g/mol\n", + "d=18.63; #density in g/cm^3\n", + "\n", + "#Calculation\n", + "Ev=Ev*1.6*10**-19; #converting eV to J\n", + "d=d*10**3; #converting g/cm^3 into kg/m^3\n", + "N=(A*d)/w;\n", + "n=N*math.exp(-Ev/(k*T1));\n", + "#let valency fraction n/N be V\n", + "V=math.exp(-Ev/(k*T2));\n", + "\n", + "#Result\n", + "print(\"concentration of atoms per m^3 is\",N);\n", + "print(\"number of vacancies per m^3 is\",n);\n", + "print(\"valency fraction is\",V);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of atoms per m^3 is', 5.69780904012189e+28)\n('number of vacancies per m^3 is', 1.8742498047705634e+23)\n('valency fraction is', 1.1625392535344139e-05)\n" + "text": [ + "('concentration of atoms per m^3 is', 5.69780904012189e+28)\n", + "('number of vacancies per m^3 is', 1.8742498047705634e+23)\n", + "('valency fraction is', 1.1625392535344139e-05)\n" + ] } ], "prompt_number": 2 @@ -38,19 +74,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.2, Page number 208 " + "source": [ + "Example number 7.2, Page number 208 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy for vacancy formation\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nA=6.022*10**26; #avagadro's constant\nT=1073; #temperature in K\nn=3.6*10**23; #number of vacancies\nd=9.5; #density in g/cm^3\nw=107.9; #atomic weight in g/mol\n\n#Calculation\nd=d*10**3; #converting g/cm^3 into kg/m^3\nN=(A*d)/w; #concentration of atoms\nE=k*T*math.log((N/n), ); #energy in J\nEeV=E/(1.602176565*10**-19); #energy in eV\nEeV=math.ceil(EeV*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"concentration of atoms per m^3 is\",N);\nprint(\"energy for vacancy formation in J\",E);\nprint(\"energy for vacancy formation in eV\",EeV);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "A=6.022*10**26; #avagadro's constant\n", + "T=1073; #temperature in K\n", + "n=3.6*10**23; #number of vacancies\n", + "d=9.5; #density in g/cm^3\n", + "w=107.9; #atomic weight in g/mol\n", + "\n", + "#Calculation\n", + "d=d*10**3; #converting g/cm^3 into kg/m^3\n", + "N=(A*d)/w; #concentration of atoms\n", + "E=k*T*math.log((N/n), ); #energy in J\n", + "EeV=E/(1.602176565*10**-19); #energy in eV\n", + "EeV=math.ceil(EeV*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"concentration of atoms per m^3 is\",N);\n", + "print(\"energy for vacancy formation in J\",E);\n", + "print(\"energy for vacancy formation in eV\",EeV);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of atoms per m^3 is', 5.3020389249304915e+28)\n('energy for vacancy formation in J', 1.762092900344914e-19)\n('energy for vacancy formation in eV', 1.1)\n" + "text": [ + "('concentration of atoms per m^3 is', 5.3020389249304915e+28)\n", + "('energy for vacancy formation in J', 1.762092900344914e-19)\n", + "('energy for vacancy formation in eV', 1.1)\n" + ] } ], "prompt_number": 6 @@ -59,19 +126,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.3, Page number 209 " + "source": [ + "Example number 7.3, Page number 209 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of Schotky defect\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**26; #avagadro's constant\nk=1.38*10**-23;\nw1=39.1; #atomic weight of K\nw2=35.45; #atomic weight of Cl\nEs=2.6; #energy formation in eV\nT=500; #temperature in C\nd=1.955; #density in g/cm^3\n\n#Calculation\nEs=Es*1.6*10**-19; #converting eV to J\nT=T+273; #temperature in K\nd=d*10**3; #converting g/cm^3 into kg/m^3\nN=(A*d)/(w1+w2);\nn=N*math.exp(-Es/(2*k*T));\n\n#Result\nprint(\"number of Schotky defect per m^3 is\",n);\n\n#answer given in the book is wrong by 3rd decimal point", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**26; #avagadro's constant\n", + "k=1.38*10**-23;\n", + "w1=39.1; #atomic weight of K\n", + "w2=35.45; #atomic weight of Cl\n", + "Es=2.6; #energy formation in eV\n", + "T=500; #temperature in C\n", + "d=1.955; #density in g/cm^3\n", + "\n", + "#Calculation\n", + "Es=Es*1.6*10**-19; #converting eV to J\n", + "T=T+273; #temperature in K\n", + "d=d*10**3; #converting g/cm^3 into kg/m^3\n", + "N=(A*d)/(w1+w2);\n", + "n=N*math.exp(-Es/(2*k*T));\n", + "\n", + "#Result\n", + "print(\"number of Schotky defect per m^3 is\",n);\n", + "\n", + "#answer given in the book is wrong by 3rd decimal point" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('number of Schotky defect per m^3 is', 5.373777171020081e+19)\n" + "text": [ + "('number of Schotky defect per m^3 is', 5.373777171020081e+19)\n" + ] } ], "prompt_number": 7 @@ -79,7 +175,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_8.ipynb b/Engineering_Physics_Marikani/Chapter_8.ipynb index 40606862..1db414de 100644 --- a/Engineering_Physics_Marikani/Chapter_8.ipynb +++ b/Engineering_Physics_Marikani/Chapter_8.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 8" + "name": "", + "signature": "sha256:1a361e48153d58a5820c879429a5bbafe3e6e3df7d99a198492b082874550ac1" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,45 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Conducting materials" + "source": [ + "Conducting materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.1, Page number 231" + "source": [ + "Example number 8.1, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electrical resistivity\n\n#Variable declaration\nm=9.1*10**-31; #mass of the electron in kg\nn=2.533*10**28; #concentration of electrons per m^3\ne=1.6*10**-19;\ntow_r=3.1*10**-14; #relaxation time in sec\n\n#Calculation\nrho=m/(n*(e**2*tow_r));\n\n#Result\nprint(\"electrical resistivity in ohm metre is\",rho);", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "n=2.533*10**28; #concentration of electrons per m^3\n", + "e=1.6*10**-19;\n", + "tow_r=3.1*10**-14; #relaxation time in sec\n", + "\n", + "#Calculation\n", + "rho=m/(n*(e**2*tow_r));\n", + "\n", + "#Result\n", + "print(\"electrical resistivity in ohm metre is\",rho);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n" + "text": [ + "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n" + ] } ], "prompt_number": 1 @@ -38,19 +59,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.2, Page number 231" + "source": [ + "Example number 8.2, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap of semiconductor\n\n#importing modules\nimport math\n\n#Variable declaration\ns=3.75*10**3; #slope\nk=1.38*10**-23;\n\n#Calculation\nEg=2*k*s;\nEg=Eg/(1.6*10**-19); #converting J to eV\nEg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"band gap of semiconductor in eV is\",Eg);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "s=3.75*10**3; #slope\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "Eg=2*k*s;\n", + "Eg=Eg/(1.6*10**-19); #converting J to eV\n", + "Eg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of semiconductor in eV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of semiconductor in eV is', 0.647)\n" + "text": [ + "('band gap of semiconductor in eV is', 0.647)\n" + ] } ], "prompt_number": 3 @@ -59,19 +101,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.3, Page number 231" + "source": [ + "Example number 8.3, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of occupation of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nT=989; #temperature in C\nk=1.38*10**-23;\n#let E-EF be E\nE=0.5; #occupied level of electron in eV\n\n#Calculation\nT=T+273; #temperature in K\nE=E*1.6*10**-19; #converting eV to J\n#let fermi=dirac distribution function f(E) be f\nf=1/(1+math.exp(E/(k*T)));\nf=math.ceil(f*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"probability of occupation of electrons is\",f);", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=989; #temperature in C\n", + "k=1.38*10**-23;\n", + "#let E-EF be E\n", + "E=0.5; #occupied level of electron in eV\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "E=E*1.6*10**-19; #converting eV to J\n", + "#let fermi=dirac distribution function f(E) be f\n", + "f=1/(1+math.exp(E/(k*T)));\n", + "f=math.ceil(f*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"probability of occupation of electrons is\",f);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of occupation of electrons is', 0.011)\n" + "text": [ + "('probability of occupation of electrons is', 0.011)\n" + ] } ], "prompt_number": 4 @@ -80,19 +146,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.4, Page number 232" + "source": [ + "Example number 8.4, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the drift velocity of free electrons\n\n#Variable declaration\nmew_e=0.0035; #mobility of electrons in m^2/Vs\nE=0.5; #electric field strength in V/m\n\n#Calculation\nvd=mew_e*E;\nvd=vd*10**3;\n\n#Result\nprint(\"drift velocity of free electrons in m/sec is\",vd,\"*10**-3\");\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "mew_e=0.0035; #mobility of electrons in m^2/Vs\n", + "E=0.5; #electric field strength in V/m\n", + "\n", + "#Calculation\n", + "vd=mew_e*E;\n", + "vd=vd*10**3;\n", + "\n", + "#Result\n", + "print(\"drift velocity of free electrons in m/sec is\",vd,\"*10**-3\");\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n" + "text": [ + "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n" + ] } ], "prompt_number": 1 @@ -101,19 +186,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.5, Page number 232" + "source": [ + "Example number 8.5, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mobility of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**23; #avagadro number\ne=1.6*10**-19;\nrho=1.73*10**-8; #resistivity of Cu in ohm metre\nw=63.5; #atomic weight \nd=8.92*10**3; #density in kg/m^3\n\n#Calculation\nd=d*10**3;\nsigma=1/rho;\nsigmaa=sigma/10**7;\nsigmaa=math.ceil(sigmaa*10**3)/10**3; #rounding off to 3 decimals\nn=(d*A)/w;\nmew=sigma/(n*e); #mobility of electrons\nmew=mew*10**3;\nmew=math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"electrical conductivity in ohm-1 m-1\",sigmaa,\"*10**7\");\nprint(\"concentration of carriers per m^3\",n);\nprint(\"mobility of electrons in m^2/Vsec is\",mew,\"*10**-3\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**23; #avagadro number\n", + "e=1.6*10**-19;\n", + "rho=1.73*10**-8; #resistivity of Cu in ohm metre\n", + "w=63.5; #atomic weight \n", + "d=8.92*10**3; #density in kg/m^3\n", + "\n", + "#Calculation\n", + "d=d*10**3;\n", + "sigma=1/rho;\n", + "sigmaa=sigma/10**7;\n", + "sigmaa=math.ceil(sigmaa*10**3)/10**3; #rounding off to 3 decimals\n", + "n=(d*A)/w;\n", + "mew=sigma/(n*e); #mobility of electrons\n", + "mew=mew*10**3;\n", + "mew=math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"electrical conductivity in ohm-1 m-1\",sigmaa,\"*10**7\");\n", + "print(\"concentration of carriers per m^3\",n);\n", + "print(\"mobility of electrons in m^2/Vsec is\",mew,\"*10**-3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical conductivity in ohm-1 m-1', 5.781, '*10**7')\n('concentration of carriers per m^3', 8.459250393700786e+28)\n('mobility of electrons in m^2/Vsec is', 4.2708, '*10**-3')\n" + "text": [ + "('electrical conductivity in ohm-1 m-1', 5.781, '*10**7')\n", + "('concentration of carriers per m^3', 8.459250393700786e+28)\n", + "('mobility of electrons in m^2/Vsec is', 4.2708, '*10**-3')\n" + ] } ], "prompt_number": 16 @@ -122,19 +240,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.6, Page number 232" + "source": [ + "Example number 8.6, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fermi energy\n\n#importing modules\nimport math\n\n#Variable declaration\nn=18.1*10**28; #concentration of electrons per m^3\nh=6.62*10**-34; #planck constant in Js\nme=9.1*10**-31; #mass of electron in kg\n\n#Calculation\nX=h**2/(8*me);\nE_F0=X*(((3*n)/math.pi)**(2/3));\nE_F0=E_F0/(1.6*10**-19); #converting J to eV\n\n#Result\nprint(\"Fermi energy in eV is\",E_F0);\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=18.1*10**28; #concentration of electrons per m^3\n", + "h=6.62*10**-34; #planck constant in Js\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "X=h**2/(8*me);\n", + "E_F0=X*(((3*n)/math.pi)**(2/3));\n", + "E_F0=E_F0/(1.6*10**-19); #converting J to eV\n", + "\n", + "#Result\n", + "print(\"Fermi energy in eV is\",E_F0);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Fermi energy in eV is', 3.762396978021977e-19)\n" + "text": [ + "('Fermi energy in eV is', 3.762396978021977e-19)\n" + ] } ], "prompt_number": 18 @@ -143,19 +285,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.7, Page number 233" + "source": [ + "Example number 8.7, Page number 233" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the concentration of free electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nE_F0=5.5; #fermi energy in eV\nh=6.63*10**-34; #planck constant in Js\nme=9.1*10**-31; #mass of electron in kg\n\n#Calculation\nE_F0=E_F0*1.6*10**-19; #converting eV to J\nn=((2*me*E_F0)**(3/2))*((8*math.pi)/(3*h**3));\n\n#Result\nprint(\"concentration of free electrons per unit volume of silver per m^3 is\",n);\n\n#answer given in the book is wrong\n", + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E_F0=5.5; #fermi energy in eV\n", + "h=6.63*10**-34; #planck constant in Js\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "E_F0=E_F0*1.6*10**-19; #converting eV to J\n", + "n=((2*me*E_F0)**(3/2))*((8*math.pi)/(3*h**3));\n", + "\n", + "#Result\n", + "print(\"concentration of free electrons per unit volume of silver per m^3 is\",n);\n", + "\n", + "#answer given in the book is wrong\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of free electrons per unit volume of silver per m^3 is', 4.603965704817037e+52)\n" + "text": [ + "('concentration of free electrons per unit volume of silver per m^3 is', 4.603965704817037e+52)\n" + ] } ], "prompt_number": 19 @@ -164,19 +327,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.8, Page number 233" + "source": [ + "Example number 8.8, Page number 233" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of an electron\n\n#importing modules\nimport math\n\n#Variable declaration\nEg=1.07; #energy gap of silicon in eV\nk=1.38*10**-23;\nT=298; #temperature in K\n\n#Calculation\nEg=Eg*1.6*10**-19; #converting eV to J\n#let the probability of electron f(E) be X\n#X=1/(1+exp((E-Ef)/(k*T)))\n#but E=Ec and Ec-Ef=Eg/2\nX=1/(1+math.exp(Eg/(2*k*T)))\n\n#Result\nprint(\"probability of an electron thermally excited is\",X);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Eg=1.07; #energy gap of silicon in eV\n", + "k=1.38*10**-23;\n", + "T=298; #temperature in K\n", + "\n", + "#Calculation\n", + "Eg=Eg*1.6*10**-19; #converting eV to J\n", + "#let the probability of electron f(E) be X\n", + "#X=1/(1+exp((E-Ef)/(k*T)))\n", + "#but E=Ec and Ec-Ef=Eg/2\n", + "X=1/(1+math.exp(Eg/(2*k*T)))\n", + "\n", + "#Result\n", + "print(\"probability of an electron thermally excited is\",X);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of an electron thermally excited is', 9.122602463573379e-10)\n" + "text": [ + "('probability of an electron thermally excited is', 9.122602463573379e-10)\n" + ] } ], "prompt_number": 21 @@ -185,19 +372,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.9, Page number 234" + "source": [ + "Example number 8.9, Page number 234" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fermi energy and temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nm=9.1*10**-31; #mass of the electron in kg\nvf=0.86*10**6; #fermi velocity in m/sec\n\n#Calculation\nEfj=(m*vf**2)/2;\nEf=Efj/(1.6*10**-19); #converting J to eV\nEf=math.ceil(Ef*10**3)/10**3; #rounding off to 3 decimals\nTf=Efj/k;\nTf=Tf/10**4;\nTf=math.ceil(Tf*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"fermi energy of metal in J is\",Efj);\nprint(\"fermi energy of metal in eV is\",Ef);\nprint(\"fermi temperature in K is\",Tf,\"*10**4\");\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "vf=0.86*10**6; #fermi velocity in m/sec\n", + "\n", + "#Calculation\n", + "Efj=(m*vf**2)/2;\n", + "Ef=Efj/(1.6*10**-19); #converting J to eV\n", + "Ef=math.ceil(Ef*10**3)/10**3; #rounding off to 3 decimals\n", + "Tf=Efj/k;\n", + "Tf=Tf/10**4;\n", + "Tf=math.ceil(Tf*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"fermi energy of metal in J is\",Efj);\n", + "print(\"fermi energy of metal in eV is\",Ef);\n", + "print(\"fermi temperature in K is\",Tf,\"*10**4\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi energy of metal in J is', 3.3651800000000002e-19)\n('fermi energy of metal in eV is', 2.104)\n('fermi temperature in K is', 2.4386, '*10**4')\n" + "text": [ + "('fermi energy of metal in J is', 3.3651800000000002e-19)\n", + "('fermi energy of metal in eV is', 2.104)\n", + "('fermi temperature in K is', 2.4386, '*10**4')\n" + ] } ], "prompt_number": 24 @@ -206,19 +422,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.10, Page number 234" + "source": [ + "Example number 8.10, Page number 234" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Lorentz number\n\n#Variable declaration\nsigma=5.82*10**7; #electrical conductivity in ohm^-1m^-1\nK=387; #thermal conductivity of Cu in W/mK\nT=27; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nL=K/(sigma*T);\n\n#Result\nprint(\"lorentz number in W ohm/K^2 is\",L);\n", + "input": [ + "\n", + "#Variable declaration\n", + "sigma=5.82*10**7; #electrical conductivity in ohm^-1m^-1\n", + "K=387; #thermal conductivity of Cu in W/mK\n", + "T=27; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "L=K/(sigma*T);\n", + "\n", + "#Result\n", + "print(\"lorentz number in W ohm/K^2 is\",L);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n" + "text": [ + "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n" + ] } ], "prompt_number": 25 @@ -227,19 +460,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.11, Page number 235" + "source": [ + "Example number 8.11, Page number 235" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electrical conductivity, thermal conductivity and Lorentz number\n\n#importing modules\nimport math\n\n#Variable declaration\nm=9.1*10**-31; #mass of the electron in kg\ne=1.6*10**-19;\nk=1.38*10**-23;\nn=8.49*10**28; #concentration of electrons in Cu per m^3\ntow_r=2.44*10**-14; #relaxation time in sec\nT=20; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nsigma=(n*(e**2)*tow_r)/m;\nsigmaa=sigma/10**7;\nsigmaa=math.ceil(sigmaa*10**4)/10**4; #rounding off to 4 decimals\nK=(n*(math.pi**2)*(k**2)*T*tow_r)/(3*m);\nK=math.ceil(K*100)/100; #rounding off to 2 decimals\nL=K/(sigma*T);\n\n#Result\nprint(\"electrical conductivity in ohm^-1 m^-1 is\",sigmaa,\"*10**7\");\nprint(\"thermal conductivity in W/mK is\",K);\nprint(\"Lorentz number in W ohm/K^2 is\",L);\n\n#answer for lorentz number given in the book is wrong\n", + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "e=1.6*10**-19;\n", + "k=1.38*10**-23;\n", + "n=8.49*10**28; #concentration of electrons in Cu per m^3\n", + "tow_r=2.44*10**-14; #relaxation time in sec\n", + "T=20; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "sigma=(n*(e**2)*tow_r)/m;\n", + "sigmaa=sigma/10**7;\n", + "sigmaa=math.ceil(sigmaa*10**4)/10**4; #rounding off to 4 decimals\n", + "K=(n*(math.pi**2)*(k**2)*T*tow_r)/(3*m);\n", + "K=math.ceil(K*100)/100; #rounding off to 2 decimals\n", + "L=K/(sigma*T);\n", + "\n", + "#Result\n", + "print(\"electrical conductivity in ohm^-1 m^-1 is\",sigmaa,\"*10**7\");\n", + "print(\"thermal conductivity in W/mK is\",K);\n", + "print(\"Lorentz number in W ohm/K^2 is\",L);\n", + "\n", + "#answer for lorentz number given in the book is wrong\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical conductivity in ohm^-1 m^-1 is', 5.8277, '*10**7')\n('thermal conductivity in W/mK is', 417.89)\n('Lorentz number in W ohm/K^2 is', 2.4473623172034308e-08)\n" + "text": [ + "('electrical conductivity in ohm^-1 m^-1 is', 5.8277, '*10**7')\n", + "('thermal conductivity in W/mK is', 417.89)\n", + "('Lorentz number in W ohm/K^2 is', 2.4473623172034308e-08)\n" + ] } ], "prompt_number": 29 @@ -247,7 +513,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Marikani/Chapter_9.ipynb b/Engineering_Physics_Marikani/Chapter_9.ipynb index 4524cd7c..bcdb04e8 100644 --- a/Engineering_Physics_Marikani/Chapter_9.ipynb +++ b/Engineering_Physics_Marikani/Chapter_9.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 9" + "name": "", + "signature": "sha256:0873412d6a4e98969b64a50f25d022cd9e4d104c8635e0bc9bd27817ed58d4b4" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,46 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Semiconducting materials" + "source": [ + "Semiconducting materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.1, Page number 266" + "source": [ + "Example number 9.1, Page number 266" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of charge carriers\n\n#Variable declaration\nmew_e=0.36; #mobility of electrons in m^2/Vs\nmew_h=0.14; #mobility of holes in m^2/Vs\nsigma=2.2; #conductivity in ohm-1 m-1\nT=300; #temperature in K\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nni=sigma/(e*(mew_e+mew_h)); #carrier concentration per m^3\n\n#Result\nprint(\"carrier concentration of an intrinsic semiconductor per m^3 is\",ni);", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "mew_e=0.36; #mobility of electrons in m^2/Vs\n", + "mew_h=0.14; #mobility of holes in m^2/Vs\n", + "sigma=2.2; #conductivity in ohm-1 m-1\n", + "T=300; #temperature in K\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "ni=sigma/(e*(mew_e+mew_h)); #carrier concentration per m^3\n", + "\n", + "#Result\n", + "print(\"carrier concentration of an intrinsic semiconductor per m^3 is\",ni);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('carrier concentration of an intrinsic semiconductor per m^3 is', 2.75e+19)\n" + "text": [ + "('carrier concentration of an intrinsic semiconductor per m^3 is', 2.75e+19)\n" + ] } ], "prompt_number": 1 @@ -38,19 +60,65 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.2, Page number 266" + "source": [ + "Example number 9.2, Page number 266" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap\n\n#importing modules\nimport math\nimport numpy as np\nfrom __future__ import division\n\n#Variable declaration\nT1=20; #temperature in C\nT2=100; #temperature in C\nsigma_i20=250; #conductivity in ohm-1 m-1\nsigma_i100=1100; #conductivity in ohm-1 m-1\nk=1.38*10**-23;\n\n#Calculation\nT1K=T1+273; #temperature in K\nT2K=T2+273; #temperature in K\nT_1K=T1K**(-1);\nT_2K=T2K**(-1);\nT_1=T_2K-T_1K;\nT_2=T2K/T1K;\nTk=T_1**(-1);\nT_k=(T_2)**(3/2);\n#intrinsic carrier concentration at T1K is ni20 = 2*((2*math.pi*k*m*293)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*293))\n#intrinsic carrier concentration at T2K is ni100 = 2*((2*math.pi*k*m*373)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*373))\n#dividing ni20/ni100 = (293/373)**(3/2)*(math.exp(-Eg/(2*k*293))/math.exp(-Eg/(2*k*373)))\n#ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n#sigma_i20/sigma_i100 = (ni20*e*(mew_e+mew_h))/(ni100*e*(mew_e+mew_h)) = ni20/ni100\n#therefore sigma_i20/sigma_i100 = ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n#math.exp((-Eg/(2*k))*((1/293)-(1/373))) = (sigma_i20/sigma_i100)*(373/293)**(3/2)\n#by taking log on both sides we get (-Eg/(2*k))*((1/293)-(1/373)) = np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\n#Eg=2*k*(((1/373)-(1/293))**(-1))*np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\nEg=2*k*Tk*np.log((sigma_i20/sigma_i100)*T_k); #band gap in J\nEgeV=Eg*6.241*10**18; #converting J to eV\nEgeV=math.ceil(EgeV*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"band gap of the semiconductor in J is\",Eg);\nprint(\"band gap of the semiconductor in eV is\",EgeV);\n\n#answer for band gap in eV given in the book is wrong in the 4th decimal point", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "import numpy as np\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=20; #temperature in C\n", + "T2=100; #temperature in C\n", + "sigma_i20=250; #conductivity in ohm-1 m-1\n", + "sigma_i100=1100; #conductivity in ohm-1 m-1\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "T1K=T1+273; #temperature in K\n", + "T2K=T2+273; #temperature in K\n", + "T_1K=T1K**(-1);\n", + "T_2K=T2K**(-1);\n", + "T_1=T_2K-T_1K;\n", + "T_2=T2K/T1K;\n", + "Tk=T_1**(-1);\n", + "T_k=(T_2)**(3/2);\n", + "#intrinsic carrier concentration at T1K is ni20 = 2*((2*math.pi*k*m*293)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*293))\n", + "#intrinsic carrier concentration at T2K is ni100 = 2*((2*math.pi*k*m*373)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*373))\n", + "#dividing ni20/ni100 = (293/373)**(3/2)*(math.exp(-Eg/(2*k*293))/math.exp(-Eg/(2*k*373)))\n", + "#ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n", + "#sigma_i20/sigma_i100 = (ni20*e*(mew_e+mew_h))/(ni100*e*(mew_e+mew_h)) = ni20/ni100\n", + "#therefore sigma_i20/sigma_i100 = ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n", + "#math.exp((-Eg/(2*k))*((1/293)-(1/373))) = (sigma_i20/sigma_i100)*(373/293)**(3/2)\n", + "#by taking log on both sides we get (-Eg/(2*k))*((1/293)-(1/373)) = np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\n", + "#Eg=2*k*(((1/373)-(1/293))**(-1))*np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\n", + "Eg=2*k*Tk*np.log((sigma_i20/sigma_i100)*T_k); #band gap in J\n", + "EgeV=Eg*6.241*10**18; #converting J to eV\n", + "EgeV=math.ceil(EgeV*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of the semiconductor in J is\",Eg);\n", + "print(\"band gap of the semiconductor in eV is\",EgeV);\n", + "\n", + "#answer for band gap in eV given in the book is wrong in the 4th decimal point" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of the semiconductor in J is', 4.2210259829756855e-20)\n('band gap of the semiconductor in eV is', 0.2635)\n" + "text": [ + "('band gap of the semiconductor in J is', 4.2210259829756855e-20)\n", + "('band gap of the semiconductor in eV is', 0.2635)\n" + ] } ], "prompt_number": 3 @@ -59,19 +127,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.3, Page number 267" + "source": [ + "Example number 9.3, Page number 267" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Hall voltage\n\n#Variable declaration\nI=10**-2; #current in Ampere\nl=100; #length in mm\nd=1; #thickness in mm\nw=10; #breadth in mm\nB=0.5; #magnetic field in Wb/m^2\nRH=3.66*10**-4; #hall coefficient in m^3/C\n\n#Calculation\nw=w*10**-3; #width in m\nVH=(B*I*RH)/w; #hall voltage\nVH=VH*10**4;\n\n#Result\nprint(\"Hall voltage in V is\",VH,\"*10**-4\");", + "input": [ + "\n", + "\n", + "#Variable declaration\n", + "I=10**-2; #current in Ampere\n", + "l=100; #length in mm\n", + "d=1; #thickness in mm\n", + "w=10; #breadth in mm\n", + "B=0.5; #magnetic field in Wb/m^2\n", + "RH=3.66*10**-4; #hall coefficient in m^3/C\n", + "\n", + "#Calculation\n", + "w=w*10**-3; #width in m\n", + "VH=(B*I*RH)/w; #hall voltage\n", + "VH=VH*10**4;\n", + "\n", + "#Result\n", + "print(\"Hall voltage in V is\",VH,\"*10**-4\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Hall voltage in V is', 1.83, '*10**-4')\n" + "text": [ + "('Hall voltage in V is', 1.83, '*10**-4')\n" + ] } ], "prompt_number": 1 @@ -80,19 +170,58 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.4, Page number 268" + "source": [ + "Example number 9.4, Page number 268" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the concentration of holes and electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nsigma=300; #conductivity in S/cm\nT=300; #temperature in K\nni=1.5*10**10 #carrier concentration per cm^3\nmew_e=1300; #mobility of electrons in cm^2/Vs\nmew_h=500; #mobility of holes in cm^2/Vs\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nsigma=sigma*10**2; #sigma in S/m\nmew_e=mew_e*10**-4; #mobility of electrons in m^2/Vs\nND=sigma/(e*mew_e); #concentration of electron per m^3\nni=ni*10**6; #carrier concentration per m^3\np=ni**2/ND; #hole concentration per m^3\np=p/10**8;\np=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\nmew_h=mew_h*10**-4; #mobility of holes in m^2/Vs\nNA=sigma/(e*mew_h); #concentration of hole per m^3\nn=ni**2/NA; #electron concentration per m^3\nn=n/10**7;\n\n#Result\nprint(\"concentration of electron for N-type semiconductor per m^3\",ND);\nprint(\"hole concentration per m^3\",p,\"*10**8\");\nprint(\"concentration of hole for P-type semiconductor per m^3\",NA);\nprint(\"electron concentration per m^3\",int(n),\"*10**7\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "sigma=300; #conductivity in S/cm\n", + "T=300; #temperature in K\n", + "ni=1.5*10**10 #carrier concentration per cm^3\n", + "mew_e=1300; #mobility of electrons in cm^2/Vs\n", + "mew_h=500; #mobility of holes in cm^2/Vs\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "sigma=sigma*10**2; #sigma in S/m\n", + "mew_e=mew_e*10**-4; #mobility of electrons in m^2/Vs\n", + "ND=sigma/(e*mew_e); #concentration of electron per m^3\n", + "ni=ni*10**6; #carrier concentration per m^3\n", + "p=ni**2/ND; #hole concentration per m^3\n", + "p=p/10**8;\n", + "p=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\n", + "mew_h=mew_h*10**-4; #mobility of holes in m^2/Vs\n", + "NA=sigma/(e*mew_h); #concentration of hole per m^3\n", + "n=ni**2/NA; #electron concentration per m^3\n", + "n=n/10**7;\n", + "\n", + "#Result\n", + "print(\"concentration of electron for N-type semiconductor per m^3\",ND);\n", + "print(\"hole concentration per m^3\",p,\"*10**8\");\n", + "print(\"concentration of hole for P-type semiconductor per m^3\",NA);\n", + "print(\"electron concentration per m^3\",int(n),\"*10**7\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of electron for N-type semiconductor per m^3', 1.4423076923076921e+24)\n('hole concentration per m^3', 1.561, '*10**8')\n('concentration of hole for P-type semiconductor per m^3', 3.7499999999999995e+24)\n('electron concentration per m^3', 6, '*10**7')\n" + "text": [ + "('concentration of electron for N-type semiconductor per m^3', 1.4423076923076921e+24)\n", + "('hole concentration per m^3', 1.561, '*10**8')\n", + "('concentration of hole for P-type semiconductor per m^3', 3.7499999999999995e+24)\n", + "('electron concentration per m^3', 6, '*10**7')\n" + ] } ], "prompt_number": 11 @@ -101,19 +230,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.5, Page number 269" + "source": [ + "Example number 9.5, Page number 269" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the type of charge carriers and the carrier concentration\n\n#importing modules\nimport math\n\n#Variable declaration\nRH=-3.68*10**-5; #hall coefficient in m^3/C\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\n#hall coefficient is negative implies charge carriers are electrons\nn=(3*math.pi)/(8*(-RH)*e); #carrier concentration\n\n#Result\nprint(\"charge carriers are electrons\");\nprint(\"carrier concentration per m^3 is\",n);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "RH=-3.68*10**-5; #hall coefficient in m^3/C\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "#hall coefficient is negative implies charge carriers are electrons\n", + "n=(3*math.pi)/(8*(-RH)*e); #carrier concentration\n", + "\n", + "#Result\n", + "print(\"charge carriers are electrons\");\n", + "print(\"carrier concentration per m^3 is\",n);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "charge carriers are electrons\n('carrier concentration per m^3 is', 2.000844505937792e+23)\n" + "text": [ + "charge carriers are electrons\n", + "('carrier concentration per m^3 is', 2.000844505937792e+23)\n" + ] } ], "prompt_number": 13 @@ -122,19 +273,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.6, Page number 269" + "source": [ + "Example number 9.6, Page number 269" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To compare the intrinsic carrier density\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nEg1=0.36; #energy gap of 1st material in eV\nEg2=0.72; #energy gap of 2nd material in eV\nT=300; #temperature in K\nmh=9*10**-31;\nme=9*10**-31; \n#given that 2*k*T=0.052; \n#consider X=2*k*T\nX=0.052;\n\n#Calculation\n#intrinsic carrier concentration for A niA = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.36/(2*k*T))\n#intrinsic carrier concentration for B niB = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.72/(2*k*T))\n#dividing niA/niB = math.exp(-0.36/(2*k*T))*math.exp(0.72/(2*k*T))\n#let niA/niB be A\nA = math.exp(-0.36/X)*math.exp(0.72/X);\nA=A/10**3;\nA=math.ceil(A*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"ratio of intrinsic carrier densities of A and B is\",A,\"*10**3\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg1=0.36; #energy gap of 1st material in eV\n", + "Eg2=0.72; #energy gap of 2nd material in eV\n", + "T=300; #temperature in K\n", + "mh=9*10**-31;\n", + "me=9*10**-31; \n", + "#given that 2*k*T=0.052; \n", + "#consider X=2*k*T\n", + "X=0.052;\n", + "\n", + "#Calculation\n", + "#intrinsic carrier concentration for A niA = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.36/(2*k*T))\n", + "#intrinsic carrier concentration for B niB = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.72/(2*k*T))\n", + "#dividing niA/niB = math.exp(-0.36/(2*k*T))*math.exp(0.72/(2*k*T))\n", + "#let niA/niB be A\n", + "A = math.exp(-0.36/X)*math.exp(0.72/X);\n", + "A=A/10**3;\n", + "A=math.ceil(A*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"ratio of intrinsic carrier densities of A and B is\",A,\"*10**3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('ratio of intrinsic carrier densities of A and B is', 1.01544, '*10**3')\n" + "text": [ + "('ratio of intrinsic carrier densities of A and B is', 1.01544, '*10**3')\n" + ] } ], "prompt_number": 16 @@ -143,19 +326,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.7, Page number 270" + "source": [ + "Example number 9.7, Page number 270" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mobility of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nND=2*10**22; #concentration of electron per m^3\nsigma=112; #conductivity in ohm-1 m-1\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nmew=sigma/(ND*e); #mobility of electrons \nmew=math.ceil(mew*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"mobility of electrons in m^2/Vs is\",mew);", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "ND=2*10**22; #concentration of electron per m^3\n", + "sigma=112; #conductivity in ohm-1 m-1\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "mew=sigma/(ND*e); #mobility of electrons \n", + "mew=math.ceil(mew*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"mobility of electrons in m^2/Vs is\",mew);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mobility of electrons in m^2/Vs is', 0.035)\n" + "text": [ + "('mobility of electrons in m^2/Vs is', 0.035)\n" + ] } ], "prompt_number": 17 @@ -164,19 +368,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.8, Page number 270" + "source": [ + "Example number 9.8, Page number 270" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Hall voltage\n\n#importing modules\nimport math\n\n#Variable declaration\nw=500; #thickness in micrometre\nA=2.5*10**-3; #area of cross section in cm^-2\nIx=1; #current in ampere\nBz=10; #magnetic field in Wb/cm^2\nn=10**16; #donor concentration in m^-3\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nBz=Bz*10**-4; #magnetic field in Wb/m^2\nw=w*10**-6; #thickness in m\nRH=(3*math.pi)/(8*n*e); #hall coefficient\nVH=(Bz*Ix*RH)/w; #hall voltage\nVH=VH/10**3;\nVH=math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"hall voltage in V is\",VH,\"*10**3\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "w=500; #thickness in micrometre\n", + "A=2.5*10**-3; #area of cross section in cm^-2\n", + "Ix=1; #current in ampere\n", + "Bz=10; #magnetic field in Wb/cm^2\n", + "n=10**16; #donor concentration in m^-3\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "Bz=Bz*10**-4; #magnetic field in Wb/m^2\n", + "w=w*10**-6; #thickness in m\n", + "RH=(3*math.pi)/(8*n*e); #hall coefficient\n", + "VH=(Bz*Ix*RH)/w; #hall voltage\n", + "VH=VH/10**3;\n", + "VH=math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"hall voltage in V is\",VH,\"*10**3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('hall voltage in V is', 1.4727, '*10**3')\n" + "text": [ + "('hall voltage in V is', 1.4727, '*10**3')\n" + ] } ], "prompt_number": 23 @@ -185,19 +417,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.9, Page number 271" + "source": [ + "Example number 9.9, Page number 271" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the ratio between conductivity of intrinsic semiconductor\n\n#importing modules\nimport math\nfrom __future__ import division\nimport numpy as np\n\n#Variable declaration\nEg=1.2; #energy gap in eV\nT1=300; #temperature in K\nT2=600; #temperature in K\nk=1.38*10**-23;\n\n#Calculation\nT_1=T1**(-1);\nT_2=T2**(-1);\nT=T_1-T_2;\nEg=Eg*1.602*10**-19; #Eg in J\n#sigma_300=ni300*e*(mew_e+mew_h)\n#sigma_600=ni600*e*(mew_e+mew_h)\n#sigma_600/sigma_300 = ni600/ni300\n#ni600/ni300 =((T2/T1)**(3/2))*math.exp(-Eg/(2*k*T2))*math.exp(Eg/(2*k*T1));\n#ni600/ni300 =((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T;\n#let ni600/ni300 be X\nX=((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T);\n\n\n#Result\nprint(\"ratio between the conductivity of material is\",int(X));\n\n#answer given in the book is wrong", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "Eg=1.2; #energy gap in eV\n", + "T1=300; #temperature in K\n", + "T2=600; #temperature in K\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "T_1=T1**(-1);\n", + "T_2=T2**(-1);\n", + "T=T_1-T_2;\n", + "Eg=Eg*1.602*10**-19; #Eg in J\n", + "#sigma_300=ni300*e*(mew_e+mew_h)\n", + "#sigma_600=ni600*e*(mew_e+mew_h)\n", + "#sigma_600/sigma_300 = ni600/ni300\n", + "#ni600/ni300 =((T2/T1)**(3/2))*math.exp(-Eg/(2*k*T2))*math.exp(Eg/(2*k*T1));\n", + "#ni600/ni300 =((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T;\n", + "#let ni600/ni300 be X\n", + "X=((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T);\n", + "\n", + "\n", + "#Result\n", + "print(\"ratio between the conductivity of material is\",int(X));\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('ratio between the conductivity of material is', 311270)\n" + "text": [ + "('ratio between the conductivity of material is', 311270)\n" + ] } ], "prompt_number": 25 @@ -206,19 +474,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.10, Page number 272" + "source": [ + "Example number 9.10, Page number 272" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the intrinsic carrier concentration\n\n#importing modules\nimport math\n\n#Variable declaration\nsigma=10**-6; #electrical conductivity in ohm-1 m-1\nmew_e=0.85; #electron mobility in m^2/Vs\nmew_h=0.04; #hole mobility in m^2/Vs\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nni=sigma/(e*(mew_e+mew_h)); #intrinsic carrier concentration\nni=ni/10**12;\nni=math.ceil(ni*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intrinsic carrier concentration per m^3 is\",ni,\"*10**12\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "sigma=10**-6; #electrical conductivity in ohm-1 m-1\n", + "mew_e=0.85; #electron mobility in m^2/Vs\n", + "mew_h=0.04; #hole mobility in m^2/Vs\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "ni=sigma/(e*(mew_e+mew_h)); #intrinsic carrier concentration\n", + "ni=ni/10**12;\n", + "ni=math.ceil(ni*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"intrinsic carrier concentration per m^3 is\",ni,\"*10**12\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intrinsic carrier concentration per m^3 is', 7.0225, '*10**12')\n" + "text": [ + "('intrinsic carrier concentration per m^3 is', 7.0225, '*10**12')\n" + ] } ], "prompt_number": 27 @@ -227,19 +518,62 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.11, Page number 272" + "source": [ + "Example number 9.11, Page number 272" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the density of impurity atoms and concentration of minority carriers\n\n#importing modules\nimport math\n\n#Variable declaration\nrho_p=10; #resistivity of p-type Si in ohm cm\nrho_n=10; #resistivity of n-type Si in ohm cm\nmew_e=1350; #electron mobility in cm^2/Vs\nmew_h=480; #hole mobility in cm^2/Vs\nni=1.5*10**10; #carrier concentration in cm^-3\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nrho_p=rho_p*10**-2;#resistivity of p-type Si in ohm m\nsigma_p=1/rho_p; #electrical conductivity\nmew_h=mew_h*10**-3;\nNA=sigma_p/(e*mew_h); #acceptor concentration\nni=ni*10**6; #carrier concentration in m^-3\nn=ni**2/NA; #concentration of minority carriers in m^-3\nn=n/10**12;\nn=math.ceil(n*10**4)/10**4; #rounding off to 4 decimals\nrho_n=rho_n*10**-2; #resistivity of n-type Si in ohm m\nsigma_n=1/rho_n; #electrical conductivity\nmew_e=mew_e*10**-3;\nND=sigma_n/(e*mew_e); #donor concentration\np=(ni**2)/ND; #concentration of minority carriers in m^-3\np=p/10**12;\np=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"donor concentration per m^3 is\",ND);\nprint(\"concentration of minority carriers per m^3\",p,\"*10**12\");\nprint(\"acceptor concentration per m^3 is\",NA);\nprint(\"concentration of minority carriers per m^3 is\",n,\"*10**12\");", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "rho_p=10; #resistivity of p-type Si in ohm cm\n", + "rho_n=10; #resistivity of n-type Si in ohm cm\n", + "mew_e=1350; #electron mobility in cm^2/Vs\n", + "mew_h=480; #hole mobility in cm^2/Vs\n", + "ni=1.5*10**10; #carrier concentration in cm^-3\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "rho_p=rho_p*10**-2;#resistivity of p-type Si in ohm m\n", + "sigma_p=1/rho_p; #electrical conductivity\n", + "mew_h=mew_h*10**-3;\n", + "NA=sigma_p/(e*mew_h); #acceptor concentration\n", + "ni=ni*10**6; #carrier concentration in m^-3\n", + "n=ni**2/NA; #concentration of minority carriers in m^-3\n", + "n=n/10**12;\n", + "n=math.ceil(n*10**4)/10**4; #rounding off to 4 decimals\n", + "rho_n=rho_n*10**-2; #resistivity of n-type Si in ohm m\n", + "sigma_n=1/rho_n; #electrical conductivity\n", + "mew_e=mew_e*10**-3;\n", + "ND=sigma_n/(e*mew_e); #donor concentration\n", + "p=(ni**2)/ND; #concentration of minority carriers in m^-3\n", + "p=p/10**12;\n", + "p=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"donor concentration per m^3 is\",ND);\n", + "print(\"concentration of minority carriers per m^3\",p,\"*10**12\");\n", + "print(\"acceptor concentration per m^3 is\",NA);\n", + "print(\"concentration of minority carriers per m^3 is\",n,\"*10**12\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('donor concentration per m^3 is', 4.6296296296296284e+19)\n('concentration of minority carriers per m^3', 4.861, '*10**12')\n('acceptor concentration per m^3 is', 1.3020833333333331e+20)\n('concentration of minority carriers per m^3 is', 1.7281, '*10**12')\n" + "text": [ + "('donor concentration per m^3 is', 4.6296296296296284e+19)\n", + "('concentration of minority carriers per m^3', 4.861, '*10**12')\n", + "('acceptor concentration per m^3 is', 1.3020833333333331e+20)\n", + "('concentration of minority carriers per m^3 is', 1.7281, '*10**12')\n" + ] } ], "prompt_number": 33 @@ -247,7 +581,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] |