diff options
Diffstat (limited to 'Applied_Physics_II')
-rwxr-xr-x | Applied_Physics_II/Chapter_1.ipynb | 1108 | ||||
-rwxr-xr-x | Applied_Physics_II/Chapter_2.ipynb | 1000 | ||||
-rwxr-xr-x | Applied_Physics_II/Chapter_3.ipynb | 779 | ||||
-rwxr-xr-x | Applied_Physics_II/Chapter_4.ipynb | 141 | ||||
-rwxr-xr-x | Applied_Physics_II/Chapter_5.ipynb | 1097 | ||||
-rwxr-xr-x | Applied_Physics_II/Chapter_6.ipynb | 189 | ||||
-rwxr-xr-x | Applied_Physics_II/Chapter_7.ipynb | 178 | ||||
-rwxr-xr-x | Applied_Physics_II/README.txt | 10 | ||||
-rwxr-xr-x | Applied_Physics_II/screenshots/halfangular.png | bin | 0 -> 57768 bytes | |||
-rwxr-xr-x | Applied_Physics_II/screenshots/probability.png | bin | 0 -> 36433 bytes | |||
-rwxr-xr-x | Applied_Physics_II/screenshots/visiblerange.png | bin | 0 -> 67578 bytes |
11 files changed, 4502 insertions, 0 deletions
diff --git a/Applied_Physics_II/Chapter_1.ipynb b/Applied_Physics_II/Chapter_1.ipynb new file mode 100755 index 00000000..c6e00369 --- /dev/null +++ b/Applied_Physics_II/Chapter_1.ipynb @@ -0,0 +1,1108 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Interference of Light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.1, Page number 1-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "i = 45 #angle of incidence(degrees)\n", + "t = 4*10**-5 #thickness of film(cm)\n", + "u = 1.2\n", + "\n", + "#Calculations & Result\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "for n in range(1,4):\n", + " lamda = (2*u*t*math.cos(r*math.pi/180))/n\n", + " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-8)\n", + "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 1, wavelength = 7756.29 A\n", + "For n = 2, wavelength = 3878.14 A\n", + "For n = 3, wavelength = 2585.43 A\n", + "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths lie in this range\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.2, Page number 1-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "r = 90 #angle of refraction(degrees)\n", + "t = 5*10**-5 #thickness of film(cm)\n", + "u = 1.33\n", + "\n", + "#Calculations & Result\n", + "for n in range(1,4):\n", + " lamda = (4*u*t*int(math.cos(math.radians(90))))/((2*n)-1)\n", + " print \"For n = %d, wavelength = %.2f A\"%(n,lamda)\n", + "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\"\n", + "\n", + "print \"\\nPlease note: Since r=90, cos(r)=0\\nHence, the answers given in the textbook are incorrect\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 1, wavelength = 0.00 A\n", + "For n = 2, wavelength = 0.00 A\n", + "For n = 3, wavelength = 0.00 A\n", + "Since the visible range of wavelengths lie between 4000 to 7000 A, none of the obtained wavelengths do not lie in this range\n", + "\n", + "Please note: Since r=90, cos(r)=0\n", + "Hence, the answers given in the textbook are incorrect\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.3, Page number 1-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "i = 45 #angle of incidence(degrees)\n", + "t = 1.5*10**-4 #thickness of film(cm)\n", + "lamda = 5*10**-5 #wavelength(cm)\n", + "u = 4./3. #refractive index\n", + "\n", + "#Calculations\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "n = (2*u*t*math.cos(r*math.pi/180))/lamda\n", + "\n", + "#Result\n", + "print \"The order of interfernce is %.2f, close to 7\"%n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The order of interfernce is 6.78, close to 7\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.2.4, Pae number 1-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "i = 45 #angle of incidence(degrees)\n", + "lamda = 5896*10**-8 #wavelength(cm)\n", + "u = 1.33 #refractive index\n", + "n = 1\n", + "\n", + "#Calculations\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round((t/1E-5),2),\"*10^-5 cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 1.31 *10^-5 cm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.5, Page number 1-14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "lamda1 = 7000 #wavelength(A)\n", + "lamda2 = 5000 #wavelength(A)\n", + "u = 1.3 #R.I. of oil\n", + "\n", + "#Calculations\n", + "'''\n", + "2utcosr = (2n-1)7000/2 ----(1)\n", + "2utcosr = (2n+1)5000/2 ----(2)\n", + "Divinding (1) by (2), we get the following expression\n", + "1 = (2n+1)5000\n", + " -----------\n", + " (2n-1)7000\n", + "Solving the above expression, we get,\n", + "'''\n", + "n = 12000/4000\n", + "t = ((2*n-1)*lamda)/(2*u*math.cos(r*math.pi/180)*2)\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round((t/1E-5),4),\"*10^-5 cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 6.6936 *10^-5 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.6, Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "i = 30 #angle of incidence(degrees)\n", + "lamda = 5890*10**-8 #wavelength(cm)\n", + "u = 1.46 #refractive index\n", + "n = 8\n", + "\n", + "#Calculations\n", + "r = math.degrees(math.asin(math.sin(i*math.pi/180)/u))\n", + "t = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", + "\n", + "#Result\n", + "print \"The required thickness is\",round((t/1E-4),3),\"*10^-4 cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required thickness is 1.718 *10^-4 cm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.7, Page number 1-15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r = 60 #angle of refraction(degrees)\n", + "lamda = 5890*10**-8 #wavelength(cm)\n", + "u = 1.5 #refractive index\n", + "n = 1 #for minimumm thickness\n", + "\n", + "#Calculations\n", + "#For r = 60\n", + "t1 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", + "\n", + "#For normal incidence \n", + "r = 0\n", + "t2 = (n*lamda)/(2*u*math.cos(r*math.pi/180))\n", + "\n", + "#Result\n", + "print \"For r = 60, the required thickness is\",round((t1/1E-5),2),\"*10^-5 cm\"\n", + "print \"For r = 0, the required thickness is\",round((t2/1E-5),2),\"*10^-5 cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For r = 60, the required thickness is 3.93 *10^-5 cm\n", + "For r = 0, the required thickness is 1.96 *10^-5 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.8, Page number 1-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r = 0 #for normal incidence(degrees)\n", + "lamda = 5.5*10**-5 #wavelength(cm)\n", + "n = 1 #for minimumm thickness\n", + "A = 10**4 #area(cm^2)\n", + "V = 0.2 #volume(cc)\n", + "\n", + "#Calculations\n", + "t = V/A\n", + "#for nth dark band,\n", + "u = (n*lamda)/(2*t*math.cos(r*math.pi/180))\n", + "\n", + "#Result\n", + "print \"Refractive index =\",u" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.375\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2.9, Page number 1-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r = 60 #angle of incidence(degrees)\n", + "t = 2*10**-7 #thickness of film(cm)\n", + "u = 1.2\n", + "\n", + "#Calculations & Result\n", + "for n in range(1,4):\n", + " lamda = (4*u*t*math.cos(r*math.pi/180))/(2*n-1)\n", + " print \"For n = %d, wavelength = %.2f A\"%(n,lamda/10**-10)\n", + "print \"Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 1, wavelength = 4800.00 A\n", + "For n = 2, wavelength = 1600.00 A\n", + "For n = 3, wavelength = 960.00 A\n", + "Since the visible range of wavelengths lie between 4000 to 7000 A, the wavelength in the visible spectrum is 4800 A\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.1, Page number 1-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "a = 40. #angle(sec)\n", + "lamda = 1.2 #distance between fringes(cm)\n", + "alpha = 10 #no. of fringes\n", + "\n", + "#Calculations\n", + "Bair = lamda/alpha #cm\n", + "alpha = (a*math.pi)/(3600*180) #radians\n", + "lamda = 2*alpha*Bair\n", + "\n", + "#Result\n", + "print \"Wavelength of monochromatic light =\",round((lamda/1E-8),1),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of monochromatic light = 4654.2 A\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.2, Page number 1-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "lamda = 5893*10**-8 #wavelength(cm)\n", + "u = 1.52 #refractive index\n", + "B = 0.1 #fringe spacing(cm)\n", + "\n", + "#Calculations\n", + "alpha = (lamda/(2*u*B))*180*3600/math.pi #seconds\n", + "\n", + "#Result\n", + "print \"Angle of wedge =\",round(alpha,2),\"secs\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle of wedge = 39.98 secs\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.3, Page number 1-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "u = 1.4 #refractive index\n", + "B = 0.25 #fringe spacing(cm)\n", + "a = 20 #angle(secs)\n", + "\n", + "#Calculations\n", + "alpha = (a*math.pi)/(3600*180) #radians\n", + "lamda = 2*u*alpha*B\n", + "\n", + "#Result\n", + "print \"Wavelength of light =\",round((lamda/1E-8),2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of light = 6787.39 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.4, Page number 1-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "u = 1.5 #refractive index\n", + "lamda = 5.82*10**-5 #wavelength(cm)\n", + "a = 20 #angle(secs)\n", + "\n", + "#Calculations\n", + "alpha = (a*math.pi)/(3600*180) #radians\n", + "B = lamda/(2*u*alpha)\n", + "N = 1/B\n", + "\n", + "#Result\n", + "print \"Number of interfernce fronges pr cm is\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of interfernce fronges pr cm is 5.0\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.5, Page number 1-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "u = 1 #refractive index for air film\n", + "lamda = 6*10**-5 #wavelength(cm)\n", + "B = 1./10 #distance between fringes(cm)\n", + "\n", + "#Calculations\n", + "alpha = lamda/(2*u*B) #radians\n", + "d = alpha*10\n", + "\n", + "#Result\n", + "print \"Daimeter of wire =\",d,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Daimeter of wire = 0.003 cm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3.6, Page number 1-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "alpha = 0.01*10**-1/10 #angle(radians)\n", + "u = 1 #refractive index for air film\n", + "lamda = 5900*10**-10 #wavlength(m)\n", + "\n", + "#Calculation\n", + "B = lamda/(2*u*alpha)\n", + "\n", + "#Result\n", + "print \"Seperation between fringes is\",B/10**-3,\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Seperation between fringes is 2.95 mm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.1, Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 40\n", + "\n", + "#Calculation\n", + "#Equating the equation 4*R*n*lamda=4*4R*n*lamda, we get\n", + "\n", + "N = (4*4*n)/4\n", + "\n", + "#result\n", + "print \"Ring number =\",N" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ring number = 160\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.2, Page number 1-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 10\n", + "Dn = 0.5 #diameter of dark ring(cm)\n", + "lamda = 5*10**-5 #waelength(cm)\n", + "\n", + "#Calculations\n", + "R = Dn**2/(4*n*lamda)\n", + "\n", + "#Result\n", + "print \"Radius of curvature =\",R,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature = 125.0 cm\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.3, Page number 1-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 5\n", + "p = 10\n", + "D5 = 0.336 #diameter of 5th ring(cm)\n", + "lamda = 5890*10**-8 #waelength(cm)\n", + "D15 = 0.59 #diameter of 15th ringcm\n", + "\n", + "#Calculations\n", + "R = (D15**2-D5**2)/(4*p*lamda)\n", + "\n", + "#Result\n", + "print \"Radius of curvature =\",round(R,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius of curvature = 99.83 cm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.4, Page number 1-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "Dn = 0.42 #diameter of dark ring(cm)\n", + "p = 8 \n", + "R = 200 #radius of curvature(cm)\n", + "Dn8 = 0.7 #diameter of (n+8)th ring(cm)\n", + "\n", + "#Calculations\n", + "lamda = (Dn8**2-Dn**2)/(4*R*p)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",lamda/1E-8,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 4900.0 A\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.5, Page number 1-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "Dn = 0.218 #cm\n", + "Dn10 = 0.451 #cm\n", + "lamda = 5893*10**-8 #wavelength(cm)\n", + "R = 90 #radius of curvature(cm)\n", + "p = 10\n", + "\n", + "#Calculation\n", + "u = (4*p*lamda*R)/(Dn10**2-Dn**2)\n", + "\n", + "#Result\n", + "print \"Refractive index =\",round(u,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.361\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.6, Page number 1-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Varaible declaration\n", + "D5 = 0.42 #diameter of dark ring(cm)\n", + "\n", + "#Calculations\n", + "'''\n", + "For 5th dark ring,\n", + "D5^2 = 20*R*lamda -----1\n", + "\n", + "For 10th dark ring,\n", + "D10^2 = 40*R*lamda -----2\n", + "\n", + "Substituting 1 in 2,\n", + "'''\n", + "\n", + "D10 = math.sqrt((40*D5**2)/20)\n", + "\n", + "#Result\n", + "print \"Diameter of the 10th dark ring =\",round(D10,3),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of the 10th dark ring = 0.594 cm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.7, Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "lamda_n = 6000 #wavelength of nth ring(A)\n", + "lamda_n1 = 5000 #wavelength for (n+1)th ring(cm)\n", + "\n", + "#Calculations\n", + "'''\n", + "Dn^2 = 4*R*n*lamda_n ---1\n", + "\n", + "Dn+1^2 = 4*R(n+1)*lamda_n1 ---2\n", + "\n", + "Equating 1 and 2, we get,\n", + "'''\n", + "\n", + "n = 5\n", + "R = 2\n", + "Dn = math.sqrt(4*R*n*lamda_n*10**-8)\n", + "\n", + "#Result\n", + "print \"Diameter =\",round(Dn,3),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 0.049 cm\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.8, Page number 1-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "Dair = 2.3 #diameter of ring in air(cm)\n", + "Dliq = 2 #diameter of ring in liquid(cm)\n", + "\n", + "#Calculations\n", + "u = Dair**2/Dliq**2\n", + "\n", + "#Result\n", + "print \"Refractive index =\",u" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index = 1.3225\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.11, Page number 1-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "D4 = 0.4 #diameter of 4th ring(cm)\n", + "D12 = 0.7 #diameter of 12th ring(cm)\n", + "\n", + "#Calculations\n", + "'''\n", + "For D4, \n", + "D4 = math.sqrt(4R*4*lamda)\n", + "'''\n", + "rt_Rl = 0.1\n", + "R = 80 \n", + "\n", + "#For D20,\n", + "D20 = math.sqrt(R)*rt_Rl\n", + "\n", + "#Result\n", + "print \"Diameter of 20th ring =\",round(D20,3),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter of 20th ring = 0.894 cm\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4.12, Page number 1-36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration \n", + "n = 5\n", + "p = 10\n", + "D5 = 0.336 #diameter of 5th ring(cm)\n", + "D15 = 0.590 #diameter of 15th ring(cm)\n", + "R = 100 #radius of curvature(cm)\n", + "\n", + "#Calculations\n", + "lamda = (D15**2-D5**2)/(4*R*p)\n", + "\n", + "#Result\n", + "print \"Wavlength =\",lamda/1E-8,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavlength = 5880.1 A\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7.1, Page number 1-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 560 #wavelength(nm)\n", + "u = 2 #refractive index\n", + "\n", + "#Calculations\n", + "lamda_dash = lamda/u\n", + "t = lamda_dash/4\n", + "\n", + "#Result\n", + "print \"Thickness of film =\",t,\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of film = 70 nm\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7.2, Page number 1-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6000 #wavelength(E)\n", + "u = 1.2 #refractive index\n", + "\n", + "#Calculations\n", + "lamda_dash = lamda/u\n", + "t = lamda_dash/4\n", + "\n", + "#Result\n", + "print \"Thickness of film =\",t,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thickness of film = 1250.0 A\n" + ] + } + ], + "prompt_number": 56 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_2.ipynb b/Applied_Physics_II/Chapter_2.ipynb new file mode 100755 index 00000000..ae487344 --- /dev/null +++ b/Applied_Physics_II/Chapter_2.ipynb @@ -0,0 +1,1000 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Diffraction of Light" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.1, Page number 2-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "theta = 30 #angle(degrees)\n", + "n = 1 \n", + "lamda = 6500*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "a = (n*lamda)/math.sin(theta*math.pi/180)\n", + "\n", + "#Result\n", + "print \"a =\",a/1e-4,\"*10^-4 cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a = 1.3 *10^-4 cm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.2, Page number 2-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a = 6*10**-4 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 6000*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "def deg_to_dms(deg):\n", + " d = int(deg)\n", + " md = abs(deg - d) * 60\n", + " m = int(md)\n", + " sd = (md - m) * 60\n", + " sd=round(sd,2)\n", + " return [d, m, sd]\n", + "\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "d = 2*theta #angular seperation\n", + "\n", + "#Result\n", + "print \"Angular seperation between the 1st order minima is\",deg_to_dms(d)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angular seperation between the 1st order minima is [11, 28, 42.03]\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.3, Page number 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 2 #for second minimum\n", + "n2 = 3 #for third minimum\n", + "lamda = 4000 #wavelength(A)\n", + "\n", + "#Calculations\n", + "'''For 2nd order,\n", + "a sin0 = n1*lamda\n", + "\n", + "For 3rd order,\n", + "a sin0 = n2*lamda'''\n", + "\n", + "lamda = (n2*lamda)/n1\n", + "\n", + "#Result\n", + "print \"Wavelength =\",lamda,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6000 A\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.4, Page number 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a = 0.16*10**-3 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 5600*10**-10 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "def deg_to_dms(deg):\n", + " d = int(deg)\n", + " md = abs(deg - d) * 60\n", + " m = int(md)\n", + " sd = (md - m) * 60\n", + " sd=round(sd,2)\n", + " return [d, m, sd]\n", + "\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "\n", + "\n", + "#Result\n", + "print \"Half angular width=\",deg_to_dms(theta)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half angular width= [0, 12, 1.93]\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.5, Page number 2-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a = 12*10**-5 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 6000*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "\n", + "\n", + "#Result\n", + "print \"Half angular width=\",(theta),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Half angular width= 30.0 degrees\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2.6, Page number 2-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "a = 2*10**-6 #width of slit(cm)\n", + "n = 1 #first order\n", + "lamda = 6500*10**-10 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "theta = (math.asin((n*lamda)/a))*180/math.pi\n", + "\n", + "\n", + "#Result\n", + "print \"Angle theta =\",round(theta,2),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Angle theta = 18.97 degrees\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3.1, Page number 2-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "a = 0.16 #width(mm)\n", + "b = 0.8 #distance(mm)\n", + "\n", + "#Calculations & Results\n", + "m = ((a+b)/a)\n", + "\n", + "for n in range(1,4):\n", + " print \"m =\",m*n\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m = 6.0\n", + "m = 12.0\n", + "m = 18.0\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.1, Page number 2-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda1 = 5*10**-5 #cm\n", + "lamda2 = 7*10**-5 #cm\n", + "a_plus_b = 1./4000 #cm\n", + "\n", + "#Calculations\n", + "m_max1 = a_plus_b/lamda1\n", + "m_max2 = round((a_plus_b/lamda2),1)\n", + "\n", + "#Results\n", + "print m_max2,\"orders are visible for 7000 A and\",m_max1,\"orders for 5000 A and either\",m_max2,\",4 or\",m_max1,\"for intermediate wavelengths\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.6 orders are visible for 7000 A and 5.0 orders for 5000 A and either 3.6 ,4 or 5.0 for intermediate wavelengths\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.2, Page number 2-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "theta = 30 #angle of diffraction(degrees)\n", + "lamda1 = 5400*10**-8 #cm\n", + "lamda2 = 4050*10**-8 #cm\n", + "\n", + "#Calculations\n", + "m = lamda2/(lamda1-lamda2)\n", + "a_plus_b = (m*lamda1)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "\n", + "#Result\n", + "print \"Number of lines per cm =\",round(N,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of lines per cm = 3086.42\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.3, Page number 2-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 4992 #A\n", + "m1 = 3 #for 3rd order\n", + "m2 = 4 #for 4th order\n", + "\n", + "#Calculations\n", + "'''For m = 3,\n", + "(a+b)sin0 = 3*lamda\n", + "\n", + "For m = 4,\n", + "(a+b)sin0 = 4*lamda'''\n", + "\n", + "l = (m2*lamda)/m1\n", + "\n", + "#Results\n", + "print \"Wavelength =\",l,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6656 A\n" + ] + } + ], + "prompt_number": 62 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.4, Page number 2-25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6328*10**-8 #wavelength(cm)\n", + "m1 = 1\n", + "m2 = 2\n", + "a_plus_b = 1./6000 #cm\n", + "\n", + "#Calculations\n", + "theta1 = math.asin((m1*lamda)/a_plus_b)*180/math.pi\n", + "theta2 = math.asin((m2*lamda)/a_plus_b)*180/math.pi\n", + "\n", + "#Result\n", + "print \"01 =\",round(theta1,2),\"degrees\"\n", + "print \"02 =\",round(theta2,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "01 = 22.31 degrees\n", + "02 = 49.41 degrees\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.5, Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 2 #2nd order\n", + "lamda = 5*10**-5 #wavelength(cm)\n", + "theta = 30\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "\n", + "#Result\n", + "print \"The number of lines/cm of the grating surface is\",N" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of lines/cm of the grating surface is 5000.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.6, Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 3 #3rd order\n", + "a_plus_b = 1./7000 #no. of lines/cm\n", + "sin0 = 1\n", + "\n", + "#Calculation\n", + "lamda = (a_plus_b*sin0)/m\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-8),\"A\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 4762.0 A\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.7, Page number 2-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1 #1st order\n", + "lamda = 6560*10**-8 #wavelength(cm)\n", + "theta = 16+12./60\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "w = 2*N\n", + "\n", + "#Result\n", + "print \"The total number of lines is\",round(w)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of lines is 8506.0\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.8, Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1 #1st order\n", + "lamda = 6.56*10**-5 #wavelength(cm)\n", + "theta = 18+14./60\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "w = 2*N\n", + "\n", + "#Result\n", + "print \"The total number of lines is\",round(w,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of lines is 9539.3\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.9, Page number 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6*10**-5 #wavelength(cm)\n", + "a_plus_b = 1./5000 #cm\n", + "\n", + "#Calculations\n", + "m_max = a_plus_b/lamda\n", + "\n", + "#Result\n", + "print \"Order =\",round(m_max)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Order = 3.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.10, Page number 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "lamda = 6000*10**-8 #wavelength(cm)\n", + "a_plus_b = 1./5000 #cm\n", + "\n", + "#Calculations\n", + "m_max = a_plus_b/lamda\n", + "\n", + "#Result\n", + "print \"m_max =\",round(m_max)\n", + "\n", + "#The rest of the solution is theoretical" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "m_max = 3.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.4.11, Page number 2-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 1 #1st order\n", + "lamda = 5790*10**-8 #wavelength(cm)\n", + "theta = 19.994\n", + "\n", + "#Calculations\n", + "a_plus_b = (m*lamda)/math.sin(theta*math.pi/180)\n", + "N = 1/a_plus_b\n", + "w = 2.54*N\n", + "\n", + "#Result\n", + "print \"The total number of lines is\",round(w)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total number of lines is 15000.0\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.1, Page number 2-31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Varaible declaration\n", + "n = 3000./0.5 #no. of lines per cm\n", + "m = 2 #for 2nd order\n", + "lamda1 = 5893*10**-8 #wavelength(cm)\n", + "lamda2 = 5896*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "a_plus_b = 1/n\n", + "theta1 = math.degrees(math.asin((2*lamda1)/(a_plus_b)))\n", + "theta2 = math.degrees(math.asin((2*lamda2)/(a_plus_b)))\n", + "d = theta2-theta1 #angular seperation\n", + "N = lamda1*10**8/(m*3)\n", + "\n", + "#Result\n", + "print \"Since N=\",round(N),\"which is smaller than 3000 lines, the two lines will be resolved in the second order\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since N= 982.0 which is smaller than 3000 lines, the two lines will be resolved in the second order\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.2, Page number 2-32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Varaible declaration\n", + "m = 3 #for 3rd order\n", + "lamda = 481 #wavelength(nm)\n", + "n = 620 #no. of ruling per mm\n", + "w = 5.05 #width(mm)\n", + "\n", + "#Calculations\n", + "N = n*w\n", + "dl = lamda/(m*N)\n", + "\n", + "#Result\n", + "print \"Smallest wavelength interval =\",round(dl,4),\"nm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Smallest wavelength interval = 0.0512 nm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.3, Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Varaible declaration\n", + "m = 2 #for 2nd order\n", + "lamda = 5890 #wavelength(A)\n", + "dl = 6 #A\n", + "n = 500. #no. of lines per cm\n", + "\n", + "#Calculations\n", + "N = lamda/(dl*m)\n", + "W = N/n\n", + "\n", + "#Result\n", + "print \"Least width =\",W,\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Least width = 0.98 cm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.4, Page number 2-33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "N = 3*5000 #no. of lines per cm\n", + "a_plus_b = 1./5000 #cm\n", + "lamda = 5890*10**-8 #wavelength(cm)\n", + "\n", + "#Calculations\n", + "m_max = round(a_plus_b/lamda)\n", + "RP = m_max*N\n", + "\n", + "#Result\n", + "print \"Maximum value of resolving power =\",RP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of resolving power = 45000.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.5, Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "m = 2 #for 2nd order\n", + "lamda = 5890 #wavelength(A)\n", + "dl = 6 #A\n", + "w = 3. #width of a line(cm)\n", + "\n", + "#Calculations\n", + "lamda2 = lamda+dl\n", + "N = lamda/(dl*m)\n", + "\n", + "a_plus_b = w/N\n", + "\n", + "#Results\n", + "print \"The minimum no. of lines a grating must have is\",N\n", + "print \"The grating element is\",round(a_plus_b/1e-3,2),\"*10^-3 cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum no. of lines a grating must have is 490\n", + "The grating element is 6.12 *10^-3 cm\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6.6, Page number 2-34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Varaible declaration\n", + "N = 40000 #no. of lines per cm\n", + "m = 2 #for 2nd order\n", + "\n", + "#Calculations\n", + "RP = m*N\n", + "\n", + "#Result\n", + "print \"Maximum value of resolving power =\",RP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum value of resolving power = 80000\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_3.ipynb b/Applied_Physics_II/Chapter_3.ipynb new file mode 100755 index 00000000..61c99435 --- /dev/null +++ b/Applied_Physics_II/Chapter_3.ipynb @@ -0,0 +1,779 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Fibre Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.1, Page number 3-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.54 #refractive index of core\n", + "NA = 0.5 #numerical aperture\n", + "\n", + "#Calculation\n", + "n2 = math.sqrt(n1**2-NA**2)\n", + "\n", + "#Result\n", + "print \"Refractive index of cladding is\",round(n2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of cladding is 1.46\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.2, Page number 3-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n2 = 1.59 #refractive index of cladding\n", + "NA = 0.2 #numerical aperture\n", + "n0 = 1.33\n", + "\n", + "#Calculation\n", + "n1 = (math.sqrt(n2**2-NA**2))\n", + "theta_o = (math.asin((math.sqrt(n2**2-n1**2)/n0)))*180/math.pi\n", + "\n", + "#Result\n", + "print \"Refractive index of core is\",n2\n", + "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of core is 1.59\n", + "Acceptance angle = 8.65 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.3, Page number 3-6\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.49 #refractive index of core\n", + "n2 = 1.44 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_o = math.degrees(math.asin(NA))\n", + "\n", + "#Result\n", + "print \"Numerical Aperture =\",round(NA,5)\n", + "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Numerical Aperture = 0.38275\n", + "Acceptance angle = 22.5 degrees\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.4, Page number 3-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.6 #refractive index of core\n", + "n2 = 1.3 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n", + "AC = 2*theta_o\n", + "\n", + "#Result\n", + "print \"Critical angle =\",round(theta_c,2),\"degrees\"\n", + "print \"Value of angle of acceptance cone =\",round(AC,3),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 54.34 degrees\n", + "Value of angle of acceptance cone = 137.731 degrees\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.5, Page number 3-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.4 #refractive index of core\n", + "theta_o = 30 #acceptance angle(degrees)\n", + "\n", + "#Calculation\n", + "n2 = math.sqrt(n1**2-math.sin(math.radians(theta_o))**2)\n", + "\n", + "#Result\n", + "print \"Refractive index of cladding is\",round(n2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of cladding is 1.3077\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.6, Page number 3-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "n1 = 1.563 #refractive index of core\n", + "n2 = 1.498 #refractive index of cladding\n", + "\n", + "#Calculation\n", + "delta = (n1-n2)/n1\n", + "\n", + "#Result\n", + "print \"Fractional index change =\",round(delta,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fractional index change = 0.0416\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.7, Page number 3-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "n1 = 1.50 #refractive index of cladding\n", + "theta_c = 90-5 #critical angle(degrees)\n", + "\n", + "#Calculation\n", + "n2 = math.sin(theta_c*math.pi/180)*n1\n", + "\n", + "#Result\n", + "print \"The maximum index of refraction allowed for cladding is\",round(n2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum index of refraction allowed for cladding is 1.4943\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3.8, Page number 3-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "n1 = 1.33 #refractive index \n", + "theta_o = 30 #acceptance angle in air\n", + "\n", + "#Calculations\n", + "theta_0 = math.degrees(math.asin(math.sin(theta_o*math.pi/180)/n1))\n", + "\n", + "#Result\n", + "print \"Acceptance angle =\",round(theta_0,2),\"degrees\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Acceptance angle = 22.08 degrees\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.1, Page number 3-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.52 #refractive index of core\n", + "n2 = 1.5189 #refractive index of cladding\n", + "d = 29*10**-6 #core diameter(m)\n", + "lamda = 1.3*10**-6 #wavelength(m)\n", + "\n", + "#Calculation\n", + "V = (math.pi*d*math.sqrt(n1**2-n2**2))/lamda\n", + "\n", + "N = V**2/2\n", + "\n", + "#Results\n", + "print \"Normalized frequency =\",round(V,3)\n", + "print \"Number of modes =\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normalized frequency = 4.052\n", + "Number of modes = 8.0\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.2, Page number 3-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.47 #refractive index of core\n", + "n2 = 1.46 #refractive index of cladding\n", + "lamda = 1300*10**-9 #wavelength(nm)\n", + "V = 2.405 #for single mode fibre\n", + "\n", + "#Calculation\n", + "d = (V*lamda)/(math.pi*math.sqrt(n1**2-n2**2))\n", + "r = d/2\n", + "\n", + "#Result\n", + "print \"Radius =\",round(r/1e-6,3),\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius = 2.907 um\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.3, Page number 3-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.48 #refractive index of core\n", + "delta = 0.055 #relative RI\n", + "lamda = 1 #wavelength(um)\n", + "r = 50 #core radius(um)\n", + "\n", + "#Calculations\n", + "n2 = -((delta*n1)-n1)\n", + "\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "theta_o = math.degrees(math.asin(NA))\n", + "\n", + "V = (math.pi*2*r*NA)/lamda\n", + "\n", + "N = V**2/2\n", + "\n", + "#Results\n", + "print \"Refractive index of cladding =\",n2\n", + "print \"NA =\",round(NA,3)\n", + "print \"Acceptance angle =\",round(theta_o,2),\"degrees\"\n", + "print \"Normalized frequency =\",round(V,3)\n", + "print \"Number of modes =\",round(N) #Answer differs due to rounding off in 'V'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refractive index of cladding = 1.3986\n", + "NA = 0.484\n", + "Acceptance angle = 28.95 degrees\n", + "Normalized frequency = 152.073\n", + "Number of modes = 11563.0\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.4, Page number 3-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.45 #refractive index of core\n", + "n2 = 1.448 #refractive index of cladding\n", + "lamda = 1*10**-6 #wavelength(m)\n", + "d = 6*10**-6 #core diameter(m)\n", + "\n", + "#Calculations\n", + "#Case i\n", + "theta_c = math.degrees(math.asin(n2/n1))\n", + "\n", + "#Case ii\n", + "theta_o = math.degrees(math.asin(math.sqrt(n1**2-n2**2)))\n", + "\n", + "#Case iii\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n", + "\n", + "#Results\n", + "print \"Critical angle =\",round(theta_c),\"degrees\"\n", + "print \"Acceptance angle =\",round(theta_o,3),\"degrees\"\n", + "print \"Number of modes =\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical angle = 87.0 degrees\n", + "Acceptance angle = 4.366 degrees\n", + "Number of modes = 1.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.5, Page number 3-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.50 #refractive index of core\n", + "n2 = 1.48 #refractive index of cladding\n", + "lamda = 1*10**-6 #wavelength(m)\n", + "d = 2*50*10**-6 #core diameter(m)\n", + "\n", + "#Calculations\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "N = (math.pi**2*d**2*NA**2)/(2*lamda**2)\n", + "\n", + "#Result\n", + "print \"Number of modes =\",round(N)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of modes = 2941.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4.6, Page number 3-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1 = 1.55 #refractive index of core\n", + "n2 = 1.50 #refractive index of cladding\n", + "lamda = 1400*10**-9 #wavelength(m)\n", + "d = 40*10**-6 #core diameter(m)\n", + "\n", + "#Calculations\n", + "NA = math.sqrt(n1**2-n2**2)\n", + "\n", + "delta = (n1-n2)/n1\n", + "\n", + "V = (math.pi*d*NA)/lamda\n", + "\n", + "#Results\n", + "print \"NA =\",round(NA,4)\n", + "print \"Fractional index change =\",round(delta,5)\n", + "print \"V-number =\",round(V,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "NA = 0.3905\n", + "Fractional index change = 0.03226\n", + "V-number = 35.05\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.1, Page number 3-17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Pout = 0.3 #output power(mW)\n", + "Pin = 1 #input power(mW)\n", + "L = 0.1 #fibre length(km)\n", + "\n", + "#Calculation\n", + "a = (-10/L)*math.log10(Pout/Pin)\n", + "\n", + "#Result\n", + "print \"Attenuation =\",round(a,2),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Attenuation = 52.29 dB/km\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.2, Page number 3-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Pin = 9 #input power(mW)\n", + "L = 3 #fibre length(km)\n", + "a = 1.5 #loss(dB/km)\n", + "\n", + "#Calculation\n", + "Pl = a*L\n", + "Pout = Pin*10**(-Pl/10)\n", + "\n", + "#Result\n", + "print \"Output power =\",round(Pout,3),\"uW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output power = 3.193 uW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.3, Page number 3-18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "a = 2.2 #attenuation(dB/km)\n", + "l1 = 2 #km\n", + "l2 = 6 #km\n", + "from sympy import * \n", + "Pin = symbols('Pin')\n", + "\n", + "#Calculations\n", + "#For 2km,\n", + "Pl1 = a*l1\n", + "Po1 = Pin*round(10**(-Pl1/10),3)\n", + "\n", + "#For 6km,\n", + "Pl2 = a*l2\n", + "Po2 = Pin*round(10**(-Pl2/10),3)\n", + "\n", + "#Results\n", + "print \"After 2 km, Pout =\",Po1\n", + "print \"After 6 km, Pout =\",Po2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "After 2 km, Pout = 0.363*Pin\n", + "After 6 km, Pout = 0.048*Pin\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6.4, Page number 3-19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "Pout = 7.5 #output power(mW)\n", + "Pin = 8.6 #input power(mW)\n", + "L = 0.5 #fibre length(km)\n", + "\n", + "#Calculation\n", + "Pl = -10*math.log10(Pout/Pin)\n", + "a = Pl/L\n", + "\n", + "#Result\n", + "print \"Loss specification =\",round(a,4),\"dB/km\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss specification = 1.1887 dB/km\n" + ] + } + ], + "prompt_number": 19 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_4.ipynb b/Applied_Physics_II/Chapter_4.ipynb new file mode 100755 index 00000000..f94b4b09 --- /dev/null +++ b/Applied_Physics_II/Chapter_4.ipynb @@ -0,0 +1,141 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Lasers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.1, Page number 4-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "P = 3.147*10**-3 #output power(W)\n", + "t = 60 #time(sec)\n", + "lamda = 632.8*10**-9 #wavelength(m)\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "N = (P*t*lamda)/(h*c)\n", + "\n", + "#Result\n", + "print \"No. of photons emittd each minute is\",round(N/1e+17),\"*10^17\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of photons emittd each minute is 6.0 *10^17\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.2, Page number 4-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T = 300 #temperature(K)\n", + "lamda = 694.3*10**-9 #wavelength(m)\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "k = 1.38*10**-23 #Boltman's constant(J/K)\n", + "\n", + "#Calculations\n", + "N2_by_N1 = math.exp((-h*c)/(lamda*k*T))\n", + " \n", + "#Result\n", + "print \"Ratio of population =\",round(N2_by_N1/1e-31,3),\"*10^-31\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of population = 8.874 *10^-31\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6.3, Page number 4-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "P = 100*10**3 #output power(W)\n", + "t = 20*10**-9 #time(sec)\n", + "N = 6.981*10**15 #no. of photons\n", + "h = 6.63*10**-34 #Planc's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculations\n", + "lamda = (N*h*c)/(P*t)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 6943.0 A\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_5.ipynb b/Applied_Physics_II/Chapter_5.ipynb new file mode 100755 index 00000000..2ad76975 --- /dev/null +++ b/Applied_Physics_II/Chapter_5.ipynb @@ -0,0 +1,1097 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5:Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.1, Page number 5-5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 10**-2 #mass of object(kg)\n", + "v = 1 #velocity(m/s)\n", + "l = 1*10**-10 #wavelength(m)\n", + "d = 10**-3 #distance travelled(m)\n", + "\n", + "#Calculations\n", + "lamda = h/(m*v)\n", + "\n", + "v = h/(m*l)\n", + "\n", + "t1 = d/v\n", + "t = t1/(365*24*60*60)\n", + "\n", + "#Results\n", + "print \"de Brogile wavelength =\",round(lamda/1e-32,2),\"*10^-32 m\"\n", + "print \"Velocity =\",round(v/1e-22,2),\"*10^-22 m/s(Calculation mistake in the textbook)\"\n", + "print \"Distance travelled =\",round(t/1e+10,2),\"*10^10 years(Calculation mistake in the textbook)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Brogile wavelength = 6.63 *10^-32 m\n", + "Velocity = 6.63 *10^-22 m/s(Calculation mistake in the textbook)\n", + "Distance travelled = 4.78 *10^10 years(Calculation mistake in the textbook)\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.2, Page number 5-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "lamda = 1*10**-10 #wavelength(m)\n", + "\n", + "#calculation\n", + "v = h/(m*lamda)\n", + "\n", + "#Result\n", + "print \"Velocity =\",round(v/1e+6,2),\"*10^6 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 7.29 *10^6 m/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.3, Page number 5-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "lamda = 5000*10**-10 #wavelength(m)\n", + "\n", + "#calculation\n", + "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Kinetic energy =\",round(E/1e-6,5),\"*10^-6 eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy = 6.03804 *10^-6 eV\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.4, Page number 5-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 1.676*10**-27 #mass of object(kg)\n", + "E = 0.025*1.6*10**-19 #energy(J)\n", + "\n", + "#Calculation\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 1.81 A\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.5, Page number 5-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "E = 120*1.6*10**-19 #energy(J)\n", + "\n", + "#Calculation\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "#Result\n", + "print \"Wavelength =\",round(lamda/1e-10,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 1.12 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.6, Page number 5-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 1.67*10**-27 #mass of neutron(kg)\n", + "lamda = 1*10**-10 #wavelength(m)\n", + "\n", + "#calculation\n", + "v = h/(m*lamda)\n", + "\n", + "E = (h**2/(2*m*lamda**2))/(1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Velocity =\",round(v,2),\"m/s\"\n", + "print \"Kinetic energy =\",round(E/1e-2,3),\"*10^-2 eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity = 3970.06 m/s\n", + "Kinetic energy = 8.225 *10^-2 eV\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.7, Page number 5-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 1 #mass of object(kg)\n", + "v = 1 #velocity(m/s)\n", + "V = 182 #potential differnce(V)\n", + "\n", + "#Calculation\n", + "#Case i\n", + "lamda = 12.27/math.sqrt(V)\n", + "\n", + "#Case ii\n", + "l = h/(m*v)\n", + "\n", + "#Results\n", + "print \"de Brogile wavelength for accelerated electron=\",round(lamda,2),\"A\"\n", + "print \"de Brogile wavelength for object=\",l,\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Brogile wavelength for accelerated electron= 0.91 A\n", + "de Brogile wavelength for object= 6.63e-34 A\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.8, Page number 5-9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "lamda = 10**-14 #wavelength(m)\n", + "\n", + "#Calculations\n", + "p = h/lamda\n", + "\n", + "E = (p**2/(2*m))/(1.6*10**-13)\n", + "\n", + "#Results\n", + "print \"Momentum =\",p,\"kg-m/s\"\n", + "print \"Energy =\",round(E,2),\"MeV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Momentum = 6.63e-20 kg-m/s\n", + "Energy = 15095.09 MeV\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.9, Page number 5-10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "V = 3000 #potential differnce(V)\n", + "\n", + "#Calculation\n", + "#Case i\n", + "lamda = 12.27/math.sqrt(V)\n", + "\n", + "#Case ii\n", + "p = h/(lamda*10**-10)\n", + "\n", + "#Case iii\n", + "lamda_b = 1/(lamda*10**-10)\n", + "\n", + "#Case iv\n", + "d = 2.04*10**-10 #m\n", + "n = 1 #for first order\n", + "theta = math.degrees(math.asin((n*lamda*10**-10)/(2*d)))\n", + "\n", + "#Results\n", + "print \"Momentum =\",round(p/1e-23,2),\"*10^-23 kg-m/s\"\n", + "print \"de Brogile wavelength =\",round(lamda,3),\"A\"\n", + "print \"Wave number =\",round(lamda_b/1e+10,3),\"*10^10 /m\"\n", + "print \"Bragg angle =\",round(theta,3),\"degrees\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Momentum = 2.96 *10^-23 kg-m/s\n", + "de Brogile wavelength = 0.224 A\n", + "Wave number = 4.464 *10^10 /m\n", + "Bragg angle = 3.147 degrees\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.10, Page number 5-11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "V = 10*10**3 #potential differnce(V)\n", + "\n", + "#Calculation\n", + "lamda = 12.27/math.sqrt(V)\n", + "\n", + "p = h/(lamda*10**-10)\n", + "\n", + "#result\n", + "print \"Wavelength =\",lamda,\"A\"\n", + "print \"Momentum =\",round(p/1e-23,3),\"*10^-23 kg-m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 0.1227 A\n", + "Momentum = 5.403 *10^-23 kg-m/s\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.12, Page number 5-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 6.68*10**-27 #mass of particle(kg)\n", + "E = 1.6*10**-16 #energy(J)\n", + "\n", + "#Calculations\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "v = h/(m*lamda)\n", + "\n", + "#Results\n", + "print \"Wavelength =\",round(lamda/1e-13,3),\"*10^-13 A\"\n", + "print \"Velocity =\",round(v/1e+5,2),\"*10^5 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength = 4.535 *10^-13 A\n", + "Velocity = 2.19 *10^5 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.13, Page number 5-12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "E = 1.6*10**-19 #energy(J)\n", + "\n", + "#Calculations\n", + "lamda_ph = (h*c)/E #wavelength of photon\n", + " \n", + "lamda_e = h/math.sqrt(2*m*E) #wavelength of electron\n", + "\n", + "#Result\n", + "print \"Wavelength of proton =\",round(lamda_ph/1e-6,3),\"*10^-6 m\"\n", + "print \"Wavelength of electron =\",round(lamda_e/1e-10,3),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Wavelength of proton = 1.243 *10^-6 m\n", + "Wavelength of electron = 12.286 A\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3.14, Page number 5-13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "\n", + "#Calculations\n", + "E = m*c**2\n", + "lamda = h/math.sqrt(2*m*E)\n", + "\n", + "#Result\n", + "print \"de Brogile wavelength =\",round(lamda/1e-12,3),\"*10^-12 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "de Brogile wavelength = 1.717 *10^-12 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.1, Page number 5-26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_v = (0.01*400)/100\n", + "\n", + "#Calculation\n", + "del_x = h/(4*math.pi*m*del_v)\n", + "\n", + "#Result\n", + "print \"Accuracy =\",round(del_x/1e-3,2),\"mm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accuracy = 1.45 mm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.2, Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_x = 10*10**-9 #m\n", + "E = 1.6*10**-16 #energy(J)\n", + "\n", + "#Calculation\n", + "del_px = h/(4*math.pi*del_x)\n", + "p = math.sqrt(2*m*E)\n", + "per = (del_px/p)*100\n", + "\n", + "#Result\n", + "print \"Percentage of uncertainity =\",round(per,4),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of uncertainity = 0.0309 %\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.3, Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_v = (0.01*4*10**5)/100\n", + "\n", + "#Calculation\n", + "del_x = h/(4*math.pi*m*del_v)\n", + "\n", + "#Result\n", + "print \"Accuracy =\",round(del_x/1e-6,2),\"*10^-6 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Accuracy = 1.45 *10^-6 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.4, Page number 5-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "del_v = (1.88*10**6)/100\n", + "\n", + "#Calculation\n", + "del_x = h/(4*math.pi*m*del_v)\n", + "\n", + "#Result\n", + "print \"Precision =\",round(del_x/1e-9,3),\"*10^-9 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Precision = 3.084 *10^-9 m\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.5, Page number 5-28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 4*10**-7 #wavelength(m)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "del_l = 8*10**-15 #spectral width(m)\n", + "\n", + "#calculation\n", + "del_t = lamda**2/(4*math.pi*c*del_l)\n", + "\n", + "#Result\n", + "print \"Time spent by the elctrons =\",round(del_t/1e-9,3),\"*10^-9 s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time spent by the elctrons = 5.305 *10^-9 s\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.6, Page number 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "del_t = 1.4*10**-10 #time spent(s)\n", + "\n", + "#calculation\n", + "E = (h/(4*math.pi*del_t))/(1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Uncertainity =\",round(E/1e-6,2),\"*10^-6 eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Uncertainity = 2.36 *10^-6 eV\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7.7, Page number 5-29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 546*10**-9 #wavelength(m)\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "del_l = 10**-14 #spectral width(m)\n", + "\n", + "#calculation\n", + "del_t = lamda**2/(4*math.pi*c*del_l)\n", + "\n", + "#Result\n", + "print \"Time spent by the elctrons =\",round(del_t/1e-9,2),\"*10^-9 s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time spent by the elctrons = 7.91 *10^-9 s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.1, Page number 5-41" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 2*10**-10 #width(m)\n", + "\n", + "#Calculation\n", + "E1 = (h**2/(8*m*L**2))/(1.6*10**-19)\n", + "E2 = 4*E1\n", + "E3 = 9*E1\n", + "\n", + "#Result\n", + "print \"Energy of electron in ground state =\",round(E1,3),\"eV\"\n", + "print \"Energy of electron in first state =\",round(E2,3),\"eV\"\n", + "print \"Energy of electron in second state =\",round(E3,3),\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of electron in ground state = 9.434 eV\n", + "Energy of electron in first state = 37.738 eV\n", + "Energy of electron in second state = 84.91 eV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.2, Page number 5-42" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "L = 5.6*10**-3 #width(m)\n", + "\n", + "#Calculation\n", + "E = L/4\n", + "\n", + "#Result\n", + "print \"Ground state energy =\",E,\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ground state energy = 0.0014 eV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.4, Page number 5-43" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import scipy\n", + "from scipy import integrate\n", + "\n", + "#Variable declaration\n", + "#Intervals\n", + "x1 = 0\n", + "x2 = 1./2\n", + "\n", + "#Calculation\n", + "x = lambda x: 3*x**2\n", + "P = integrate.quad(x, x1, x2)\n", + "\n", + "#Result\n", + "print \"Probability =\",P[0]" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Probability = 0.125\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.5, Page number 5-44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m1 = 9.1*10**-31 #mass of electron(kg)\n", + "m2 = 10**-9 #mass of grain dust(kg)\n", + "L1 = 10**-9 #width(m)\n", + "L2 = 10**-4 #width(m)\n", + "\n", + "#Calculation\n", + "#For electron\n", + "print \"For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\"\n", + "for n in range(1,4):\n", + " En1 = ((n**2*h**2)/(8*m*L1**2))/(1.6*10**-19)\n", + " print round(En1,4),\"eV\"\n", + " \n", + "#For the grain of dust\n", + "print \"\\nFor a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\"\n", + "for n in range(1,4):\n", + " En2 = ((n**2*h**2)/(8*m2*L2**2))/(1.6*10**-19)\n", + " print round(En2/1e-32,3),\"eV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For an electron, the lowest thre energy states obtained for n=1,2 and 3 are\n", + "0.3774 eV\n", + "1.5095 eV\n", + "3.3964 eV\n", + "\n", + "For a grain of dust, the lowest thre energy states obtained for n=1,2 and 3 are\n", + "3.434 eV\n", + "13.737 eV\n", + "30.907 eV\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.6, Page number 5-45\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "E1 = 38*1.6*10**-19 #energy(J)\n", + "\n", + "#Calculation\n", + "L = math.sqrt(h**2/(8*m*E1))\n", + " \n", + "#Result\n", + "print \"Width of well =\",round(L/1e-10,4),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of well = 0.9965 A\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.15.7, Page number 5-45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "h = 6.63*10**-34 #Planck's constant(J-s)\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "L = 5*10**-10 #width(m)\n", + "n1 = 1\n", + "n2 = 2\n", + "c = 3*10**8 #velocity of light(m/s)\n", + "\n", + "#Calculation\n", + "E = ((3*h**2)/(8*m*L**2)) #E2-E1\n", + "Ev = E/(1.6-10**-19) #J\n", + "lamda = (h*c)/E\n", + "\n", + "#Result\n", + "print \"Energy =\",round(Ev/1e-19,2),\"eV\"\n", + "print \"Wavelength =\",round(lamda/1e-7,3),\"*10^-7 m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy = 4.53 eV\n", + "Wavelength = 2.745 *10^-7 m\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_6.ipynb b/Applied_Physics_II/Chapter_6.ipynb new file mode 100755 index 00000000..cc609a3f --- /dev/null +++ b/Applied_Physics_II/Chapter_6.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Motion of charge particle in Electric & Magnetic fields" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.1, Page number 6-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "v = 2.5*10**6 #velocity of electron(m/s)\n", + "theta = 30*math.pi/180 #angle(degrees)\n", + "B = 0.94*10**-4 #field strength(Wb/m^2)\n", + "e = 1.6*10**-19 #electron charge(C)\n", + "\n", + "#Calculations\n", + "r = (m*v*math.sin(theta))/(B*e)\n", + "\n", + "l = (5*v*math.cos(theta)*2*math.pi*m)/(B*e)\n", + "\n", + "#Results\n", + "print \"Radius =\",round(r/1e-3,2),\"mm\"\n", + "print \"Distance covered =\",round(l,3),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius = 75.63 mm\n", + "Distance covered = 4.115 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.2, Page number 6-7 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 9.1*10**-31 #mass of electron(kg)\n", + "v = 3*10**7 #velocity of electron(m/s)\n", + "theta = 45*math.pi/180 #angle(degrees)\n", + "B = 0.23*10**-4 #field strength(Wb/m^2)\n", + "e = 1.6*10**-19 #electron charge(C)\n", + "\n", + "#Calculations\n", + "r = (m*v*math.sin(theta))/(B*e)\n", + "\n", + "l = (v*math.cos(theta)*2*math.pi*m)/(B*e)\n", + "\n", + "#Results\n", + "print \"Radius =\",round(r,2),\"m\"\n", + "print \"Distance covered =\",round(l,3),\"m\"\n", + "#Calculation mistakes in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Radius = 5.25 m\n", + "Distance covered = 32.959 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1.3, Page number 6-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "y = 1.5 #displacement(cm)\n", + "d = 0.42 #distance(cm)\n", + "Va = 1.6*10**3 #anode voltage(V)\n", + "D = 28 #cm\n", + "l = 1.8 #length of plates(cm)\n", + "\n", + "#Calculation\n", + "V = (2*y*d*Va)/(D*l)\n", + "Vin = V/6\n", + "\n", + "#Result\n", + "print \"Input voltage =\",round(Vin,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input voltage = 6.67 V\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5.1, Page number 6-16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "da = 0.8 #minor axis(cm)\n", + "db = 2 #major axis(cm)\n", + "\n", + "#Calculation\n", + "ps = math.degrees(math.asin(da/db))\n", + "\n", + "#Result\n", + "print \"Phase shift =\",round(ps,2),\"degrees\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase shift = 23.58 degrees\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/Chapter_7.ipynb b/Applied_Physics_II/Chapter_7.ipynb new file mode 100755 index 00000000..3425e831 --- /dev/null +++ b/Applied_Physics_II/Chapter_7.ipynb @@ -0,0 +1,178 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Superconductivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.1, Page number 7-6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ho = 2.*10**5 #A/m\n", + "Hc = 1.*10**5 #A/m\n", + "T = 8. #temperature(K)\n", + "\n", + "#Calculations\n", + "Tc = math.sqrt(T**2/(1-(Hc/Ho)))\n", + "\n", + "#Result\n", + "print \"Critical temperature =\",round(Tc,3),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical temperature = 11.314 K\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.2, Page number 7-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Bo = 0.0306 #Critical field at 0K(T)\n", + "Tc = 3.7 #critical temperature(K)\n", + "T = 2 #K\n", + "\n", + "#calculation\n", + "Bc = Bo*(1-((T/Tc)**2))\n", + "\n", + "#Result\n", + "print \"Critical field at 2K is\",round(Bc,5),\"T\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical field at 2K is 0.02166 T\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.3, Page number 7-7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Ho = 6.5*10**4 #Critical field at 0K(T)\n", + "Tc = 7.18 #critical temperature(K)\n", + "T = 4.2 #K\n", + "r = 0.5*10**-3 #radius(m)\n", + "\n", + "#calculation\n", + "Hc = Ho*(1-((T/Tc)**2))\n", + "Ic = 2*math.pi*r*Hc\n", + "\n", + "#Result\n", + "print \"Critical current =\",round(Ic,2),\"A\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical current = 134.33 A\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3.4, Page number 7-8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable declaration\n", + "Tc1 = 4.185 #critical temperature(K)\n", + "M1 = 199.5 #isotopic mass\n", + "Tc2 = 4.133 #K\n", + "\n", + "#calculation\n", + "M2 = ((Tc1*M1**0.5)/Tc2)**2\n", + "\n", + "#Result\n", + "print \"Isotopic mass =\",round(M2,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Isotopic mass = 204.55\n" + ] + } + ], + "prompt_number": 9 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_II/README.txt b/Applied_Physics_II/README.txt new file mode 100755 index 00000000..717d1591 --- /dev/null +++ b/Applied_Physics_II/README.txt @@ -0,0 +1,10 @@ +Contributed By: Muktesh Chaudhary +Course: be +College/Institute/Organization: Anglo Eastern ship management india Pvt. Ltd +Department/Designation: Electrical & Electronics Officer +Book Title: Applied Physics II +Author: H. J. Sawant +Publisher: Technical Publications +Year of publication: 2014 +Isbn: 978-93-5038-883-9 +Edition: 2nd
\ No newline at end of file diff --git a/Applied_Physics_II/screenshots/halfangular.png b/Applied_Physics_II/screenshots/halfangular.png Binary files differnew file mode 100755 index 00000000..6c38e8b8 --- /dev/null +++ b/Applied_Physics_II/screenshots/halfangular.png diff --git a/Applied_Physics_II/screenshots/probability.png b/Applied_Physics_II/screenshots/probability.png Binary files differnew file mode 100755 index 00000000..f8d2ba6f --- /dev/null +++ b/Applied_Physics_II/screenshots/probability.png diff --git a/Applied_Physics_II/screenshots/visiblerange.png b/Applied_Physics_II/screenshots/visiblerange.png Binary files differnew file mode 100755 index 00000000..c4d798f7 --- /dev/null +++ b/Applied_Physics_II/screenshots/visiblerange.png |