summaryrefslogtreecommitdiff
path: root/Engineering_Physics_Marikani
diff options
context:
space:
mode:
authorJovina Dsouza2014-06-18 13:08:52 +0530
committerJovina Dsouza2014-06-18 13:08:52 +0530
commita78126bbe4443e9526a64df9d8245c4af8843044 (patch)
treeec84778a693a93a076d64803afbe814b8f5c99be /Engineering_Physics_Marikani
parent206d0358703aa05d5d7315900fe1d054c2817ddc (diff)
downloadPython-Textbook-Companions-a78126bbe4443e9526a64df9d8245c4af8843044.tar.gz
Python-Textbook-Companions-a78126bbe4443e9526a64df9d8245c4af8843044.tar.bz2
Python-Textbook-Companions-a78126bbe4443e9526a64df9d8245c4af8843044.zip
adding book
Diffstat (limited to 'Engineering_Physics_Marikani')
-rw-r--r--Engineering_Physics_Marikani/Chapter_1.ipynb133
-rw-r--r--Engineering_Physics_Marikani/Chapter_10.ipynb154
-rw-r--r--Engineering_Physics_Marikani/Chapter_11.ipynb175
-rw-r--r--Engineering_Physics_Marikani/Chapter_12.ipynb154
-rw-r--r--Engineering_Physics_Marikani/Chapter_2.ipynb238
-rw-r--r--Engineering_Physics_Marikani/Chapter_3.ipynb154
-rw-r--r--Engineering_Physics_Marikani/Chapter_4.ipynb343
-rw-r--r--Engineering_Physics_Marikani/Chapter_6.ipynb400
-rw-r--r--Engineering_Physics_Marikani/Chapter_7.ipynb91
-rw-r--r--Engineering_Physics_Marikani/Chapter_8.ipynb259
-rw-r--r--Engineering_Physics_Marikani/Chapter_9.ipynb259
-rw-r--r--Engineering_Physics_Marikani/README.txt10
-rw-r--r--Engineering_Physics_Marikani/screenshots/screenshot1.PNGbin0 -> 33329 bytes
-rw-r--r--Engineering_Physics_Marikani/screenshots/screenshot2.PNGbin0 -> 31796 bytes
-rw-r--r--Engineering_Physics_Marikani/screenshots/screenshot3.PNGbin0 -> 19782 bytes
15 files changed, 2370 insertions, 0 deletions
diff --git a/Engineering_Physics_Marikani/Chapter_1.ipynb b/Engineering_Physics_Marikani/Chapter_1.ipynb
new file mode 100644
index 00000000..4392ba50
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_1.ipynb
@@ -0,0 +1,133 @@
+{
+ "metadata": {
+ "name": "Chapter 1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Ultrasonics"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('fundamental frequency of vibration in MHz is', 1.819992)\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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));",
+ "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"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('doppler shifted frequency in MHz is', 0.012991)\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('velocity of ultrasonic waves in m/s is', 5459.975)\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_10.ipynb b/Engineering_Physics_Marikani/Chapter_10.ipynb
new file mode 100644
index 00000000..d1968a2f
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_10.ipynb
@@ -0,0 +1,154 @@
+{
+ "metadata": {
+ "name": "Chapter 10"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Magnetic materials"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('magnetic moment of Ni is', 0.611, 'mew_b')\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('permeability of material is', 663.146)\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('saturation magnetisation in A/m is', 2.9299, '*10**5')\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('magnetic flux density in Wb/m^2 is', 1.3824, '*10**-3')\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_11.ipynb b/Engineering_Physics_Marikani/Chapter_11.ipynb
new file mode 100644
index 00000000..6e1a896d
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_11.ipynb
@@ -0,0 +1,175 @@
+{
+ "metadata": {
+ "name": "Chapter 11"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Dielectric materials"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('dielectric constant of material is', 2258.87)\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('electronic polarizability of He gas in Fm^2 is', 2.2430133333322991e-41)\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('polarization in C/m^2 is', 4.426999999999999e-09)\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('electronic polarizability in Fm^2 is', 4.3885458748002144e-40)\n"
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "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"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('dielectric constant is', 5.8566)\n"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('polarisability of material in F/m^2 is', 4.373876e-39)\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_12.ipynb b/Engineering_Physics_Marikani/Chapter_12.ipynb
new file mode 100644
index 00000000..5d0b74d0
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_12.ipynb
@@ -0,0 +1,154 @@
+{
+ "metadata": {
+ "name": "Chapter 12"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Superconducting Materials"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('critical field in T is', 0.02166)\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('critical field in T is', 3364.385)\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('critical temperature of Hg in K is', 4.144685)\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('frequency of ac signal in Hz is', 2.8977, '*10**9')\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('band gap of superconducting lead in meV is', 2.171)\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_2.ipynb b/Engineering_Physics_Marikani/Chapter_2.ipynb
new file mode 100644
index 00000000..f57dc5cb
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_2.ipynb
@@ -0,0 +1,238 @@
+{
+ "metadata": {
+ "name": "Chapter 2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Laser"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('energy of one photon in eV is', 1.964)\n"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('value of E3 in eV is', 2.49)\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)\n"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('relative population between N1 and N2 is', 5.068255595981255e+41)\n"
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)\n"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('efficiency of laser in % is', 0.016667)\n"
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('intensity of laser in W/m^2 is', 1.2733, '*10**9')\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_3.ipynb b/Engineering_Physics_Marikani/Chapter_3.ipynb
new file mode 100644
index 00000000..59daaddd
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_3.ipynb
@@ -0,0 +1,154 @@
+{
+ "metadata": {
+ "name": "Chapter 3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Fibre Optics"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('the numerical aperture of the fibre is', 0.5568)\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('refractive index of the cladding is', 1.4773)\n"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_4.ipynb b/Engineering_Physics_Marikani/Chapter_4.ipynb
new file mode 100644
index 00000000..02198aef
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_4.ipynb
@@ -0,0 +1,343 @@
+{
+ "metadata": {
+ "name": "Chapter 4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Quantum Physics"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('change in wavelength in metres is', 4.1458307496867315e-12)\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('de Broglie wavelength in angstrom is', 0.3471)\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('de Broglie wavelength in angstrom is', 1.8305)\n"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('de Broglie wavelength in angstrom is', 0.7282)\n"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n"
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('probability of finding the particle is', 0.004)\n"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "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"
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('lowest energy of system in eV is', 75.385)\n"
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('mass of the particle in kg is', 1.3719961249999998e-31)\n"
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_6.ipynb b/Engineering_Physics_Marikani/Chapter_6.ipynb
new file mode 100644
index 00000000..1445b978
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_6.ipynb
@@ -0,0 +1,400 @@
+{
+ "metadata": {
+ "name": "Chapter 6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Crystallography"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('density of diamond in kg/m^3 is', 4520.31)\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('percentage change in volume is', 191.12)\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('density of Cu in kg/m^3 is', 8935.92)\n"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('interatomic distance in NaCl in m is', 5.6278114346454509e-10)\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": "Example number 6.8, Page number 188"
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "#sketching the crystallographic planes",
+ "language": "python",
+ "metadata": {},
+ "outputs": [],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('lattice constant in nm is', 0.40496)\n"
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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)\");",
+ "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"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "l1:l2:l3 = 3:2:6\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "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"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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)\");",
+ "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"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('interplanar distance in armstrong is', 0.681)\n"
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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));",
+ "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"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "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"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_7.ipynb b/Engineering_Physics_Marikani/Chapter_7.ipynb
new file mode 100644
index 00000000..c59443c9
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_7.ipynb
@@ -0,0 +1,91 @@
+{
+ "metadata": {
+ "name": "Chapter 7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Crystal Imperfections"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "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"
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('number of Schotky defect per m^3 is', 5.373777171020081e+19)\n"
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_8.ipynb b/Engineering_Physics_Marikani/Chapter_8.ipynb
new file mode 100644
index 00000000..40606862
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_8.ipynb
@@ -0,0 +1,259 @@
+{
+ "metadata": {
+ "name": "Chapter 8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Conducting materials"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('band gap of semiconductor in eV is', 0.647)\n"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('probability of occupation of electrons is', 0.011)\n"
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('Fermi energy in eV is', 3.762396978021977e-19)\n"
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('probability of an electron thermally excited is', 9.122602463573379e-10)\n"
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/Chapter_9.ipynb b/Engineering_Physics_Marikani/Chapter_9.ipynb
new file mode 100644
index 00000000..4524cd7c
--- /dev/null
+++ b/Engineering_Physics_Marikani/Chapter_9.ipynb
@@ -0,0 +1,259 @@
+{
+ "metadata": {
+ "name": "Chapter 9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": "Semiconducting materials"
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('carrier concentration of an intrinsic semiconductor per m^3 is', 2.75e+19)\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "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"
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('Hall voltage in V is', 1.83, '*10**-4')\n"
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "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"
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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);",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('mobility of electrons in m^2/Vs is', 0.035)\n"
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('hall voltage in V is', 1.4727, '*10**3')\n"
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('ratio between the conductivity of material is', 311270)\n"
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": "('intrinsic carrier concentration per m^3 is', 7.0225, '*10**12')\n"
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "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\");",
+ "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"
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": "",
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/README.txt b/Engineering_Physics_Marikani/README.txt
new file mode 100644
index 00000000..00ccdb95
--- /dev/null
+++ b/Engineering_Physics_Marikani/README.txt
@@ -0,0 +1,10 @@
+Contributed By: SINDHU ARROJU
+Course: btech
+College/Institute/Organization: JNTUH
+Department/Designation: Computer Science
+Book Title: Engineering Physics
+Author: A. Marikani
+Publisher: PHI Learning ( New Delhi )
+Year of publication: 2009
+Isbn: 9788120339392
+Edition: 1 \ No newline at end of file
diff --git a/Engineering_Physics_Marikani/screenshots/screenshot1.PNG b/Engineering_Physics_Marikani/screenshots/screenshot1.PNG
new file mode 100644
index 00000000..419ba452
--- /dev/null
+++ b/Engineering_Physics_Marikani/screenshots/screenshot1.PNG
Binary files differ
diff --git a/Engineering_Physics_Marikani/screenshots/screenshot2.PNG b/Engineering_Physics_Marikani/screenshots/screenshot2.PNG
new file mode 100644
index 00000000..bf169152
--- /dev/null
+++ b/Engineering_Physics_Marikani/screenshots/screenshot2.PNG
Binary files differ
diff --git a/Engineering_Physics_Marikani/screenshots/screenshot3.PNG b/Engineering_Physics_Marikani/screenshots/screenshot3.PNG
new file mode 100644
index 00000000..4062fb31
--- /dev/null
+++ b/Engineering_Physics_Marikani/screenshots/screenshot3.PNG
Binary files differ