diff options
Diffstat (limited to 'Engineering_Physics')
34 files changed, 9483 insertions, 1087 deletions
diff --git a/Engineering_Physics/Chapter10_1.ipynb b/Engineering_Physics/Chapter10_1.ipynb index b31ad5ec..b2bd25cb 100644 --- a/Engineering_Physics/Chapter10_1.ipynb +++ b/Engineering_Physics/Chapter10_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter10" + "name": "", + "signature": "sha256:4b61028c3be5c168cde4c3aa75ae23500168dbc119942b73de7c79e4a037fd53" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,52 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "10: Statistical Mechanics" + "source": [ + "10: Statistical Mechanics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.1, Page number 222" + "source": [ + "Example number 10.1, Page number 222" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the ratio of occupancy of the excited to the ground state\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nk = 1.38*10**-23; #Boltzmann constant(J/K)\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\ng1 = 2; #The degeneracy of ground state\ng2 = 8; #The degeneracy of excited state\ndelta_E = 10.2; #Energy of excited state above the ground state(eV)\nT = 6000; #Temperature of the state(K)\n\n#Calculation\nD_ratio = g2/g1; #Ratio of degeneracy of states\nx = k*T/e;\nN_ratio = D_ratio*math.exp(-delta_E/x); #Ratio of occupancy of the excited to the ground state\n\n#Result\nprint \"The ratio of occupancy of the excited to the ground state is\",N_ratio", + "input": [ + "\n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "g1 = 2; #The degeneracy of ground state\n", + "g2 = 8; #The degeneracy of excited state\n", + "delta_E = 10.2; #Energy of excited state above the ground state(eV)\n", + "T = 6000; #Temperature of the state(K)\n", + "\n", + "#Calculation\n", + "D_ratio = g2/g1; #Ratio of degeneracy of states\n", + "x = k*T/e;\n", + "N_ratio = D_ratio*math.exp(-delta_E/x); #Ratio of occupancy of the excited to the ground state\n", + "\n", + "#Result\n", + "print \"The ratio of occupancy of the excited to the ground state is\",N_ratio" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The ratio of occupancy of the excited to the ground state is 1.10167326887e-08\n" + "text": [ + "The ratio of occupancy of the excited to the ground state is 1.10167326887e-08\n" + ] } ], "prompt_number": 1 @@ -38,19 +66,30 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.2, Page number 222" + "source": [ + "Example number 10.2, Page number 222" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the ground state energy of 10 non-interacting bosons\n\n#Calculation\n#an energy level can accomodate any number of bosons. Hence 10 bosons will be in n=1 state\n#energy is given by E1 = (pi**2*h**2)/(2*m*a**2)\na = 10/2;\n#enegy of 10 bosons is E = (10*pi**2*h**2)/(2*m*a**2) = (5*pi**2*h**2)/(m*a**2)\n\n#Result\nprint \"enegy of 10 bosons is E = \",int(a),\"(pi**2*h**2)/(m*a**2)\"", + "input": [ + "\n", + "a = 10/2;\n", + "#enegy of 10 bosons is E = (10*pi**2*h**2)/(2*m*a**2) = (5*pi**2*h**2)/(m*a**2)\n", + "\n", + "#Result\n", + "print \"enegy of 10 bosons is E = \",int(a),\"(pi**2*h**2)/(m*a**2)\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "enegy of 10 bosons is E = 5 (pi**2*h**2)/(m*a**2)\n" + "text": [ + "enegy of 10 bosons is E = 5 (pi**2*h**2)/(m*a**2)\n" + ] } ], "prompt_number": 5 @@ -59,19 +98,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.3, Page number 223" + "source": [ + "Example number 10.3, Page number 223" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the ground state energy of the system\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1; #1st level\nn2=2; #2nd level\nn3=3; #3rd level\nn4=4; #4th level\nn5=5; #5th level\n\n#Calculation\n#an energy level can accomodate only 2 fermions. hence there will be 2 fermions in each level\n#thus total ground state energy will be E = (2*E1)+(2*E2)+(2*E3)+(2*E4)+E5\n#let X = ((pi**2)*(h**2)/(2*m*a**2)). E = X*((2*n1**2)+(2*n2**2)+(2*n3**2)+(2*n4**2)+(n5**2))\nA = (2*n1**2)+(2*n2**2)+(2*n3**2)+(2*n4**2)+(n5**2);\n#thus E = A*X\n\n#Result\nprint \"the ground state energy of the system is\",A,\"(pi**2)*(h**2)/(2*m*a**2)\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1; #1st level\n", + "n2=2; #2nd level\n", + "n3=3; #3rd level\n", + "n4=4; #4th level\n", + "n5=5; #5th level\n", + "\n", + "#Calculation\n", + "#an energy level can accomodate only 2 fermions. hence there will be 2 fermions in each level\n", + "#thus total ground state energy will be E = (2*E1)+(2*E2)+(2*E3)+(2*E4)+E5\n", + "#let X = ((pi**2)*(h**2)/(2*m*a**2)). E = X*((2*n1**2)+(2*n2**2)+(2*n3**2)+(2*n4**2)+(n5**2))\n", + "A = (2*n1**2)+(2*n2**2)+(2*n3**2)+(2*n4**2)+(n5**2);\n", + "#thus E = A*X\n", + "\n", + "#Result\n", + "print \"the ground state energy of the system is\",A,\"(pi**2)*(h**2)/(2*m*a**2)\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "the ground state energy of the system is 85 (pi**2)*(h**2)/(2*m*a**2)\n" + "text": [ + "the ground state energy of the system is 85 (pi**2)*(h**2)/(2*m*a**2)\n" + ] } ], "prompt_number": 6 @@ -80,19 +144,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.4, Page number 223" + "source": [ + "Example number 10.4, Page number 223" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number density of conduction electrons and Fermi energy of silver\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nN_A = 6.02*10**23; #Avogadro's number\nh = 6.626*10**-34; #Planck's constant(Js)\nme = 9.1*10**-31; #Mass of electron(kg)\nrho = 10.5; #Density of silver(g/cm)\nm = 108; #Molecular mass of silver(g/mol)\n\n#Calculation\nN_D = rho*N_A/m; #Number density of conduction electrons(per cm**3)\nN_D = N_D*10**6; #Number density of conduction electrons(per m**3)\nE_F = ((h**2)/(8*me))*(3/math.pi*N_D)**(2/3); #fermi energy(J)\nE_F = E_F/e; #fermi energy(eV)\nE_F = math.ceil(E_F*10**2)/10**2; #rounding off the value of E_F to 2 decimals\n\n#Result\nprint \"The number density of conduction electrons is\",N_D, \"per metre cube\"\nprint \"The Fermi energy of silver is\",E_F, \"eV\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "N_A = 6.02*10**23; #Avogadro's number\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "me = 9.1*10**-31; #Mass of electron(kg)\n", + "rho = 10.5; #Density of silver(g/cm)\n", + "m = 108; #Molecular mass of silver(g/mol)\n", + "\n", + "#Calculation\n", + "N_D = rho*N_A/m; #Number density of conduction electrons(per cm**3)\n", + "N_D = N_D*10**6; #Number density of conduction electrons(per m**3)\n", + "E_F = ((h**2)/(8*me))*(3/math.pi*N_D)**(2/3); #fermi energy(J)\n", + "E_F = E_F/e; #fermi energy(eV)\n", + "E_F = math.ceil(E_F*10**2)/10**2; #rounding off the value of E_F to 2 decimals\n", + "\n", + "#Result\n", + "print \"The number density of conduction electrons is\",N_D, \"per metre cube\"\n", + "print \"The Fermi energy of silver is\",E_F, \"eV\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The number density of conduction electrons is 5.85277777778e+28 per metre cube\nThe Fermi energy of silver is 5.51 eV\n" + "text": [ + "The number density of conduction electrons is 5.85277777778e+28 per metre cube\n", + "The Fermi energy of silver is 5.51 eV\n" + ] } ], "prompt_number": 7 @@ -101,19 +194,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.5, Page number 224" + "source": [ + "Example number 10.5, Page number 224" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic contribution to molar specific heat of sodium\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nN_A = 6.02*10**23; #Avogadro's number\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nT = 293; #Temperature of sodium(K)\nE_F = 3.24; #Fermi energy of sodium(eV)\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n\n#Calculation\nC_v = math.pi**2*N_A*k**2*T/(2*E_F*e); #Molar specific heat of sodium(per mole)\nC_v = math.ceil(C_v*10**2)/10**2; #rounding off the value of C_v to 2 decimals\n\n#Result\nprint \"The electronic contribution to molar specific heat of sodium is\",C_v, \"per mole\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N_A = 6.02*10**23; #Avogadro's number\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "T = 293; #Temperature of sodium(K)\n", + "E_F = 3.24; #Fermi energy of sodium(eV)\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "\n", + "#Calculation\n", + "C_v = math.pi**2*N_A*k**2*T/(2*E_F*e); #Molar specific heat of sodium(per mole)\n", + "C_v = math.ceil(C_v*10**2)/10**2; #rounding off the value of C_v to 2 decimals\n", + "\n", + "#Result\n", + "print \"The electronic contribution to molar specific heat of sodium is\",C_v, \"per mole\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The electronic contribution to molar specific heat of sodium is 0.32 per mole\n" + "text": [ + "The electronic contribution to molar specific heat of sodium is 0.32 per mole\n" + ] } ], "prompt_number": 8 @@ -122,19 +238,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.6, Page number 224" + "source": [ + "Example number 10.6, Page number 224" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Fermi energy and mean energy of the electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nh = 6.626*10**-34; #Planck's constant(Js)\nm = 9.1*10**-31; #Mass of the electron(kg)\nN_D = 18.1*10**28; #Number density of conduction electrons in Al(per metre cube)\n\n#Calculation\nE_F = h**2/(8*m)*(3/math.pi*N_D)**(2/3); #N_D = N/V. Fermi energy of aluminium(J)\nE_F = E_F/e; #Fermi energy of aluminium(eV)\nE_F = math.ceil(E_F*10**3)/10**3; #rounding off the value of E_F to 3 decimals\nEm_0 = 3/5*E_F; #Mean energy of the electron at 0K(eV)\nEm_0 = math.ceil(Em_0*10**3)/10**3; #rounding off the value of Em_0 to 3 decimals\n\n#Result\nprint \"The Fermi energy of aluminium is\",E_F, \"eV\"\nprint \"The mean energy of the electron is\",Em_0, \"eV\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "m = 9.1*10**-31; #Mass of the electron(kg)\n", + "N_D = 18.1*10**28; #Number density of conduction electrons in Al(per metre cube)\n", + "\n", + "#Calculation\n", + "E_F = h**2/(8*m)*(3/math.pi*N_D)**(2/3); #N_D = N/V. Fermi energy of aluminium(J)\n", + "E_F = E_F/e; #Fermi energy of aluminium(eV)\n", + "E_F = math.ceil(E_F*10**3)/10**3; #rounding off the value of E_F to 3 decimals\n", + "Em_0 = 3/5*E_F; #Mean energy of the electron at 0K(eV)\n", + "Em_0 = math.ceil(Em_0*10**3)/10**3; #rounding off the value of Em_0 to 3 decimals\n", + "\n", + "#Result\n", + "print \"The Fermi energy of aluminium is\",E_F, \"eV\"\n", + "print \"The mean energy of the electron is\",Em_0, \"eV\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Fermi energy of aluminium is 11.696 eV\nThe mean energy of the electron is 7.018 eV\n" + "text": [ + "The Fermi energy of aluminium is 11.696 eV\n", + "The mean energy of the electron is 7.018 eV\n" + ] } ], "prompt_number": 9 @@ -142,7 +285,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter11_1.ipynb b/Engineering_Physics/Chapter11_1.ipynb index 733fe6b7..d9dc8a6d 100644 --- a/Engineering_Physics/Chapter11_1.ipynb +++ b/Engineering_Physics/Chapter11_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter11" + "name": "", + "signature": "sha256:9d08f8379ee15c99ce5ad85c8c37d7ad2a3a702f52e1db068a113b3963c85435" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,55 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "11: Lasers" + "source": [ + "11: Lasers" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.1, Page number 249" + "source": [ + "Example number 11.1, Page number 249" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the ratio of spontaneous emission to stimulated emission for visible and microwave region\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nh = 6.626*10**-34; #Planck's constant(Js)\nc = 3*10**8; #Speed of light in free space(m/s)\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nT = 300; #Temperature at absolute scale(K)\nlamda1 = 5500; #Wavelength of visible light(A)\nlamda2 = 10**-2; #Wavelength of microwave(m)\n\n#Calculation\nlamda1 = lamda1*10**-10; #Wavelength of visible light(m)\nrate_ratio = math.exp(h*c/(lamda1*k*T))-1; #Ratio of spontaneous emission to stimulated emission\nrate_ratio1 = math.exp(h*c/(lamda2*k*T))-1; #Ratio of spontaneous emission to stimulated emission\nrate_ratio1 = math.ceil(rate_ratio1*10**5)/10**5; #rounding off the value of rate_ratio1 to 5 decimals\n\n#Result\nprint \"The ratio of spontaneous emission to stimulated emission for visible region is\",rate_ratio\nprint \"The ratio of spontaneous emission to stimulated emission for microwave region is\", rate_ratio1", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "c = 3*10**8; #Speed of light in free space(m/s)\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "T = 300; #Temperature at absolute scale(K)\n", + "lamda1 = 5500; #Wavelength of visible light(A)\n", + "lamda2 = 10**-2; #Wavelength of microwave(m)\n", + "\n", + "#Calculation\n", + "lamda1 = lamda1*10**-10; #Wavelength of visible light(m)\n", + "rate_ratio = math.exp(h*c/(lamda1*k*T))-1; #Ratio of spontaneous emission to stimulated emission\n", + "rate_ratio1 = math.exp(h*c/(lamda2*k*T))-1; #Ratio of spontaneous emission to stimulated emission\n", + "rate_ratio1 = math.ceil(rate_ratio1*10**5)/10**5; #rounding off the value of rate_ratio1 to 5 decimals\n", + "\n", + "#Result\n", + "print \"The ratio of spontaneous emission to stimulated emission for visible region is\",rate_ratio\n", + "print \"The ratio of spontaneous emission to stimulated emission for microwave region is\", rate_ratio1" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The ratio of spontaneous emission to stimulated emission for visible region is 8.19422217477e+37\nThe ratio of spontaneous emission to stimulated emission for microwave region is 0.00482\n" + "text": [ + "The ratio of spontaneous emission to stimulated emission for visible region is 8.19422217477e+37\n", + "The ratio of spontaneous emission to stimulated emission for microwave region is 0.00482\n" + ] } ], "prompt_number": 3 @@ -38,19 +69,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.2, Page number 250" + "source": [ + "Example number 11.2, Page number 250" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy of excited state\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nh = 6.626*10**-34; #Planck's constant(Js)\nc = 3*10**8; #Speed of light in free space(m/s)\nlamda = 690; #Wavelength of laser light(nm)\nE_lower = 30.5; #Energy of lower state(eV)\n\n#Calculation\nlamda = lamda*10**-9; #Wavelength of laser light(m)\nE = h*c/lamda; #Energy of the laser light(J)\nE = E/e; #Energy of the laser light(eV)\nE_ex = E_lower + E; #Energy of excited state of laser system(eV)\nE_ex = math.ceil(E_ex*10**2)/10**2; #rounding off the value of E_ex to 2 decimals\n\n#Result\nprint \"The energy of excited state of laser system is\",E_ex, \"eV\"", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "c = 3*10**8; #Speed of light in free space(m/s)\n", + "lamda = 690; #Wavelength of laser light(nm)\n", + "E_lower = 30.5; #Energy of lower state(eV)\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-9; #Wavelength of laser light(m)\n", + "E = h*c/lamda; #Energy of the laser light(J)\n", + "E = E/e; #Energy of the laser light(eV)\n", + "E_ex = E_lower + E; #Energy of excited state of laser system(eV)\n", + "E_ex = math.ceil(E_ex*10**2)/10**2; #rounding off the value of E_ex to 2 decimals\n", + "\n", + "#Result\n", + "print \"The energy of excited state of laser system is\",E_ex, \"eV\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The energy of excited state of laser system is 32.31 eV\n" + "text": [ + "The energy of excited state of laser system is 32.31 eV\n" + ] } ], "prompt_number": 4 @@ -59,19 +115,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.3, Page number 250" + "source": [ + "Example number 11.3, Page number 250" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To determine the condition under which stimulated emission equals spontaneous emission\n\n#importing modules\nimport math\nfrom __future__ import division\nimport numpy as np\n\n#Variable declaration\nh = 6.626*10**-34; #Planck's constant(Js)\nk = 1.38*10**-23; #Boltzmann constant(J/K)\n\n#Calculation\n#Stimulated Emission = Spontaneous Emission <=> exp(h*f/(k*T))-1 = 1 i.e.\n#f/T = log(2)*k/h = A\nA = np.log(2)*k/h; #Frequency per unit temperature(Hz/K)\nA = A/10**10;\nA = math.ceil(A*10**3)/10**3; #rounding off the value of A to 3 decimals\n\n#Result\nprint \"The stimulated emission equals spontaneous emission iff f/T =\",A,\"*10**10 Hz/k\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "\n", + "#Calculation\n", + "#Stimulated Emission = Spontaneous Emission <=> exp(h*f/(k*T))-1 = 1 i.e.\n", + "#f/T = log(2)*k/h = A\n", + "A = np.log(2)*k/h; #Frequency per unit temperature(Hz/K)\n", + "A = A/10**10;\n", + "A = math.ceil(A*10**3)/10**3; #rounding off the value of A to 3 decimals\n", + "\n", + "#Result\n", + "print \"The stimulated emission equals spontaneous emission iff f/T =\",A,\"*10**10 Hz/k\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The stimulated emission equals spontaneous emission iff f/T = 1.444 *10**10 Hz/k\n" + "text": [ + "The stimulated emission equals spontaneous emission iff f/T = 1.444 *10**10 Hz/k\n" + ] } ], "prompt_number": 7 @@ -80,19 +160,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.4, Page number 250" + "source": [ + "Example number 11.4, Page number 250" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the area of the spot and intensity at the focus \n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 500; #Wavelength of laser light(nm)\nf = 15; #Focal length of the lens(cm)\nd = 2; #Diameter of the aperture of source(cm)\nP = 5; #Power of the laser(mW)\n\n#Calculation\nP = P*10**-3; #Power of the laser(W)\nlamda = lamda*10**-9; #Wavelength of laser light(m)\nd = d*10**-2; #Diameter of the aperture of source(m)\nf = f*10**-2; #Focal length of the lens(m)\na = d/2; #Radius of the aperture of source(m)\nA = math.pi*lamda**2*f**2/a**2; #Area of the spot at the focal plane, metre square\nI = P/A; #Intensity at the focus(W/m**2)\nI = I/10**7;\nI = math.ceil(I*10**4)/10**4; #rounding off the value of I to 1 decimal\n\n#Result\nprint \"The area of the spot at the focal plane is\",A, \"m**2\"\nprint \"The intensity at the focus is\",I,\"*10**7 W/m**2\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 500; #Wavelength of laser light(nm)\n", + "f = 15; #Focal length of the lens(cm)\n", + "d = 2; #Diameter of the aperture of source(cm)\n", + "P = 5; #Power of the laser(mW)\n", + "\n", + "#Calculation\n", + "P = P*10**-3; #Power of the laser(W)\n", + "lamda = lamda*10**-9; #Wavelength of laser light(m)\n", + "d = d*10**-2; #Diameter of the aperture of source(m)\n", + "f = f*10**-2; #Focal length of the lens(m)\n", + "a = d/2; #Radius of the aperture of source(m)\n", + "A = math.pi*lamda**2*f**2/a**2; #Area of the spot at the focal plane, metre square\n", + "I = P/A; #Intensity at the focus(W/m**2)\n", + "I = I/10**7;\n", + "I = math.ceil(I*10**4)/10**4; #rounding off the value of I to 1 decimal\n", + "\n", + "#Result\n", + "print \"The area of the spot at the focal plane is\",A, \"m**2\"\n", + "print \"The intensity at the focus is\",I,\"*10**7 W/m**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The area of the spot at the focal plane is 1.76714586764e-10 m**2\nThe intensity at the focus is 2.8295 *10**7 W/m**2\n" + "text": [ + "The area of the spot at the focal plane is 1.76714586764e-10 m**2\n", + "The intensity at the focus is 2.8295 *10**7 W/m**2\n" + ] } ], "prompt_number": 14 @@ -101,19 +212,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.5, Page number 251" + "source": [ + "Example number 11.5, Page number 251" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy released per pulse and number of photons\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nh = 6.626*10**-34; #Planck's constant(Js)\nc = 3*10**8; #Speed of light in free space(m/s)\nlamda = 1064; #Wavelength of laser light(nm)\nP = 0.8; #Average power output per laser pulse(W)\ndt = 25; #Pulse width of laser(ms)\n\n#Calculation\ndt = dt*10**-3; #Pulse width of laser(s)\nlamda = lamda*10**-9; #Wavelength of laser light(m)\nE = P*dt; #Energy released per pulse(J)\nE1 = E*10**3;\nN = E/(h*c/lamda); #Number of photons in a pulse\n\n#Result\nprint \"The energy released per pulse is\",E1,\"*10**-3 J\"\nprint \"The number of photons in a pulse is\", N\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "c = 3*10**8; #Speed of light in free space(m/s)\n", + "lamda = 1064; #Wavelength of laser light(nm)\n", + "P = 0.8; #Average power output per laser pulse(W)\n", + "dt = 25; #Pulse width of laser(ms)\n", + "\n", + "#Calculation\n", + "dt = dt*10**-3; #Pulse width of laser(s)\n", + "lamda = lamda*10**-9; #Wavelength of laser light(m)\n", + "E = P*dt; #Energy released per pulse(J)\n", + "E1 = E*10**3;\n", + "N = E/(h*c/lamda); #Number of photons in a pulse\n", + "\n", + "#Result\n", + "print \"The energy released per pulse is\",E1,\"*10**-3 J\"\n", + "print \"The number of photons in a pulse is\", N\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The energy released per pulse is 20.0 *10**-3 J\nThe number of photons in a pulse is 1.07053023443e+17\n" + "text": [ + "The energy released per pulse is 20.0 *10**-3 J\n", + "The number of photons in a pulse is 1.07053023443e+17\n" + ] } ], "prompt_number": 17 @@ -122,19 +261,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.6, Page number 251" + "source": [ + "Example number 11.6, Page number 251" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angular spread and diameter of the beam\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 693; #Wavelength of laser beam(nm)\nD = 3; #Diameter of laser beam(mm)\nd = 300; #Height of a satellite above the surface of earth(km)\n\n#Calculation\nD = D*10**-3; #Diameter of laser beam(m)\nlamda = lamda*10**-9; #Wavelength of laser beam(m)\nd = d*10**3; #Height of a satellite above the surface of earth(m)\nd_theta = 1.22*lamda/D; #Angular spread of laser beam(rad)\ndtheta = d_theta*10**4;\ndtheta = math.ceil(dtheta*10**2)/10**2; #rounding off the value of dtheta to 2 decimals\na = d_theta*d; #Diameter of the beam on the satellite(m)\na = math.ceil(a*10)/10; #rounding off the value of a to 1 decimal\n\n#Result\nprint \"The height of a satellite above the surface of earth is\",dtheta,\"*10**-4 rad\"\nprint \"The diameter of the beam on the satellite is\",a, \"m\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 693; #Wavelength of laser beam(nm)\n", + "D = 3; #Diameter of laser beam(mm)\n", + "d = 300; #Height of a satellite above the surface of earth(km)\n", + "\n", + "#Calculation\n", + "D = D*10**-3; #Diameter of laser beam(m)\n", + "lamda = lamda*10**-9; #Wavelength of laser beam(m)\n", + "d = d*10**3; #Height of a satellite above the surface of earth(m)\n", + "d_theta = 1.22*lamda/D; #Angular spread of laser beam(rad)\n", + "dtheta = d_theta*10**4;\n", + "dtheta = math.ceil(dtheta*10**2)/10**2; #rounding off the value of dtheta to 2 decimals\n", + "a = d_theta*d; #Diameter of the beam on the satellite(m)\n", + "a = math.ceil(a*10)/10; #rounding off the value of a to 1 decimal\n", + "\n", + "#Result\n", + "print \"The height of a satellite above the surface of earth is\",dtheta,\"*10**-4 rad\"\n", + "print \"The diameter of the beam on the satellite is\",a, \"m\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The height of a satellite above the surface of earth is 2.82 *10**-4 rad\nThe diameter of the beam on the satellite is 84.6 m\n" + "text": [ + "The height of a satellite above the surface of earth is 2.82 *10**-4 rad\n", + "The diameter of the beam on the satellite is 84.6 m\n" + ] } ], "prompt_number": 25 @@ -142,7 +310,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter12_1.ipynb b/Engineering_Physics/Chapter12_1.ipynb index 440b2d59..c394fc3a 100644 --- a/Engineering_Physics/Chapter12_1.ipynb +++ b/Engineering_Physics/Chapter12_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter12" + "name": "", + "signature": "sha256:435dc2503f7ab5f5c4bb167df36c6ef12f8211207bc52e60997787c4d2bd8d5c" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,59 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "12: Holography and Fibre Optics" + "source": [ + "12: Holography and Fibre Optics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.1, Page number 271" + "source": [ + "Example number 12.1, Page number 271" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical angle, critical propagation angle and numerical aperture \n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nn1 = 1.43; #Refractive index of fibre core\nn2 = 1.4; #Refractive index of fibre cladding\n\n#Calculation\n#As sin (alpha_c) = n2/n1, solving for alpha_c\nalpha_c = math.asin(n2/n1); #Critical angle for optical fibre(rad)\nalpha_c = alpha_c*57.2957795; #Critical angle for optical fibre(degrees)\nalpha_c = math.ceil(alpha_c*10**3)/10**3; #rounding off the value of alpha_c to 3 decimals\n#AS cos(theta_c) = n2/n1, solving for theta_c\ntheta_c = math.acos(n2/n1); #Critical propagation angle for optical fibre(rad)\ntheta_c = theta_c*57.2957795; #Critical propagation angle for optical fibre(degrees)\ntheta_c = math.ceil(theta_c*10**2)/10**2; #rounding off the value of theta_c to 2 decimals\nNA = math.sqrt(n1**2 - n2**2); #Numerical aperture for optical fibre\nNA = math.ceil(NA*10**3)/10**3; #rounding off the value of NA to 3 decimals\n\n#Result\nprint \"The critical angle for optical fibre is\",alpha_c, \"degrees\"\nprint \"The critical propagation angle for optical fibre is\",theta_c, \"degrees\"\nprint \"Numerical aperture for optical fibre is\",NA\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.43; #Refractive index of fibre core\n", + "n2 = 1.4; #Refractive index of fibre cladding\n", + "\n", + "#Calculation\n", + "#As sin (alpha_c) = n2/n1, solving for alpha_c\n", + "alpha_c = math.asin(n2/n1); #Critical angle for optical fibre(rad)\n", + "alpha_c = alpha_c*57.2957795; #Critical angle for optical fibre(degrees)\n", + "alpha_c = math.ceil(alpha_c*10**3)/10**3; #rounding off the value of alpha_c to 3 decimals\n", + "#AS cos(theta_c) = n2/n1, solving for theta_c\n", + "theta_c = math.acos(n2/n1); #Critical propagation angle for optical fibre(rad)\n", + "theta_c = theta_c*57.2957795; #Critical propagation angle for optical fibre(degrees)\n", + "theta_c = math.ceil(theta_c*10**2)/10**2; #rounding off the value of theta_c to 2 decimals\n", + "NA = math.sqrt(n1**2 - n2**2); #Numerical aperture for optical fibre\n", + "NA = math.ceil(NA*10**3)/10**3; #rounding off the value of NA to 3 decimals\n", + "\n", + "#Result\n", + "print \"The critical angle for optical fibre is\",alpha_c, \"degrees\"\n", + "print \"The critical propagation angle for optical fibre is\",theta_c, \"degrees\"\n", + "print \"Numerical aperture for optical fibre is\",NA\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The critical angle for optical fibre is 78.244 degrees\nThe critical propagation angle for optical fibre is 11.76 degrees\nNumerical aperture for optical fibre is 0.292\n" + "text": [ + "The critical angle for optical fibre is 78.244 degrees\n", + "The critical propagation angle for optical fibre is 11.76 degrees\n", + "Numerical aperture for optical fibre is 0.292\n" + ] } ], "prompt_number": 1 @@ -38,19 +73,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.2, Page number 271" + "source": [ + "Example number 12.2, Page number 271" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture, acceptance angle and relative refractive index difference\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nn1 = 1.45; #Refractive index of fibre core\nn2 = 1.4; #Refractive index of fibre cladding\n\n#Calculation\nNA = math.sqrt(n1**2 - n2**2); #Numerical aperture for optical fibre\nNA = math.ceil(NA*10**4)/10**4; #rounding off the value of NA to 4 decimals\n#As sin(theta_a) = sqrt(n1^2 - n2^2), solving for theta_a\ntheta_a = math.asin(math.sqrt(n1**2 - n2**2)); #Half of acceptance angle of optical fibre(rad)\ntheta_a = theta_a*57.2957795; #Half of acceptance angle of optical fibre(degrees)\ntheta_accp = 2*theta_a; #Acceptance angle of optical fibre(degrees)\ntheta_accp = math.ceil(theta_accp*10**2)/10**2; #rounding off the value of theta_accp to 2 decimals\nDelta = (n1 - n2)/n1; #Relative refractive index difference\nDelta = math.ceil(Delta*10**4)/10**4; #rounding off the value of Delta to 4 decimals\n\n#Result\nprint \"Numerical aperture for optical fibre is\", NA\nprint \"The acceptance angle of optical fibre is\",theta_accp, \"degrees\"\nprint \"Relative refractive index difference is\", Delta\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.45; #Refractive index of fibre core\n", + "n2 = 1.4; #Refractive index of fibre cladding\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2 - n2**2); #Numerical aperture for optical fibre\n", + "NA = math.ceil(NA*10**4)/10**4; #rounding off the value of NA to 4 decimals\n", + "#As sin(theta_a) = sqrt(n1^2 - n2^2), solving for theta_a\n", + "theta_a = math.asin(math.sqrt(n1**2 - n2**2)); #Half of acceptance angle of optical fibre(rad)\n", + "theta_a = theta_a*57.2957795; #Half of acceptance angle of optical fibre(degrees)\n", + "theta_accp = 2*theta_a; #Acceptance angle of optical fibre(degrees)\n", + "theta_accp = math.ceil(theta_accp*10**2)/10**2; #rounding off the value of theta_accp to 2 decimals\n", + "Delta = (n1 - n2)/n1; #Relative refractive index difference\n", + "Delta = math.ceil(Delta*10**4)/10**4; #rounding off the value of Delta to 4 decimals\n", + "\n", + "#Result\n", + "print \"Numerical aperture for optical fibre is\", NA\n", + "print \"The acceptance angle of optical fibre is\",theta_accp, \"degrees\"\n", + "print \"Relative refractive index difference is\", Delta\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "Numerical aperture for optical fibre is 0.3775\nThe acceptance angle of optical fibre is 44.36 degrees\nRelative refractive index difference is 0.0345\n" + "text": [ + "Numerical aperture for optical fibre is 0.3775\n", + "The acceptance angle of optical fibre is 44.36 degrees\n", + "Relative refractive index difference is 0.0345\n" + ] } ], "prompt_number": 2 @@ -59,19 +125,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.3, Page number 271" + "source": [ + "Example number 12.3, Page number 271" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture and acceptance angle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nn1 = 1.55; #Refractive index of fibre core\nn2 = 1.53; #Refractive index of fibre cladding\nn0 = 1.3; #Refractive index of medium\n\n#Calculation\nNA = math.sqrt(n1**2 - n2**2); #Numerical aperture for optical fibre\nNA = math.ceil(NA*10**4)/10**4; #rounding off the value of NA to 4 decimals\n#n0*sin(theta_a) = sqrt(n1^2 - n2^2) = NA, solving for theta_a\ntheta_a = math.asin(math.sqrt(n1**2 - n2**2)/n0); #Half of acceptance angle of optical fibre(rad)\ntheta_a = theta_a*57.2957795; #Half of acceptance angle of optical fibre(degrees)\ntheta_accp = 2*theta_a; #Acceptance angle of optical fibre(degrees)\n\n#Result\nprint \"Numerical aperture for step index fibre is\",NA\nprint \"The acceptance angle of step index fibre is\",int(theta_accp), \"degrees\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n1 = 1.55; #Refractive index of fibre core\n", + "n2 = 1.53; #Refractive index of fibre cladding\n", + "n0 = 1.3; #Refractive index of medium\n", + "\n", + "#Calculation\n", + "NA = math.sqrt(n1**2 - n2**2); #Numerical aperture for optical fibre\n", + "NA = math.ceil(NA*10**4)/10**4; #rounding off the value of NA to 4 decimals\n", + "#n0*sin(theta_a) = sqrt(n1^2 - n2^2) = NA, solving for theta_a\n", + "theta_a = math.asin(math.sqrt(n1**2 - n2**2)/n0); #Half of acceptance angle of optical fibre(rad)\n", + "theta_a = theta_a*57.2957795; #Half of acceptance angle of optical fibre(degrees)\n", + "theta_accp = 2*theta_a; #Acceptance angle of optical fibre(degrees)\n", + "\n", + "#Result\n", + "print \"Numerical aperture for step index fibre is\",NA\n", + "print \"The acceptance angle of step index fibre is\",int(theta_accp), \"degrees\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "Numerical aperture for step index fibre is 0.2482\nThe acceptance angle of step index fibre is 22 degrees\n" + "text": [ + "Numerical aperture for step index fibre is 0.2482\n", + "The acceptance angle of step index fibre is 22 degrees\n" + ] } ], "prompt_number": 5 @@ -80,25 +173,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.4, Page number 271 Theoritical proof" + "source": [ + "Example number 12.4, Page number 271 Theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.5, Page number 272" + "source": [ + "Example number 12.5, Page number 272" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture and acceptance angle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nalpha = 2; #Power loss through optical fibre(dB/km)\nP_in = 500; #Poer input of optical fibre(micro-watt)\nz = 10; #Length of the optical fibre(km)\n\n#Calculation\n#As alpha = 10/z*log10(P_in/P_out), solving for P_out\nP_out = P_in/10**(alpha*z/10); #Output power in fibre optic communication(micro-Watt)\n\n#Result\nprint \"The output power in fibre optic communication is\",P_out, \"micro-Watt\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "alpha = 2; #Power loss through optical fibre(dB/km)\n", + "P_in = 500; #Poer input of optical fibre(micro-watt)\n", + "z = 10; #Length of the optical fibre(km)\n", + "\n", + "#Calculation\n", + "#As alpha = 10/z*log10(P_in/P_out), solving for P_out\n", + "P_out = P_in/10**(alpha*z/10); #Output power in fibre optic communication(micro-Watt)\n", + "\n", + "#Result\n", + "print \"The output power in fibre optic communication is\",P_out, \"micro-Watt\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The output power in fibre optic communication is 5.0 micro-Watt\n" + "text": [ + "The output power in fibre optic communication is 5.0 micro-Watt\n" + ] } ], "prompt_number": 6 @@ -106,7 +222,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter13_1.ipynb b/Engineering_Physics/Chapter13_1.ipynb index 2366432d..75d0d1f7 100644 --- a/Engineering_Physics/Chapter13_1.ipynb +++ b/Engineering_Physics/Chapter13_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter13" + "name": "", + "signature": "sha256:be254bf95838dd01a87a63582117a886c3167a80cf387f9901b2e2de7a990b8e" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,48 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "13: Dielectric Properties of Materials" + "source": [ + "13: Dielectric Properties of Materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.1, Page number 287" + "source": [ + "Example number 13.1, Page number 287" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability \n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0 = 8.85*10**-12; #Absolute electrical permittivity of free space(F/m)\nR = 0.52; #Radius of hydrogen atom(A)\nn = 9.7*10**26; #Number density of hydrogen(per metre cube)\n\n#Calculation\nR = R*10**-10; #Radius of hydrogen atom(m)\nalpha_e = 4*math.pi*epsilon_0*R**3; #Electronic polarizability of hydrogen atom(Fm**2)\n\n#Result\nprint \"The electronic polarizability of hydrogen atom is\", alpha_e, \"Fm**2\"", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0 = 8.85*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "R = 0.52; #Radius of hydrogen atom(A)\n", + "n = 9.7*10**26; #Number density of hydrogen(per metre cube)\n", + "\n", + "#Calculation\n", + "R = R*10**-10; #Radius of hydrogen atom(m)\n", + "alpha_e = 4*math.pi*epsilon_0*R**3; #Electronic polarizability of hydrogen atom(Fm**2)\n", + "\n", + "#Result\n", + "print \"The electronic polarizability of hydrogen atom is\", alpha_e, \"Fm**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The electronic polarizability of hydrogen atom is 1.56373503182e-41 Fm**2\n" + "text": [ + "The electronic polarizability of hydrogen atom is 1.56373503182e-41 Fm**2\n" + ] } ], "prompt_number": 1 @@ -38,19 +62,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.2, Page number 287" + "source": [ + "Example number 13.2, Page number 287" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the capacitance of capacitor and charge on the plates\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nepsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\nA = 100; #Area of a plate of parallel plate capacitor(cm**2)\nd = 1; #Distance between the plates of the capacitor(cm)\nV = 100; #Potential applied to the plates of the capacitor(V)\n\n#Calculation\nA= A*10**-4; #Area of a plate of parallel plate capacitor(m**2)\nd = d*10**-2; #Distance between the plates of the capacitor(m)\nC = epsilon_0*A/d; #Capacitance of parallel plate capacitor(F)\nQ = C*V; #Charge on the plates of the capacitor(C)\n\n#Result\nprint \"The capacitance of parallel plate capacitor is\",C, \"F\"\nprint \"The charge on the plates of the capacitor is\",Q, \"C\"\n", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "A = 100; #Area of a plate of parallel plate capacitor(cm**2)\n", + "d = 1; #Distance between the plates of the capacitor(cm)\n", + "V = 100; #Potential applied to the plates of the capacitor(V)\n", + "\n", + "#Calculation\n", + "A= A*10**-4; #Area of a plate of parallel plate capacitor(m**2)\n", + "d = d*10**-2; #Distance between the plates of the capacitor(m)\n", + "C = epsilon_0*A/d; #Capacitance of parallel plate capacitor(F)\n", + "Q = C*V; #Charge on the plates of the capacitor(C)\n", + "\n", + "#Result\n", + "print \"The capacitance of parallel plate capacitor is\",C, \"F\"\n", + "print \"The charge on the plates of the capacitor is\",Q, \"C\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The capacitance of parallel plate capacitor is 8.854e-12 F\nThe charge on the plates of the capacitor is 8.854e-10 C\n" + "text": [ + "The capacitance of parallel plate capacitor is 8.854e-12 F\n", + "The charge on the plates of the capacitor is 8.854e-10 C\n" + ] } ], "prompt_number": 2 @@ -59,19 +110,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.3, Page number 288" + "source": [ + "Example number 13.3, Page number 288" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the dielectric displacement\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nepsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\nepsilon_r = 5.0; #Dielectric constant of the material between the plates of capacitor\nV = 15; #Potential difference applied between the plates of the capacitor(V)\nd = 1.5; #Separation between the plates of the capacitor(mm)\n\n#Calculation\nd = d*10**-3; #Separation between the plates of the capacitor(m)\n#Electric displacement, D = epsilon_0*epsilon_r*E, as E = V/d, so \nD = epsilon_0*epsilon_r*V/d; #Dielectric displacement(C/m**2)\n\n#Result\nprint \"The dielectric displacement is\",D, \"C/m**2\"", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "epsilon_r = 5.0; #Dielectric constant of the material between the plates of capacitor\n", + "V = 15; #Potential difference applied between the plates of the capacitor(V)\n", + "d = 1.5; #Separation between the plates of the capacitor(mm)\n", + "\n", + "#Calculation\n", + "d = d*10**-3; #Separation between the plates of the capacitor(m)\n", + "#Electric displacement, D = epsilon_0*epsilon_r*E, as E = V/d, so \n", + "D = epsilon_0*epsilon_r*V/d; #Dielectric displacement(C/m**2)\n", + "\n", + "#Result\n", + "print \"The dielectric displacement is\",D, \"C/m**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The dielectric displacement is 4.427e-07 C/m**2\n" + "text": [ + "The dielectric displacement is 4.427e-07 C/m**2\n" + ] } ], "prompt_number": 3 @@ -80,19 +155,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.4, Page number 288" + "source": [ + "Example number 13.4, Page number 288" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative dielectric constant\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nepsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\nN = 3*10**28; #Number density of solid elemental dielectric(atoms/metre cube)\nalpha_e = 10**-40; #Electronic polarizability(Fm**2)\n\n#Calculation\nepsilon_r = 1 + (N*alpha_e/epsilon_0); #Relative dielectric constant of the material\nepsilon_r = math.ceil(epsilon_r*10**3)/10**3; #rounding off the value of epsilon_r to 3 decimals\n\n#Result\nprint \"The Relative dielectric constant of the material is\",epsilon_r\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "N = 3*10**28; #Number density of solid elemental dielectric(atoms/metre cube)\n", + "alpha_e = 10**-40; #Electronic polarizability(Fm**2)\n", + "\n", + "#Calculation\n", + "epsilon_r = 1 + (N*alpha_e/epsilon_0); #Relative dielectric constant of the material\n", + "epsilon_r = math.ceil(epsilon_r*10**3)/10**3; #rounding off the value of epsilon_r to 3 decimals\n", + "\n", + "#Result\n", + "print \"The Relative dielectric constant of the material is\",epsilon_r\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Relative dielectric constant of the material is 1.339\n" + "text": [ + "The Relative dielectric constant of the material is 1.339\n" + ] } ], "prompt_number": 5 @@ -101,19 +197,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.5, Page number 288" + "source": [ + "Example number 13.5, Page number 288" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nN_A = 6.02*10**23; #Avogadro's number(per mole)\nepsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\nepsilon_r = 3.75; #Relative dielectric constant\nd = 2050; #Density of sulphur(kg/metre cube)\ny = 1/3; #Internal field constant\nM = 32; #Atomic weight of sulphur(g/mol)\n\n#Calculation\nN = N_A*10**3*d/M; #Number density of atoms of sulphur(per metre cube)\n#Lorentz relation for local fields give E_local = E + P/(3*epsilon_0) which gives\n#(epsilon_r - 1)/(epsilon_r + 2) = N*alpha_e/(3*epsilon_0), solving for alpha_e\nalpha_e = (epsilon_r - 1)/(epsilon_r + 2)*3*epsilon_0/N; #Electronic polarizability of sulphur(Fm**2)\n\n#Result\nprint \"The electronic polarizability of sulphur is\",alpha_e, \"Fm**2\"", + "input": [ + "\n", + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N_A = 6.02*10**23; #Avogadro's number(per mole)\n", + "epsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "epsilon_r = 3.75; #Relative dielectric constant\n", + "d = 2050; #Density of sulphur(kg/metre cube)\n", + "y = 1/3; #Internal field constant\n", + "M = 32; #Atomic weight of sulphur(g/mol)\n", + "\n", + "#Calculation\n", + "N = N_A*10**3*d/M; #Number density of atoms of sulphur(per metre cube)\n", + "#Lorentz relation for local fields give E_local = E + P/(3*epsilon_0) which gives\n", + "#(epsilon_r - 1)/(epsilon_r + 2) = N*alpha_e/(3*epsilon_0), solving for alpha_e\n", + "alpha_e = (epsilon_r - 1)/(epsilon_r + 2)*3*epsilon_0/N; #Electronic polarizability of sulphur(Fm**2)\n", + "\n", + "#Result\n", + "print \"The electronic polarizability of sulphur is\",alpha_e, \"Fm**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The electronic polarizability of sulphur is 3.2940125351e-40 Fm**2\n" + "text": [ + "The electronic polarizability of sulphur is 3.2940125351e-40 Fm**2\n" + ] } ], "prompt_number": 6 @@ -122,19 +245,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.6, Page number 289" + "source": [ + "Example number 13.6, Page number 289" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nN = 3*10**28; #Number density of atoms of dielectric material(per metre cube)\nepsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\nn = 1.6; #Refractive index of dielectric material\n\n#Calculation\n#As (n^2 - 1)/(n^2 + 2) = N*alpha_e/(3*epsilon_0), solving for alpha_e\nalpha_e = (n**2 - 1)/(n**2 + 2)*3*epsilon_0/N; #Electronic polarizability of dielectric material(Fm**2)\n\n#Result\nprint \"The electronic polarizability of dielectric material is\",alpha_e, \"Fm**2\"", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N = 3*10**28; #Number density of atoms of dielectric material(per metre cube)\n", + "epsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "n = 1.6; #Refractive index of dielectric material\n", + "\n", + "#Calculation\n", + "#As (n^2 - 1)/(n^2 + 2) = N*alpha_e/(3*epsilon_0), solving for alpha_e\n", + "alpha_e = (n**2 - 1)/(n**2 + 2)*3*epsilon_0/N; #Electronic polarizability of dielectric material(Fm**2)\n", + "\n", + "#Result\n", + "print \"The electronic polarizability of dielectric material is\",alpha_e, \"Fm**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The electronic polarizability of dielectric material is 3.029e-40 Fm**2\n" + "text": [ + "The electronic polarizability of dielectric material is 3.029e-40 Fm**2\n" + ] } ], "prompt_number": 8 @@ -143,19 +286,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 13.7, Page number 289" + "source": [ + "Example number 13.7, Page number 289" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the ratio of electronic polarizability to ionic polarizability\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nepsilon_r = 4.9; #Absolute relative dielectric constant of material(F/m)\nn = 1.6; #Refractive index of dielectric material\n\n#Calculation\n#As (n^2 - 1)/(n^2 + 2)*(alpha_e + alpha_i)/alpha_e = N*(alpha_e + alpha_i)/(3*epsilon_0) = (epsilon_r - 1)/(epsilon_r + 2)\n#let alpha_ratio = alpha_i/alpha_e\nalpha_ratio = ((epsilon_r - 1)/(epsilon_r + 2)*(n**2 + 2)/(n**2 - 1) - 1)**(-1); #Ratio of electronic polarizability to ionic polarizability\nalpha_ratio = math.ceil(alpha_ratio*10**3)/10**3; #rounding off the value of alpha_ratio to 3 decimals\n\n#Result\nprint \"The ratio of electronic polarizability to ionic polarizability is\",alpha_ratio", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "epsilon_r = 4.9; #Absolute relative dielectric constant of material(F/m)\n", + "n = 1.6; #Refractive index of dielectric material\n", + "\n", + "#Calculation\n", + "#As (n^2 - 1)/(n^2 + 2)*(alpha_e + alpha_i)/alpha_e = N*(alpha_e + alpha_i)/(3*epsilon_0) = (epsilon_r - 1)/(epsilon_r + 2)\n", + "#let alpha_ratio = alpha_i/alpha_e\n", + "alpha_ratio = ((epsilon_r - 1)/(epsilon_r + 2)*(n**2 + 2)/(n**2 - 1) - 1)**(-1); #Ratio of electronic polarizability to ionic polarizability\n", + "alpha_ratio = math.ceil(alpha_ratio*10**3)/10**3; #rounding off the value of alpha_ratio to 3 decimals\n", + "\n", + "#Result\n", + "print \"The ratio of electronic polarizability to ionic polarizability is\",alpha_ratio" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The ratio of electronic polarizability to ionic polarizability is 1.534\n" + "text": [ + "The ratio of electronic polarizability to ionic polarizability is 1.534\n" + ] } ], "prompt_number": 9 @@ -163,7 +328,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter14_1.ipynb b/Engineering_Physics/Chapter14_1.ipynb index eb6cc153..1191c56f 100644 --- a/Engineering_Physics/Chapter14_1.ipynb +++ b/Engineering_Physics/Chapter14_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter14" + "name": "", + "signature": "sha256:03a15735237144f42a49956ccb15694e3ce619fee35260180caccfe8f848e036" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,53 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "14: Magnetic Properties of Materials" + "source": [ + "14: Magnetic Properties of Materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.1, Page number 306" + "source": [ + "Example number 14.1, Page number 306" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the spontaneous magnetisation\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nN = 6.02*10**23; #Avogadro's number(per mole)\nA = 56; #Atomic weight of the substance(g/mole)\nd = 7.9; #Density of the substance(g/cm**3)\nm_B = 9.27*10**-24; #Bohr's Magneton(J/T)\n\n#Calculation\nm = 2.2*m_B; #Magnetic moment of substance(J/T)\nn = d*N/A ; #Number of atoms per unit volume of the substance(per cm**3)\nn = n*10**6; #Number of atoms per unit volume of the substance(per m**3)\nM = n*m; #Spontaneous magnetisation of the substance(A/m)\nM = M/10**6;\nM = math.ceil(M*10**3)/10**3; #rounding off the value of M to 3 decimals\n\n#Result\nprint \"The spontaneous magnetisation of the substance is\",M,\"*10**6 A/m\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N = 6.02*10**23; #Avogadro's number(per mole)\n", + "A = 56; #Atomic weight of the substance(g/mole)\n", + "d = 7.9; #Density of the substance(g/cm**3)\n", + "m_B = 9.27*10**-24; #Bohr's Magneton(J/T)\n", + "\n", + "#Calculation\n", + "m = 2.2*m_B; #Magnetic moment of substance(J/T)\n", + "n = d*N/A ; #Number of atoms per unit volume of the substance(per cm**3)\n", + "n = n*10**6; #Number of atoms per unit volume of the substance(per m**3)\n", + "M = n*m; #Spontaneous magnetisation of the substance(A/m)\n", + "M = M/10**6;\n", + "M = math.ceil(M*10**3)/10**3; #rounding off the value of M to 3 decimals\n", + "\n", + "#Result\n", + "print \"The spontaneous magnetisation of the substance is\",M,\"*10**6 A/m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The spontaneous magnetisation of the substance is 1.732 *10**6 A/m\n" + "text": [ + "The spontaneous magnetisation of the substance is 1.732 *10**6 A/m\n" + ] } ], "prompt_number": 5 @@ -38,19 +67,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.2, Page number 307" + "source": [ + "Example number 14.2, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative permeability\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nH = 200; #Field strength to which the ferromagnetic material is subjected(A/m)\nM = 3100; #Magnetisation of the ferromagnetic material(A/m)\n\n#Calculation\nchi = M/H; #Magnetic susceptibility\nmew_r = 1 + chi; #Relative permeability of ferromagnetic material\n\n#Result\nprint \"The relative permeability of ferromagnetic material is\",mew_r", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H = 200; #Field strength to which the ferromagnetic material is subjected(A/m)\n", + "M = 3100; #Magnetisation of the ferromagnetic material(A/m)\n", + "\n", + "#Calculation\n", + "chi = M/H; #Magnetic susceptibility\n", + "mew_r = 1 + chi; #Relative permeability of ferromagnetic material\n", + "\n", + "#Result\n", + "print \"The relative permeability of ferromagnetic material is\",mew_r" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The relative permeability of ferromagnetic material is 16.5\n" + "text": [ + "The relative permeability of ferromagnetic material is 16.5\n" + ] } ], "prompt_number": 6 @@ -59,19 +108,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.3, Page number 307" + "source": [ + "Example number 14.3, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative permeability\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nH = 300; #Field strength to which the ferromagnetic material is subjected(A/m)\nM = 4400; #Magnetisation of the ferromagnetic material(A/m)\n\n#Calculation\nchi = M/H; #Magnetic susceptibility\nmew_r = 1 + chi; #Relative permeability of ferromagnetic material\nmew_r = math.ceil(mew_r*100)/100; #rounding off the value of mew_r to 2 decimals\n\n#Result\nprint \"The relative permeability of ferromagnetic material is\",mew_r\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "H = 300; #Field strength to which the ferromagnetic material is subjected(A/m)\n", + "M = 4400; #Magnetisation of the ferromagnetic material(A/m)\n", + "\n", + "#Calculation\n", + "chi = M/H; #Magnetic susceptibility\n", + "mew_r = 1 + chi; #Relative permeability of ferromagnetic material\n", + "mew_r = math.ceil(mew_r*100)/100; #rounding off the value of mew_r to 2 decimals\n", + "\n", + "#Result\n", + "print \"The relative permeability of ferromagnetic material is\",mew_r\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The relative permeability of ferromagnetic material is 15.67\n" + "text": [ + "The relative permeability of ferromagnetic material is 15.67\n" + ] } ], "prompt_number": 7 @@ -80,19 +150,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.4, Page number 307" + "source": [ + "Example number 14.4, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetisation and flux density\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\nH = 10000; #Field strength to which the diamagnetic material is subjected(A/m)\nchi = -0.4*10**-5; #Magnetic susceptibility\n\n#Calculation\nM = chi*H; #Magnetisation of the diamagnetic material(A/m)\nB = mew_0*(H + M); #Magnetic flux density of diamagnetic material(T)\nB = math.ceil(B*10**4)/10**4; #rounding off the value of B to 4 decimals\n\n#Result\nprint \"The magnetisation of diamagnetic material is\",M, \"A/m\"\nprint \"The magnetic flux density of diamagnetic material is\",B, \"T\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\n", + "H = 10000; #Field strength to which the diamagnetic material is subjected(A/m)\n", + "chi = -0.4*10**-5; #Magnetic susceptibility\n", + "\n", + "#Calculation\n", + "M = chi*H; #Magnetisation of the diamagnetic material(A/m)\n", + "B = mew_0*(H + M); #Magnetic flux density of diamagnetic material(T)\n", + "B = math.ceil(B*10**4)/10**4; #rounding off the value of B to 4 decimals\n", + "\n", + "#Result\n", + "print \"The magnetisation of diamagnetic material is\",M, \"A/m\"\n", + "print \"The magnetic flux density of diamagnetic material is\",B, \"T\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The magnetisation of diamagnetic material is -0.04 A/m\nThe magnetic flux density of diamagnetic material is 0.0126 T\n" + "text": [ + "The magnetisation of diamagnetic material is -0.04 A/m\n", + "The magnetic flux density of diamagnetic material is 0.0126 T\n" + ] } ], "prompt_number": 8 @@ -101,19 +194,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.5, Page number 307" + "source": [ + "Example number 14.5, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetisation, relative permeability and flux density\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nmew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\nH = 1.2*10**5; #Field strength to which the diamagnetic material is subjected(A/m)\nchi = -4.2*10**-6; #Magnetic susceptibility\n\n#Calculation\nM = chi*H; #Magnetisation of the diamagnetic material(A/m)\nB = mew_0*(H + M); #Magnetic flux density of diamagnetic material(T)\nB = math.ceil(B*10**3)/10**3; #rounding off the value of B to 3 decimals\nmew_r = M/H + 1; #The relative permeability of diamagnetic material\nmew_r = math.ceil(mew_r*10**6)/10**6; #rounding off the value of mew_r to 6 decimals\n\n#Result\nprint \"The magnetisation of diamagnetic material is\",M, \"A/m\"\nprint \"The magnetic flux density of diamagnetic material is\",B, \"T\"\nprint \"The relative permeability of diamagnetic material is\",mew_r\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\n", + "H = 1.2*10**5; #Field strength to which the diamagnetic material is subjected(A/m)\n", + "chi = -4.2*10**-6; #Magnetic susceptibility\n", + "\n", + "#Calculation\n", + "M = chi*H; #Magnetisation of the diamagnetic material(A/m)\n", + "B = mew_0*(H + M); #Magnetic flux density of diamagnetic material(T)\n", + "B = math.ceil(B*10**3)/10**3; #rounding off the value of B to 3 decimals\n", + "mew_r = M/H + 1; #The relative permeability of diamagnetic material\n", + "mew_r = math.ceil(mew_r*10**6)/10**6; #rounding off the value of mew_r to 6 decimals\n", + "\n", + "#Result\n", + "print \"The magnetisation of diamagnetic material is\",M, \"A/m\"\n", + "print \"The magnetic flux density of diamagnetic material is\",B, \"T\"\n", + "print \"The relative permeability of diamagnetic material is\",mew_r\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The magnetisation of diamagnetic material is -0.504 A/m\nThe magnetic flux density of diamagnetic material is 0.151 T\nThe relative permeability of diamagnetic material is 0.999996\n" + "text": [ + "The magnetisation of diamagnetic material is -0.504 A/m\n", + "The magnetic flux density of diamagnetic material is 0.151 T\n", + "The relative permeability of diamagnetic material is 0.999996\n" + ] } ], "prompt_number": 10 @@ -122,19 +243,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.6, Page number 308" + "source": [ + "Example number 14.6, Page number 308" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mean radius of the atom\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nchi = 5.6*10**-6; #Magnetic susceptibility of diamagnetic material\nm = 9.1*10**-31; #Mass of an electron(kg)\nmew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\nZ = 1; #Atomic number\ne = 1.6*10**-19; #Electronic charge(C)\na = 2.53; #Lattice parameter of bcc structure(A)\n\n#Calculation\na = a*10**-10; #Lattice parameter of bcc structure(m)\nN = 2/a**3; #The number of electrons per unit volume(per metre cube)\nr = math.sqrt(chi*6*m/(mew_0*Z*e**2*N)); #Mean radius of body centered cubic structure(m)\nr = r*10**10; #Mean radius of body centered cubic structure(A)\nr = math.ceil(r*100)/100; #rounding off the value of r to 2 decimals\n\n#Result\nprint \"The mean radius of body centered cubic structure is\",r, \"A\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi = 5.6*10**-6; #Magnetic susceptibility of diamagnetic material\n", + "m = 9.1*10**-31; #Mass of an electron(kg)\n", + "mew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\n", + "Z = 1; #Atomic number\n", + "e = 1.6*10**-19; #Electronic charge(C)\n", + "a = 2.53; #Lattice parameter of bcc structure(A)\n", + "\n", + "#Calculation\n", + "a = a*10**-10; #Lattice parameter of bcc structure(m)\n", + "N = 2/a**3; #The number of electrons per unit volume(per metre cube)\n", + "r = math.sqrt(chi*6*m/(mew_0*Z*e**2*N)); #Mean radius of body centered cubic structure(m)\n", + "r = r*10**10; #Mean radius of body centered cubic structure(A)\n", + "r = math.ceil(r*100)/100; #rounding off the value of r to 2 decimals\n", + "\n", + "#Result\n", + "print \"The mean radius of body centered cubic structure is\",r, \"A\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The mean radius of body centered cubic structure is 0.88 A\n" + "text": [ + "The mean radius of body centered cubic structure is 0.88 A\n" + ] } ], "prompt_number": 11 @@ -143,19 +291,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 14.7, Page number 308" + "source": [ + "Example number 14.7, Page number 308" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetic susceptibility and magnetisation\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nmew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\nN_A = 6.02*10**26; #Avogadro's number(per kmol)\nrho = 4370; #Density of paramegnetic salt(kg/metre cube)\nM = 168.5; #Molecular weight of paramagnetic salt(g/mol)\nT = 27; #Temperature of paramagnetic salt(C)\nH = 2*10**5; #Field strength to which the paramagnetic salt is subjected(A/m)\nmew_B = 9.27*10**-24; #Bohr's magneton(Am**2)\np = 2; #Number of Bohr magnetons per molecule\nk = 1.38*10**-23; #Boltzmann constant(J/K)\n\n#Calculation\nT = T+273; #Temperature of paramagnetic salt(K)\nN = rho*N_A/M; #Total density of atoms in the paramagnetic salt(per meter cube)\nchi_para = mew_0*N*p**2*mew_B**2/(3*k*T); #Magnetic susceptibility of paramagnetic salt\nchi_para = chi_para*10**4;\nchi_para = math.ceil(chi_para*10**2)/10**2; #rounding off the value of chi_para to 2 decimals\nM = chi*H; #Magnetisation of paramagnetic salt(A/m)\nM = math.ceil(M*10)/10; #rounding off the value of M to 1 decimal\n\n#Result\nprint \"The magnetic susceptibility of paramagnetic salt is\",chi_para,\"*10**-4\"\nprint \"The magnetisation of paramagnetic salt is\",M, \"A/m\"\n\n#answer for magnetisation is not given in the textbook", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew_0 = 4*math.pi*10**-7; #Magnetic permeability of free space(Tm/A)\n", + "N_A = 6.02*10**26; #Avogadro's number(per kmol)\n", + "rho = 4370; #Density of paramegnetic salt(kg/metre cube)\n", + "M = 168.5; #Molecular weight of paramagnetic salt(g/mol)\n", + "T = 27; #Temperature of paramagnetic salt(C)\n", + "H = 2*10**5; #Field strength to which the paramagnetic salt is subjected(A/m)\n", + "mew_B = 9.27*10**-24; #Bohr's magneton(Am**2)\n", + "p = 2; #Number of Bohr magnetons per molecule\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "\n", + "#Calculation\n", + "T = T+273; #Temperature of paramagnetic salt(K)\n", + "N = rho*N_A/M; #Total density of atoms in the paramagnetic salt(per meter cube)\n", + "chi_para = mew_0*N*p**2*mew_B**2/(3*k*T); #Magnetic susceptibility of paramagnetic salt\n", + "chi_para = chi_para*10**4;\n", + "chi_para = math.ceil(chi_para*10**2)/10**2; #rounding off the value of chi_para to 2 decimals\n", + "M = chi*H; #Magnetisation of paramagnetic salt(A/m)\n", + "M = math.ceil(M*10)/10; #rounding off the value of M to 1 decimal\n", + "\n", + "#Result\n", + "print \"The magnetic susceptibility of paramagnetic salt is\",chi_para,\"*10**-4\"\n", + "print \"The magnetisation of paramagnetic salt is\",M, \"A/m\"\n", + "\n", + "#answer for magnetisation is not given in the textbook" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The magnetic susceptibility of paramagnetic salt is 5.43 *10**-4\nThe magnetisation of paramagnetic salt is 1.2 A/m\n" + "text": [ + "The magnetic susceptibility of paramagnetic salt is 5.43 *10**-4\n", + "The magnetisation of paramagnetic salt is 1.2 A/m\n" + ] } ], "prompt_number": 14 @@ -163,7 +347,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter15_1.ipynb b/Engineering_Physics/Chapter15_1.ipynb index cfabc2c6..feff19f4 100644 --- a/Engineering_Physics/Chapter15_1.ipynb +++ b/Engineering_Physics/Chapter15_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter15" + "name": "", + "signature": "sha256:16c7c597c3247782caaceb2ade68420e223aff8e960ccd80320d3e5521140cc3" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,48 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "15: Thermal Properties " + "source": [ + "15: Thermal Properties " + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 15.1, Page number 323" + "source": [ + "Example number 15.1, Page number 323" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Debye temperature\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nh = 6.626*10**-34; #Planck's constant(Js)\nf_D = 64*10**11; #Debye frequency for Al(Hz)\n\n#Calculation\ntheta_D = h*f_D/k; #Debye temperature(K)\ntheta_D = math.ceil(theta_D*10)/10; #rounding off the value of theta_D to 1 decimal\n\n#Result\nprint \"The Debye temperature of aluminium is\",theta_D, \"K\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "f_D = 64*10**11; #Debye frequency for Al(Hz)\n", + "\n", + "#Calculation\n", + "theta_D = h*f_D/k; #Debye temperature(K)\n", + "theta_D = math.ceil(theta_D*10)/10; #rounding off the value of theta_D to 1 decimal\n", + "\n", + "#Result\n", + "print \"The Debye temperature of aluminium is\",theta_D, \"K\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Debye temperature of aluminium is 307.3 K\n" + "text": [ + "The Debye temperature of aluminium is 307.3 K\n" + ] } ], "prompt_number": 2 @@ -38,19 +62,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 15.2, Page number 323" + "source": [ + "Example number 15.2, Page number 323" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lattice specific heat\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nN = 6.02*10**26; #Avogadro's number(per kmol)\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nh = 6.626*10**-34; #Planck's constant(Js)\nf_D = 40.5*10**12; #Debye frequency for Al(Hz)\nT = 30; #Temperature of carbon(Ks)\n\n#Calculation\ntheta_D = h*f_D/k; #Debye temperature(K)\nC_l = 12/5*math.pi**4*N*k*(T/theta_D)**3; #Lattice specific heat of carbon(J/k-mol/K)\nC_l = math.ceil(C_l*10**3)/10**3; #rounding off the value of C_l to 3 decimals\n\n#Result\nprint \"The lattice specific heat of carbon is\",C_l, \"J/k-mol/K\"\n\n#answer given in the book is wrong in the 2nd decimal", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "N = 6.02*10**26; #Avogadro's number(per kmol)\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "f_D = 40.5*10**12; #Debye frequency for Al(Hz)\n", + "T = 30; #Temperature of carbon(Ks)\n", + "\n", + "#Calculation\n", + "theta_D = h*f_D/k; #Debye temperature(K)\n", + "C_l = 12/5*math.pi**4*N*k*(T/theta_D)**3; #Lattice specific heat of carbon(J/k-mol/K)\n", + "C_l = math.ceil(C_l*10**3)/10**3; #rounding off the value of C_l to 3 decimals\n", + "\n", + "#Result\n", + "print \"The lattice specific heat of carbon is\",C_l, \"J/k-mol/K\"\n", + "\n", + "#answer given in the book is wrong in the 2nd decimal" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The lattice specific heat of carbon is 7.132 J/k-mol/K\n" + "text": [ + "The lattice specific heat of carbon is 7.132 J/k-mol/K\n" + ] } ], "prompt_number": 3 @@ -59,19 +109,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 15.3, Page number 323" + "source": [ + "Example number 15.3, Page number 323" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To show that the frequency falls in the infrared region\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nh = 6.626*10**-34; #Planck's constant(Js)\ntheta_E = 1990; #Einstein temperature of Cu(K)\n\n#Calculation\nf_E = k*theta_E/h; #Einstein frequency for Cu(K)\n\n#Result\nprint \"The Einstein frequency for Cu is\",f_E, \"Hz\"\nprint \"The frequency falls in the near infrared region\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "theta_E = 1990; #Einstein temperature of Cu(K)\n", + "\n", + "#Calculation\n", + "f_E = k*theta_E/h; #Einstein frequency for Cu(K)\n", + "\n", + "#Result\n", + "print \"The Einstein frequency for Cu is\",f_E, \"Hz\"\n", + "print \"The frequency falls in the near infrared region\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Einstein frequency for Cu is 4.14458194989e+13 Hz\nThe frequency falls in the near infrared region\n" + "text": [ + "The Einstein frequency for Cu is 4.14458194989e+13 Hz\n", + "The frequency falls in the near infrared region\n" + ] } ], "prompt_number": 4 @@ -80,19 +152,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 15.4, Page number 323" + "source": [ + "Example number 15.4, Page number 323" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic and lattice heat capacities\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nN = 6.02*10**23; #Avogadro's number(per mol)\nT = 0.05; #Temperature of Cu(K)\nE_F = 7; #Fermi energy of Cu(eV)\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nh = 6.626*10**-34; #Planck's constant(Js)\ntheta_D = 348; #Debye temperature of Cu(K)\n\n#Calculation\nC_e = math.pi**2*N*k**2*T/(2*E_F*e); #Electronic heat capacity of Cu(J/mol/K)\nC_V = (12/5)*math.pi**4*(N*k)*(T/theta_D)**3; #Lattice heat capacity of Cu(J/mol/K)\n\n#Result\nprint \"The electronic heat capacity of Cu is\",C_e, \"J/mol/K\"\nprint \"The lattice heat capacity of Cu is\",C_V, \"J/mol/K\"\n\n#answer for lattice heat capacity given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "N = 6.02*10**23; #Avogadro's number(per mol)\n", + "T = 0.05; #Temperature of Cu(K)\n", + "E_F = 7; #Fermi energy of Cu(eV)\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "theta_D = 348; #Debye temperature of Cu(K)\n", + "\n", + "#Calculation\n", + "C_e = math.pi**2*N*k**2*T/(2*E_F*e); #Electronic heat capacity of Cu(J/mol/K)\n", + "C_V = (12/5)*math.pi**4*(N*k)*(T/theta_D)**3; #Lattice heat capacity of Cu(J/mol/K)\n", + "\n", + "#Result\n", + "print \"The electronic heat capacity of Cu is\",C_e, \"J/mol/K\"\n", + "print \"The lattice heat capacity of Cu is\",C_V, \"J/mol/K\"\n", + "\n", + "#answer for lattice heat capacity given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The electronic heat capacity of Cu is 2.52566877726e-05 J/mol/K\nThe lattice heat capacity of Cu is 5.76047891492e-09 J/mol/K\n" + "text": [ + "The electronic heat capacity of Cu is 2.52566877726e-05 J/mol/K\n", + "The lattice heat capacity of Cu is 5.76047891492e-09 J/mol/K\n" + ] } ], "prompt_number": 5 @@ -101,19 +202,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 15.5, Page number 324" + "source": [ + "Example number 15.5, Page number 324" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the heat capacity\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nT = 1; #For simplicity assume temperature to be unity(K)\nR = 1; #For simplicity assume molar gas constant to be unity(J/mol/K)\ntheta_E = T; #Einstein temperature(K)\n\n#Calculation\nC_V = 3*R*(theta_E/T)**2*math.exp(theta_E/T)/(math.exp(theta_E/T)-1)**2; #Einstein lattice specific heat(J/mol/K)\nC_V = C_V/3;\nC_V = math.ceil(C_V*10**3)/10**3; #rounding off the value of C_V to 3 decimals\n\n#Result\nprint \"The Einstein lattice specific heat is\",C_V, \"X 3R\"", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T = 1; #For simplicity assume temperature to be unity(K)\n", + "R = 1; #For simplicity assume molar gas constant to be unity(J/mol/K)\n", + "theta_E = T; #Einstein temperature(K)\n", + "\n", + "#Calculation\n", + "C_V = 3*R*(theta_E/T)**2*math.exp(theta_E/T)/(math.exp(theta_E/T)-1)**2; #Einstein lattice specific heat(J/mol/K)\n", + "C_V = C_V/3;\n", + "C_V = math.ceil(C_V*10**3)/10**3; #rounding off the value of C_V to 3 decimals\n", + "\n", + "#Result\n", + "print \"The Einstein lattice specific heat is\",C_V, \"X 3R\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Einstein lattice specific heat is 0.921 X 3R\n" + "text": [ + "The Einstein lattice specific heat is 0.921 X 3R\n" + ] } ], "prompt_number": 6 @@ -122,19 +245,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 15.6, Page number 324" + "source": [ + "Example number 15.6, Page number 324" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the molar electronic heat capacity\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nv = 2; #Valency of Zn atom\nN = v*6.02*10**23; #Avogadro's number(per mol)\nT = 300; #Temperature of Zn(K)\nE_F = 9.38; #Fermi energy of Zn(eV)\nk = 1.38*10**-23; #Boltzmann constant(J/K)\nh = 6.626*10**-34; #Planck's constant(Js)\n\n#Calculation\nN = v*6.02*10**23; #Avogadro's number(per mol)\nC_e = math.pi**2*N*k**2*T/(2*E_F*e); #Electronic heat capacity of Zn(J/mol/K)\nC_e = math.ceil(C_e*10**4)/10**4; #rounding off the value of C_e to 4 decimals\n\n#Result\nprint \"The molar electronic heat capacity of zinc is\",C_e, \"J/mol/K\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "v = 2; #Valency of Zn atom\n", + "N = v*6.02*10**23; #Avogadro's number(per mol)\n", + "T = 300; #Temperature of Zn(K)\n", + "E_F = 9.38; #Fermi energy of Zn(eV)\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "\n", + "#Calculation\n", + "N = v*6.02*10**23; #Avogadro's number(per mol)\n", + "C_e = math.pi**2*N*k**2*T/(2*E_F*e); #Electronic heat capacity of Zn(J/mol/K)\n", + "C_e = math.ceil(C_e*10**4)/10**4; #rounding off the value of C_e to 4 decimals\n", + "\n", + "#Result\n", + "print \"The molar electronic heat capacity of zinc is\",C_e, \"J/mol/K\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The molar electronic heat capacity of zinc is 0.2262 J/mol/K\n" + "text": [ + "The molar electronic heat capacity of zinc is 0.2262 J/mol/K\n" + ] } ], "prompt_number": 8 @@ -142,7 +291,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter17_1.ipynb b/Engineering_Physics/Chapter17_1.ipynb index f0df2691..38e069ca 100644 --- a/Engineering_Physics/Chapter17_1.ipynb +++ b/Engineering_Physics/Chapter17_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter17" + "name": "", + "signature": "sha256:8879a312d81dca096153a38216868ea90a0e18845d7af1e07069b08fc5353d2b" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "17: Ultrasonics" + "source": [ + "17: Ultrasonics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 17.1, Page number 352" + "source": [ + "Example number 17.1, Page number 352" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the thickness of vibrating quartz\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nf = 3; #Fundamental vibrational frequency of quartz crystal(MHz)\nY = 7.9*10**10; #Young's modulus of quartz(N/m**2)\nrho = 2650; #Density of quartz(kg/m**3)\n\n#Calculation\nf = f*10**6; #Fundamental vibrational frequency of quartz crystal(Hz)\nl = 1/(2*f)*math.sqrt(Y/rho); #Thickness of vibrating quartz at resonance(m)\nl = l*10**3; #Thickness of vibrating quartz at resonance(mm)\nl = math.ceil(l*100)/100; #rounding off the value of l to 2 decimals\n\n#Result\nprint \"The thickness of vibrating quartz at resonance is\",l, \"mm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "f = 3; #Fundamental vibrational frequency of quartz crystal(MHz)\n", + "Y = 7.9*10**10; #Young's modulus of quartz(N/m**2)\n", + "rho = 2650; #Density of quartz(kg/m**3)\n", + "\n", + "#Calculation\n", + "f = f*10**6; #Fundamental vibrational frequency of quartz crystal(Hz)\n", + "l = 1/(2*f)*math.sqrt(Y/rho); #Thickness of vibrating quartz at resonance(m)\n", + "l = l*10**3; #Thickness of vibrating quartz at resonance(mm)\n", + "l = math.ceil(l*100)/100; #rounding off the value of l to 2 decimals\n", + "\n", + "#Result\n", + "print \"The thickness of vibrating quartz at resonance is\",l, \"mm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The thickness of vibrating quartz at resonance is 0.91 mm\n" + "text": [ + "The thickness of vibrating quartz at resonance is 0.91 mm\n" + ] } ], "prompt_number": 1 @@ -37,7 +63,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter18_1.ipynb b/Engineering_Physics/Chapter18_1.ipynb index aca20375..0a7b2021 100644 --- a/Engineering_Physics/Chapter18_1.ipynb +++ b/Engineering_Physics/Chapter18_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter18" + "name": "", + "signature": "sha256:3bec68600cdf231538bf44a09963d76f89f72c71634091075e5c4136c75bb4a6" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "18: Acoustics of Buildings" + "source": [ + "18: Acoustics of Buildings" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 18.1, Page number 361" + "source": [ + "Example number 18.1, Page number 361" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the output power of the sound source\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nr = 200; #Distance of the point of reduction from the source(m)\nI_0 = 10**-12; #Final intensity of sound(W/m**2)\nI_f = 60; #Intensity gain of sound at the point of reduction(dB)\n\n#Calculation\n#As A_I = 10*log10(I/I_0), solving for I\nI = I_0*10**(I_f/10); #Initial Intensity of sound(W/m**2)\nP = 4*math.pi*r**2*I; #Output power of the sound source(W)\nP = math.ceil(P*100)/100; #rounding off the value of P to 2 decimals\n\n#Result\nprint \"The output power of the sound source is\",P, \"W\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r = 200; #Distance of the point of reduction from the source(m)\n", + "I_0 = 10**-12; #Final intensity of sound(W/m**2)\n", + "I_f = 60; #Intensity gain of sound at the point of reduction(dB)\n", + "\n", + "#Calculation\n", + "#As A_I = 10*log10(I/I_0), solving for I\n", + "I = I_0*10**(I_f/10); #Initial Intensity of sound(W/m**2)\n", + "P = 4*math.pi*r**2*I; #Output power of the sound source(W)\n", + "P = math.ceil(P*100)/100; #rounding off the value of P to 2 decimals\n", + "\n", + "#Result\n", + "print \"The output power of the sound source is\",P, \"W\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The output power of the sound source is 0.51 W\n" + "text": [ + "The output power of the sound source is 0.51 W\n" + ] } ], "prompt_number": 1 @@ -38,19 +64,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 18.2, Page number 361" + "source": [ + "Example number 18.2, Page number 361" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the change in sound level\n\n#importing modules\nimport math\nfrom __future__ import division\nimport numpy as np\n\n#Variable declaration\nI1 = 1; #For simplicity assume first intensity level to be unity(W/m**2)\n\n#Calculation\nI2 = 2*I1; #Intensity level after doubling(W/m**2)\ndA_I = 10*np.log10(I2/I1); #Difference in gain level(dB)\n\n#Result\nprint \"The sound intensity level is increased by\",int(dA_I), \"dB\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "I1 = 1; #For simplicity assume first intensity level to be unity(W/m**2)\n", + "\n", + "#Calculation\n", + "I2 = 2*I1; #Intensity level after doubling(W/m**2)\n", + "dA_I = 10*np.log10(I2/I1); #Difference in gain level(dB)\n", + "\n", + "#Result\n", + "print \"The sound intensity level is increased by\",int(dA_I), \"dB\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The sound intensity level is increased by 3 dB\n" + "text": [ + "The sound intensity level is increased by 3 dB\n" + ] } ], "prompt_number": 3 @@ -59,19 +105,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 18.3, Page number 361" + "source": [ + "Example number 18.3, Page number 361" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the total absorption of sound in the hall\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nV = 8000; #Volume of the hall(m**3)\nT = 1.5; #Reverbration time of the hall(s)\n\n#Calculation\nalpha_s = 0.167*V/T; #Sabine Formula giving total absorption of sound in the hall(OWU)\nalpha_s = math.ceil(alpha_s*10)/10; #rounding off the value of alpha_s to 1 decimal\n\n#Result\nprint \"The total absorption of sound in the hall is\",alpha_s, \"OWU\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 8000; #Volume of the hall(m**3)\n", + "T = 1.5; #Reverbration time of the hall(s)\n", + "\n", + "#Calculation\n", + "alpha_s = 0.167*V/T; #Sabine Formula giving total absorption of sound in the hall(OWU)\n", + "alpha_s = math.ceil(alpha_s*10)/10; #rounding off the value of alpha_s to 1 decimal\n", + "\n", + "#Result\n", + "print \"The total absorption of sound in the hall is\",alpha_s, \"OWU\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The total absorption of sound in the hall is 890.7 OWU\n" + "text": [ + "The total absorption of sound in the hall is 890.7 OWU\n" + ] } ], "prompt_number": 4 @@ -80,19 +146,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 18.4, Page number 362" + "source": [ + "Example number 18.4, Page number 362" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the average absorption coefficient of the surfaces\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nV = 25*20*8; #Volume of the hall(m**3)\nT = 4; #Reverbration time of the hall(s)\n\n#Calculation\nS = 2*(25*20+25*8+20*8); #Total surface area of the hall(m**2)\nalpha = 0.167*V/(T*S); #Sabine Formule giving total absorption in the hall(OWU)\nalpha = math.ceil(alpha*10**4)/10**4; #rounding off the value of alpha to 4 decimals\n\n#Result\nprint \"The average absorption coefficient of the surfaces is\",alpha, \"OWU/m**2\"\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 25*20*8; #Volume of the hall(m**3)\n", + "T = 4; #Reverbration time of the hall(s)\n", + "\n", + "#Calculation\n", + "S = 2*(25*20+25*8+20*8); #Total surface area of the hall(m**2)\n", + "alpha = 0.167*V/(T*S); #Sabine Formule giving total absorption in the hall(OWU)\n", + "alpha = math.ceil(alpha*10**4)/10**4; #rounding off the value of alpha to 4 decimals\n", + "\n", + "#Result\n", + "print \"The average absorption coefficient of the surfaces is\",alpha, \"OWU/m**2\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The average absorption coefficient of the surfaces is 0.0971 OWU/m**2\n" + "text": [ + "The average absorption coefficient of the surfaces is 0.0971 OWU/m**2\n" + ] } ], "prompt_number": 5 @@ -101,19 +188,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 18.5, Page number 362" + "source": [ + "Example number 18.5, Page number 362" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the reverbration time for the hall\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nV = 475; #Volume of the hall(m**3)\nA_f = 100; #Area of the floor(m**2)\nA_c = 100; #Area of the ceiling(m**2)\nA_w = 200; #Area of the wall(m**2)\nalpha_w = 0.025; #Absorption coefficients of the wall(OWU/m**2)\nalpha_c = 0.02; #Absorption coefficients of the ceiling(OWU/m**2)\nalpha_f = 0.55; #Absorption coefficients of the floor(OWU/m**2)\n\n#Calculation\nalpha_s = (A_w*alpha_w)+(A_c*alpha_c)+(A_f*alpha_f); \nT = 0.167*V/alpha_s; #Sabine Formula for reverbration time(s)\nT = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n\n#Result\nprint \"The reverbration time for the hall is\",T, \"s\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 475; #Volume of the hall(m**3)\n", + "A_f = 100; #Area of the floor(m**2)\n", + "A_c = 100; #Area of the ceiling(m**2)\n", + "A_w = 200; #Area of the wall(m**2)\n", + "alpha_w = 0.025; #Absorption coefficients of the wall(OWU/m**2)\n", + "alpha_c = 0.02; #Absorption coefficients of the ceiling(OWU/m**2)\n", + "alpha_f = 0.55; #Absorption coefficients of the floor(OWU/m**2)\n", + "\n", + "#Calculation\n", + "alpha_s = (A_w*alpha_w)+(A_c*alpha_c)+(A_f*alpha_f); \n", + "T = 0.167*V/alpha_s; #Sabine Formula for reverbration time(s)\n", + "T = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n", + "\n", + "#Result\n", + "print \"The reverbration time for the hall is\",T, \"s\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The reverbration time for the hall is 1.28 s\n" + "text": [ + "The reverbration time for the hall is 1.28 s\n" + ] } ], "prompt_number": 6 @@ -122,19 +235,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 18.6, Page number 362" + "source": [ + "Example number 18.6, Page number 362" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the reverbration time for the hall\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nI0 = 1; #For simplicity assume initial sound intensity to be unity(W/m**2)\nA_I1 = 80; #First intensity gain of sound(dB)\nA_I2 = 70; #Second intensity gain of sound(dB)\n\n#Calculation\n#As A_I = 10*log10(I/I_0), solving for I1 and I2\nI1 = 10**(A_I1/10)*I0; #First intensity of sound(W/m**2)\nI2 = 10**(A_I2/10)*I0; #Second intensity of sound(W/m**2)\nI = I1 + I2; #Resultant intensity level of sound(W/m**2)\nA_I = 10*np.log10(I/I0); #Intensity gain of resultant sound(dB)\nA_I = math.ceil(A_I*10**3)/10**3; #rounding off the value of A_I to 3 decimals\n\n#Result\nprint \"The intensity gain of resultant sound is\",A_I, \"dB\"\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "I0 = 1; #For simplicity assume initial sound intensity to be unity(W/m**2)\n", + "A_I1 = 80; #First intensity gain of sound(dB)\n", + "A_I2 = 70; #Second intensity gain of sound(dB)\n", + "\n", + "#Calculation\n", + "#As A_I = 10*log10(I/I_0), solving for I1 and I2\n", + "I1 = 10**(A_I1/10)*I0; #First intensity of sound(W/m**2)\n", + "I2 = 10**(A_I2/10)*I0; #Second intensity of sound(W/m**2)\n", + "I = I1 + I2; #Resultant intensity level of sound(W/m**2)\n", + "A_I = 10*np.log10(I/I0); #Intensity gain of resultant sound(dB)\n", + "A_I = math.ceil(A_I*10**3)/10**3; #rounding off the value of A_I to 3 decimals\n", + "\n", + "#Result\n", + "print \"The intensity gain of resultant sound is\",A_I, \"dB\"\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The intensity gain of resultant sound is 80.414 dB\n" + "text": [ + "The intensity gain of resultant sound is 80.414 dB\n" + ] } ], "prompt_number": 7 @@ -142,7 +282,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter1_1.ipynb b/Engineering_Physics/Chapter1_1.ipynb index c487a981..9c835441 100644 --- a/Engineering_Physics/Chapter1_1.ipynb +++ b/Engineering_Physics/Chapter1_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter1" + "name": "", + "signature": "sha256:078983e30b4c728fb3bac2d9363145a8f1fffb1522bc3df76d2595e630af4298" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,51 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "1: Oscillations and Waves" + "source": [ + "1: Oscillations and Waves" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.1, Page number 23" + "source": [ + "Example number 1.1, Page number 23" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the period of motion\n\n#import modules\nimport math\n\n#Variable declaration\nS=4; #SHM described by a particle(cm)\nx=0; #mean position\nv=12; #velocity at mean position(cm/s)\n\n#Calculation\nA=S/2; #amplitude of motion(cm)\nomega=v/A; #angular frequency(sec-1)\nT=(2*math.pi)/omega; #time period(sec)\nT=math.ceil(T*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"time period of motion is\",T, \"sec\"\nprint \"time period of motion is pi/3 sec\"", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "S=4; #SHM described by a particle(cm)\n", + "x=0; #mean position\n", + "v=12; #velocity at mean position(cm/s)\n", + "\n", + "#Calculation\n", + "A=S/2; #amplitude of motion(cm)\n", + "omega=v/A; #angular frequency(sec-1)\n", + "T=(2*math.pi)/omega; #time period(sec)\n", + "T=math.ceil(T*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"time period of motion is\",T, \"sec\"\n", + "print \"time period of motion is pi/3 sec\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "time period of motion is 1.048 sec\ntime period of motion is pi/3 sec\n" + "text": [ + "time period of motion is 1.048 sec\n", + "time period of motion is pi/3 sec\n" + ] } ], "prompt_number": 2 @@ -38,19 +65,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.2, Page number 23" + "source": [ + "Example number 1.2, Page number 23" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the acceleration and maximum velocity\n\n#import modules\nimport math\n\n#Variable declaration\nT=0.1; #time period(sec)\nA=4; #amplitude of motion(cm)\nx=0.2; #distance from mean position(cm)\n\n#Calculation\nomega=(2*math.pi)/T; #angular frequency(sec-1)\na=(omega**2)*x; #acceleration(cm/sec^2)\na=math.ceil(a*10**2)/10**2; #rounding off to 2 decimals\n#maximum velocity is when particle is in the mean position\nv_max=omega*A; #maximum velocity(cm/sec)\nv_max=math.ceil(v_max*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint \"acceleration is\",a, \"cm/sec^2\"\nprint \"maximum velocity is\",v_max, \"cm/sec\"\n\n#answers given in the book are wrong", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=0.1; #time period(sec)\n", + "A=4; #amplitude of motion(cm)\n", + "x=0.2; #distance from mean position(cm)\n", + "\n", + "#Calculation\n", + "omega=(2*math.pi)/T; #angular frequency(sec-1)\n", + "a=(omega**2)*x; #acceleration(cm/sec^2)\n", + "a=math.ceil(a*10**2)/10**2; #rounding off to 2 decimals\n", + "#maximum velocity is when particle is in the mean position\n", + "v_max=omega*A; #maximum velocity(cm/sec)\n", + "v_max=math.ceil(v_max*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"acceleration is\",a, \"cm/sec^2\"\n", + "print \"maximum velocity is\",v_max, \"cm/sec\"\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "acceleration is 789.57 cm/sec^2\nmaximum velocity is 251.33 cm/sec\n" + "text": [ + "acceleration is 789.57 cm/sec^2\n", + "maximum velocity is 251.33 cm/sec\n" + ] } ], "prompt_number": 3 @@ -59,19 +114,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.3, Page number 24" + "source": [ + "Example number 1.3, Page number 24" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the damping constant\n\n#import modules\nimport math\nimport numpy as np\n\n#Variable declaration\nA1 = 40; #First amplitude of oscillation(cm)\nAn_plus_1 = 4; #Amplitude after 100 oscillations(cm)\nn = 100; #Number of oscillations\nT = 2.5; #Time period of oscillations(s)\n\n#Calculation\nt = T/4; #Time taken to reach the first amplitude from the mean position(s)\n#Now A1 = x0*math.exp(-lambda*t) and An_plus_1 = x0*math.exp(-lambda*(t+nT))\n#A1/An_plus_1 = math.exp(n*lambda*T)\nx=A1/An_plus_1;\nlamda=np.log(x)/(n*T); #Damping constant(per sec)\nlamda=lamda*10**2;\nlamda=math.ceil(lamda*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"Damping constant is\",lamda,\"*10**-2 per sec\"", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "A1 = 40; #First amplitude of oscillation(cm)\n", + "An_plus_1 = 4; #Amplitude after 100 oscillations(cm)\n", + "n = 100; #Number of oscillations\n", + "T = 2.5; #Time period of oscillations(s)\n", + "\n", + "#Calculation\n", + "t = T/4; #Time taken to reach the first amplitude from the mean position(s)\n", + "#Now A1 = x0*math.exp(-lambda*t) and An_plus_1 = x0*math.exp(-lambda*(t+nT))\n", + "#A1/An_plus_1 = math.exp(n*lambda*T)\n", + "x=A1/An_plus_1;\n", + "lamda=np.log(x)/(n*T); #Damping constant(per sec)\n", + "lamda=lamda*10**2;\n", + "lamda=math.ceil(lamda*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"Damping constant is\",lamda,\"*10**-2 per sec\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "Damping constant is 0.922 *10**-2 per sec\n" + "text": [ + "Damping constant is 0.922 *10**-2 per sec\n" + ] } ], "prompt_number": 6 @@ -80,19 +162,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.4, Page number 24" + "source": [ + "Example number 1.4, Page number 24" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the amplitude and period of oscillation\n\n#import modules\nimport math\n\n#Variable declaration\nx1 = 3; #First position of the particle(cm)\nx2 = 4; #Second position of the particle(cm)\nv1 = 16; #Velocity of particle executing SHM at 1st position(cm/s)\nv2 = 12; #Velocity of particle executing SHM at 2nd position (cm/s)\n\n#Calculation\n#As v = omega*sqrt(A**2 - x**2) so\n#(v1/v2)**2=(A**2 - x1**2)/(A**2 - x2**2)\n#RHS gives (A**2-9)/(A**2-16)\n#(v2**2)*(A**2 - x1**2)=(v1**2)*(A**2 - x2**2), on solving we get\nA=math.sqrt((((v1**2)*(x2**2))-((v2**2)*(x1**2)))/((v1**2)-(v2**2))); #amplitude in cm\nomega=v1/math.sqrt(A**2-x1**2); #Angular speed of the particle(per sec)\nT=2*math.pi/omega; #Time period of oscillation(sec)\nT=math.ceil(T*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint \"The amplitude of SHM is\",A, \"cm\"\nprint \"The time period of oscillation is\",T, \"sec\"", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "x1 = 3; #First position of the particle(cm)\n", + "x2 = 4; #Second position of the particle(cm)\n", + "v1 = 16; #Velocity of particle executing SHM at 1st position(cm/s)\n", + "v2 = 12; #Velocity of particle executing SHM at 2nd position (cm/s)\n", + "\n", + "#Calculation\n", + "#As v = omega*sqrt(A**2 - x**2) so\n", + "#(v1/v2)**2=(A**2 - x1**2)/(A**2 - x2**2)\n", + "#RHS gives (A**2-9)/(A**2-16)\n", + "#(v2**2)*(A**2 - x1**2)=(v1**2)*(A**2 - x2**2), on solving we get\n", + "A=math.sqrt((((v1**2)*(x2**2))-((v2**2)*(x1**2)))/((v1**2)-(v2**2))); #amplitude in cm\n", + "omega=v1/math.sqrt(A**2-x1**2); #Angular speed of the particle(per sec)\n", + "T=2*math.pi/omega; #Time period of oscillation(sec)\n", + "T=math.ceil(T*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print \"The amplitude of SHM is\",A, \"cm\"\n", + "print \"The time period of oscillation is\",T, \"sec\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The amplitude of SHM is 5.0 cm\nThe time period of oscillation is 1.571 sec\n" + "text": [ + "The amplitude of SHM is 5.0 cm\n", + "The time period of oscillation is 1.571 sec\n" + ] } ], "prompt_number": 7 @@ -101,19 +212,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.5, Page number 25" + "source": [ + "Example number 1.5, Page number 25" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the spring constant, amplitude and maximum velocity\n\n#import modules\nimport math\n\n#Variable declaration\nm = 0.3; #Mass attached to the string(kg)\ng = 9.8; #Acceleration due to gravity(m/sec**2)\nx = 0.15; #Stretchness produced in the spring(m)\ns = 0.1; #spring is stretched and released(m)\n\n#Calculation\nF = m*g; #Restoring force acting on the mass(N)\nk = F/x; #Spring constant(N/m)\nA = s; #amplitude equals to the spring stretched and released\nomega = math.sqrt(k/m); #Angular frequency of oscillation(rad per sec)\nv0 = omega*A; #Maximum velocity during the oscillations(m/s)\nv0=math.ceil(v0*100)/100; #rounding off to 2 decimals\n\n#Result\nprint \"The spring constant is\",k, \"N/m\"\nprint \"The amplitude of oscillation is\",A, \"m\"\nprint \"The maximum velocity during oscillations is\",v0, \"m/s\"", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 0.3; #Mass attached to the string(kg)\n", + "g = 9.8; #Acceleration due to gravity(m/sec**2)\n", + "x = 0.15; #Stretchness produced in the spring(m)\n", + "s = 0.1; #spring is stretched and released(m)\n", + "\n", + "#Calculation\n", + "F = m*g; #Restoring force acting on the mass(N)\n", + "k = F/x; #Spring constant(N/m)\n", + "A = s; #amplitude equals to the spring stretched and released\n", + "omega = math.sqrt(k/m); #Angular frequency of oscillation(rad per sec)\n", + "v0 = omega*A; #Maximum velocity during the oscillations(m/s)\n", + "v0=math.ceil(v0*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"The spring constant is\",k, \"N/m\"\n", + "print \"The amplitude of oscillation is\",A, \"m\"\n", + "print \"The maximum velocity during oscillations is\",v0, \"m/s\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The spring constant is 19.6 N/m\nThe amplitude of oscillation is 0.1 m\nThe maximum velocity during oscillations is 0.81 m/s\n" + "text": [ + "The spring constant is 19.6 N/m\n", + "The amplitude of oscillation is 0.1 m\n", + "The maximum velocity during oscillations is 0.81 m/s\n" + ] } ], "prompt_number": 8 @@ -122,19 +262,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.6, Page number 25" + "source": [ + "Example number 1.6, Page number 25" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the frequency equivalent of visible region\n\n#import modules\nimport math\n\n#Variable declaration\nlambda1 = 400; #Lower limit of wavelength of visible region(nm)\nlambda2 = 700; #Upper limit of wavelength of visible region(nm)\nc = 3*10**8; #Speed of light in vacuum(m/s)\n\n#Calculation\nlambda1 = lambda1*10**-9 #Lower limit of wavelength(m) \nlambda2 = lambda2*10**-9 #upper limit of wavelength(m) \nnew_1 = c/lambda1; #Upper limit of frequency of visible region(m)\nnew_2 = c/lambda2; #Lower limit of frequency of visible region(m)\n\n#Result\nprint \"The frequency equivalent of 400 nm is\",new_1, \"Hz\"\nprint \"The frequency equivalent of 700 nm is\",new_2, \"Hz\"\n", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lambda1 = 400; #Lower limit of wavelength of visible region(nm)\n", + "lambda2 = 700; #Upper limit of wavelength of visible region(nm)\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "\n", + "#Calculation\n", + "lambda1 = lambda1*10**-9 #Lower limit of wavelength(m) \n", + "lambda2 = lambda2*10**-9 #upper limit of wavelength(m) \n", + "new_1 = c/lambda1; #Upper limit of frequency of visible region(m)\n", + "new_2 = c/lambda2; #Lower limit of frequency of visible region(m)\n", + "\n", + "#Result\n", + "print \"The frequency equivalent of 400 nm is\",new_1, \"Hz\"\n", + "print \"The frequency equivalent of 700 nm is\",new_2, \"Hz\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The frequency equivalent of 400 nm is 7.5e+14 Hz\nThe frequency equivalent of 700 nm is 4.28571428571e+14 Hz\n" + "text": [ + "The frequency equivalent of 400 nm is 7.5e+14 Hz\n", + "The frequency equivalent of 700 nm is 4.28571428571e+14 Hz\n" + ] } ], "prompt_number": 9 @@ -143,19 +307,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.7, Page number 26" + "source": [ + "Example number 1.7, Page number 26" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the amplitude, wavelength, frequency and velocity of the wave\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\n#Comparing the standard equation u(x,t) = A*sin(2*%pi(x/lambda-t/T)) with the given equation, we get\nA = 1.5*10**-3; #Amplitude of the sound wave(m)\nlamda = 8; #Wavelength of the sound wave(m)\nT = 1/40; #Time period of the sound wave(s)\n\n#Calculation\nA = A*10**3;\nnew = 1/T; #Frequency of the sound wave(Hz)\nv = new*lamda; #Velocity of the sound wave(m/s)\nT=math.ceil(T*100)/100; #rounding off to 2 decimals\n\n#Result\nprint \"The amplitude of the sound wave is\",A,\"*10**-3 m\"\nprint \"The wavelength of the sound wave is\",lamda, \"m\"\nprint \"The time period of the sound wave is\",T, \"s\"\nprint \"The frequency of the sound wave is\",new, \"Hz\"\nprint \"The velocity of the sound wave is\",v, \"m/s\"", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#Comparing the standard equation u(x,t) = A*sin(2*%pi(x/lambda-t/T)) with the given equation, we get\n", + "A = 1.5*10**-3; #Amplitude of the sound wave(m)\n", + "lamda = 8; #Wavelength of the sound wave(m)\n", + "T = 1/40; #Time period of the sound wave(s)\n", + "\n", + "#Calculation\n", + "A = A*10**3;\n", + "new = 1/T; #Frequency of the sound wave(Hz)\n", + "v = new*lamda; #Velocity of the sound wave(m/s)\n", + "T=math.ceil(T*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"The amplitude of the sound wave is\",A,\"*10**-3 m\"\n", + "print \"The wavelength of the sound wave is\",lamda, \"m\"\n", + "print \"The time period of the sound wave is\",T, \"s\"\n", + "print \"The frequency of the sound wave is\",new, \"Hz\"\n", + "print \"The velocity of the sound wave is\",v, \"m/s\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The amplitude of the sound wave is 1.5 *10**-3 m\nThe wavelength of the sound wave is 8 m\nThe time period of the sound wave is 0.03 s\nThe frequency of the sound wave is 40.0 Hz\nThe velocity of the sound wave is 320.0 m/s\n" + "text": [ + "The amplitude of the sound wave is 1.5 *10**-3 m\n", + "The wavelength of the sound wave is 8 m\n", + "The time period of the sound wave is 0.03 s\n", + "The frequency of the sound wave is 40.0 Hz\n", + "The velocity of the sound wave is 320.0 m/s\n" + ] } ], "prompt_number": 12 @@ -164,19 +360,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.8, Page number 26" + "source": [ + "Example number 1.8, Page number 26" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the equation of a wave\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nA = 2; #Amplitude of the wave(cm)\nT = 0.5; #Time period of the wave(sec)\nv = 200; #Wave velocity(cm/s)\n\n#Calculation\nf = 1/T; #Frequency of the wave(Hz)\nlamda = v/f; #Wavelength of the wave(cm)\n\n#Result\nprint \"frequency of wave is\",f, \"Hz\"\nprint \"wavelength of wave is\",lamda, \"cm\"\nprint \"The Equation of the wave moving along X-axis :\"\nprint \"u = \",A,\"*sin*2*math.pi*(x/\",lamda,\"- t/\",T,\")\" #x and y are in cm and t is in sec", + "input": [ + "\n", + "\n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A = 2; #Amplitude of the wave(cm)\n", + "T = 0.5; #Time period of the wave(sec)\n", + "v = 200; #Wave velocity(cm/s)\n", + "\n", + "#Calculation\n", + "f = 1/T; #Frequency of the wave(Hz)\n", + "lamda = v/f; #Wavelength of the wave(cm)\n", + "\n", + "#Result\n", + "print \"frequency of wave is\",f, \"Hz\"\n", + "print \"wavelength of wave is\",lamda, \"cm\"\n", + "print \"The Equation of the wave moving along X-axis :\"\n", + "print \"u = \",A,\"*sin*2*math.pi*(x/\",lamda,\"- t/\",T,\")\" #x and y are in cm and t is in sec" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "frequency of wave is 2.0 Hz\nwavelength of wave is 100.0 cm\nThe Equation of the wave moving along X-axis :\nu = 2 *sin*2*math.pi*(x/ 100.0 - t/ 0.5 )\n" + "text": [ + "frequency of wave is 2.0 Hz\n", + "wavelength of wave is 100.0 cm\n", + "The Equation of the wave moving along X-axis :\n", + "u = 2 *sin*2*math.pi*(x/ 100.0 - t/ 0.5 )\n" + ] } ], "prompt_number": 13 @@ -185,19 +409,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.9, Page number 27" + "source": [ + "Example number 1.9, Page number 27" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the velocity and frequency of the wave\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nT = 1000; #Tension in the wire(N)\nM=15; #mass of the wire(kg)\nl=300; #length of the wire(m)\nlamda = 0.30; #Wavelength of wave along wire(m)\n\n#Calculation\nm = M/l; #Mass per unit length of the wire(kg/m)\nv = math.sqrt(T/m); #Velocity of wave through wire(m/s)\nv=math.ceil(v*100)/100; #rounding off to 2 decimals\nnew = v/lamda; #Frequency of wave through string(Hz)\nnew=math.ceil(new*100)/100; #rounding off to 2 decimals\n\n#Result\nprint \"The velocity of the wave through wire is\",v, \"m/s\"\nprint \"The frequency of the wave through wire is\",new, \"Hz\"\n\n#answer for frequency of the wave is wrong in the textbook", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T = 1000; #Tension in the wire(N)\n", + "M=15; #mass of the wire(kg)\n", + "l=300; #length of the wire(m)\n", + "lamda = 0.30; #Wavelength of wave along wire(m)\n", + "\n", + "#Calculation\n", + "m = M/l; #Mass per unit length of the wire(kg/m)\n", + "v = math.sqrt(T/m); #Velocity of wave through wire(m/s)\n", + "v=math.ceil(v*100)/100; #rounding off to 2 decimals\n", + "new = v/lamda; #Frequency of wave through string(Hz)\n", + "new=math.ceil(new*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print \"The velocity of the wave through wire is\",v, \"m/s\"\n", + "print \"The frequency of the wave through wire is\",new, \"Hz\"\n", + "\n", + "#answer for frequency of the wave is wrong in the textbook" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The velocity of the wave through wire is 141.43 m/s\nThe frequency of the wave through wire is 471.44 Hz\n" + "text": [ + "The velocity of the wave through wire is 141.43 m/s\n", + "The frequency of the wave through wire is 471.44 Hz\n" + ] } ], "prompt_number": 15 @@ -205,7 +458,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter2_1.ipynb b/Engineering_Physics/Chapter2_1.ipynb index f002fd31..3d6c503f 100644 --- a/Engineering_Physics/Chapter2_1.ipynb +++ b/Engineering_Physics/Chapter2_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter2" + "name": "", + "signature": "sha256:2693d83b10c8e62fc8d3ef78c9959c4d8327c36ed1f7884372585d33796bcbc3" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,60 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "2: Electromagnetic Theory" + "source": [ + "2: Electromagnetic Theory" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.1, Page number 46" + "source": [ + "Example number 2.1, Page number 46" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To determine the peak value of displacement current\n\n#importing modules\nfrom __future__ import division\nfrom sympy import *\nimport math\n\n#Variable declaration\nC = 10; #Capacitance of the capacitor(pF)\n#given V=0.2*sin(120*math.pi*t) in volts\n\n#Calculation\nC=C*10**-12; #Capacitance of the capacitor(F)\nx, y, z, t = symbols('x y z t')\nk, m, n = symbols('k m n', integer=True)\nf, g, h = symbols('f g h', cls=Function)\n#I = C*dV/dt\n#let dV/dt be a\na=diff(0.2*sin(120*math.pi*t),t) #dV/dt\n#value of dV/dt is 75.398223686155*cos(376.991118430775*t)\n#for cosine function peak value occurs when 120*math.pi*t = 0\n#therefore value of dV/dt becomes d = 75.398223686155\nd = 75.398223686155; #value of dV/dt \nI=C*d; #displacement current(A)\n\n#Result\nprint \"value of dV/dt is\",a\nprint \"displacement current is\",I, \"A\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "from sympy import *\n", + "import math\n", + "\n", + "#Variable declaration\n", + "C = 10; #Capacitance of the capacitor(pF)\n", + "#given V=0.2*sin(120*math.pi*t) in volts\n", + "\n", + "#Calculation\n", + "C=C*10**-12; #Capacitance of the capacitor(F)\n", + "x, y, z, t = symbols('x y z t')\n", + "k, m, n = symbols('k m n', integer=True)\n", + "f, g, h = symbols('f g h', cls=Function)\n", + "#I = C*dV/dt\n", + "#let dV/dt be a\n", + "a=diff(0.2*sin(120*math.pi*t),t) #dV/dt\n", + "#value of dV/dt is 75.398223686155*cos(376.991118430775*t)\n", + "#for cosine function peak value occurs when 120*math.pi*t = 0\n", + "#therefore value of dV/dt becomes d = 75.398223686155\n", + "d = 75.398223686155; #value of dV/dt \n", + "I=C*d; #displacement current(A)\n", + "\n", + "#Result\n", + "print \"value of dV/dt is\",a\n", + "print \"displacement current is\",I, \"A\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "value of dV/dt is 75.398223686155*cos(376.991118430775*t)\ndisplacement current is 7.53982236862e-10 A\n" + "text": [ + "value of dV/dt is 75.398223686155*cos(376.991118430775*t)\n", + "displacement current is 7.53982236862e-10 A\n" + ] } ], "prompt_number": 2 @@ -38,19 +74,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.2, Page number 46" + "source": [ + "Example number 2.2, Page number 46" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the peak value of displacement current density in a good conductor\n\n#importing modules\nfrom __future__ import division\nfrom sympy import *\nimport math\n\n#Variable declaration\nepsilon_r = 1; #Relative electrical permittivity of free space\nepsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n#given E=sin(120*math.pi*t) in volts\n\n#Calculation\nx, y, z, t = symbols('x y z t')\nk, m, n = symbols('k m n', integer=True)\nf, g, h = symbols('f g h', cls=Function)\n#J2 = epsilon*dE/dt\nepsilon=epsilon_0*epsilon_r;\n#let dE/dt be a\na=diff(sin(120*math.pi*t),t) #dE/dt\n#value of dE/dt is 376.991118430775*cos(376.991118430775*t)\n#for cosine function peak value occurs when 120*math.pi*t = 0\n#therefore value of dE/dt becomes d = 376.991118430775\nd = 376.991118430775; #value of dE/dt\nJ2=epsilon*d; #displacement current density(A/m**2)\n\n#Result\nprint \"value of dE/dt is\",a\nprint \"The peak value of displacement current density is\",J2, \"A/m**2\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "from sympy import *\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_r = 1; #Relative electrical permittivity of free space\n", + "epsilon_0 = 8.854*10**-12; #Absolute electrical permittivity of free space(F/m)\n", + "#given E=sin(120*math.pi*t) in volts\n", + "\n", + "#Calculation\n", + "x, y, z, t = symbols('x y z t')\n", + "k, m, n = symbols('k m n', integer=True)\n", + "f, g, h = symbols('f g h', cls=Function)\n", + "#J2 = epsilon*dE/dt\n", + "epsilon=epsilon_0*epsilon_r;\n", + "#let dE/dt be a\n", + "a=diff(sin(120*math.pi*t),t) #dE/dt\n", + "#value of dE/dt is 376.991118430775*cos(376.991118430775*t)\n", + "#for cosine function peak value occurs when 120*math.pi*t = 0\n", + "#therefore value of dE/dt becomes d = 376.991118430775\n", + "d = 376.991118430775; #value of dE/dt\n", + "J2=epsilon*d; #displacement current density(A/m**2)\n", + "\n", + "#Result\n", + "print \"value of dE/dt is\",a\n", + "print \"The peak value of displacement current density is\",J2, \"A/m**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "value of dE/dt is 376.991118430775*cos(376.991118430775*t)\nThe peak value of displacement current density is 3.33787936259e-09 A/m**2\n" + "text": [ + "value of dE/dt is 376.991118430775*cos(376.991118430775*t)\n", + "The peak value of displacement current density is 3.33787936259e-09 A/m**2\n" + ] } ], "prompt_number": 3 @@ -59,25 +129,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.3, Page number 47 (Theoritical proof)" + "source": [ + "Example number 2.3, Page number 47 (Theoritical proof)" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.4, Page number 47" + "source": [ + "Example number 2.4, Page number 47" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To determine the peak value of displacement current\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\np = 60; #Power rating of bulb(W)\nd = 0.5; #Distance from the bulb(m)\n\n#Calculation\nA=4*math.pi*d**2; #area(m**2)\nP = p/A; #Value of Poynting vector(W/m**2)\nP = math.ceil(P*100)/100; #rounding off value of P to 1 decimal\n\n#Result\nprint \"The value of Poynting vector is\",P, \"W/m**2\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "p = 60; #Power rating of bulb(W)\n", + "d = 0.5; #Distance from the bulb(m)\n", + "\n", + "#Calculation\n", + "A=4*math.pi*d**2; #area(m**2)\n", + "P = p/A; #Value of Poynting vector(W/m**2)\n", + "P = math.ceil(P*100)/100; #rounding off value of P to 1 decimal\n", + "\n", + "#Result\n", + "print \"The value of Poynting vector is\",P, \"W/m**2\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The value of Poynting vector is 19.1 W/m**2\n" + "text": [ + "The value of Poynting vector is 19.1 W/m**2\n" + ] } ], "prompt_number": 4 @@ -86,19 +179,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.5, Page number 47" + "source": [ + "Example number 2.5, Page number 47" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To determine the velocity of wave, intrinsic impedence and peak value of magnetic intensity\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nE_peak = 6; #Peak value of electric field intensity(V/m)\nc = 3*10**8; #Speed of electromagnetic wave in free space(m/s)\nmew_0 = 4*math.pi*10**-7; #Absolute permeability of free space(Tm/A)\nepsilon_0 = 8.854*10**-12; #Absolute permittivity of free space(F/m)\nmew_r = 1; #Relative permeability of medium\nepsilon_r = 3; #Relative permittivity of the medium\n\n#Calculation\nv = c/math.sqrt(mew_r*epsilon_r); #Wave velocity(m/s)\nv = v/10**8;\nv = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\neta = math.sqrt((mew_0/epsilon_0)*(mew_r/epsilon_r)); #Intrinsic impedance of the medium(ohm)\neta = math.ceil(eta*10)/10; #rounding off the value of v to 1 decimal\nH_P = E_peak/eta; #Peak value of the magnetic intensity(A/m)\nH_P = H_P*10**2;\nH_P = math.ceil(H_P*10**2)/10**2; #rounding off the value of v to 2 decimals\n\n#Result\nprint \"The wave velocity is\",v,\"*10**8 m/s\"\nprint \"The intrinsic impedance of the medium is\",eta, \"ohm\"\nprint \"The peak value of the magnetic intensity is\",H_P,\"*10**-2 A/m\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E_peak = 6; #Peak value of electric field intensity(V/m)\n", + "c = 3*10**8; #Speed of electromagnetic wave in free space(m/s)\n", + "mew_0 = 4*math.pi*10**-7; #Absolute permeability of free space(Tm/A)\n", + "epsilon_0 = 8.854*10**-12; #Absolute permittivity of free space(F/m)\n", + "mew_r = 1; #Relative permeability of medium\n", + "epsilon_r = 3; #Relative permittivity of the medium\n", + "\n", + "#Calculation\n", + "v = c/math.sqrt(mew_r*epsilon_r); #Wave velocity(m/s)\n", + "v = v/10**8;\n", + "v = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n", + "eta = math.sqrt((mew_0/epsilon_0)*(mew_r/epsilon_r)); #Intrinsic impedance of the medium(ohm)\n", + "eta = math.ceil(eta*10)/10; #rounding off the value of v to 1 decimal\n", + "H_P = E_peak/eta; #Peak value of the magnetic intensity(A/m)\n", + "H_P = H_P*10**2;\n", + "H_P = math.ceil(H_P*10**2)/10**2; #rounding off the value of v to 2 decimals\n", + "\n", + "#Result\n", + "print \"The wave velocity is\",v,\"*10**8 m/s\"\n", + "print \"The intrinsic impedance of the medium is\",eta, \"ohm\"\n", + "print \"The peak value of the magnetic intensity is\",H_P,\"*10**-2 A/m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The wave velocity is 1.7321 *10**8 m/s\nThe intrinsic impedance of the medium is 217.6 ohm\nThe peak value of the magnetic intensity is 2.76 *10**-2 A/m\n" + "text": [ + "The wave velocity is 1.7321 *10**8 m/s\n", + "The intrinsic impedance of the medium is 217.6 ohm\n", + "The peak value of the magnetic intensity is 2.76 *10**-2 A/m\n" + ] } ], "prompt_number": 11 @@ -106,7 +233,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter3_1.ipynb b/Engineering_Physics/Chapter3_1.ipynb index e20ce99f..7f02f8be 100644 --- a/Engineering_Physics/Chapter3_1.ipynb +++ b/Engineering_Physics/Chapter3_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter3" + "name": "", + "signature": "sha256:366ab969956cd234404db0091b17960805856ec3ff44007e36b0efdbe1414f5e" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,51 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "3: Interference" + "source": [ + "3: Interference" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.1, Page number 71" + "source": [ + "Example number 3.1, Page number 71" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the velocity of light\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nbeta = 0.51; #Fringe width(mm)\nd = 2.2; #Distance between the slits(mm)\nD = 2; #Distance between the slits and the screen(m)\n\n#Calculation\nbeta = beta*10**-1; #Fringe width(cm)\nd = d*10**-1; #Distance between the slits(cm)\nD=D*10**2; #Distance between the slits and the screen(cm)\nlamda = beta*d/D; #Wavelength of light(cm)\nlamda = lamda*10**8; #Wavelength of light(A)\n\n#Result\nprint \"The wavelength of light is\",lamda, \"angstrom\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "beta = 0.51; #Fringe width(mm)\n", + "d = 2.2; #Distance between the slits(mm)\n", + "D = 2; #Distance between the slits and the screen(m)\n", + "\n", + "#Calculation\n", + "beta = beta*10**-1; #Fringe width(cm)\n", + "d = d*10**-1; #Distance between the slits(cm)\n", + "D=D*10**2; #Distance between the slits and the screen(cm)\n", + "lamda = beta*d/D; #Wavelength of light(cm)\n", + "lamda = lamda*10**8; #Wavelength of light(A)\n", + "\n", + "#Result\n", + "print \"The wavelength of light is\",lamda, \"angstrom\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The wavelength of light is 5610.0 angstrom\n" + "text": [ + "The wavelength of light is 5610.0 angstrom\n" + ] } ], "prompt_number": 4 @@ -38,19 +65,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.2, Page number 71" + "source": [ + "Example number 3.2, Page number 71" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the seperation between the third fringe\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nlambda1 = 4250; #First wavelength emitted by source of light(A)\nlambda2 = 5050; #Second wavelength emitted by source of light(A)\nD = 1.5; #Distance between the source and the screen(m)\nd = 0.025; #Distance between the slits(mm)\nn = 3; #Number of fringe from the centre\n\n#Calculation\nlambda1 = lambda1*10**-10; #First wavelength emitted(m)\nlambda2 = lambda2*10**-10; #Second wavelength emitted(m)\nd = d*10**-3; #Distance between the slits(m)\nx3 = n*lambda1*D/d; #Position of third bright fringe due to lambda1(m)\nx3_prime = n*lambda2*D/d; #Position of third bright fringe due to lambda2(m)\nx = x3_prime-x3; #separation between the third bright fringe(m)\nx = x*10**2; #separation between the third bright fringe(cm)\n\n#Result\nprint \"The separation between the third bright fringe due to the two wavelengths is\",x, \"cm\"\n", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lambda1 = 4250; #First wavelength emitted by source of light(A)\n", + "lambda2 = 5050; #Second wavelength emitted by source of light(A)\n", + "D = 1.5; #Distance between the source and the screen(m)\n", + "d = 0.025; #Distance between the slits(mm)\n", + "n = 3; #Number of fringe from the centre\n", + "\n", + "#Calculation\n", + "lambda1 = lambda1*10**-10; #First wavelength emitted(m)\n", + "lambda2 = lambda2*10**-10; #Second wavelength emitted(m)\n", + "d = d*10**-3; #Distance between the slits(m)\n", + "x3 = n*lambda1*D/d; #Position of third bright fringe due to lambda1(m)\n", + "x3_prime = n*lambda2*D/d; #Position of third bright fringe due to lambda2(m)\n", + "x = x3_prime-x3; #separation between the third bright fringe(m)\n", + "x = x*10**2; #separation between the third bright fringe(cm)\n", + "\n", + "#Result\n", + "print \"The separation between the third bright fringe due to the two wavelengths is\",x, \"cm\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The separation between the third bright fringe due to the two wavelengths is 1.44 cm\n" + "text": [ + "The separation between the third bright fringe due to the two wavelengths is 1.44 cm\n" + ] } ], "prompt_number": 5 @@ -59,19 +114,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.3, Page number 71" + "source": [ + "Example number 3.3, Page number 71" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the refractive index of the sheet of glass\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 5.5*10**-5; #Wavelength emitted by source of light(cm)\nn = 4; #Number of fringes shifted\nt = 3.9*10**-4; #Thickness of the thin glass sheet(cm)\n\n#Calculation\nmew = (n*lamda/t)+1; #Refractive index of the sheet of glass\nmew = math.ceil(mew*10**4)/10**4; #rounding off the value of v to 4 decimals\n\n#Result\nprint \"The refractive index of the sheet of glass is\",mew", + "input": [ + " \n", + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 5.5*10**-5; #Wavelength emitted by source of light(cm)\n", + "n = 4; #Number of fringes shifted\n", + "t = 3.9*10**-4; #Thickness of the thin glass sheet(cm)\n", + "\n", + "#Calculation\n", + "mew = (n*lamda/t)+1; #Refractive index of the sheet of glass\n", + "mew = math.ceil(mew*10**4)/10**4; #rounding off the value of v to 4 decimals\n", + "\n", + "#Result\n", + "print \"The refractive index of the sheet of glass is\",mew" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The refractive index of the sheet of glass is 1.5642\n" + "text": [ + "The refractive index of the sheet of glass is 1.5642\n" + ] } ], "prompt_number": 6 @@ -80,19 +156,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.4, Page number 72" + "source": [ + "Example number 3.4, Page number 72" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the least thickness of the film that appears bright and dark\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 5893; #Wavelength of monochromatic lihgt used(A)\nn = 1; #Number of fringe for the least thickness of the film\ncosr = 1; #for normal incidence\nmew = 1.42; #refractive index of the soap film\n\n#Calculation\n#As for constructive interference, \n#2*mew*t*cos(r) = (2*n-1)*lambda/2, solving for t\nt = (2*n-1)*lamda/(4*mew*cosr); #Thickness of the film that appears bright(A)\n#As for destructive interference, \n#2*mu*t*cos(r) = n*lambda, solving for t\nt1 = n*lamda/(2*mew*cosr); #Thickness of the film that appears bright(A)\n\n#Result\nprint \"The thickness of the film that appears bright is\",t, \"angstrom\"\nprint \"The thickness of the film that appears dark is\",t1, \"angstrom\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 5893; #Wavelength of monochromatic lihgt used(A)\n", + "n = 1; #Number of fringe for the least thickness of the film\n", + "cosr = 1; #for normal incidence\n", + "mew = 1.42; #refractive index of the soap film\n", + "\n", + "#Calculation\n", + "#As for constructive interference, \n", + "#2*mew*t*cos(r) = (2*n-1)*lambda/2, solving for t\n", + "t = (2*n-1)*lamda/(4*mew*cosr); #Thickness of the film that appears bright(A)\n", + "#As for destructive interference, \n", + "#2*mu*t*cos(r) = n*lambda, solving for t\n", + "t1 = n*lamda/(2*mew*cosr); #Thickness of the film that appears bright(A)\n", + "\n", + "#Result\n", + "print \"The thickness of the film that appears bright is\",t, \"angstrom\"\n", + "print \"The thickness of the film that appears dark is\",t1, \"angstrom\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The thickness of the film that appears bright is 1037.5 angstrom\nThe thickness of the film that appears dark is 2075.0 angstrom\n" + "text": [ + "The thickness of the film that appears bright is 1037.5 angstrom\n", + "The thickness of the film that appears dark is 2075.0 angstrom\n" + ] } ], "prompt_number": 7 @@ -101,19 +204,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.5, Page number 72" + "source": [ + "Example number 3.5, Page number 72" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angle of the wedge\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 5893; #Wavelength of monochromatic lihgt used(A)\nn = 10; #Number of fringe that are found \nd = 1; #Distance of 10 fringes(cm)\n\n#Calculation\nbeta = d/n; #Fringe width(cm)\nlamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\ntheta = lamda/(2*beta); #Angle of the wedge(rad)\ntheta = theta*10**4;\ntheta = math.ceil(theta*10**4)/10**4; #rounding off the value of theta to 4 decimals\n\n#Result\nprint \"The angle of the wedge is\",theta,\"*10**-4 rad\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 5893; #Wavelength of monochromatic lihgt used(A)\n", + "n = 10; #Number of fringe that are found \n", + "d = 1; #Distance of 10 fringes(cm)\n", + "\n", + "#Calculation\n", + "beta = d/n; #Fringe width(cm)\n", + "lamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\n", + "theta = lamda/(2*beta); #Angle of the wedge(rad)\n", + "theta = theta*10**4;\n", + "theta = math.ceil(theta*10**4)/10**4; #rounding off the value of theta to 4 decimals\n", + "\n", + "#Result\n", + "print \"The angle of the wedge is\",theta,\"*10**-4 rad\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The angle of the wedge is 2.9465 *10**-4 rad\n" + "text": [ + "The angle of the wedge is 2.9465 *10**-4 rad\n" + ] } ], "prompt_number": 12 @@ -122,19 +248,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.6, Page number 72" + "source": [ + "Example number 3.6, Page number 72" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the separation between consecutive bright fringes\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 5900; #Wavelength of monochromatic lihgt used(A)\nt = 0.010; #Spacer thickness(mm)\nl = 10; #Wedge length(cm)\n\n#Calculation\nt = t*10**-1; #Spacer thickness(cm)\ntheta = t/l; #Angle of the wedge(rad)\nlamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\nbeta = lamda/(2*theta); #Fringe width(cm)\n\n#Result\nprint \"The separation between consecutive bright fringes is\",beta, \"cm\"", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 5900; #Wavelength of monochromatic lihgt used(A)\n", + "t = 0.010; #Spacer thickness(mm)\n", + "l = 10; #Wedge length(cm)\n", + "\n", + "#Calculation\n", + "t = t*10**-1; #Spacer thickness(cm)\n", + "theta = t/l; #Angle of the wedge(rad)\n", + "lamda = lamda*10**-8; #Wavelength of monochromatic lihgt used(cm)\n", + "beta = lamda/(2*theta); #Fringe width(cm)\n", + "\n", + "#Result\n", + "print \"The separation between consecutive bright fringes is\",beta, \"cm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The separation between consecutive bright fringes is 0.295 cm\n" + "text": [ + "The separation between consecutive bright fringes is 0.295 cm\n" + ] } ], "prompt_number": 13 @@ -143,19 +291,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.7, Page number 72" + "source": [ + "Example number 3.7, Page number 72" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the diameter of 20th dark ring\n\n#importing modules\nimport math\n\n#Variable declaration\nD4 = 0.4; #Diameter of 4th dark ring(cm)\nD12 = 0.7; #Diameter of 12th dark ring(cm)\n\n#Calculation\n#We have (dn_plus_k**2)-Dn**2 = 4*k*R*lamda\n#D12**2-D4**2 = 32*R*lamda and D20**2-D12**2 = 32*R*lamda for k = 8\n#since RHS are equal, by equating the LHS we get D12**2-D4**2 = D20**2-D12**2\nD20 = math.sqrt((2*D12**2)-D4**2); #Diameter of 20th dark ring(cm)\nD20 = math.ceil(D20*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n\n#Result\nprint \"The diameter of 20th dark ring is\",D20, \"cm\"", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "D4 = 0.4; #Diameter of 4th dark ring(cm)\n", + "D12 = 0.7; #Diameter of 12th dark ring(cm)\n", + "\n", + "#Calculation\n", + "#We have (dn_plus_k**2)-Dn**2 = 4*k*R*lamda\n", + "#D12**2-D4**2 = 32*R*lamda and D20**2-D12**2 = 32*R*lamda for k = 8\n", + "#since RHS are equal, by equating the LHS we get D12**2-D4**2 = D20**2-D12**2\n", + "D20 = math.sqrt((2*D12**2)-D4**2); #Diameter of 20th dark ring(cm)\n", + "D20 = math.ceil(D20*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n", + "\n", + "#Result\n", + "print \"The diameter of 20th dark ring is\",D20, \"cm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The diameter of 20th dark ring is 0.9056 cm\n" + "text": [ + "The diameter of 20th dark ring is 0.9056 cm\n" + ] } ], "prompt_number": 14 @@ -164,19 +333,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.8, Page number 73" + "source": [ + "Example number 3.8, Page number 73" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the refractive index of the liquid\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nDn = 0.30; #Diameter of nth dark ring with air film(cm)\ndn = 0.25; #Diameter of nth dark ring with liquid film(cm)\n\n#Calculation\nmew = (Dn/dn)**2; #Refractive index of the liquid\n\n#Result\nprint \"The refractive index of the liquid is\", mew\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Dn = 0.30; #Diameter of nth dark ring with air film(cm)\n", + "dn = 0.25; #Diameter of nth dark ring with liquid film(cm)\n", + "\n", + "#Calculation\n", + "mew = (Dn/dn)**2; #Refractive index of the liquid\n", + "\n", + "#Result\n", + "print \"The refractive index of the liquid is\", mew\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The refractive index of the liquid is 1.44\n" + "text": [ + "The refractive index of the liquid is 1.44\n" + ] } ], "prompt_number": 15 @@ -185,19 +373,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.9, Page number 73" + "source": [ + "Example number 3.9, Page number 73" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of light\n\n#importing modules\nimport math\n\n#Variable declaration\nx = 0.002945; #Distance through which movable mirror is shifted(cm)\nN = 100; #Number of fringes shifted\n\n#Calculation\nx = x*10**-2; #Distance through which movable mirror is shifted(m)\nlamda = 2*x/N; #Wavelength of light(m)\nlamda = lamda*10**10; #Wavelength of light(A)\n\n#Result\nprint \"The wavelength of light is\",lamda, \"angstrom\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "x = 0.002945; #Distance through which movable mirror is shifted(cm)\n", + "N = 100; #Number of fringes shifted\n", + "\n", + "#Calculation\n", + "x = x*10**-2; #Distance through which movable mirror is shifted(m)\n", + "lamda = 2*x/N; #Wavelength of light(m)\n", + "lamda = lamda*10**10; #Wavelength of light(A)\n", + "\n", + "#Result\n", + "print \"The wavelength of light is\",lamda, \"angstrom\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The wavelength of light is 5890.0 angstrom\n" + "text": [ + "The wavelength of light is 5890.0 angstrom\n" + ] } ], "prompt_number": 16 @@ -206,19 +414,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.10, Page number 73" + "source": [ + "Example number 3.10, Page number 73" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the shift in movable mirror\n\n#importing modules\nimport math\n\n#Variable declaration\nlambda1 = 5896; #Wavelength of D1 line of sodium(A)\nlambda2 = 5890; #Wavelength of D2 line of sodium(A)\n\n#Calculation\nlamda = (lambda1+lambda2)/2;\nx = (lamda**2)/(2*(lambda1-lambda2)); #Shift in movable mirror of Michelson Interferometer(A)\nx = x*10**-7; #Shift in movable mirror of Michelson Interferometer(mm)\nx = math.ceil(x*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n\n#Result\nprint \"The shift in movable mirror is\",x, \"mm\"", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "lambda1 = 5896; #Wavelength of D1 line of sodium(A)\n", + "lambda2 = 5890; #Wavelength of D2 line of sodium(A)\n", + "\n", + "#Calculation\n", + "lamda = (lambda1+lambda2)/2;\n", + "x = (lamda**2)/(2*(lambda1-lambda2)); #Shift in movable mirror of Michelson Interferometer(A)\n", + "x = x*10**-7; #Shift in movable mirror of Michelson Interferometer(mm)\n", + "x = math.ceil(x*10**4)/10**4; #rounding off the value of D20 to 4 decimals\n", + "\n", + "#Result\n", + "print \"The shift in movable mirror is\",x, \"mm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The shift in movable mirror is 0.2894 mm\n" + "text": [ + "The shift in movable mirror is 0.2894 mm\n" + ] } ], "prompt_number": 17 @@ -226,7 +454,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter4_1.ipynb b/Engineering_Physics/Chapter4_1.ipynb index 4cd8a196..c2e7944f 100644 --- a/Engineering_Physics/Chapter4_1.ipynb +++ b/Engineering_Physics/Chapter4_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter4" + "name": "", + "signature": "sha256:bd975238ecc341317a545ed613e73ea0b105f0af115e6d7857237510924e96a0" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,61 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "4: Diffraction" + "source": [ + "4: Diffraction" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.1, Page number 91" + "source": [ + "Example number 4.1, Page number 91" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the velocity of light\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nD = 50; #Distance between source and the screen(cm)\nlamda = 6563; #Wavelength of light of parallel rays(A)\nd = 0.385; #Width of the slit(mm)\nn1 = 1; #Order of diffraction for first minimum\nn2 = 5; #Order of diffraction for fifth minimum\n\n#Calculation\nlamda = lamda*10**-8; #Wavelength of light of parallel rays(cm)\nd = d*10**-1; #Width of the slit(cm)\n#As sin(theta1) = n*lambda/d = x1/D, solving for x1\nx1 = n1*lamda*D/d; #Distance from the centre of the principal maximum to the first minimum(cm)\nx1 = x1*10; #Distance from the centre of the principal maximum to the first minimum(mm)\nx1 = math.ceil(x1*10**3)/10**3; #rounding off the value of x1 to 3 decimals\nx2 = n2*lamda*D/d; #Distance from the centre of the principal maximum to the fifth minimum(cm)\nx2 = x2*10; #Distance from the centre of the principal maximum to the fifth minimum(mm)\nx2 = math.ceil(x2*10**3)/10**3; #rounding off the value of x2 to 3 decimals\n\n#Result\nprint \"The Distance from the centre of the principal maximum to the first minimum is\",x1, \"mm\"\nprint \"The Distance from the centre of the principal maximum to the fifth minimum is\",x2, \"mm\"\n\n#answer for x2 given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "D = 50; #Distance between source and the screen(cm)\n", + "lamda = 6563; #Wavelength of light of parallel rays(A)\n", + "d = 0.385; #Width of the slit(mm)\n", + "n1 = 1; #Order of diffraction for first minimum\n", + "n2 = 5; #Order of diffraction for fifth minimum\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-8; #Wavelength of light of parallel rays(cm)\n", + "d = d*10**-1; #Width of the slit(cm)\n", + "#As sin(theta1) = n*lambda/d = x1/D, solving for x1\n", + "x1 = n1*lamda*D/d; #Distance from the centre of the principal maximum to the first minimum(cm)\n", + "x1 = x1*10; #Distance from the centre of the principal maximum to the first minimum(mm)\n", + "x1 = math.ceil(x1*10**3)/10**3; #rounding off the value of x1 to 3 decimals\n", + "x2 = n2*lamda*D/d; #Distance from the centre of the principal maximum to the fifth minimum(cm)\n", + "x2 = x2*10; #Distance from the centre of the principal maximum to the fifth minimum(mm)\n", + "x2 = math.ceil(x2*10**3)/10**3; #rounding off the value of x2 to 3 decimals\n", + "\n", + "#Result\n", + "print \"The Distance from the centre of the principal maximum to the first minimum is\",x1, \"mm\"\n", + "print \"The Distance from the centre of the principal maximum to the fifth minimum is\",x2, \"mm\"\n", + "\n", + "#answer for x2 given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Distance from the centre of the principal maximum to the first minimum is 0.853 mm\nThe Distance from the centre of the principal maximum to the fifth minimum is 4.262 mm\n" + "text": [ + "The Distance from the centre of the principal maximum to the first minimum is 0.853 mm\n", + "The Distance from the centre of the principal maximum to the fifth minimum is 4.262 mm\n" + ] } ], "prompt_number": 1 @@ -38,19 +75,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.2, Page number 91" + "source": [ + "Example number 4.2, Page number 91" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the radii of first two dark rings\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nD = 0.04; #Diameter of circular aperture(cm)\nf = 20; #Focal length of convex lens(cm)\nlamda = 6000; #Wavelength of light used(A)\n\n#Calculation\nlamda = lamda*10**-8; #Wavelength of light used(cm)\n#We have sin(theta) = 1.22*lambda/D = theta, for small theta\n#For first dark ring\ntheta = 1.22*lamda/D; #The half angular width at central maximum(rad)\nr1 = theta*f; #The half width of central maximum for first dark ring(cm)\nr1 = r1*10**2;\n#We have sin(theta) = 5.136*lambda/(%pi*D) = theta, for small theta\n#For second dark ring\ntheta = 5.136*lamda/(math.pi*D); #The half angular width at central maximum(rad)\nr2 = theta*f; #The half width of central maximum for second dark ring(cm)\nr2 = r2*10**2;\nr2 = math.ceil(r2*100)/100; #rounding off the value of r2 to 2 decimals\n\n#Result\nprint \"The radius of first dark ring is\",r1,\"*10**-2 cm\"\nprint \"The radius of second dark ring is\",r2,\"*10**-2 cm\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "D = 0.04; #Diameter of circular aperture(cm)\n", + "f = 20; #Focal length of convex lens(cm)\n", + "lamda = 6000; #Wavelength of light used(A)\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-8; #Wavelength of light used(cm)\n", + "#We have sin(theta) = 1.22*lambda/D = theta, for small theta\n", + "#For first dark ring\n", + "theta = 1.22*lamda/D; #The half angular width at central maximum(rad)\n", + "r1 = theta*f; #The half width of central maximum for first dark ring(cm)\n", + "r1 = r1*10**2;\n", + "#We have sin(theta) = 5.136*lambda/(%pi*D) = theta, for small theta\n", + "#For second dark ring\n", + "theta = 5.136*lamda/(math.pi*D); #The half angular width at central maximum(rad)\n", + "r2 = theta*f; #The half width of central maximum for second dark ring(cm)\n", + "r2 = r2*10**2;\n", + "r2 = math.ceil(r2*100)/100; #rounding off the value of r2 to 2 decimals\n", + "\n", + "#Result\n", + "print \"The radius of first dark ring is\",r1,\"*10**-2 cm\"\n", + "print \"The radius of second dark ring is\",r2,\"*10**-2 cm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The radius of first dark ring is 3.66 *10**-2 cm\nThe radius of second dark ring is 4.91 *10**-2 cm\n" + "text": [ + "The radius of first dark ring is 3.66 *10**-2 cm\n", + "The radius of second dark ring is 4.91 *10**-2 cm\n" + ] } ], "prompt_number": 6 @@ -59,19 +129,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.3, Page number 92" + "source": [ + "Example number 4.3, Page number 92" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angle at which the light produces a second order maximum\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nn = 2; #Order of diffraction\nlamda = 650; #Wavelength of light used(nm)\nd = 1.2*10**-3; #Distance between two consecutive slits of grating(cm)\n\n#Calculation\n#We have sin(theta) = n*N*lambda = n*lambda/d, solving for theta\nlamda = lamda*10**-9; #Wavelength of light used(m)\nd = d*10**-2; #Distance between two consecutive slits of grating(m)\na=n*lamda/d;\ntheta = math.asin(a); #Angle at which the 650 nm light produces a second order maximum(rad)\ntheta = theta*57.2957795; #angle in degrees\ntheta = math.ceil(theta*10**2)/10**2; #rounding off the value of theta to 2 decimals\n\n#Result\nprint \"The angle at which the light produces a second order maximum is\",theta, \"degrees\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "n = 2; #Order of diffraction\n", + "lamda = 650; #Wavelength of light used(nm)\n", + "d = 1.2*10**-3; #Distance between two consecutive slits of grating(cm)\n", + "\n", + "#Calculation\n", + "#We have sin(theta) = n*N*lambda = n*lambda/d, solving for theta\n", + "lamda = lamda*10**-9; #Wavelength of light used(m)\n", + "d = d*10**-2; #Distance between two consecutive slits of grating(m)\n", + "a=n*lamda/d;\n", + "theta = math.asin(a); #Angle at which the 650 nm light produces a second order maximum(rad)\n", + "theta = theta*57.2957795; #angle in degrees\n", + "theta = math.ceil(theta*10**2)/10**2; #rounding off the value of theta to 2 decimals\n", + "\n", + "#Result\n", + "print \"The angle at which the light produces a second order maximum is\",theta, \"degrees\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The angle at which the light produces a second order maximum is 6.22 degrees\n" + "text": [ + "The angle at which the light produces a second order maximum is 6.22 degrees\n" + ] } ], "prompt_number": 7 @@ -80,19 +176,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.4, Page number 92" + "source": [ + "Example number 4.4, Page number 92" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the highest order of spectra\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 650; #Wavelength of light used(nm)\nN = 6000; #Number of lines per cm on grating\ntheta = 90; #Angle at which the highest spectral order is obtained(degrees)\n\n#Calculation\ntheta = theta*0.0174532925; #Angle at which the highest spectral order is obtained(rad)\n#We have sin(theta) = n*N*lambda, solving for n\nlamda = lamda*10**-9; #Wavelength of light used(m)\nN = N*10**2; #Number of lines per m on grating\nn = math.sin(theta)/(N*lamda); #The highest order of spectra with diffraction grating\nn = math.ceil(n*10**3)/10**3; #rounding off the value of theta to 3 decimals\ni,d = divmod(n, 1); #divides the value of n into integer and decimal parts where i is integer\n\n#Result\nprint \"value of n is\",n\nprint \"The highest order of spectra obtained with diffraction grating is\",i\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 650; #Wavelength of light used(nm)\n", + "N = 6000; #Number of lines per cm on grating\n", + "theta = 90; #Angle at which the highest spectral order is obtained(degrees)\n", + "\n", + "#Calculation\n", + "theta = theta*0.0174532925; #Angle at which the highest spectral order is obtained(rad)\n", + "#We have sin(theta) = n*N*lambda, solving for n\n", + "lamda = lamda*10**-9; #Wavelength of light used(m)\n", + "N = N*10**2; #Number of lines per m on grating\n", + "n = math.sin(theta)/(N*lamda); #The highest order of spectra with diffraction grating\n", + "n = math.ceil(n*10**3)/10**3; #rounding off the value of theta to 3 decimals\n", + "i,d = divmod(n, 1); #divides the value of n into integer and decimal parts where i is integer\n", + "\n", + "#Result\n", + "print \"value of n is\",n\n", + "print \"The highest order of spectra obtained with diffraction grating is\",i\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "value of n is 2.565\nThe highest order of spectra obtained with diffraction grating is 2.0\n" + "text": [ + "value of n is 2.565\n", + "The highest order of spectra obtained with diffraction grating is 2.0\n" + ] } ], "prompt_number": 8 @@ -101,19 +225,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.5, Page number 92" + "source": [ + "Example number 4.5, Page number 92" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To show that the blue line and red line overlap\n\n#importing modules\nimport math\n\n#Variable declaration\nN = 4000; #Number of lines per cm on grating\n#For Blue Line\nlamda1 = 450; #Wavelength of blue light(nm)\nn1 = 3; #Order of diffraction spectrum\n#For Red Line\nlamda2 = 700; #Wavelength of red light(nm)\nn2 = 2; #Order of diffraction spectrum\n\n#Calculation\nN = N*10**2; #Number of lines per m on grating\nlamda1 = lamda1*10**-9; #Wavelength of blue light(m)\nlamda2 = lamda2*10**-9; #Wavelength of red light(m)\n#We have sin(theta) = n*N*lambda, solving for sin(theta)\nsin_theta_3 = n1*N*lamda1; #Sine of angle at third order diffraction \nsin_theta_2 = n2*N*lamda2; #Sine of angle at second order diffraction\n\n#Result\nprint \"Sine of angle at third order diffraction is\",sin_theta_3\nprint \"Sine of angle at second order diffraction is\",sin_theta_2 \n#Check for overlapping\nif (sin_theta_2-sin_theta_3)<0.05:\n print \"The two orders overlap\"\nelse:\n print \"The two orders do not overlap\" ", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "N = 4000; #Number of lines per cm on grating\n", + "#For Blue Line\n", + "lamda1 = 450; #Wavelength of blue light(nm)\n", + "n1 = 3; #Order of diffraction spectrum\n", + "#For Red Line\n", + "lamda2 = 700; #Wavelength of red light(nm)\n", + "n2 = 2; #Order of diffraction spectrum\n", + "\n", + "#Calculation\n", + "N = N*10**2; #Number of lines per m on grating\n", + "lamda1 = lamda1*10**-9; #Wavelength of blue light(m)\n", + "lamda2 = lamda2*10**-9; #Wavelength of red light(m)\n", + "#We have sin(theta) = n*N*lambda, solving for sin(theta)\n", + "sin_theta_3 = n1*N*lamda1; #Sine of angle at third order diffraction \n", + "sin_theta_2 = n2*N*lamda2; #Sine of angle at second order diffraction\n", + "\n", + "#Result\n", + "print \"Sine of angle at third order diffraction is\",sin_theta_3\n", + "print \"Sine of angle at second order diffraction is\",sin_theta_2 \n", + "#Check for overlapping\n", + "if (sin_theta_2-sin_theta_3)<0.05:\n", + " print \"The two orders overlap\"\n", + "else:\n", + " print \"The two orders do not overlap\" " + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "Sine of angle at third order diffraction is 0.54\nSine of angle at second order diffraction is 0.56\nThe two orders overlap\n" + "text": [ + "Sine of angle at third order diffraction is 0.54\n", + "Sine of angle at second order diffraction is 0.56\n", + "The two orders overlap\n" + ] } ], "prompt_number": 9 @@ -122,19 +282,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.6, Page number 93" + "source": [ + "Example number 4.6, Page number 93" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the width of first order spectrum on the screen\n\n#importing modules\nimport math\n\n#Variable declaration\nn = 1; #Order of diffraction spectrum\nN = 6000; #Number of lines per cm on diffraction grating\nD = 2; #Distance of screen from the source(m)\nlamda1 = 400; #Wavelength of blue light(nm)\nlamda2 = 750; #Wavelength of blue light(nm)\n\n#Calculation\nN = N*10**2; #Number of lines per m on grating\nlamda1 = lamda1*10**-9; #Wavelength of blue light(m)\nlamda2 = lamda2*10**-9; #Wavelength of blue light(m)\n#We have sin(theta1) = n*N*lamda1, solving for theta1\ntheta1 = math.asin(n*N*lamda1); #Angle at first order diffraction for Blue light(rad)\ntheta1_d = theta1*57.2957795; #Angle at first order diffraction for Blue light(degrees)\ntheta2 = math.asin(n*N*lamda2); #Angle at first order diffraction for Red light(rad)\ntheta2_d = theta2*57.2957795; #Angle at first order diffraction for Red light(degrees)\nx1 = D*math.tan(theta1); #Half width position at central maximum for blue color(m)\nx2 = D*math.tan(theta2); #Half width position at central maximum for red color(m)\nx = x2-x1; #width of first order spectrum on the screen(m)\nx = x*10**2; #width of first order spectrum on the screen(cm)\nx = math.ceil(x*10**2)/10**2; #rounding off the value of x to 2 decimals\n\n#Result\nprint \"The width of first order spectrum on the screen is\",x, \"cm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n = 1; #Order of diffraction spectrum\n", + "N = 6000; #Number of lines per cm on diffraction grating\n", + "D = 2; #Distance of screen from the source(m)\n", + "lamda1 = 400; #Wavelength of blue light(nm)\n", + "lamda2 = 750; #Wavelength of blue light(nm)\n", + "\n", + "#Calculation\n", + "N = N*10**2; #Number of lines per m on grating\n", + "lamda1 = lamda1*10**-9; #Wavelength of blue light(m)\n", + "lamda2 = lamda2*10**-9; #Wavelength of blue light(m)\n", + "#We have sin(theta1) = n*N*lamda1, solving for theta1\n", + "theta1 = math.asin(n*N*lamda1); #Angle at first order diffraction for Blue light(rad)\n", + "theta1_d = theta1*57.2957795; #Angle at first order diffraction for Blue light(degrees)\n", + "theta2 = math.asin(n*N*lamda2); #Angle at first order diffraction for Red light(rad)\n", + "theta2_d = theta2*57.2957795; #Angle at first order diffraction for Red light(degrees)\n", + "x1 = D*math.tan(theta1); #Half width position at central maximum for blue color(m)\n", + "x2 = D*math.tan(theta2); #Half width position at central maximum for red color(m)\n", + "x = x2-x1; #width of first order spectrum on the screen(m)\n", + "x = x*10**2; #width of first order spectrum on the screen(cm)\n", + "x = math.ceil(x*10**2)/10**2; #rounding off the value of x to 2 decimals\n", + "\n", + "#Result\n", + "print \"The width of first order spectrum on the screen is\",x, \"cm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The width of first order spectrum on the screen is 51.34 cm\n" + "text": [ + "The width of first order spectrum on the screen is 51.34 cm\n" + ] } ], "prompt_number": 10 @@ -143,19 +336,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.7, Page number 93" + "source": [ + "Example number 4.7, Page number 93" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the least separation between wavelengths\n\n#importing modules\nimport math\n\n#Variable declaration\nw = 5; #Width of the grating(cm)\nN = 32; #Number of lines per mm on grating\nlamda = 640; #Wavelength of light(nm)\nn = 2; #Order of diffraction\n\n#Calculation\nN= N*10; #Number of lines per cm on grating\nN0 = w*N; #Total number of lines on the grating\nd_lambda = lamda/(n*N0); #Separation between wavelengths(nm)\n\n#Result\nprint \"The separation between wavelengths which the grating can just resolve is\",d_lambda, \"nm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "w = 5; #Width of the grating(cm)\n", + "N = 32; #Number of lines per mm on grating\n", + "lamda = 640; #Wavelength of light(nm)\n", + "n = 2; #Order of diffraction\n", + "\n", + "#Calculation\n", + "N= N*10; #Number of lines per cm on grating\n", + "N0 = w*N; #Total number of lines on the grating\n", + "d_lambda = lamda/(n*N0); #Separation between wavelengths(nm)\n", + "\n", + "#Result\n", + "print \"The separation between wavelengths which the grating can just resolve is\",d_lambda, \"nm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The separation between wavelengths which the grating can just resolve is 0.2 nm\n" + "text": [ + "The separation between wavelengths which the grating can just resolve is 0.2 nm\n" + ] } ], "prompt_number": 11 @@ -164,19 +379,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.8, Page number 93" + "source": [ + "Example number 4.8, Page number 93" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the separation of the centres of the images in the focal plane\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda = 550; #Wavelength of light(nm)\nD = 3.2; #Diameter of circular lens(cm)\nf = 24; #Focal length of the lens(cm) \n\n#Calculation\nlamda = lamda*10**-9; #Wavelength of light(m)\nD = D*10**-2; #Diameter of circular lens(m)\ntheta_min = 1.22*lamda/D; #Minimum angle of resolution provided by the lens(rad)\n#As delta_x/f = theta_min, solving for delta_x\nf = f*10**-2; #Focal length of the lens(m) \ndelta_x = theta_min*f; #Separation of the centres of the images in the focal plane of lens(m)\ndelta_x = delta_x*10**6; #Separation of the centres of the images in the focal plane of lens(micro m)\n \n#Result\nprint \"The separation of the centres of the images in the focal plane is\",round(delta_x), \"micro-metre\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 550; #Wavelength of light(nm)\n", + "D = 3.2; #Diameter of circular lens(cm)\n", + "f = 24; #Focal length of the lens(cm) \n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-9; #Wavelength of light(m)\n", + "D = D*10**-2; #Diameter of circular lens(m)\n", + "theta_min = 1.22*lamda/D; #Minimum angle of resolution provided by the lens(rad)\n", + "#As delta_x/f = theta_min, solving for delta_x\n", + "f = f*10**-2; #Focal length of the lens(m) \n", + "delta_x = theta_min*f; #Separation of the centres of the images in the focal plane of lens(m)\n", + "delta_x = delta_x*10**6; #Separation of the centres of the images in the focal plane of lens(micro m)\n", + " \n", + "#Result\n", + "print \"The separation of the centres of the images in the focal plane is\",round(delta_x), \"micro-metre\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The separation of the centres of the images in the focal plane is 5.0 micro-metre\n" + "text": [ + "The separation of the centres of the images in the focal plane is 5.0 micro-metre\n" + ] } ], "prompt_number": 12 @@ -185,19 +425,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.9, Page number 94" + "source": [ + "Example number 4.9, Page number 94" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the linear separation between two points\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 550; #Wavelength of light(nm)\nD = 20; #Diameter of objective of telescope(cm)\nd = 6; #Distance of two points from the objective of telescope(km)\n\n#Calculation\nlamda = lamda*10**-9; #Wavelength of light(m)\nD = D*10**-2; #Diameter of objective of telescope(m)\nd = d*10**3; #Distance of two points from the objective of telescope(m)\ntheta = 1.22*lamda/D; #Angular separation between two points(rad)\nx = theta*d; #Linear separation between two points(m)\nx = x*10**3; #Linear separation between two points(mm)\n\n#Result\nprint \"The linear separation between two points is\",x, \"mm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 550; #Wavelength of light(nm)\n", + "D = 20; #Diameter of objective of telescope(cm)\n", + "d = 6; #Distance of two points from the objective of telescope(km)\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-9; #Wavelength of light(m)\n", + "D = D*10**-2; #Diameter of objective of telescope(m)\n", + "d = d*10**3; #Distance of two points from the objective of telescope(m)\n", + "theta = 1.22*lamda/D; #Angular separation between two points(rad)\n", + "x = theta*d; #Linear separation between two points(m)\n", + "x = x*10**3; #Linear separation between two points(mm)\n", + "\n", + "#Result\n", + "print \"The linear separation between two points is\",x, \"mm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The linear separation between two points is 20.13 mm\n" + "text": [ + "The linear separation between two points is 20.13 mm\n" + ] } ], "prompt_number": 13 @@ -205,7 +470,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter5_1.ipynb b/Engineering_Physics/Chapter5_1.ipynb index 3731e0ad..86db7d36 100644 --- a/Engineering_Physics/Chapter5_1.ipynb +++ b/Engineering_Physics/Chapter5_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter5" + "name": "", + "signature": "sha256:7539e2f35ea93dc5f143cbd45df18f4d6a1bee4d35a1729fab5d759b4b27d8ff" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,58 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "5: Polarization" + "source": [ + "5: Polarization" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.1, Page number 113" + "source": [ + "Example number 5.1, Page number 113" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angle of incidence for complete polarization\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nmew_g = 1.72; #Refractive index of glass\nmew_w = 4/3; #Refractive index of water\n\n#Calculation\n#For polarization to occur on flint glass, tan(i) = mew_g/mew_w\n#Solving for i\ni_g = math.atan(mew_g/mew_w); #angle of incidence for complete polarization for flint glass(rad)\na = 180/math.pi; #conversion factor from radians to degrees\ni_g = i_g*a; #angle of incidence(degrees)\ni_g = math.ceil(i_g*10**2)/10**2; #rounding off the value of i_g to 2 decimals\n#For polarization to occur on water, tan(i) = mew_w/mew_g\n#Solving for i\ni_w = math.atan(mew_w/mew_g); #angle of incidence for complete polarization for water(rad)\ni_w = i_w*a; #angle of incidence(degrees)\ni_w = math.ceil(i_w*10**3)/10**3; #rounding off the value of i_w to 3 decimals\n\n#Result\nprint \"The angle of incidence for complete polarization to occur on flint glass is\",i_g, \"degrees\"\nprint \"The angle of incidence for complete polarization to occur on water is\",i_w, \"degrees\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_g = 1.72; #Refractive index of glass\n", + "mew_w = 4/3; #Refractive index of water\n", + "\n", + "#Calculation\n", + "#For polarization to occur on flint glass, tan(i) = mew_g/mew_w\n", + "#Solving for i\n", + "i_g = math.atan(mew_g/mew_w); #angle of incidence for complete polarization for flint glass(rad)\n", + "a = 180/math.pi; #conversion factor from radians to degrees\n", + "i_g = i_g*a; #angle of incidence(degrees)\n", + "i_g = math.ceil(i_g*10**2)/10**2; #rounding off the value of i_g to 2 decimals\n", + "#For polarization to occur on water, tan(i) = mew_w/mew_g\n", + "#Solving for i\n", + "i_w = math.atan(mew_w/mew_g); #angle of incidence for complete polarization for water(rad)\n", + "i_w = i_w*a; #angle of incidence(degrees)\n", + "i_w = math.ceil(i_w*10**3)/10**3; #rounding off the value of i_w to 3 decimals\n", + "\n", + "#Result\n", + "print \"The angle of incidence for complete polarization to occur on flint glass is\",i_g, \"degrees\"\n", + "print \"The angle of incidence for complete polarization to occur on water is\",i_w, \"degrees\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The angle of incidence for complete polarization to occur on flint glass is 52.22 degrees\nThe angle of incidence for complete polarization to occur on water is 37.783 degrees\n" + "text": [ + "The angle of incidence for complete polarization to occur on flint glass is 52.22 degrees\n", + "The angle of incidence for complete polarization to occur on water is 37.783 degrees\n" + ] } ], "prompt_number": 5 @@ -38,19 +72,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.2, Page number 113" + "source": [ + "Example number 5.2, Page number 113" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the percentage transmission of incident light\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nI0 = 1; #For simplicity, we assume the intensity of light falling on the second Nicol prism to be unity(W/m**2)\ntheta = 30; #Angle through which the crossed Nicol is rotated(degrees)\n\n#Calculation\ntheeta = 90-theta; #angle between the planes of transmission after rotating through 30 degrees\na = math.pi/180; #conversion factor from degrees to radians\ntheeta = theeta*a; ##angle between the planes of transmission(rad)\nI = I0*math.cos(theeta)**2; #Intensity of the emerging light from second Nicol(W/m**2)\nT = (I/(2*I0))*100; #Percentage transmission of incident light\nT = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n\n#Result\nprint \"The percentage transmission of incident light after emerging through the Nicol prism is\",T, \"%\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "I0 = 1; #For simplicity, we assume the intensity of light falling on the second Nicol prism to be unity(W/m**2)\n", + "theta = 30; #Angle through which the crossed Nicol is rotated(degrees)\n", + "\n", + "#Calculation\n", + "theeta = 90-theta; #angle between the planes of transmission after rotating through 30 degrees\n", + "a = math.pi/180; #conversion factor from degrees to radians\n", + "theeta = theeta*a; ##angle between the planes of transmission(rad)\n", + "I = I0*math.cos(theeta)**2; #Intensity of the emerging light from second Nicol(W/m**2)\n", + "T = (I/(2*I0))*100; #Percentage transmission of incident light\n", + "T = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n", + "\n", + "#Result\n", + "print \"The percentage transmission of incident light after emerging through the Nicol prism is\",T, \"%\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The percentage transmission of incident light after emerging through the Nicol prism is 12.51 %\n" + "text": [ + "The percentage transmission of incident light after emerging through the Nicol prism is 12.51 %\n" + ] } ], "prompt_number": 6 @@ -59,19 +117,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.3, Page number 113" + "source": [ + "Example number 5.3, Page number 113" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the thickness of Quarter Wave plate\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nlamda = 6000; #Wavelength of incident light(A)\nmew_e = 1.55; #Refractive index of extraordinary ray\nmew_o = 1.54; #Refractive index of ordinary ray\n\n#Calculation\nlamda = lamda*10**-8; #Wavelength of incident light(cm)\nt = lamda/(4*(mew_e-mew_o)); #Thickness of Quarter Wave plate of positive crystal(cm)\n\n#Result\nprint \"The thickness of Quarter Wave plate is\",t, \"cm\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 6000; #Wavelength of incident light(A)\n", + "mew_e = 1.55; #Refractive index of extraordinary ray\n", + "mew_o = 1.54; #Refractive index of ordinary ray\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-8; #Wavelength of incident light(cm)\n", + "t = lamda/(4*(mew_e-mew_o)); #Thickness of Quarter Wave plate of positive crystal(cm)\n", + "\n", + "#Result\n", + "print \"The thickness of Quarter Wave plate is\",t, \"cm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The thickness of Quarter Wave plate is 0.0015 cm\n" + "text": [ + "The thickness of Quarter Wave plate is 0.0015 cm\n" + ] } ], "prompt_number": 7 @@ -80,19 +159,31 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.4, Page number 114" + "source": [ + "Example number 5.4, Page number 114" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To show the behaviour of the plate\n\n#Calculation\n#the thickness of a half wave plate of calcite for wavelength lamda is\n#t = lamda/(2*(mew_e - mew_o)) = (2*lamda)/(4*(mew_e - mew_o))\n\n#Result\nprint \"The half wave plate for lamda will behave as a quarter wave plate for 2*lamda for negligible variation of refractive index with wavelength\"", + "input": [ + " \n", + "#Calculation\n", + "#the thickness of a half wave plate of calcite for wavelength lamda is\n", + "#t = lamda/(2*(mew_e - mew_o)) = (2*lamda)/(4*(mew_e - mew_o))\n", + "\n", + "#Result\n", + "print \"The half wave plate for lamda will behave as a quarter wave plate for 2*lamda for negligible variation of refractive index with wavelength\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The half wave plate for lamda will behave as a quarter wave plate for 2*lamda for negligible variation of refractive index with wavelength\n" + "text": [ + "The half wave plate for lamda will behave as a quarter wave plate for 2*lamda for negligible variation of refractive index with wavelength\n" + ] } ], "prompt_number": 8 @@ -101,19 +192,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.5, Page number 114" + "source": [ + "Example number 5.5, Page number 114" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the phase retardation\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nlamda = 500; #Wavelength of incident light(nm)\nmew_e = 1.5508; #Refractive index of extraordinary ray\nmew_o = 1.5418; #Refractive index of ordinary ray\nt = 0.032; #Thickness of quartz plate(mm)\n\n#Calculation\nlamda = lamda*10**-9; #Wavelength of incident light(m)\nt = t*10**-3; #Thickness of quartz plate(m)\ndx = (mew_e - mew_o)*t; #Path difference between E-ray and O-ray(m)\ndphi = (2*math.pi)/lamda*dx; #Phase retardation for quartz for given wavelength(rad)\ndphi = dphi/math.pi;\n\n#Result\nprint \"The phase retardation for quartz for given wavelength is\",dphi, \"pi rad\"", + "input": [ + " \n", + "\n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda = 500; #Wavelength of incident light(nm)\n", + "mew_e = 1.5508; #Refractive index of extraordinary ray\n", + "mew_o = 1.5418; #Refractive index of ordinary ray\n", + "t = 0.032; #Thickness of quartz plate(mm)\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-9; #Wavelength of incident light(m)\n", + "t = t*10**-3; #Thickness of quartz plate(m)\n", + "dx = (mew_e - mew_o)*t; #Path difference between E-ray and O-ray(m)\n", + "dphi = (2*math.pi)/lamda*dx; #Phase retardation for quartz for given wavelength(rad)\n", + "dphi = dphi/math.pi;\n", + "\n", + "#Result\n", + "print \"The phase retardation for quartz for given wavelength is\",dphi, \"pi rad\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The phase retardation for quartz for given wavelength is 1.152 pi rad\n" + "text": [ + "The phase retardation for quartz for given wavelength is 1.152 pi rad\n" + ] } ], "prompt_number": 9 @@ -122,19 +239,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.6, Page number 114" + "source": [ + "Example number 5.6, Page number 114" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Brewster angle at the boundary\n\n#importing modules\nimport math\n\n#Variable declaration\nC = 52; #Critical angle for total internal reflection(degrees)\n\n#Calculation\na = math.pi/180; #conversion factor from degrees to radians\nC = C*a; #Critical angle for total internal reflection(rad)\n#From Brewster's law, math.tan(i_B) = 1_mew_2\n#Also math.sin(C) = 1_mew_2, so that math.tan(i_B) = math.sin(C), solving for i_B\ni_B = math.atan(math.sin(C)); #Brewster angle at the boundary(rad)\nb = 180/math.pi; #conversion factor from radians to degrees\ni_B = i_B*b; #Brewster angle at the boundary(degrees)\n\n#Result\nprint \"The Brewster angle at the boundary between two materials is\",int(i_B), \"degrees\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "C = 52; #Critical angle for total internal reflection(degrees)\n", + "\n", + "#Calculation\n", + "a = math.pi/180; #conversion factor from degrees to radians\n", + "C = C*a; #Critical angle for total internal reflection(rad)\n", + "#From Brewster's law, math.tan(i_B) = 1_mew_2\n", + "#Also math.sin(C) = 1_mew_2, so that math.tan(i_B) = math.sin(C), solving for i_B\n", + "i_B = math.atan(math.sin(C)); #Brewster angle at the boundary(rad)\n", + "b = 180/math.pi; #conversion factor from radians to degrees\n", + "i_B = i_B*b; #Brewster angle at the boundary(degrees)\n", + "\n", + "#Result\n", + "print \"The Brewster angle at the boundary between two materials is\",int(i_B), \"degrees\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The Brewster angle at the boundary between two materials is 38 degrees\n" + "text": [ + "The Brewster angle at the boundary between two materials is 38 degrees\n" + ] } ], "prompt_number": 13 @@ -142,7 +282,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [], diff --git a/Engineering_Physics/Chapter6_1.ipynb b/Engineering_Physics/Chapter6_1.ipynb index 889b1e18..63de6fa0 100644 --- a/Engineering_Physics/Chapter6_1.ipynb +++ b/Engineering_Physics/Chapter6_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter6" + "name": "", + "signature": "sha256:761cc333c24ab0bff41cc769407ab239595ed8749ad7bd7c5ee14e4e733b1604" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "6: Crystallography" + "source": [ + "6: Crystallography" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.1, Page number 134" + "source": [ + "Example number 6.1, Page number 134" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lattice parameter\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nM = 23+35.5; #Molecular weight of NaCl(kg/k-mole)\nd = 2.18*10**3; #Density of rock salt(kg/m**3)\nn = 4; #Number of atoms per unit cell for an fcc lattice of NaCl crystal\nN = 6.02*10**26; #Avogadro's No., atoms/k-mol\n\n#Calculation\na = (n*M/(d*N))**(1/3); #Lattice constant of unit cell of NaCl(m)\na = a*10**9; ##Lattice constant of unit cell of NaCl(nm)\na = math.ceil(a*10**3)/10**3; #rounding off the value of a to 3 decimals\n\n#Result\nprint \"Lattice parameter for the NaCl crystal is\",a, \"nm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "M = 23+35.5; #Molecular weight of NaCl(kg/k-mole)\n", + "d = 2.18*10**3; #Density of rock salt(kg/m**3)\n", + "n = 4; #Number of atoms per unit cell for an fcc lattice of NaCl crystal\n", + "N = 6.02*10**26; #Avogadro's No., atoms/k-mol\n", + "\n", + "#Calculation\n", + "a = (n*M/(d*N))**(1/3); #Lattice constant of unit cell of NaCl(m)\n", + "a = a*10**9; ##Lattice constant of unit cell of NaCl(nm)\n", + "a = math.ceil(a*10**3)/10**3; #rounding off the value of a to 3 decimals\n", + "\n", + "#Result\n", + "print \"Lattice parameter for the NaCl crystal is\",a, \"nm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "Lattice parameter for the NaCl crystal is 0.563 nm\n" + "text": [ + "Lattice parameter for the NaCl crystal is 0.563 nm\n" + ] } ], "prompt_number": 1 @@ -38,19 +64,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.2, Page number 134" + "source": [ + "Example number 6.2, Page number 134" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the miller indices of the plane\n\n#importing modules\nimport math\n\n#Variable declaration\nm = 3;\nn = 2; \np = 1; #Coefficients of intercepts along three axes\n\n#Calculation\n#reciprocals of the intercepts are 1/m, 1/n, 1/p i.e 1/3, 1/2, 1\n#multiplying by LCM the reciprocals become 2, 3, 6\n\n#Result\nprint \"The required miller indices are : (2, 3, 6)\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 3;\n", + "n = 2; \n", + "p = 1; #Coefficients of intercepts along three axes\n", + "\n", + "#Calculation\n", + "#reciprocals of the intercepts are 1/m, 1/n, 1/p i.e 1/3, 1/2, 1\n", + "#multiplying by LCM the reciprocals become 2, 3, 6\n", + "\n", + "#Result\n", + "print \"The required miller indices are : (2, 3, 6)\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The required miller indices are : (2, 3, 6)\n" + "text": [ + "The required miller indices are : (2, 3, 6)\n" + ] } ], "prompt_number": 2 @@ -59,19 +105,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.3, Page number 135" + "source": [ + "Example number 6.3, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the miller indices of the plane\n\n#importing modules\nimport math\n\n#Variable declaration\nm = 2; #Coefficient of intercept along x-axis\n#n = infinite Coefficient of intercept along y-axis\np = 3/2; #Coefficient of intercept along z-axis\n\n#Calculation\n#reciprocals of the intercepts are 1/m, 1/n, 1/p i.e 1/2, 0, 2/3\n#multiplying by LCM the reciprocals become 3, 0, 4\n\n#Result\nprint \"The required miller indices are : (3, 0, 4)\"\n", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "m = 2; #Coefficient of intercept along x-axis\n", + "#n = infinite Coefficient of intercept along y-axis\n", + "p = 3/2; #Coefficient of intercept along z-axis\n", + "\n", + "#Calculation\n", + "#reciprocals of the intercepts are 1/m, 1/n, 1/p i.e 1/2, 0, 2/3\n", + "#multiplying by LCM the reciprocals become 3, 0, 4\n", + "\n", + "#Result\n", + "print \"The required miller indices are : (3, 0, 4)\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The required miller indices are : (3, 0, 4)\n" + "text": [ + "The required miller indices are : (3, 0, 4)\n" + ] } ], "prompt_number": 3 @@ -80,25 +145,59 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.4, Sketching not possible" + "source": [ + "Example number 6.4, Sketching not possible" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.5, Page number 136" + "source": [ + "Example number 6.5, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the interplanar spacing between planes\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\n#For (110) planes\nh1 = 1;\nk1 = 1;\nl1 = 0; #Miller Indices for planes in a cubic crystal\na1 = 0.43; #Interatomic spacing(nm)\n#For (212) planes\nh2 = 2; \nk2 = 1;\nl2 = 2; #Miller Indices for planes in a cubic crystal\na2 = 0.43; #Interatomic spacing(nm)\n\n#Calculation\nd1 = a1/(h1**2+k1**2+l1**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\nd1 = math.ceil(d1*10**4)/10**4; #rounding off the value of d1 to 4 decimals\nd2 = a2/(h2**2+k2**2+l2**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\nd2 = math.ceil(d2*10**4)/10**4; #rounding off the value of d2 to 4 decimals\n\n#Result\nprint \"The interplanar spacing between consecutive (110) planes is\",d1, \"nm\";\nprint \"The interplanar spacing between consecutive (212) planes is\",d2, \"nm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#For (110) planes\n", + "h1 = 1;\n", + "k1 = 1;\n", + "l1 = 0; #Miller Indices for planes in a cubic crystal\n", + "a1 = 0.43; #Interatomic spacing(nm)\n", + "#For (212) planes\n", + "h2 = 2; \n", + "k2 = 1;\n", + "l2 = 2; #Miller Indices for planes in a cubic crystal\n", + "a2 = 0.43; #Interatomic spacing(nm)\n", + "\n", + "#Calculation\n", + "d1 = a1/(h1**2+k1**2+l1**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\n", + "d1 = math.ceil(d1*10**4)/10**4; #rounding off the value of d1 to 4 decimals\n", + "d2 = a2/(h2**2+k2**2+l2**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\n", + "d2 = math.ceil(d2*10**4)/10**4; #rounding off the value of d2 to 4 decimals\n", + "\n", + "#Result\n", + "print \"The interplanar spacing between consecutive (110) planes is\",d1, \"nm\";\n", + "print \"The interplanar spacing between consecutive (212) planes is\",d2, \"nm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The interplanar spacing between consecutive (110) planes is 0.3041 nm\nThe interplanar spacing between consecutive (212) planes is 0.1434 nm\n" + "text": [ + "The interplanar spacing between consecutive (110) planes is 0.3041 nm\n", + "The interplanar spacing between consecutive (212) planes is 0.1434 nm\n" + ] } ], "prompt_number": 4 @@ -107,19 +206,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.6, Page number 136" + "source": [ + "Example number 6.6, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the interplanar spacing between planes\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nh = 2;\nk = 3;\nl = 1; #Miller Indices for planes in a cubic crystal\nr = 0.175; #Atomic radius of fcc lattice(nm)\n\n#Calculation\na = 2*math.sqrt(2)*r; #Interatomic spacing of fcc lattice(nm)\nd = a/(h**2+k**2+l**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\nd = math.ceil(d*10**4)/10**4; #rounding off the value of d to 4 decimals\n\n#Result\nprint \"The interplanar spacing between consecutive (231) planes is\",d, \"nm\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 2;\n", + "k = 3;\n", + "l = 1; #Miller Indices for planes in a cubic crystal\n", + "r = 0.175; #Atomic radius of fcc lattice(nm)\n", + "\n", + "#Calculation\n", + "a = 2*math.sqrt(2)*r; #Interatomic spacing of fcc lattice(nm)\n", + "d = a/(h**2+k**2+l**2)**(1/2); #The interplanar spacing for cubic crystals(nm)\n", + "d = math.ceil(d*10**4)/10**4; #rounding off the value of d to 4 decimals\n", + "\n", + "#Result\n", + "print \"The interplanar spacing between consecutive (231) planes is\",d, \"nm\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The interplanar spacing between consecutive (231) planes is 0.1323 nm\n" + "text": [ + "The interplanar spacing between consecutive (231) planes is 0.1323 nm\n" + ] } ], "prompt_number": 5 @@ -128,19 +250,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.7, Page number 136" + "source": [ + "Example number 6.7, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angle of diffraction\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nlamda = 1.44; #Wavelength of X-rays(A)\nd = 2.8; #Interplanar spacing of rocksalt crystal(A)\nn1 = 1; #For 1st Order diffraction\nn2 = 2; #For 2nd Order diffraction\n\n#Calculation\ntheta1 = math.asin(n1*lamda/(2*d)); #Angle of diffraction(radians)\ntheeta1 = theta1*57.2957795; #Angle of diffraction(degrees)\ntheeta1 = math.ceil(theeta1*10**2)/10**2; #rounding off the value of theeta1 to 2 decimals\ntheta2 = math.asin(n2*lamda/(2*d)); #Angle of diffraction(radians)\ntheeta2 = theta2*57.2957795; #Angle of diffraction(degrees)\ntheeta2 = math.ceil(theeta2*10**2)/10**2; #rounding off the value of theeta2 to 2 decimals\n\n#Result\nprint \"The angle of diffraction for first order maxima is\",theeta1, \"degrees\"\nprint \"The angle of diffraction for second order maxima is\",theeta2, \"degrees\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "lamda = 1.44; #Wavelength of X-rays(A)\n", + "d = 2.8; #Interplanar spacing of rocksalt crystal(A)\n", + "n1 = 1; #For 1st Order diffraction\n", + "n2 = 2; #For 2nd Order diffraction\n", + "\n", + "#Calculation\n", + "theta1 = math.asin(n1*lamda/(2*d)); #Angle of diffraction(radians)\n", + "theeta1 = theta1*57.2957795; #Angle of diffraction(degrees)\n", + "theeta1 = math.ceil(theeta1*10**2)/10**2; #rounding off the value of theeta1 to 2 decimals\n", + "theta2 = math.asin(n2*lamda/(2*d)); #Angle of diffraction(radians)\n", + "theeta2 = theta2*57.2957795; #Angle of diffraction(degrees)\n", + "theeta2 = math.ceil(theeta2*10**2)/10**2; #rounding off the value of theeta2 to 2 decimals\n", + "\n", + "#Result\n", + "print \"The angle of diffraction for first order maxima is\",theeta1, \"degrees\"\n", + "print \"The angle of diffraction for second order maxima is\",theeta2, \"degrees\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The angle of diffraction for first order maxima is 14.91 degrees\nThe angle of diffraction for second order maxima is 30.95 degrees\n" + "text": [ + "The angle of diffraction for first order maxima is 14.91 degrees\n", + "The angle of diffraction for second order maxima is 30.95 degrees\n" + ] } ], "prompt_number": 6 @@ -149,19 +299,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.8, Page number 136" + "source": [ + "Example number 6.8, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the percentage of actual volume occupied by the spheres\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\na = 1; #For convenience, assume interatomic spacing to be unity(m)\n\n#Calculation\nN = 8*(1/8) + 6*(1/2); #total number of spheres in a unit cell\nr = a/(2*math.sqrt(2)); #The atomic radius(m)\nV_atom = N*(4/3)*math.pi*r**3; #Volume of atoms(m**3)\nV_uc = a**3; #Volume of unit cell(m**3)\nPV = (V_atom/V_uc)*100; #percentage of actual volume\nPV = math.ceil(PV*10)/10; #rounding off the value of PV to 1 decimal\n\n#Result\nprint \"The percentage of actual volume occupied by the spheres in fcc structure is\",PV, \"percent\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "a = 1; #For convenience, assume interatomic spacing to be unity(m)\n", + "\n", + "#Calculation\n", + "N = 8*(1/8) + 6*(1/2); #total number of spheres in a unit cell\n", + "r = a/(2*math.sqrt(2)); #The atomic radius(m)\n", + "V_atom = N*(4/3)*math.pi*r**3; #Volume of atoms(m**3)\n", + "V_uc = a**3; #Volume of unit cell(m**3)\n", + "PV = (V_atom/V_uc)*100; #percentage of actual volume\n", + "PV = math.ceil(PV*10)/10; #rounding off the value of PV to 1 decimal\n", + "\n", + "#Result\n", + "print \"The percentage of actual volume occupied by the spheres in fcc structure is\",PV, \"percent\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The percentage of actual volume occupied by the spheres in fcc structure is 74.1 percent\n" + "text": [ + "The percentage of actual volume occupied by the spheres in fcc structure is 74.1 percent\n" + ] } ], "prompt_number": 7 @@ -170,19 +343,56 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.9, Page number 137" + "source": [ + "Example number 6.9, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the interplanar spacing, wavelength and angle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\n#For (221) planes\nh = 2; \nk = 2; \nl = 1; #Miller Indices for planes in a cubic crystal\na = 2.68; #Interatomic spacing(A)\nn1 = 1; #First Order of diffraction \nn2 = 2; #Second order of diffraction\ntheta1 = 8.5; #Glancing angle at which Bragg's reflection occurs(degrees)\n\n#Calculation\ntheta1 = theta1*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\na = a*10**-10; #Interatomic spacing(m)\nd = a/(h**2+k**2+l**2)**(1/2); #The interplanar spacing for cubic crystal(m)\nlamda = 2*d*math.sin(theta1)/n1; #Bragg's Law for wavelength of X-rays(m)\nlamda_A = lamda*10**10; #Bragg's Law for wavelength of X-rays(A)\nlamda_A = math.ceil(lamda_A*10**4)/10**4; #rounding off the value of lamda_A to 4 decimals\ntheta2 = math.asin(n2*lamda/(2*d)); #Angle at which second order Bragg reflection occurs(radians)\ntheta2 = theta2*57.2957795; #Angle at which second order Bragg reflection occurs(degrees)\ntheta2 = math.ceil(theta2*10)/10; #rounding off the value of theta2 to 1 decimal\n\n#Result\nprint \"The interplanar spacing between consecutive (221) planes is\",d, \"m\"\nprint \"The wavelength of X-rays is\",lamda_A, \"angstrom\"\nprint \"The angle at which second order Bragg reflection occurs is\",theta2, \"degrees\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#For (221) planes\n", + "h = 2; \n", + "k = 2; \n", + "l = 1; #Miller Indices for planes in a cubic crystal\n", + "a = 2.68; #Interatomic spacing(A)\n", + "n1 = 1; #First Order of diffraction \n", + "n2 = 2; #Second order of diffraction\n", + "theta1 = 8.5; #Glancing angle at which Bragg's reflection occurs(degrees)\n", + "\n", + "#Calculation\n", + "theta1 = theta1*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\n", + "a = a*10**-10; #Interatomic spacing(m)\n", + "d = a/(h**2+k**2+l**2)**(1/2); #The interplanar spacing for cubic crystal(m)\n", + "lamda = 2*d*math.sin(theta1)/n1; #Bragg's Law for wavelength of X-rays(m)\n", + "lamda_A = lamda*10**10; #Bragg's Law for wavelength of X-rays(A)\n", + "lamda_A = math.ceil(lamda_A*10**4)/10**4; #rounding off the value of lamda_A to 4 decimals\n", + "theta2 = math.asin(n2*lamda/(2*d)); #Angle at which second order Bragg reflection occurs(radians)\n", + "theta2 = theta2*57.2957795; #Angle at which second order Bragg reflection occurs(degrees)\n", + "theta2 = math.ceil(theta2*10)/10; #rounding off the value of theta2 to 1 decimal\n", + "\n", + "#Result\n", + "print \"The interplanar spacing between consecutive (221) planes is\",d, \"m\"\n", + "print \"The wavelength of X-rays is\",lamda_A, \"angstrom\"\n", + "print \"The angle at which second order Bragg reflection occurs is\",theta2, \"degrees\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The interplanar spacing between consecutive (221) planes is 8.93333333333e-11 m\nThe wavelength of X-rays is 0.2641 angstrom\nThe angle at which second order Bragg reflection occurs is 17.2 degrees\n" + "text": [ + "The interplanar spacing between consecutive (221) planes is 8.93333333333e-11 m\n", + "The wavelength of X-rays is 0.2641 angstrom\n", + "The angle at which second order Bragg reflection occurs is 17.2 degrees\n" + ] } ], "prompt_number": 9 @@ -191,19 +401,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.10, Page number 137" + "source": [ + "Example number 6.10, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lattice parameter for cubic crystal\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nh = 1; \nk = 1;\nl = 0; #Miller Indices for planes in a cubic crystal\nn = 1; #First Order of diffraction \ntheta = 25; #Glancing angle at which Bragg's reflection occurs(degrees)\nlamda = 0.7; #Wavelength of X-rays(A)\n\n#Calculation\ntheta = theta*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\nd = n*lamda/(2*math.sin(theta)); #Interplanar spacing of cubic crystal(A)\na = d*(h**2+k**2+l**2)**(1/2); #The lattice parameter for cubic crystal(A)\na = math.ceil(a*10**3)/10**3; #rounding off the value of a to 3 decimals\n\n#Result\nprint \"The lattice parameter for cubic crystal is\",a, \"angstrom\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 1; \n", + "k = 1;\n", + "l = 0; #Miller Indices for planes in a cubic crystal\n", + "n = 1; #First Order of diffraction \n", + "theta = 25; #Glancing angle at which Bragg's reflection occurs(degrees)\n", + "lamda = 0.7; #Wavelength of X-rays(A)\n", + "\n", + "#Calculation\n", + "theta = theta*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\n", + "d = n*lamda/(2*math.sin(theta)); #Interplanar spacing of cubic crystal(A)\n", + "a = d*(h**2+k**2+l**2)**(1/2); #The lattice parameter for cubic crystal(A)\n", + "a = math.ceil(a*10**3)/10**3; #rounding off the value of a to 3 decimals\n", + "\n", + "#Result\n", + "print \"The lattice parameter for cubic crystal is\",a, \"angstrom\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The lattice parameter for cubic crystal is 1.172 angstrom\n" + "text": [ + "The lattice parameter for cubic crystal is 1.172 angstrom\n" + ] } ], "prompt_number": 10 @@ -212,19 +448,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.11, Page number 138" + "source": [ + "Example number 6.11, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of X-rays and maximum possible order of diffraction\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nd = 0.31; #Interplanar spacing(nm)\nn = 1; #First Order of diffraction \ntheta = 9.25; #Glancing angle at which Bragg's reflection occurs(degrees)\ntheta_max = 90; #Maximum possible angle at which reflection can occur(degrees)\ntheta_max = theta_max*0.0174532925; #Maximum possible angle at which reflection can occur(radians)\n\n#Calculation\ntheta = theta*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\nlamda = 2*d*math.sin(theta)/n; #Wavelength of X-rays(nm) (Bragg's Law)\nlamda = math.ceil(lamda*10**5)/10**5; #rounding off the value of lamda to 5 decimals\nn = 2*d*math.sin(theta_max)/lamda; #Maximum possible order of diffraction\n\n#Result\nprint \"The wavelength of X-rays is\",lamda, \"nm\"\nprint \"The Maximum possible order of diffraction is\",round(n)", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d = 0.31; #Interplanar spacing(nm)\n", + "n = 1; #First Order of diffraction \n", + "theta = 9.25; #Glancing angle at which Bragg's reflection occurs(degrees)\n", + "theta_max = 90; #Maximum possible angle at which reflection can occur(degrees)\n", + "theta_max = theta_max*0.0174532925; #Maximum possible angle at which reflection can occur(radians)\n", + "\n", + "#Calculation\n", + "theta = theta*0.0174532925; #Glancing angle at which Bragg's reflection occurs(radians)\n", + "lamda = 2*d*math.sin(theta)/n; #Wavelength of X-rays(nm) (Bragg's Law)\n", + "lamda = math.ceil(lamda*10**5)/10**5; #rounding off the value of lamda to 5 decimals\n", + "n = 2*d*math.sin(theta_max)/lamda; #Maximum possible order of diffraction\n", + "\n", + "#Result\n", + "print \"The wavelength of X-rays is\",lamda, \"nm\"\n", + "print \"The Maximum possible order of diffraction is\",round(n)" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The wavelength of X-rays is 0.09967 nm\nThe Maximum possible order of diffraction is 6.0\n" + "text": [ + "The wavelength of X-rays is 0.09967 nm\n", + "The Maximum possible order of diffraction is 6.0\n" + ] } ], "prompt_number": 11 @@ -233,19 +496,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.12, Page number 138" + "source": [ + "Example number 6.12, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Bragg reflection angle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\n#For (110) planes\nh1 = 1;\nk1 = 1;\nl1 = 0; #Miller indices for (110) planes\nd_110 = 0.195; #Interplanar spacing between (110) planes(nm)\n#For (210) planes\nh2 = 2;\nk2 = 1; \nl2 = 0; #Miller indices for (110) planes\nn = 2; #Second Order of diffraction \nlamda = 0.071; #Wavelength of X-rays(nm)\n\n#Calculation\na = d_110*(h1**2 + k1**2 + l1**2)**(1/2); #Lattice parameter for bcc crystal(nm)\nd_210 = a/(h2**2 + k2**2 + l2**2)**(1/2); #Interplanar spacing between (210) planes(nm)\ntheta = math.asin(n*lamda/(2*d_210)); #Bragg reflection angle for the second order diffraction(radians)\ntheeta = theta*57.2957795; #Bragg reflection angle for the second order diffraction(degrees)\ntheeta = math.ceil(theeta*10**3)/10**3; #rounding off the value of theeta to 3 decimals\n\n#Result\nprint \"Bragg reflection angle for the second order diffraction is\",theeta, \"degrees\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "#For (110) planes\n", + "h1 = 1;\n", + "k1 = 1;\n", + "l1 = 0; #Miller indices for (110) planes\n", + "d_110 = 0.195; #Interplanar spacing between (110) planes(nm)\n", + "#For (210) planes\n", + "h2 = 2;\n", + "k2 = 1; \n", + "l2 = 0; #Miller indices for (110) planes\n", + "n = 2; #Second Order of diffraction \n", + "lamda = 0.071; #Wavelength of X-rays(nm)\n", + "\n", + "#Calculation\n", + "a = d_110*(h1**2 + k1**2 + l1**2)**(1/2); #Lattice parameter for bcc crystal(nm)\n", + "d_210 = a/(h2**2 + k2**2 + l2**2)**(1/2); #Interplanar spacing between (210) planes(nm)\n", + "theta = math.asin(n*lamda/(2*d_210)); #Bragg reflection angle for the second order diffraction(radians)\n", + "theeta = theta*57.2957795; #Bragg reflection angle for the second order diffraction(degrees)\n", + "theeta = math.ceil(theeta*10**3)/10**3; #rounding off the value of theeta to 3 decimals\n", + "\n", + "#Result\n", + "print \"Bragg reflection angle for the second order diffraction is\",theeta, \"degrees\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "Bragg reflection angle for the second order diffraction is 35.149 degrees\n" + "text": [ + "Bragg reflection angle for the second order diffraction is 35.149 degrees\n" + ] } ], "prompt_number": 12 @@ -254,19 +549,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.13, Page number 138" + "source": [ + "Example number 6.13, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the distance between nearest neighbours\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nd = 2182; #Density of rock salt(kg/m**3)\nn = 4; #Number of atoms per unit cell for an fcc lattice of NaCl crystal\nN = 6.02*10**26; #Avogadro's number(atoms/k-mol)\n\n#Calculation\nM = 23+35.5; #Molecular weight of NaCl(kg/k-mole)\n#V = a^3 = M*n/(N*d)\na = (n*M/(d*N))**(1/3); #Lattice constant of unit cell of NaCl(m)\nD = a/2; #distance between nearest neighbours(m)\nD = D*10**9; #distance between nearest neighbours(nm)\nD = math.ceil(D*10**4)/10**4; #rounding off the value of D to 4 decimals\n\n#Result\nprint \"The distance between nearest neighbours of NaCl structure is\",D, \"nm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "d = 2182; #Density of rock salt(kg/m**3)\n", + "n = 4; #Number of atoms per unit cell for an fcc lattice of NaCl crystal\n", + "N = 6.02*10**26; #Avogadro's number(atoms/k-mol)\n", + "\n", + "#Calculation\n", + "M = 23+35.5; #Molecular weight of NaCl(kg/k-mole)\n", + "#V = a^3 = M*n/(N*d)\n", + "a = (n*M/(d*N))**(1/3); #Lattice constant of unit cell of NaCl(m)\n", + "D = a/2; #distance between nearest neighbours(m)\n", + "D = D*10**9; #distance between nearest neighbours(nm)\n", + "D = math.ceil(D*10**4)/10**4; #rounding off the value of D to 4 decimals\n", + "\n", + "#Result\n", + "print \"The distance between nearest neighbours of NaCl structure is\",D, \"nm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The distance between nearest neighbours of NaCl structure is 0.2814 nm\n" + "text": [ + "The distance between nearest neighbours of NaCl structure is 0.2814 nm\n" + ] } ], "prompt_number": 13 @@ -275,19 +595,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.14, Page number 139" + "source": [ + "Example number 6.14, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the percentage change in volume\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nr1 = 1.258; #Atomic radius of bcc structure of iron(A)\nN1 = 2; #Number of atoms per unit cell in bcc structure\n#For fcc structure\nr2 = 1.292; #Atomic radius of fcc structure of iron(A)\nN2 = 4; #Number of atoms per unit cell in fcc structure\n\n#Calculation\na1 = 4*r1/math.sqrt(3); #Lattice parameter of bcc structure of iron(A)\nV1 = a1**3; #Volume of bcc unit cell(A)\nV_atom_bcc = V1/N1; #Volume occupied by one atom(A)\na2 = 2*math.sqrt(2)*r2; #Lattice parameter of fcc structure of iron(A)\nV2 = a2**3; #Volume of fcc unit cell(A)\nV_atom_fcc = V2/N2; #Volume occupied by one atom(A)\ndelta_V = (V_atom_bcc-V_atom_fcc)/V_atom_bcc*100; #Percentage change in volume due to structural change of iron\ndelta_V = math.ceil(delta_V*10**3)/10**3; #rounding off the value of delta_V to 3 decimals\n\n#Result\nprint \"The percentage change in volume of iron is\",delta_V, \"percent\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "r1 = 1.258; #Atomic radius of bcc structure of iron(A)\n", + "N1 = 2; #Number of atoms per unit cell in bcc structure\n", + "#For fcc structure\n", + "r2 = 1.292; #Atomic radius of fcc structure of iron(A)\n", + "N2 = 4; #Number of atoms per unit cell in fcc structure\n", + "\n", + "#Calculation\n", + "a1 = 4*r1/math.sqrt(3); #Lattice parameter of bcc structure of iron(A)\n", + "V1 = a1**3; #Volume of bcc unit cell(A)\n", + "V_atom_bcc = V1/N1; #Volume occupied by one atom(A)\n", + "a2 = 2*math.sqrt(2)*r2; #Lattice parameter of fcc structure of iron(A)\n", + "V2 = a2**3; #Volume of fcc unit cell(A)\n", + "V_atom_fcc = V2/N2; #Volume occupied by one atom(A)\n", + "delta_V = (V_atom_bcc-V_atom_fcc)/V_atom_bcc*100; #Percentage change in volume due to structural change of iron\n", + "delta_V = math.ceil(delta_V*10**3)/10**3; #rounding off the value of delta_V to 3 decimals\n", + "\n", + "#Result\n", + "print \"The percentage change in volume of iron is\",delta_V, \"percent\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The percentage change in volume of iron is 0.494 percent\n" + "text": [ + "The percentage change in volume of iron is 0.494 percent\n" + ] } ], "prompt_number": 15 @@ -295,7 +644,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter7_1.ipynb b/Engineering_Physics/Chapter7_1.ipynb index 5b1859d1..cd558c19 100644 --- a/Engineering_Physics/Chapter7_1.ipynb +++ b/Engineering_Physics/Chapter7_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter7" + "name": "", + "signature": "sha256:7187247d22d4e816cffb8e16cb739591c46b8ff453a1af7a76514de7cc4fae35" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,48 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "7: Superconductivity" + "source": [ + "7: Superconductivity" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.1, Page number 152" + "source": [ + "Example number 7.1, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical field\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nTc=3.722; #critical temperature(K)\nT=2; #temperature(K)\nBc_0=0.0305; #critical field(T)\n\n#Calculation\nBc_T=Bc_0*(1-(T/Tc)**2); #critical field at 2K(T)\nBc_T = math.ceil(Bc_T*10**4)/10**4; #rounding off the value of Bc_T to 4 decimals\n\n#Result\nprint \"The critical field at 2K is\",Bc_T, \"T\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=3.722; #critical temperature(K)\n", + "T=2; #temperature(K)\n", + "Bc_0=0.0305; #critical field(T)\n", + "\n", + "#Calculation\n", + "Bc_T=Bc_0*(1-(T/Tc)**2); #critical field at 2K(T)\n", + "Bc_T = math.ceil(Bc_T*10**4)/10**4; #rounding off the value of Bc_T to 4 decimals\n", + "\n", + "#Result\n", + "print \"The critical field at 2K is\",Bc_T, \"T\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The critical field at 2K is 0.0217 T\n" + "text": [ + "The critical field at 2K is 0.0217 T\n" + ] } ], "prompt_number": 1 @@ -38,19 +62,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.2, Page number 152" + "source": [ + "Example number 7.2, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the frequency of Josephson current\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nV = 1; #DC voltage applied across the Josephson junction(micro-volt)\ne = 1.6*10**-19; #Charge on an electron(C)\nh = 6.626*10**-34; #Planck's constant(Js)\n\n#Calculation\nV = V*10**-6; #DC voltage applied across the Josephson junction(V)\nf = 2*e*V/h; #Frequency of Josephson current(Hz)\nf = f*10**-6; #Frequency of Josephson current(MHz)\nf = math.ceil(f*10**2)/10**2; #rounding off the value of f to 2 decimals\n\n#Result\nprint \"The frequency of Josephson current is\",f, \"MHz\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "V = 1; #DC voltage applied across the Josephson junction(micro-volt)\n", + "e = 1.6*10**-19; #Charge on an electron(C)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "\n", + "#Calculation\n", + "V = V*10**-6; #DC voltage applied across the Josephson junction(V)\n", + "f = 2*e*V/h; #Frequency of Josephson current(Hz)\n", + "f = f*10**-6; #Frequency of Josephson current(MHz)\n", + "f = math.ceil(f*10**2)/10**2; #rounding off the value of f to 2 decimals\n", + "\n", + "#Result\n", + "print \"The frequency of Josephson current is\",f, \"MHz\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The frequency of Josephson current is 482.95 MHz\n" + "text": [ + "The frequency of Josephson current is 482.95 MHz\n" + ] } ], "prompt_number": 2 @@ -59,19 +106,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.3, Page number 152" + "source": [ + "Example number 7.3, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the superconducting energy gap\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nT_c = 0.517; #Critical temperature for cadmium(K)\nk = 1.38*10**-23; #Boltzmann constant(J/K)\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n\n#Calculation\nE_g = 3.5*k*T_c/e; #Superconducting energy gap at absolute zero(eV)\nE_g = E_g*10**4;\nE_g = math.ceil(E_g*10**3)/10**3; #rounding off the value of E_g to 3 decimals\n\n#Result\nprint \"The superconducting energy gap for Cd at absolute zero is\",E_g,\"*10**-4 eV\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T_c = 0.517; #Critical temperature for cadmium(K)\n", + "k = 1.38*10**-23; #Boltzmann constant(J/K)\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "\n", + "#Calculation\n", + "E_g = 3.5*k*T_c/e; #Superconducting energy gap at absolute zero(eV)\n", + "E_g = E_g*10**4;\n", + "E_g = math.ceil(E_g*10**3)/10**3; #rounding off the value of E_g to 3 decimals\n", + "\n", + "#Result\n", + "print \"The superconducting energy gap for Cd at absolute zero is\",E_g,\"*10**-4 eV\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The superconducting energy gap for Cd at absolute zero is 1.561 *10**-4 eV\n" + "text": [ + "The superconducting energy gap for Cd at absolute zero is 1.561 *10**-4 eV\n" + ] } ], "prompt_number": 8 @@ -80,19 +149,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.4, Page number 152" + "source": [ + "Example number 7.4, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of photon\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nc = 3*10**8; #Speed of light in free space(m/s)\nh = 6.626*10**-34; #Planck's constant(Js)\nE_g = 1.5*10**-4; #Superconducting energy gap for a material(eV)\n\n#Calculation\n#As E_g = h*new = h*c/lamda, solving for lambda\nlamda = h*c/(E_g*e); #Wavelength of photon to break up a Cooper-pair(m)\nlamda = lamda*10**3;\nlamda = math.ceil(lamda*10**3)/10**3; #rounding off the value of lamda to 3 decimals\n\n#Result\nprint \"The wavelength of photon to break up a Cooper-pair is\",lamda,\"*10**-3 m\"", + "input": [ + " \n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "c = 3*10**8; #Speed of light in free space(m/s)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "E_g = 1.5*10**-4; #Superconducting energy gap for a material(eV)\n", + "\n", + "#Calculation\n", + "#As E_g = h*new = h*c/lamda, solving for lambda\n", + "lamda = h*c/(E_g*e); #Wavelength of photon to break up a Cooper-pair(m)\n", + "lamda = lamda*10**3;\n", + "lamda = math.ceil(lamda*10**3)/10**3; #rounding off the value of lamda to 3 decimals\n", + "\n", + "#Result\n", + "print \"The wavelength of photon to break up a Cooper-pair is\",lamda,\"*10**-3 m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The wavelength of photon to break up a Cooper-pair is 8.283 *10**-3 m\n" + "text": [ + "The wavelength of photon to break up a Cooper-pair is 8.283 *10**-3 m\n" + ] } ], "prompt_number": 12 @@ -101,19 +193,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.5, Page number 153" + "source": [ + "Example number 7.5, Page number 153" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the London penetration depth of lead\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nlambda_0 = 37; #Penetration depth of lead at 0 kelvin(nm)\nT_c = 7.193; #Critical temperature of superconducting transition for lead(kelvin)\nT = 5.2; #Temperature at which penetration depth for lead becomes lambda_T(kelvin) \n\n#Calculation\nlambda_T = lambda_0*(1-(T/T_c)**4)**(-1/2); #Penetration depth of lead at 5.2 kelvin(nm)\nlambda_T = math.ceil(lambda_T*10)/10; #rounding off the value of lamda_T to 1 decimal\n\n#Result\nprint \"The penetration depth of lead is\",lambda_T, \"nm\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lambda_0 = 37; #Penetration depth of lead at 0 kelvin(nm)\n", + "T_c = 7.193; #Critical temperature of superconducting transition for lead(kelvin)\n", + "T = 5.2; #Temperature at which penetration depth for lead becomes lambda_T(kelvin) \n", + "\n", + "#Calculation\n", + "lambda_T = lambda_0*(1-(T/T_c)**4)**(-1/2); #Penetration depth of lead at 5.2 kelvin(nm)\n", + "lambda_T = math.ceil(lambda_T*10)/10; #rounding off the value of lamda_T to 1 decimal\n", + "\n", + "#Result\n", + "print \"The penetration depth of lead is\",lambda_T, \"nm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The penetration depth of lead is 43.4 nm\n" + "text": [ + "The penetration depth of lead is 43.4 nm\n" + ] } ], "prompt_number": 13 @@ -122,19 +235,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.6, Page number 153" + "source": [ + "Example number 7.6, Page number 153" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mass of isotope of mercury\n\n#importing modules\nfrom __future__ import division\nimport math\n\n#Variable declaration\nM1 = 199; #Mass of an isotope of mercury(amu)\nT_C1 = 4.185; #Transition temperature of the isoptope of Hg(K)\nT_C2 = 4.153; #Transition temperature of another isoptope of Hg(K)\nalpha = 0.5; #Isotope coefficient\n\n#Calculation\nM2 = M1*(T_C1/T_C2)**(1/alpha); #Mass of another isotope of mercury(amu)\nM2 = math.ceil(M2*100)/100; #rounding off the value of M2 to 2 decimals\n\n#Result\nprint \"The mass of another isotope of mercury is\",M2, \"amu\"", + "input": [ + " \n", + "#importing modules\n", + "from __future__ import division\n", + "import math\n", + "\n", + "#Variable declaration\n", + "M1 = 199; #Mass of an isotope of mercury(amu)\n", + "T_C1 = 4.185; #Transition temperature of the isoptope of Hg(K)\n", + "T_C2 = 4.153; #Transition temperature of another isoptope of Hg(K)\n", + "alpha = 0.5; #Isotope coefficient\n", + "\n", + "#Calculation\n", + "M2 = M1*(T_C1/T_C2)**(1/alpha); #Mass of another isotope of mercury(amu)\n", + "M2 = math.ceil(M2*100)/100; #rounding off the value of M2 to 2 decimals\n", + "\n", + "#Result\n", + "print \"The mass of another isotope of mercury is\",M2, \"amu\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The mass of another isotope of mercury is 202.08 amu\n" + "text": [ + "The mass of another isotope of mercury is 202.08 amu\n" + ] } ], "prompt_number": 16 @@ -142,7 +277,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter8_1.ipynb b/Engineering_Physics/Chapter8_1.ipynb index 8ec25fcf..809f0bc8 100644 --- a/Engineering_Physics/Chapter8_1.ipynb +++ b/Engineering_Physics/Chapter8_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter8" + "name": "", + "signature": "sha256:6cf74f56ec30435213713191af54de81cab98f4f30811b6d81fe0fb6a9021553" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "8: Special Theory of Relativity" + "source": [ + "8: Special Theory of Relativity" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.1, Page number 171" + "source": [ + "Example number 8.1, Page number 171" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the speed\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nL_0 = 1; #For simplicity, we assume classical length to be unity(m)\nc = 1; #For simplicity assume speed of light to be unity(m/s)\n\n#Calculation\nL = (1-1/100)*L_0; #Relativistic length(m)\n#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\nv = math.sqrt(1-(L/L_0)**2)*c; #Speed at which relativistic length is 1 percent of the classical length(m/s)\nv = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n\n#Result\nprint \"The speed at which relativistic length is 1 percent of the classical length is\",v, \"c\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "L_0 = 1; #For simplicity, we assume classical length to be unity(m)\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "\n", + "#Calculation\n", + "L = (1-1/100)*L_0; #Relativistic length(m)\n", + "#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\n", + "v = math.sqrt(1-(L/L_0)**2)*c; #Speed at which relativistic length is 1 percent of the classical length(m/s)\n", + "v = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n", + "\n", + "#Result\n", + "print \"The speed at which relativistic length is 1 percent of the classical length is\",v, \"c\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The speed at which relativistic length is 1 percent of the classical length is 0.1411 c\n" + "text": [ + "The speed at which relativistic length is 1 percent of the classical length is 0.1411 c\n" + ] } ], "prompt_number": 1 @@ -38,19 +63,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.2, Page number 171" + "source": [ + "Example number 8.2, Page number 171" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the proper lifetime of particle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\ndelta_t = 5*10**-6; #Mean lifetime of particles as observed in the lab frame(s)\n\n#Calculation\nv = 0.9*c; #Speed at which beam of particles travel(m/s)\ndelta_tau = delta_t*math.sqrt(1-(v/c)**2); #Proper lifetime of particle as per Time Dilation rule(s)\n\n#Result\nprint \"The proper lifetime of particle is\",delta_tau, \"s\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "delta_t = 5*10**-6; #Mean lifetime of particles as observed in the lab frame(s)\n", + "\n", + "#Calculation\n", + "v = 0.9*c; #Speed at which beam of particles travel(m/s)\n", + "delta_tau = delta_t*math.sqrt(1-(v/c)**2); #Proper lifetime of particle as per Time Dilation rule(s)\n", + "\n", + "#Result\n", + "print \"The proper lifetime of particle is\",delta_tau, \"s\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The proper lifetime of particle is 2.17944947177e-06 s\n" + "text": [ + "The proper lifetime of particle is 2.17944947177e-06 s\n" + ] } ], "prompt_number": 2 @@ -59,25 +104,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.3, Page number 171. theoritical proof" + "source": [ + "Example number 8.3, Page number 171. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.4, Page number 172" + "source": [ + "Example number 8.4, Page number 172" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the speed of second rocket for same and opposite direction\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\n\n#Calculation\nv = 0.6*c; #Speed with which the rocket leaves the earth(m/s)\nu_prime = 0.9*c; #Relative speed of second rocket w.r.t. the first rocket(m/s)\nu1 = (u_prime+v)/(1+(u_prime*v)/c**2); #Speed of second rocket for same direction of firing as per Velocity Addition Rule(m/s)\nu1 = math.ceil(u1*10**4)/10**4; #rounding off the value of u1 to 4 decimals\nu2 = (-u_prime+v)/(1-(u_prime*v)/c**2); #Speed of second rocket for opposite direction of firing as per Velocity Addition Rule(m/s)\nu2 = math.ceil(u2*10**4)/10**4; #rounding off the value of u2 to 4 decimals\n\n#Result\nprint \"The speed of second rocket for same direction of firing is\",u1,\"c\"\nprint \"The speed of second rocket for opposite direction of firing is\",u2,\"c\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "\n", + "#Calculation\n", + "v = 0.6*c; #Speed with which the rocket leaves the earth(m/s)\n", + "u_prime = 0.9*c; #Relative speed of second rocket w.r.t. the first rocket(m/s)\n", + "u1 = (u_prime+v)/(1+(u_prime*v)/c**2); #Speed of second rocket for same direction of firing as per Velocity Addition Rule(m/s)\n", + "u1 = math.ceil(u1*10**4)/10**4; #rounding off the value of u1 to 4 decimals\n", + "u2 = (-u_prime+v)/(1-(u_prime*v)/c**2); #Speed of second rocket for opposite direction of firing as per Velocity Addition Rule(m/s)\n", + "u2 = math.ceil(u2*10**4)/10**4; #rounding off the value of u2 to 4 decimals\n", + "\n", + "#Result\n", + "print \"The speed of second rocket for same direction of firing is\",u1,\"c\"\n", + "print \"The speed of second rocket for opposite direction of firing is\",u2,\"c\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The speed of second rocket for same direction of firing is 0.9741 c\nThe speed of second rocket for opposite direction of firing is -0.6521 c\n" + "text": [ + "The speed of second rocket for same direction of firing is 0.9741 c\n", + "The speed of second rocket for opposite direction of firing is -0.6521 c\n" + ] } ], "prompt_number": 4 @@ -86,19 +158,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.5, Page number 172" + "source": [ + "Example number 8.5, Page number 172" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the speed and time dilation of spaceship\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nL0 = 1; #For simplicity assume length in spaceship's frame to be unity(m)\ntau = 1; #Unit time in the spaceship's frame(s)\n\n#Calculation\nL = 1/2*L0; #Length as observed on earth(m)\n#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\nv = math.sqrt(1-(L/L0)**2)*c; #Speed at which length of spaceship is observed as half from the earth frame(m/s)\nt = tau/math.sqrt(1-(v/c)**2); #Time dilation of the spaceship's unit time(s)\nv = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n\n#Result\nprint \"The speed at which length of spaceship is observed as half from the earth frame is\",v, \"c\"\nprint \"The time dilation of the spaceship unit time is\",t,\"delta_tau\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "L0 = 1; #For simplicity assume length in spaceship's frame to be unity(m)\n", + "tau = 1; #Unit time in the spaceship's frame(s)\n", + "\n", + "#Calculation\n", + "L = 1/2*L0; #Length as observed on earth(m)\n", + "#Relativistic length contraction gives L = L_0*sqrt(1-v^2/c^2), solving for v\n", + "v = math.sqrt(1-(L/L0)**2)*c; #Speed at which length of spaceship is observed as half from the earth frame(m/s)\n", + "t = tau/math.sqrt(1-(v/c)**2); #Time dilation of the spaceship's unit time(s)\n", + "v = math.ceil(v*10**4)/10**4; #rounding off the value of v to 4 decimals\n", + "\n", + "#Result\n", + "print \"The speed at which length of spaceship is observed as half from the earth frame is\",v, \"c\"\n", + "print \"The time dilation of the spaceship unit time is\",t,\"delta_tau\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The speed at which length of spaceship is observed as half from the earth frame is 0.8661 c\nThe time dilation of the spaceship unit time is 2.0 delta_tau\n" + "text": [ + "The speed at which length of spaceship is observed as half from the earth frame is 0.8661 c\n", + "The time dilation of the spaceship unit time is 2.0 delta_tau\n" + ] } ], "prompt_number": 5 @@ -107,19 +205,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.6, Page number 172" + "source": [ + "Example number 8.6, Page number 172" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the time difference and distance between the events\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\nt1 = 2*10**-7; #Time for which first event occurs(s)\nt2 = 3*10**-7; #Time for which second event occurs(s)\nx1 = 10; #Position at which first event occurs(m)\nx2 = 40; #Position at which second event occurs(m)\n\n#Calculation\nv = 0.6*c; #Velocity with which S2 frame moves relative to S1 frame(m/s)\nL_factor = 1/math.sqrt(1-(v/c)**2); #Lorentz factor\ndelta_t = L_factor*(t2 - t1)+L_factor*v/c**2*(x1 - x2); #Time difference between the events(s)\ndelta_x = L_factor*(x2 - x1)-L_factor*v*(t2 - t1); #Distance between the events(m)\n\n#Result\nprint \"The time difference between the events is\",delta_t, \"s\" \nprint \"The distance between the events is\",delta_x, \"m\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "t1 = 2*10**-7; #Time for which first event occurs(s)\n", + "t2 = 3*10**-7; #Time for which second event occurs(s)\n", + "x1 = 10; #Position at which first event occurs(m)\n", + "x2 = 40; #Position at which second event occurs(m)\n", + "\n", + "#Calculation\n", + "v = 0.6*c; #Velocity with which S2 frame moves relative to S1 frame(m/s)\n", + "L_factor = 1/math.sqrt(1-(v/c)**2); #Lorentz factor\n", + "delta_t = L_factor*(t2 - t1)+L_factor*v/c**2*(x1 - x2); #Time difference between the events(s)\n", + "delta_x = L_factor*(x2 - x1)-L_factor*v*(t2 - t1); #Distance between the events(m)\n", + "\n", + "#Result\n", + "print \"The time difference between the events is\",delta_t, \"s\" \n", + "print \"The distance between the events is\",delta_x, \"m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The time difference between the events is 5e-08 s\nThe distance between the events is 15.0 m\n" + "text": [ + "The time difference between the events is 5e-08 s\n", + "The distance between the events is 15.0 m\n" + ] } ], "prompt_number": 6 @@ -128,19 +253,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.7, Page number 173" + "source": [ + "Example number 8.7, Page number 173" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the speed of the unstable particle\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\ntau = 2.6*10**-8; #Mean lifetime the particle in its own frame(s)\nd = 20; #Distance which the unstable particle travels before decaying(m)\n\n#Calculation\n#As t = d/v and also t = tau/sqrt(1-(v/c)^2), so that\n#d/v = tau/sqrt(1-(v/c)^2), solving for v\nv = math.sqrt(d**2/(tau**2+(d/c)**2)); #Speed of the unstable particle in lab frame(m/s)\nv = v/10**8;\nv = math.ceil(v*10)/10; #rounding off the value of v to 1 decimal\n\n#Result\nprint \"The speed of the unstable particle in lab frame is\",v,\"*10**8 m/s\"\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "tau = 2.6*10**-8; #Mean lifetime the particle in its own frame(s)\n", + "d = 20; #Distance which the unstable particle travels before decaying(m)\n", + "\n", + "#Calculation\n", + "#As t = d/v and also t = tau/sqrt(1-(v/c)^2), so that\n", + "#d/v = tau/sqrt(1-(v/c)^2), solving for v\n", + "v = math.sqrt(d**2/(tau**2+(d/c)**2)); #Speed of the unstable particle in lab frame(m/s)\n", + "v = v/10**8;\n", + "v = math.ceil(v*10)/10; #rounding off the value of v to 1 decimal\n", + "\n", + "#Result\n", + "print \"The speed of the unstable particle in lab frame is\",v,\"*10**8 m/s\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The speed of the unstable particle in lab frame is 2.8 *10**8 m/s\n" + "text": [ + "The speed of the unstable particle in lab frame is 2.8 *10**8 m/s\n" + ] } ], "prompt_number": 9 @@ -149,19 +298,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.8, Page number 174" + "source": [ + "Example number 8.8, Page number 174" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the speed, effective mass and kinetic energy of mu-meson\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nme = 1; #For simplicity assume mass of electron to be unity(kg)\ntau = 2.3*10**-6; #Average lifetime of mu-meson in rest frame(s)\nt = 6.9*10**-6; #Average lifetime of mu-meson in laboratory frame(s)\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nC = 3*10**8; #Speed of light in vacuum(m/s)\nm_e = 9.1*10**-31; #Mass of an electron(kg)\n\n#Calculation\n#Fromm Time Dilation Rule, tau = t*sqrt(1-(v/c)^2), solving for v\nv = c*math.sqrt(1-(tau/t)**2); #Speed of mu-meson in the laboratory frame(m/s)\nv = math.ceil(v*10**5)/10**5; #rounding off the value of v to 5 decimals\nm0 = 207*me; #Rest mass of mu-meson(kg)\nm = m0/math.sqrt(1-(v/c)**2); #Relativistic variation of mass with velocity(kg)\nm = math.ceil(m*10)/10; #rounding off the value of m to 1 decimal\nT = (m*m_e*C**2 - m0*m_e*C**2)/e; #Kinetic energy of mu-meson(eV)\nT = T*10**-6; #Kinetic energy of mu-meson(MeV)\nT = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n \n#Result\nprint \"The speed of mu-meson in the laboratory frame is\",v, \"c\"\nprint \"The effective mass of mu-meson is\",m, \"me\"\nprint \"The kinetic energy of mu-meson is\",T, \"MeV\"\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "me = 1; #For simplicity assume mass of electron to be unity(kg)\n", + "tau = 2.3*10**-6; #Average lifetime of mu-meson in rest frame(s)\n", + "t = 6.9*10**-6; #Average lifetime of mu-meson in laboratory frame(s)\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "C = 3*10**8; #Speed of light in vacuum(m/s)\n", + "m_e = 9.1*10**-31; #Mass of an electron(kg)\n", + "\n", + "#Calculation\n", + "#Fromm Time Dilation Rule, tau = t*sqrt(1-(v/c)^2), solving for v\n", + "v = c*math.sqrt(1-(tau/t)**2); #Speed of mu-meson in the laboratory frame(m/s)\n", + "v = math.ceil(v*10**5)/10**5; #rounding off the value of v to 5 decimals\n", + "m0 = 207*me; #Rest mass of mu-meson(kg)\n", + "m = m0/math.sqrt(1-(v/c)**2); #Relativistic variation of mass with velocity(kg)\n", + "m = math.ceil(m*10)/10; #rounding off the value of m to 1 decimal\n", + "T = (m*m_e*C**2 - m0*m_e*C**2)/e; #Kinetic energy of mu-meson(eV)\n", + "T = T*10**-6; #Kinetic energy of mu-meson(MeV)\n", + "T = math.ceil(T*100)/100; #rounding off the value of T to 2 decimals\n", + " \n", + "#Result\n", + "print \"The speed of mu-meson in the laboratory frame is\",v, \"c\"\n", + "print \"The effective mass of mu-meson is\",m, \"me\"\n", + "print \"The kinetic energy of mu-meson is\",T, \"MeV\"\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The speed of mu-meson in the laboratory frame is 0.94281 c\nThe effective mass of mu-meson is 621.1 me\nThe kinetic energy of mu-meson is 211.97 MeV\n" + "text": [ + "The speed of mu-meson in the laboratory frame is 0.94281 c\n", + "The effective mass of mu-meson is 621.1 me\n", + "The kinetic energy of mu-meson is 211.97 MeV\n" + ] } ], "prompt_number": 13 @@ -170,19 +355,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.9, Page number 174" + "source": [ + "Example number 8.9, Page number 174" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the speed of moving body\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nm0 = 1; #For simplicity assume rest mass to be unity(kg)\n\n#Calculation\nm = (20/100+1)*m0; #Mass in motion(kg)\n#As m = m0/sqrt(1-(u/c)^2), solving for u\nu = math.sqrt(1-(m0/m)**2)*c; #Speed of moving mass(m/s) \nu = math.ceil(u*10**3)/10**3; #rounding off the value of u to 3 decimals\n\n#Result\nprint \"The speed of moving body is\",u, \"c\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "m0 = 1; #For simplicity assume rest mass to be unity(kg)\n", + "\n", + "#Calculation\n", + "m = (20/100+1)*m0; #Mass in motion(kg)\n", + "#As m = m0/sqrt(1-(u/c)^2), solving for u\n", + "u = math.sqrt(1-(m0/m)**2)*c; #Speed of moving mass(m/s) \n", + "u = math.ceil(u*10**3)/10**3; #rounding off the value of u to 3 decimals\n", + "\n", + "#Result\n", + "print \"The speed of moving body is\",u, \"c\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The speed of moving body is 0.553 c\n" + "text": [ + "The speed of moving body is 0.553 c\n" + ] } ], "prompt_number": 14 @@ -191,19 +398,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.10, Page number 175" + "source": [ + "Example number 8.10, Page number 175" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the rate of decrease of mass\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\ndE = 4*10**26; #Energy radiated per second my the sun(J/s)\n\n#Calculation\ndm = dE/c**2; #Rate of decrease of mass of sun(kg/s)\ndm = dm/10**9;\ndm = math.ceil(dm*10**3)/10**3; #rounding off the value of dm to 3 decimals\n\n#Result\nprint \"The rate of decrease of mass of sun is\",dm,\"*10**9 kg/s\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "dE = 4*10**26; #Energy radiated per second my the sun(J/s)\n", + "\n", + "#Calculation\n", + "dm = dE/c**2; #Rate of decrease of mass of sun(kg/s)\n", + "dm = dm/10**9;\n", + "dm = math.ceil(dm*10**3)/10**3; #rounding off the value of dm to 3 decimals\n", + "\n", + "#Result\n", + "print \"The rate of decrease of mass of sun is\",dm,\"*10**9 kg/s\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The rate of decrease of mass of sun is 4.445 *10**9 kg/s\n" + "text": [ + "The rate of decrease of mass of sun is 4.445 *10**9 kg/s\n" + ] } ], "prompt_number": 18 @@ -212,19 +440,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.11, Page number 175" + "source": [ + "Example number 8.11, Page number 175" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the momentum and velocity of the electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 1; #For simplicity assume speed of light to be unity(m/s)\nm0 = 9.1*10**-31; #Mass of the electron(kg)\nE0 = 0.512; #Rest energy of electron(MeV)\nT = 10; #Kinetic energy of electron(MeV)\n\n#Calculation\nE = T + E0; #Total energy of electron(MeV)\n# From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for p\np = math.sqrt(E**2-m0**2*c**4)/c; #Momentum of the electron(MeV)\np = math.ceil(p*100)/100; #rounding off the value of p to 2 decimals\n#As E = E0/sqrt(1-(u/c)^2), solving for u\nu = math.sqrt(1-(E0/E)**2)*c; #Velocity of the electron(m/s)\nu = math.ceil(u*10**4)/10**4; #rounding off the value of u to 4 decimals\n\n#Result\nprint \"The momentum of the electron is\",p,\"/c MeV\"\nprint \"The velocity of the electron is\",u, \"c\"\n\n#answer for velocity given in the book is wrong", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 1; #For simplicity assume speed of light to be unity(m/s)\n", + "m0 = 9.1*10**-31; #Mass of the electron(kg)\n", + "E0 = 0.512; #Rest energy of electron(MeV)\n", + "T = 10; #Kinetic energy of electron(MeV)\n", + "\n", + "#Calculation\n", + "E = T + E0; #Total energy of electron(MeV)\n", + "# From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for p\n", + "p = math.sqrt(E**2-m0**2*c**4)/c; #Momentum of the electron(MeV)\n", + "p = math.ceil(p*100)/100; #rounding off the value of p to 2 decimals\n", + "#As E = E0/sqrt(1-(u/c)^2), solving for u\n", + "u = math.sqrt(1-(E0/E)**2)*c; #Velocity of the electron(m/s)\n", + "u = math.ceil(u*10**4)/10**4; #rounding off the value of u to 4 decimals\n", + "\n", + "#Result\n", + "print \"The momentum of the electron is\",p,\"/c MeV\"\n", + "print \"The velocity of the electron is\",u, \"c\"\n", + "\n", + "#answer for velocity given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The momentum of the electron is 10.52 /c MeV\nThe velocity of the electron is 0.9989 c\n" + "text": [ + "The momentum of the electron is 10.52 /c MeV\n", + "The velocity of the electron is 0.9989 c\n" + ] } ], "prompt_number": 19 @@ -233,25 +492,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.12, Page number 175. theoritical proof" + "source": [ + "Example number 8.12, Page number 175. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.13, Page number 176" + "source": [ + "Example number 8.13, Page number 176" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the rest mass of the body\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\nE = 4.5*10**17; #Total energy of object(J)\npx = 3.8*10**8; #X-component of momentum(kg-m/s)\npy = 3*10**8; #Y-component of momentum(kg-m/s)\npz = 3*10**8; #Z-component of momentum(kg-m/s)\n\n#Calculation\np = math.sqrt(px**2+py**2+pz**2); #Total momentum of the object(kg-m/s)\n#From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for m0\nm0 = math.sqrt(E**2/c**4 - p**2/c**2); #Rest mass of the body(kg)\nm0 = math.ceil(m0*100)/100; #rounding off the value of m0 to 2 decimals\n\n#Result\nprint \"The rest mass of the body is\",m0, \"kg\"", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "E = 4.5*10**17; #Total energy of object(J)\n", + "px = 3.8*10**8; #X-component of momentum(kg-m/s)\n", + "py = 3*10**8; #Y-component of momentum(kg-m/s)\n", + "pz = 3*10**8; #Z-component of momentum(kg-m/s)\n", + "\n", + "#Calculation\n", + "p = math.sqrt(px**2+py**2+pz**2); #Total momentum of the object(kg-m/s)\n", + "#From Relativistic mass-energy relation E^2 = c^2*p^2 + m0^2*c^4, solving for m0\n", + "m0 = math.sqrt(E**2/c**4 - p**2/c**2); #Rest mass of the body(kg)\n", + "m0 = math.ceil(m0*100)/100; #rounding off the value of m0 to 2 decimals\n", + "\n", + "#Result\n", + "print \"The rest mass of the body is\",m0, \"kg\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The rest mass of the body is 4.63 kg\n" + "text": [ + "The rest mass of the body is 4.63 kg\n" + ] } ], "prompt_number": 20 @@ -260,19 +546,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.14, Page number 176" + "source": [ + "Example number 8.14, Page number 176" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the momentum of the high speed probe\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light in vacuum(m/s)\nm = 50000; #Mass of high speed probe(kg)\n\n#Calculation\nu = 0.8*c; #Speed of the probe(m/s)\np = m*u/math.sqrt(1-(u/c)**2); #Momentum of the probe(kg-m/s)\n\n#Result\nprint \"The momentum of the high speed probe is\",p, \"kg-m/s\"", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "m = 50000; #Mass of high speed probe(kg)\n", + "\n", + "#Calculation\n", + "u = 0.8*c; #Speed of the probe(m/s)\n", + "p = m*u/math.sqrt(1-(u/c)**2); #Momentum of the probe(kg-m/s)\n", + "\n", + "#Result\n", + "print \"The momentum of the high speed probe is\",p, \"kg-m/s\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The momentum of the high speed probe is 2e+13 kg-m/s\n" + "text": [ + "The momentum of the high speed probe is 2e+13 kg-m/s\n" + ] } ], "prompt_number": 21 @@ -281,19 +587,55 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.15, Page number 177" + "source": [ + "Example number 8.15, Page number 177" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the change in mass, work done and accelerating potential\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Electronic charge, C = Energy equivalent of 1 eV(J/eV)\nm0 = 9.11*10**-31; #Rest mass of electron(kg)\nc = 3*10**8; #Speed of light in vacuum(m/s)\n\n#Calculation\nu1 = 0.98*c; #Inital speed of electron(m/s)\nu2 = 0.99*c; #Final speed of electron(m/s)\nm1 = m0/math.sqrt(1-(u1/c)**2); #Initial relativistic mass of electron(kg)\nm2 = m0/math.sqrt(1-(u2/c)**2); #Final relativistic mass of electron(kg)\ndm = m2 - m1; #Change in relativistic mass of the electron(kg)\nW = dm*c**2/e; #Work done on the electron to change its velocity(eV)\nW = W*10**-6; #Work done on the electron to change its velocity(MeV)\nW = math.ceil(W*100)/100; #rounding off the value of W to 2 decimals\n#As W = eV, V = accelerating potential, solving for V\nV = W*10**6; #Accelerating potential(volt)\nV = V/10**6;\n\n#Result\nprint \"The change in relativistic mass of the electron is\",dm, \"kg\"\nprint \"The work done on the electron to change its velocity is\",W, \"MeV\"\nprint \"The accelerating potential is\",V, \"*10**6 volt\"\n\n#answers given in the book are wrong", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Electronic charge, C = Energy equivalent of 1 eV(J/eV)\n", + "m0 = 9.11*10**-31; #Rest mass of electron(kg)\n", + "c = 3*10**8; #Speed of light in vacuum(m/s)\n", + "\n", + "#Calculation\n", + "u1 = 0.98*c; #Inital speed of electron(m/s)\n", + "u2 = 0.99*c; #Final speed of electron(m/s)\n", + "m1 = m0/math.sqrt(1-(u1/c)**2); #Initial relativistic mass of electron(kg)\n", + "m2 = m0/math.sqrt(1-(u2/c)**2); #Final relativistic mass of electron(kg)\n", + "dm = m2 - m1; #Change in relativistic mass of the electron(kg)\n", + "W = dm*c**2/e; #Work done on the electron to change its velocity(eV)\n", + "W = W*10**-6; #Work done on the electron to change its velocity(MeV)\n", + "W = math.ceil(W*100)/100; #rounding off the value of W to 2 decimals\n", + "#As W = eV, V = accelerating potential, solving for V\n", + "V = W*10**6; #Accelerating potential(volt)\n", + "V = V/10**6;\n", + "\n", + "#Result\n", + "print \"The change in relativistic mass of the electron is\",dm, \"kg\"\n", + "print \"The work done on the electron to change its velocity is\",W, \"MeV\"\n", + "print \"The accelerating potential is\",V, \"*10**6 volt\"\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The change in relativistic mass of the electron is 1.87996052912e-30 kg\nThe work done on the electron to change its velocity is 1.06 MeV\nThe accelerating potential is 1.06 *10**6 volt\n" + "text": [ + "The change in relativistic mass of the electron is 1.87996052912e-30 kg\n", + "The work done on the electron to change its velocity is 1.06 MeV\n", + "The accelerating potential is 1.06 *10**6 volt\n" + ] } ], "prompt_number": 24 @@ -301,7 +643,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter9_1.ipynb b/Engineering_Physics/Chapter9_1.ipynb index 50e4b6bd..bea06702 100644 --- a/Engineering_Physics/Chapter9_1.ipynb +++ b/Engineering_Physics/Chapter9_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter9" + "name": "", + "signature": "sha256:1c769d85a6ecede1e3083e9252f10446216c71537365688b1cba3c5693bdfee6" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,45 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "9: Quantum Mechanics" + "source": [ + "9: Quantum Mechanics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.1, Page number 202" + "source": [ + "Example number 9.1, Page number 202" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the De-Broglie wavelength of electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nV = 100; #Accelerating potential for electron(volt)\n\n#Calculation\nlamda = math.sqrt(150/V)*10**-10; #de-Broglie wavelength of electron(m)\n\n#Result\nprint \"The De-Broglie wavelength of electron is\",lamda, \"m\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V = 100; #Accelerating potential for electron(volt)\n", + "\n", + "#Calculation\n", + "lamda = math.sqrt(150/V)*10**-10; #de-Broglie wavelength of electron(m)\n", + "\n", + "#Result\n", + "print \"The De-Broglie wavelength of electron is\",lamda, \"m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The De-Broglie wavelength of electron is 1.22474487139e-10 m\n" + "text": [ + "The De-Broglie wavelength of electron is 1.22474487139e-10 m\n" + ] } ], "prompt_number": 1 @@ -38,19 +59,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.2, Page number 203" + "source": [ + "Example number 9.2, Page number 203" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the De-Broglie wavelength of electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nh = 6.626*10**-34; #Planck's constant(Js)\nm = 9.11*10**-31; #Mass of the electron(kg)\nEk = 10; #Kinetic energy of electron(eV)\n\n#Calculation\np = math.sqrt(2*m*Ek*e); #Momentum of the electron(kg-m/s)\nlamda = h/p ; #de-Broglie wavelength of electron from De-Broglie relation(m)\nlamda = lamda*10**9; #de-Broglie wavelength of electron from De-Broglie relation(nm)\nlamda = math.ceil(lamda*10**2)/10**2; #rounding off the value of lamda to 2 decimals\n\n#Result\nprint \"The de-Broglie wavelength of electron is\",lamda, \"nm\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "m = 9.11*10**-31; #Mass of the electron(kg)\n", + "Ek = 10; #Kinetic energy of electron(eV)\n", + "\n", + "#Calculation\n", + "p = math.sqrt(2*m*Ek*e); #Momentum of the electron(kg-m/s)\n", + "lamda = h/p ; #de-Broglie wavelength of electron from De-Broglie relation(m)\n", + "lamda = lamda*10**9; #de-Broglie wavelength of electron from De-Broglie relation(nm)\n", + "lamda = math.ceil(lamda*10**2)/10**2; #rounding off the value of lamda to 2 decimals\n", + "\n", + "#Result\n", + "print \"The de-Broglie wavelength of electron is\",lamda, \"nm\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The de-Broglie wavelength of electron is 0.39 nm\n" + "text": [ + "The de-Broglie wavelength of electron is 0.39 nm\n" + ] } ], "prompt_number": 2 @@ -59,25 +104,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.3, Page number 203. theoritical proof" + "source": [ + "Example number 9.3, Page number 203. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.4, Page number 203" + "source": [ + "Example number 9.4, Page number 203" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the uncertainty in position of electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nh = 6.626*10**-34; #Planck's constant(Js)\nm = 9.11*10**-31; #Mass of the electron(kg)\nv = 1.1*10**6; #Speed of the electron(m/s)\npr = 0.1; #precision in percent\n\n#Calculation\np = m*v; #Momentum of the electron(kg-m/s)\ndp = pr/100*p; #Uncertainty in momentum(kg-m/s)\nh_bar = h/(2*math.pi); #Reduced Planck's constant(Js)\ndx = h_bar/(2*dp); #Uncertainty in position(m)\n\n#Result\nprint \"The uncertainty in position of electron is\",dx, \"m\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "m = 9.11*10**-31; #Mass of the electron(kg)\n", + "v = 1.1*10**6; #Speed of the electron(m/s)\n", + "pr = 0.1; #precision in percent\n", + "\n", + "#Calculation\n", + "p = m*v; #Momentum of the electron(kg-m/s)\n", + "dp = pr/100*p; #Uncertainty in momentum(kg-m/s)\n", + "h_bar = h/(2*math.pi); #Reduced Planck's constant(Js)\n", + "dx = h_bar/(2*dp); #Uncertainty in position(m)\n", + "\n", + "#Result\n", + "print \"The uncertainty in position of electron is\",dx, \"m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The uncertainty in position of electron is 5.26175358211e-08 m\n" + "text": [ + "The uncertainty in position of electron is 5.26175358211e-08 m\n" + ] } ], "prompt_number": 3 @@ -86,19 +157,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.5, Page number 203" + "source": [ + "Example number 9.5, Page number 203" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the uncertainty in energy of the excited state\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\ne = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\nh = 6.626*10**-34; #Planck's constant(Js)\ndt = 10**-8; #Uncertainty in time(s)\n\n#Calculation\nh_bar = h/(2*math.pi); #Reduced Planck's constant(Js)\ndE = h_bar/(2*dt*e); #Uncertainty in energy of the excited state(m)\n\n#Result\nprint \"The uncertainty in energy of the excited state is\",dE, \"eV\"\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e = 1.6*10**-19; #Energy equivalent of 1 eV(J/eV)\n", + "h = 6.626*10**-34; #Planck's constant(Js)\n", + "dt = 10**-8; #Uncertainty in time(s)\n", + "\n", + "#Calculation\n", + "h_bar = h/(2*math.pi); #Reduced Planck's constant(Js)\n", + "dE = h_bar/(2*dt*e); #Uncertainty in energy of the excited state(m)\n", + "\n", + "#Result\n", + "print \"The uncertainty in energy of the excited state is\",dE, \"eV\"\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The uncertainty in energy of the excited state is 3.2955020404e-08 eV\n" + "text": [ + "The uncertainty in energy of the excited state is 3.2955020404e-08 eV\n" + ] } ], "prompt_number": 4 @@ -107,19 +201,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.6, Page number 204" + "source": [ + "Example number 9.6, Page number 204" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the width of spectral line\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nc = 3*10**8; #Speed of light(m/s)\ndt = 10**-8; #Average lifetime(s)\nlamda = 400; #Wavelength of spectral line(nm)\n\n#Calculation\nlamda = lamda*10**-9; #Wavelength of spectral line(m)\n#From Heisenberg uncertainty principle,\n#dE = h_bar/(2*dt) and also dE = h*c/lambda^2*d_lambda, which give\n#h_bar/(2*dt) = h*c/lambda^2*d_lambda, solving for d_lambda\nd_lamda = (lamda**2)/(4*math.pi*c*dt); #Width of spectral line(m)\n\n#Result\nprint \"The width of spectral line is\",d_lamda, \"m\"", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "c = 3*10**8; #Speed of light(m/s)\n", + "dt = 10**-8; #Average lifetime(s)\n", + "lamda = 400; #Wavelength of spectral line(nm)\n", + "\n", + "#Calculation\n", + "lamda = lamda*10**-9; #Wavelength of spectral line(m)\n", + "#From Heisenberg uncertainty principle,\n", + "#dE = h_bar/(2*dt) and also dE = h*c/lambda^2*d_lambda, which give\n", + "#h_bar/(2*dt) = h*c/lambda^2*d_lambda, solving for d_lambda\n", + "d_lamda = (lamda**2)/(4*math.pi*c*dt); #Width of spectral line(m)\n", + "\n", + "#Result\n", + "print \"The width of spectral line is\",d_lamda, \"m\"" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The width of spectral line is 4.24413181578e-15 m\n" + "text": [ + "The width of spectral line is 4.24413181578e-15 m\n" + ] } ], "prompt_number": 5 @@ -128,61 +246,98 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.7, Page number 204. theoritical proof" + "source": [ + "Example number 9.7, Page number 204. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.8, Page number 204. theoritical proof" + "source": [ + "Example number 9.8, Page number 204. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.9, Page number 205. theoritical proof" + "source": [ + "Example number 9.9, Page number 205. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.10, Page number 205. theoritical proof" + "source": [ + "Example number 9.10, Page number 205. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.11, Page number 205. theoritical proof" + "source": [ + "Example number 9.11, Page number 205. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.12, Page number 206. theoritical proof" + "source": [ + "Example number 9.12, Page number 206. theoritical proof" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.13, Page number 206. theoritical proof " + "source": [ + "Example number 9.13, Page number 206. theoritical proof " + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.14, Page number 207" + "source": [ + "Example number 9.14, Page number 207" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of finding the electron\n\n#importing modules\nimport math\nfrom __future__ import division\nfrom scipy.integrate import quad\n\n#Variable declaration\na = 2*10**-10; # Width of 1D box(m)\nx1=0; # Position of first extreme of the box(m)\nx2=1*10**-10; # Position of second extreme of the box(m)\n\n#Calculation\ndef intg(x):\n return ((2/a)*(math.sin(2*math.pi*x/a))**2)\nS=quad(intg,x1,x2)[0]\n\n#Result\nprint \"The probability of finding the electron between x = 0 and x = 10**-10 is\",S", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "from scipy.integrate import quad\n", + "\n", + "#Variable declaration\n", + "a = 2*10**-10; # Width of 1D box(m)\n", + "x1=0; # Position of first extreme of the box(m)\n", + "x2=1*10**-10; # Position of second extreme of the box(m)\n", + "\n", + "#Calculation\n", + "def intg(x):\n", + " return ((2/a)*(math.sin(2*math.pi*x/a))**2)\n", + "S=quad(intg,x1,x2)[0]\n", + "\n", + "#Result\n", + "print \"The probability of finding the electron between x = 0 and x = 10**-10 is\",S" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "The probability of finding the electron between x = 0 and x = 10**-10 is 0.5\n" + "text": [ + "The probability of finding the electron between x = 0 and x = 10**-10 is 0.5\n" + ] } ], "prompt_number": 7 @@ -190,7 +345,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_1.ipynb b/Engineering_Physics/Chapter_1.ipynb index 4392ba50..080a49e2 100644 --- a/Engineering_Physics/Chapter_1.ipynb +++ b/Engineering_Physics/Chapter_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 1" + "name": "", + "signature": "sha256:f155f4255421e223741f26abb6caa1287b63505ee5f432c40968d5b5ff6fb505" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Ultrasonics" + "source": [ + "Ultrasonics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.1, Page number 28 " + "source": [ + "Example number 1.1, Page number 28 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fundamental frequency of vibration\n\n#importing modules\nimport math\n\n#Variable declaration\nt=0.15*10**-2; #thickness of the quartz crystal in m\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nx=math.sqrt(Y/rho);\nf=x/(2*t);\nf=f*10**-6; #converting f from Hz to MHz\nf=math.ceil(f*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"fundamental frequency of vibration in MHz is\",f);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "t=0.15*10**-2; #thickness of the quartz crystal in m\n", + "Y=7.9*10**10; #young's modulus of quartz in N/m^2\n", + "rho=2650; #density of quartz in kg/m^3\n", + "\n", + "#Calculation\n", + "x=math.sqrt(Y/rho);\n", + "f=x/(2*t);\n", + "f=f*10**-6; #converting f from Hz to MHz\n", + "f=math.ceil(f*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"fundamental frequency of vibration in MHz is\",f);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fundamental frequency of vibration in MHz is', 1.819992)\n" + "text": [ + "('fundamental frequency of vibration in MHz is', 1.819992)\n" + ] } ], "prompt_number": 2 @@ -38,19 +63,56 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.2, Page number 28 " + "source": [ + "Example number 1.2, Page number 28 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fundamental frequency and the first overtone\n\n#importing modules\nimport math\n\n#Variable declaration\nt=1e-03; #thickness of the quartz crystal in m\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nx=math.sqrt(Y/rho);\np1=1; #for fundamental frequency p=1\nf1=(p1*x)/(2*t);\nF1=f1/10**6;\nF1=math.ceil(F1*10**5)/10**5; #rounding off to 5 decimals\nf_1=f1*10**-6; #converting f1 from Hz to MHz\nf_1=math.ceil(f_1*10**5)/10**5; #rounding off to 5 decimals\np2=2; #for first overtone p=2\nf2=(p2*x)/(2*t);\nF2=f2/10**6;\nF2=math.ceil(F2*10**5)/10**5; #rounding off to 5 decimals\nf_2=f2*10**-6; #converting f2 from Hz to MHz\nf_2=math.ceil(f_2*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"fundamental frequency in Hz is\",F1,\"*10**6\");\nprint(\"fundamental frequency in MHz is\",f_1);\nprint(\"frequency of the first overtone in Hz is\",F2,\"*10**6\");\nprint(\"frequency of the first overtone in MHz is\",f_2);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "t=1e-03; #thickness of the quartz crystal in m\n", + "Y=7.9*10**10; #young's modulus of quartz in N/m^2\n", + "rho=2650; #density of quartz in kg/m^3\n", + "\n", + "#Calculation\n", + "x=math.sqrt(Y/rho);\n", + "p1=1; #for fundamental frequency p=1\n", + "f1=(p1*x)/(2*t);\n", + "F1=f1/10**6;\n", + "F1=math.ceil(F1*10**5)/10**5; #rounding off to 5 decimals\n", + "f_1=f1*10**-6; #converting f1 from Hz to MHz\n", + "f_1=math.ceil(f_1*10**5)/10**5; #rounding off to 5 decimals\n", + "p2=2; #for first overtone p=2\n", + "f2=(p2*x)/(2*t);\n", + "F2=f2/10**6;\n", + "F2=math.ceil(F2*10**5)/10**5; #rounding off to 5 decimals\n", + "f_2=f2*10**-6; #converting f2 from Hz to MHz\n", + "f_2=math.ceil(f_2*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"fundamental frequency in Hz is\",F1,\"*10**6\");\n", + "print(\"fundamental frequency in MHz is\",f_1);\n", + "print(\"frequency of the first overtone in Hz is\",F2,\"*10**6\");\n", + "print(\"frequency of the first overtone in MHz is\",f_2);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fundamental frequency in Hz is', 2.72999, '*10**6')\n('fundamental frequency in MHz is', 2.72999)\n('frequency of the first overtone in Hz is', 5.45998, '*10**6')\n('frequency of the first overtone in MHz is', 5.45998)\n" + "text": [ + "('fundamental frequency in Hz is', 2.72999, '*10**6')\n", + "('fundamental frequency in MHz is', 2.72999)\n", + "('frequency of the first overtone in Hz is', 5.45998, '*10**6')\n", + "('frequency of the first overtone in MHz is', 5.45998)\n" + ] } ], "prompt_number": 1 @@ -59,19 +121,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.3, Page number 29 " + "source": [ + "Example number 1.3, Page number 29 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the velocity of ultrasonic wave\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda=589.3*10**-9; #wavelength of light in m\nf=100*10**6; #frequency of ultrasonic transducer in Hz\nn=1; #order of diffraction\ntheta=2.25; #angle of diffraction in degrees\ntheta=theta*0.0174532925; #converting degrees to radians\n\n#Calculation\nd=(n*lamda)/(2*math.sin(theta));\nd1=d*10**6; #converting d from m to micro m\nlamda1=2*d;\nv=f*lamda1;\nv=math.ceil(v*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"wavelength of ultrasonic wave in m is\",lamda1);\nprint(\"velocity of ultrasonic wave in m/sec\",int(v));", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda=589.3*10**-9; #wavelength of light in m\n", + "f=100*10**6; #frequency of ultrasonic transducer in Hz\n", + "n=1; #order of diffraction\n", + "theta=2.25; #angle of diffraction in degrees\n", + "theta=theta*0.0174532925; #converting degrees to radians\n", + "\n", + "#Calculation\n", + "d=(n*lamda)/(2*math.sin(theta));\n", + "d1=d*10**6; #converting d from m to micro m\n", + "lamda1=2*d;\n", + "v=f*lamda1;\n", + "v=math.ceil(v*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"wavelength of ultrasonic wave in m is\",lamda1);\n", + "print(\"velocity of ultrasonic wave in m/sec\",int(v));" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('wavelength of ultrasonic wave in m is', 1.5010258944908707e-05)\n('velocity of ultrasonic wave in m/sec', 1501)\n" + "text": [ + "('wavelength of ultrasonic wave in m is', 1.5010258944908707e-05)\n", + "('velocity of ultrasonic wave in m/sec', 1501)\n" + ] } ], "prompt_number": 19 @@ -80,19 +169,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.4, Page number 29 " + "source": [ + "Example number 1.4, Page number 29 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Doppler shifted frequency\n\n#importing modules\nimport math\n\n#Variable declaration\nf=2*10**6; #frequency of transducer in MHz\nv=3; #speed of blood in m/s\nc=800; #velocity of ultrasonic wave in m/s\ntheta=30; #angle of inclination in degrees\ntheta=theta*0.0174532925; #converting degrees to radians\n\n#Calculation\ndeltaf=(2*f*v*math.cos(theta))/c;\ndeltaf=deltaf*10**-6; #converting deltaf from Hz to MHz\ndeltaf=math.ceil(deltaf*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"doppler shifted frequency in MHz is\",deltaf);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "f=2*10**6; #frequency of transducer in MHz\n", + "v=3; #speed of blood in m/s\n", + "c=800; #velocity of ultrasonic wave in m/s\n", + "theta=30; #angle of inclination in degrees\n", + "theta=theta*0.0174532925; #converting degrees to radians\n", + "\n", + "#Calculation\n", + "deltaf=(2*f*v*math.cos(theta))/c;\n", + "deltaf=deltaf*10**-6; #converting deltaf from Hz to MHz\n", + "deltaf=math.ceil(deltaf*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"doppler shifted frequency in MHz is\",deltaf);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('doppler shifted frequency in MHz is', 0.012991)\n" + "text": [ + "('doppler shifted frequency in MHz is', 0.012991)\n" + ] } ], "prompt_number": 20 @@ -101,19 +213,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.5, Page number 30 " + "source": [ + "Example number 1.5, Page number 30 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the velocity of ultrasonic wave\n\n#importing modules\nimport math\n\n#Variable declaration\nY=7.9*10**10; #young's modulus of quartz in N/m^2\nrho=2650; #density of quartz in kg/m^3\n\n#Calculation\nv=math.sqrt(Y/rho);\nv=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"velocity of ultrasonic waves in m/s is\",v);\n", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "Y=7.9*10**10; #young's modulus of quartz in N/m^2\n", + "rho=2650; #density of quartz in kg/m^3\n", + "\n", + "#Calculation\n", + "v=math.sqrt(Y/rho);\n", + "v=math.ceil(v*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"velocity of ultrasonic waves in m/s is\",v);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('velocity of ultrasonic waves in m/s is', 5459.975)\n" + "text": [ + "('velocity of ultrasonic waves in m/s is', 5459.975)\n" + ] } ], "prompt_number": 21 @@ -121,7 +251,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_10.ipynb b/Engineering_Physics/Chapter_10.ipynb index d1968a2f..22ab6eae 100644 --- a/Engineering_Physics/Chapter_10.ipynb +++ b/Engineering_Physics/Chapter_10.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 10" + "name": "", + "signature": "sha256:d58d66ad9738120c070e76177ecbb4c809f35b6cd83a911351fcdee8be9798f2" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Magnetic materials" + "source": [ + "Magnetic materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.1, Page number 305" + "source": [ + "Example number 10.1, Page number 305" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the intensity of magnetisation and flux density\n\n#importing modules\nimport math\n\n#Variable declaration\nH=10**6; #magnetic field strength in A/m\nchi=0.5*10**-5; #magnetic susceptibility\n\n#Calculation\nmew0=4*math.pi*10**-7;\nM=chi*H;\nB=mew0*(M+H);\nB=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"intensity of magnetisation in A/m is\",M);\nprint(\"flux density in Wb/m^2 is\",B);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "H=10**6; #magnetic field strength in A/m\n", + "chi=0.5*10**-5; #magnetic susceptibility\n", + "\n", + "#Calculation\n", + "mew0=4*math.pi*10**-7;\n", + "M=chi*H;\n", + "B=mew0*(M+H);\n", + "B=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"intensity of magnetisation in A/m is\",M);\n", + "print(\"flux density in Wb/m^2 is\",B);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intensity of magnetisation in A/m is', 5.0)\n('flux density in Wb/m^2 is', 1.257)\n" + "text": [ + "('intensity of magnetisation in A/m is', 5.0)\n", + "('flux density in Wb/m^2 is', 1.257)\n" + ] } ], "prompt_number": 1 @@ -38,19 +64,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.2, Page number 306" + "source": [ + "Example number 10.2, Page number 306" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetic moment\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**23; #avagadro number\nmew0=4*math.pi*10**-7;\nw=58.7; #atomic weight of Ni\nB=0.65; #saturation magnetic induction in Wb/m^2\nrho=8906; #density in kg/m^3\n\n#Calculation\nrho=rho*10**3; #converting into gm/m^3\nN=(rho*A)/w;\nmew_m=B/(N*mew0);\n#mew_m/(9.27*10^-24) gives mew_m in mewB\nmew_m=mew_m/(9.27*10**-24);\nmew_m=math.ceil(mew_m*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"magnetic moment of Ni is\",mew_m,\"mew_b\");\n#that is mew_m=0.61 mew_b", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**23; #avagadro number\n", + "mew0=4*math.pi*10**-7;\n", + "w=58.7; #atomic weight of Ni\n", + "B=0.65; #saturation magnetic induction in Wb/m^2\n", + "rho=8906; #density in kg/m^3\n", + "\n", + "#Calculation\n", + "rho=rho*10**3; #converting into gm/m^3\n", + "N=(rho*A)/w;\n", + "mew_m=B/(N*mew0);\n", + "#mew_m/(9.27*10^-24) gives mew_m in mewB\n", + "mew_m=mew_m/(9.27*10**-24);\n", + "mew_m=math.ceil(mew_m*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic moment of Ni is\",mew_m,\"mew_b\");\n", + "#that is mew_m=0.61 mew_b" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic moment of Ni is', 0.611, 'mew_b')\n" + "text": [ + "('magnetic moment of Ni is', 0.611, 'mew_b')\n" + ] } ], "prompt_number": 5 @@ -59,19 +112,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.3, Page number 306" + "source": [ + "Example number 10.3, Page number 306" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the permeability\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0=4*math.pi*10**-7;\nH=1800; #magnetic field in A/m\nphi=3*10**-5; #magnetic flux in Wb\nA=0.2; #area of cross section in cm^2\n\n#Calculation\nA=A*10**-4; #area in m^2\nB=phi/A;\nmew_r=B/(mew_0*H);\nmew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"permeability of material is\",mew_r);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0=4*math.pi*10**-7;\n", + "H=1800; #magnetic field in A/m\n", + "phi=3*10**-5; #magnetic flux in Wb\n", + "A=0.2; #area of cross section in cm^2\n", + "\n", + "#Calculation\n", + "A=A*10**-4; #area in m^2\n", + "B=phi/A;\n", + "mew_r=B/(mew_0*H);\n", + "mew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"permeability of material is\",mew_r);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('permeability of material is', 663.146)\n" + "text": [ + "('permeability of material is', 663.146)\n" + ] } ], "prompt_number": 6 @@ -80,19 +156,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.4, Page number 307" + "source": [ + "Example number 10.4, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the saturation magnetisation \n\n#importing modules\nimport math\n\n#Variable declaration\nmew=18.4; #magnetic moment in mew_b\na=0.835; #lattice parameter in nm\n\n#Calculation\nmew=mew*9.27*10**-24;\na=a*10**-9; #converting nm to m\nV=a**3;\nM=mew/V;\nM=M/10**5;\nM=math.ceil(M*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"saturation magnetisation in A/m is\",M,\"*10**5\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew=18.4; #magnetic moment in mew_b\n", + "a=0.835; #lattice parameter in nm\n", + "\n", + "#Calculation\n", + "mew=mew*9.27*10**-24;\n", + "a=a*10**-9; #converting nm to m\n", + "V=a**3;\n", + "M=mew/V;\n", + "M=M/10**5;\n", + "M=math.ceil(M*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"saturation magnetisation in A/m is\",M,\"*10**5\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('saturation magnetisation in A/m is', 2.9299, '*10**5')\n" + "text": [ + "('saturation magnetisation in A/m is', 2.9299, '*10**5')\n" + ] } ], "prompt_number": 8 @@ -101,19 +200,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.5, Page number 307" + "source": [ + "Example number 10.5, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the value of B and M\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0=4*math.pi*10**-7;\nH=2*10**5; #magnetic field strength in A/m\nmew_r=1.01; #relative permeability\n\n#Calculation\nB=mew_0*mew_r*H;\nB=math.ceil(B*10**5)/10**5; #rounding off to 3 decimals\nM=(B/mew_0)-H;\nM=math.ceil(M*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"magnetic flux density in Wb/m^2 is\",B);\nprint(\"magnetisation in A/m is\",M);\n\n#answer for magnetisation given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0=4*math.pi*10**-7;\n", + "H=2*10**5; #magnetic field strength in A/m\n", + "mew_r=1.01; #relative permeability\n", + "\n", + "#Calculation\n", + "B=mew_0*mew_r*H;\n", + "B=math.ceil(B*10**5)/10**5; #rounding off to 3 decimals\n", + "M=(B/mew_0)-H;\n", + "M=math.ceil(M*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic flux density in Wb/m^2 is\",B);\n", + "print(\"magnetisation in A/m is\",M);\n", + "\n", + "#answer for magnetisation given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic flux density in Wb/m^2 is', 0.25385)\n('magnetisation in A/m is', 2007.42)\n" + "text": [ + "('magnetic flux density in Wb/m^2 is', 0.25385)\n", + "('magnetisation in A/m is', 2007.42)\n" + ] } ], "prompt_number": 9 @@ -122,19 +247,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 10.6, Page number 307" + "source": [ + "Example number 10.6, Page number 307" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the magnetic flux density\n\n#importing modules\nimport math\n\n#Variable declaration\nmew_0=4*math.pi*10**-7;\nH=500; #magnetic field strength in A/m\nchi=1.2; #susceptibility\n\n#Calculation\nM=chi*H;\nB=mew_0*(M+H);\nB=B*10**3;\nB=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"magnetic flux density in Wb/m^2 is\",B,\"*10**-3\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "mew_0=4*math.pi*10**-7;\n", + "H=500; #magnetic field strength in A/m\n", + "chi=1.2; #susceptibility\n", + "\n", + "#Calculation\n", + "M=chi*H;\n", + "B=mew_0*(M+H);\n", + "B=B*10**3;\n", + "B=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic flux density in Wb/m^2 is\",B,\"*10**-3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic flux density in Wb/m^2 is', 1.3824, '*10**-3')\n" + "text": [ + "('magnetic flux density in Wb/m^2 is', 1.3824, '*10**-3')\n" + ] } ], "prompt_number": 14 @@ -142,7 +289,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_11.ipynb b/Engineering_Physics/Chapter_11.ipynb index 6e1a896d..d8455a9b 100644 --- a/Engineering_Physics/Chapter_11.ipynb +++ b/Engineering_Physics/Chapter_11.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 11" + "name": "", + "signature": "sha256:3ff449f1ffe03bd2c9931a55b263d24ea75427a65a897e285709531b99dfed25" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,48 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Dielectric materials" + "source": [ + "Dielectric materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.1, Page number 335" + "source": [ + "Example number 11.1, Page number 335" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative dielectric constant\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nA=10*10*10**-6; #area of capacitor in m^2\nd=2*10**-3; #distance of seperation in m\nC=10**-9; #capacitance in F\n\n#Calculation\nepsilon_r=(C*d)/(epsilon_0*A);\nepsilon_r=math.ceil(epsilon_r*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"dielectric constant of material is\",epsilon_r);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "A=10*10*10**-6; #area of capacitor in m^2\n", + "d=2*10**-3; #distance of seperation in m\n", + "C=10**-9; #capacitance in F\n", + "\n", + "#Calculation\n", + "epsilon_r=(C*d)/(epsilon_0*A);\n", + "epsilon_r=math.ceil(epsilon_r*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"dielectric constant of material is\",epsilon_r);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('dielectric constant of material is', 2258.87)\n" + "text": [ + "('dielectric constant of material is', 2258.87)\n" + ] } ], "prompt_number": 1 @@ -38,19 +62,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.2, Page number 335" + "source": [ + "Example number 11.2, Page number 335" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability of atoms\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nepsilon_r=1.0000684; #dielectric constant of He gas\nN=2.7*10**25; #concentration of dipoles per m^3\n\n#Calculation\n#alpha_e=P/(N*E) and P=epsilon_0(epsilon_r-1)*E\n#therefore alpha_e=epsilon_0(epsilon_r-1)/N\nalpha_e=(epsilon_0*(epsilon_r-1))/N;\n\n#Result\nprint(\"electronic polarizability of He gas in Fm^2 is\",alpha_e);\n", + "input": [ + " \n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "epsilon_r=1.0000684; #dielectric constant of He gas\n", + "N=2.7*10**25; #concentration of dipoles per m^3\n", + "\n", + "#Calculation\n", + "#alpha_e=P/(N*E) and P=epsilon_0(epsilon_r-1)*E\n", + "#therefore alpha_e=epsilon_0(epsilon_r-1)/N\n", + "alpha_e=(epsilon_0*(epsilon_r-1))/N;\n", + "\n", + "#Result\n", + "print(\"electronic polarizability of He gas in Fm^2 is\",alpha_e);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electronic polarizability of He gas in Fm^2 is', 2.2430133333322991e-41)\n" + "text": [ + "('electronic polarizability of He gas in Fm^2 is', 2.2430133333322991e-41)\n" + ] } ], "prompt_number": 2 @@ -59,19 +101,35 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.3, Page number 336" + "source": [ + "Example number 11.3, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the polarisation\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nepsilon_r=6; #dielectric constant\nE=100; #electric field intensity in V/m\n\n#Calculation\nP=epsilon_0*(epsilon_r-1)*E;\n\n#Result\nprint(\"polarization in C/m^2 is\",P);\n", + "input": [ + " \n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "epsilon_r=6; #dielectric constant\n", + "E=100; #electric field intensity in V/m\n", + "\n", + "#Calculation\n", + "P=epsilon_0*(epsilon_r-1)*E;\n", + "\n", + "#Result\n", + "print(\"polarization in C/m^2 is\",P);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('polarization in C/m^2 is', 4.426999999999999e-09)\n" + "text": [ + "('polarization in C/m^2 is', 4.426999999999999e-09)\n" + ] } ], "prompt_number": 3 @@ -80,19 +138,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.4, Page number 336" + "source": [ + "Example number 11.4, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electronic polarizability of Ne\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nR=0.158; #radius of Ne in nm\n\n#Calculation\nR=R*10**-9; #converting nm to m\nalpha_e=4*math.pi*epsilon_0*R**3;\n\n#Result\nprint(\"electronic polarizability in Fm^2 is\",alpha_e);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "R=0.158; #radius of Ne in nm\n", + "\n", + "#Calculation\n", + "R=R*10**-9; #converting nm to m\n", + "alpha_e=4*math.pi*epsilon_0*R**3;\n", + "\n", + "#Result\n", + "print(\"electronic polarizability in Fm^2 is\",alpha_e);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electronic polarizability in Fm^2 is', 4.3885458748002144e-40)\n" + "text": [ + "('electronic polarizability in Fm^2 is', 4.3885458748002144e-40)\n" + ] } ], "prompt_number": 5 @@ -101,19 +178,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.5, Page number 336" + "source": [ + "Example number 11.5, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the area of metal sheet\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nC=0.02; #capacitance in micro farad\nepsilon_r=6; #dielectric constant\nt=0.002; #thickness of mica in cm\nd=0.002; #thickness of metal sheet in cm\n\n#Calculation\nC=C*10**-6; #converting micro farad to farad\nd=d*10**-2; #converting cm to m\nA=(C*d)/(epsilon_0*epsilon_r);\nA=A*10**3;\nA=math.ceil(A*10**4)/10**4; #rounding off to 4 decimals\nA1=A*10; #converting m**2 to cm**2\nA1=math.ceil(A1*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"area of metal sheet in m^2 is\",A,\"*10**-3\");\nprint(\"area of metal sheet in cm^2 is\",A1);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "C=0.02; #capacitance in micro farad\n", + "epsilon_r=6; #dielectric constant\n", + "t=0.002; #thickness of mica in cm\n", + "d=0.002; #thickness of metal sheet in cm\n", + "\n", + "#Calculation\n", + "C=C*10**-6; #converting micro farad to farad\n", + "d=d*10**-2; #converting cm to m\n", + "A=(C*d)/(epsilon_0*epsilon_r);\n", + "A=A*10**3;\n", + "A=math.ceil(A*10**4)/10**4; #rounding off to 4 decimals\n", + "A1=A*10; #converting m**2 to cm**2\n", + "A1=math.ceil(A1*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"area of metal sheet in m^2 is\",A,\"*10**-3\");\n", + "print(\"area of metal sheet in cm^2 is\",A1);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('area of metal sheet in m^2 is', 7.5296, '*10**-3')\n('area of metal sheet in cm^2 is', 75.296)\n" + "text": [ + "('area of metal sheet in m^2 is', 7.5296, '*10**-3')\n", + "('area of metal sheet in cm^2 is', 75.296)\n" + ] } ], "prompt_number": 9 @@ -122,19 +228,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.6, Page number 336" + "source": [ + "Example number 11.6, Page number 336" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative permitivity of the crystal\n\n#importing modules\nimport math\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nE=1000; #electric field in V/m\nP=4.3*10**-8; #polarization in C/m^2\n\n#Calculation\nepsilon_r=(P/(E*epsilon_0)+1);\nepsilon_r=math.ceil(epsilon_r*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"dielectric constant is\",epsilon_r);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "E=1000; #electric field in V/m\n", + "P=4.3*10**-8; #polarization in C/m^2\n", + "\n", + "#Calculation\n", + "epsilon_r=(P/(E*epsilon_0)+1);\n", + "epsilon_r=math.ceil(epsilon_r*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"dielectric constant is\",epsilon_r);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('dielectric constant is', 5.8566)\n" + "text": [ + "('dielectric constant is', 5.8566)\n" + ] } ], "prompt_number": 10 @@ -143,19 +269,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 11.7, Page number 337" + "source": [ + "Example number 11.7, Page number 337" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the polarisability of the material\n\n#Variable declaration\nepsilon_0=8.854*10**-12;\nchi=4.94; #relative susceptibility\nN=10**28; #number of dipoles per m^3\n\n#Calculation\n#polarisation P=N*alpha*E and P=epsilon_0*chi*E. equate the two equations\n#epsilon_0*chi*E=N*alpha*E\nalpha=(epsilon_0*chi)/N;\n\n#Result\nprint(\"polarisability of material in F/m^2 is\",alpha);\n", + "input": [ + " \n", + "#Variable declaration\n", + "epsilon_0=8.854*10**-12;\n", + "chi=4.94; #relative susceptibility\n", + "N=10**28; #number of dipoles per m^3\n", + "\n", + "#Calculation\n", + "#polarisation P=N*alpha*E and P=epsilon_0*chi*E. equate the two equations\n", + "#epsilon_0*chi*E=N*alpha*E\n", + "alpha=(epsilon_0*chi)/N;\n", + "\n", + "#Result\n", + "print(\"polarisability of material in F/m^2 is\",alpha);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('polarisability of material in F/m^2 is', 4.373876e-39)\n" + "text": [ + "('polarisability of material in F/m^2 is', 4.373876e-39)\n" + ] } ], "prompt_number": 11 @@ -163,7 +307,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_12.ipynb b/Engineering_Physics/Chapter_12.ipynb index 5d0b74d0..4fdbd6c5 100644 --- a/Engineering_Physics/Chapter_12.ipynb +++ b/Engineering_Physics/Chapter_12.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 12" + "name": "", + "signature": "sha256:50b83ee4e84906dcabb2d002b372255d1153b0b8a78afbf0a4be018e0c342780" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,47 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Superconducting Materials" + "source": [ + "Superconducting Materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.1, Page number 356" + "source": [ + "Example number 12.1, Page number 356" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical field\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=3.7; #critical temperature in K\nH0=0.0306; #magnetic field in T\nT=2; #temperature in K\n\n#Calculation\nHc=H0*(1-(T**2/Tc**2));\nHc=math.ceil(Hc*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"critical field in T is\",Hc);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=3.7; #critical temperature in K\n", + "H0=0.0306; #magnetic field in T\n", + "T=2; #temperature in K\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T**2/Tc**2));\n", + "Hc=math.ceil(Hc*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"critical field in T is\",Hc);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical field in T is', 0.02166)\n" + "text": [ + "('critical field in T is', 0.02166)\n" + ] } ], "prompt_number": 1 @@ -38,19 +61,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.2, Page number 356" + "source": [ + "Example number 12.2, Page number 356" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical field\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=7.26; #critical temperature in K\nH0=6.4*10**3; #magnetic field in T\nT=5; #temperature in K\n\n#Calculation\nHc=H0*(1-(T**2/Tc**2));\nHc=math.ceil(Hc*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"critical field in T is\",Hc);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=7.26; #critical temperature in K\n", + "H0=6.4*10**3; #magnetic field in T\n", + "T=5; #temperature in K\n", + "\n", + "#Calculation\n", + "Hc=H0*(1-(T**2/Tc**2));\n", + "Hc=math.ceil(Hc*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"critical field in T is\",Hc);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical field in T is', 3364.385)\n" + "text": [ + "('critical field in T is', 3364.385)\n" + ] } ], "prompt_number": 2 @@ -59,19 +102,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.3, Page number 357" + "source": [ + "Example number 12.3, Page number 357" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the value of Tc\n\n#importing modules\nimport math\n\n#Variable declaration\nTc1=4.185; #critical temperature in K\nM1=199.5; #atomic mass\nM2=203.4; #atomic mass after changing\n\n#Calculation\n#according to maxwell equation Tc*M^0.5=constant\n#Tc1*M1^0.5=Tc2*M2^0.5\nTc2=(Tc1*M1**0.5)/M2**0.5;\nTc2=math.ceil(Tc2*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"critical temperature of Hg in K is\",Tc2);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc1=4.185; #critical temperature in K\n", + "M1=199.5; #atomic mass\n", + "M2=203.4; #atomic mass after changing\n", + "\n", + "#Calculation\n", + "#according to maxwell equation Tc*M^0.5=constant\n", + "#Tc1*M1^0.5=Tc2*M2^0.5\n", + "Tc2=(Tc1*M1**0.5)/M2**0.5;\n", + "Tc2=math.ceil(Tc2*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"critical temperature of Hg in K is\",Tc2);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical temperature of Hg in K is', 4.144685)\n" + "text": [ + "('critical temperature of Hg in K is', 4.144685)\n" + ] } ], "prompt_number": 3 @@ -80,19 +145,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.4, Page number 357" + "source": [ + "Example number 12.4, Page number 357" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical current density\n\n#importing modules\nimport math\n\n#Variable declaration\nd=1; #diameter of wire in mm\nT=4.2; #temperature in K\nTc=7.18; #critical temperature in K\nH0=6.5*10**4; #magnetic field\n\n#Calculation\nd=d*10**-3; #diameter in m\nR=d/2;\nHc=H0*(1-(T**2/Tc**2));\nHC=Hc/10**4;\nHC=math.ceil(HC*10**3)/10**3; #rounding off to 2 decimals\nIc=2*math.pi*R*Hc;\nIc=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\nA=math.pi*R**2;\nJ=Ic/A;\nJ=J/10**8;\nJ=math.ceil(J*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"critical magnetic field at 4.2K in A/m is\",HC,\"*10**4\");\nprint(\"critical current in A is\",Ic);\nprint(\"critical current density in A/m^2 is\",J,\"*10**8\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "d=1; #diameter of wire in mm\n", + "T=4.2; #temperature in K\n", + "Tc=7.18; #critical temperature in K\n", + "H0=6.5*10**4; #magnetic field\n", + "\n", + "#Calculation\n", + "d=d*10**-3; #diameter in m\n", + "R=d/2;\n", + "Hc=H0*(1-(T**2/Tc**2));\n", + "HC=Hc/10**4;\n", + "HC=math.ceil(HC*10**3)/10**3; #rounding off to 2 decimals\n", + "Ic=2*math.pi*R*Hc;\n", + "Ic=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\n", + "A=math.pi*R**2;\n", + "J=Ic/A;\n", + "J=J/10**8;\n", + "J=math.ceil(J*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"critical magnetic field at 4.2K in A/m is\",HC,\"*10**4\");\n", + "print(\"critical current in A is\",Ic);\n", + "print(\"critical current density in A/m^2 is\",J,\"*10**8\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical magnetic field at 4.2K in A/m is', 4.276, '*10**4')\n('critical current in A is', 134.33)\n('critical current density in A/m^2 is', 1.71035, '*10**8')\n" + "text": [ + "('critical magnetic field at 4.2K in A/m is', 4.276, '*10**4')\n", + "('critical current in A is', 134.33)\n", + "('critical current density in A/m^2 is', 1.71035, '*10**8')\n" + ] } ], "prompt_number": 15 @@ -101,19 +200,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.5, Page number 358" + "source": [ + "Example number 12.5, Page number 358" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the frequency of radiation\n\n#importing modules\nimport math\n\n#Variable declaration\ne=1.6*10**-19;\nh=6.626*10**-34;\nV=6; #voltage applied in micro volts\n\n#Calculation\nV=V*10**-6; #converting micro volts to volts\nnew=(2*e*V)/h;\nnew=new/10**9;\nnew=math.ceil(new*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"frequency of ac signal in Hz is\",new,\"*10**9\");", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19;\n", + "h=6.626*10**-34;\n", + "V=6; #voltage applied in micro volts\n", + "\n", + "#Calculation\n", + "V=V*10**-6; #converting micro volts to volts\n", + "new=(2*e*V)/h;\n", + "new=new/10**9;\n", + "new=math.ceil(new*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"frequency of ac signal in Hz is\",new,\"*10**9\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('frequency of ac signal in Hz is', 2.8977, '*10**9')\n" + "text": [ + "('frequency of ac signal in Hz is', 2.8977, '*10**9')\n" + ] } ], "prompt_number": 16 @@ -122,19 +242,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 12.6, Page number 358" + "source": [ + "Example number 12.6, Page number 358" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap\n\n#importing modules\nimport math\n\n#Variable declaration\nKb=1.38*10**-23;\nTc=7.19; #critical temperature in K\n\n#Calculation\nEg=3.5*Kb*Tc;\nEg=Eg/(1.6*10**-19); #converting J to eV\nEg=Eg*10**3; #converting eV into milli eV\nEg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"band gap of superconducting lead in meV is\",Eg);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "Kb=1.38*10**-23;\n", + "Tc=7.19; #critical temperature in K\n", + "\n", + "#Calculation\n", + "Eg=3.5*Kb*Tc;\n", + "Eg=Eg/(1.6*10**-19); #converting J to eV\n", + "Eg=Eg*10**3; #converting eV into milli eV\n", + "Eg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of superconducting lead in meV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of superconducting lead in meV is', 2.171)\n" + "text": [ + "('band gap of superconducting lead in meV is', 2.171)\n" + ] } ], "prompt_number": 17 @@ -142,7 +282,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_2.ipynb b/Engineering_Physics/Chapter_2.ipynb index f57dc5cb..82d0d7af 100644 --- a/Engineering_Physics/Chapter_2.ipynb +++ b/Engineering_Physics/Chapter_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 2" + "name": "", + "signature": "sha256:3d73f6bba1b33a0bbd48c706ad53709f1f38f4b901966e1c9494931ace163899" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,53 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Laser" + "source": [ + "Laser" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.1, Page number 59 " + "source": [ + "Example number 2.1, Page number 59 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of photons emitted by laser\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nlamda=632.8*10**-9; #wavelength in m\nP=5*10**-3; #output power in W\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\nN=P/E; #number of photons emitted\n\n\n#Result\nprint(\"energy of one photon in eV is\",E_eV);\nprint(\"number of photons emitted per second is\",N);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "lamda=632.8*10**-9; #wavelength in m\n", + "P=5*10**-3; #output power in W\n", + "\n", + "#Calculation\n", + "E=(h*c)/lamda; #energy of one photon\n", + "E_eV=E/(1.6*10**-19); #converting J to eV\n", + "E_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n", + "N=P/E; #number of photons emitted\n", + "\n", + "\n", + "#Result\n", + "print(\"energy of one photon in eV is\",E_eV);\n", + "print(\"number of photons emitted per second is\",N);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of one photon in eV is', 1.964)\n('number of photons emitted per second is', 1.5917094275077976e+16)\n" + "text": [ + "('energy of one photon in eV is', 1.964)\n", + "('number of photons emitted per second is', 1.5917094275077976e+16)\n" + ] } ], "prompt_number": 1 @@ -38,19 +67,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.2, Page number 60" + "source": [ + "Example number 2.2, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy of emitted photons\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nlamda=632.8*10**-9; #wavelength in m\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n\n#Result\nprint(\"energy of one photon in eV is\",E_eV);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "lamda=632.8*10**-9; #wavelength in m\n", + "\n", + "#Calculation\n", + "E=(h*c)/lamda; #energy of one photon\n", + "E_eV=E/(1.6*10**-19); #converting J to eV\n", + "E_eV=math.ceil(E_eV*1000)/1000; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"energy of one photon in eV is\",E_eV);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of one photon in eV is', 1.964)\n" + "text": [ + "('energy of one photon in eV is', 1.964)\n" + ] } ], "prompt_number": 2 @@ -59,19 +109,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.3, Page number 60" + "source": [ + "Example number 2.3, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the value of E3\n\n#importing modules\nimport math\n\n#Variable declaration\nE1=0; #value of 1st energy level in eV\nE2=1.4; #value of 2nd energy level in eV\nlamda=1.15*10**-6;\nh=6.626*10**-34;\nc=3*10**8;\n\n#Calculation\nE=(h*c)/lamda; #energy of one photon\nE_eV=E/(1.6*10**-19); #converting J to eV\nE3=E2+E_eV;\nE3=math.ceil(E3*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"value of E3 in eV is\",E3);\n\n#answer given in the book for E3 is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E1=0; #value of 1st energy level in eV\n", + "E2=1.4; #value of 2nd energy level in eV\n", + "lamda=1.15*10**-6;\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "\n", + "#Calculation\n", + "E=(h*c)/lamda; #energy of one photon\n", + "E_eV=E/(1.6*10**-19); #converting J to eV\n", + "E3=E2+E_eV;\n", + "E3=math.ceil(E3*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"value of E3 in eV is\",E3);\n", + "\n", + "#answer given in the book for E3 is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('value of E3 in eV is', 2.49)\n" + "text": [ + "('value of E3 in eV is', 2.49)\n" + ] } ], "prompt_number": 3 @@ -80,19 +156,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.4, Page number 60" + "source": [ + "Example number 2.4, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of laser beam\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nE2=3.2; #value of higher energy level in eV\nE1=1.6; #value of lower energy level in eV\n\n#Calculation\nE=E2-E1; #energy difference in eV\nE_J=E*1.6*10**-19; #converting E from eV to J\nlamda=(h*c)/E_J; #wavelength of photon\n\n#Result\nprint(\"energy difference in eV\",E);\nprint(\"wavelength of photon in m\",lamda);\n", + "input": [ + " \n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "E2=3.2; #value of higher energy level in eV\n", + "E1=1.6; #value of lower energy level in eV\n", + "\n", + "#Calculation\n", + "E=E2-E1; #energy difference in eV\n", + "E_J=E*1.6*10**-19; #converting E from eV to J\n", + "lamda=(h*c)/E_J; #wavelength of photon\n", + "\n", + "#Result\n", + "print(\"energy difference in eV\",E);\n", + "print(\"wavelength of photon in m\",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy difference in eV', 1.6)\n('wavelength of photon in m', 7.76484375e-07)\n" + "text": [ + "('energy difference in eV', 1.6)\n", + "('wavelength of photon in m', 7.76484375e-07)\n" + ] } ], "prompt_number": 6 @@ -101,19 +198,35 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.5, Page number 60" + "source": [ + "Example number 2.5, Page number 60" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength of laser beam\n\n#Variable declaration\nh=6.626*10**-34;\nc=3*10**8;\nE=1.42*1.6*10**-19; #band gap of GaAs in J\n\n#Calculation\nlamda=(h*c)/E; #wavelength of laser\n\n#Result\nprint(\"wavelength of laser emitted by GaAs in m\",lamda);\n", + "input": [ + " \n", + "#Variable declaration\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "E=1.42*1.6*10**-19; #band gap of GaAs in J\n", + "\n", + "#Calculation\n", + "lamda=(h*c)/E; #wavelength of laser\n", + "\n", + "#Result\n", + "print(\"wavelength of laser emitted by GaAs in m\",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)\n" + "text": [ + "('wavelength of laser emitted by GaAs in m', 8.74911971830986e-07)\n" + ] } ], "prompt_number": 8 @@ -122,19 +235,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.6, Page number 61" + "source": [ + "Example number 2.6, Page number 61" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the relative population of energy levels\n\n#importing modules\nimport math\n\n#Variable declaration\nT=300; #temperature in K\nlamda=500*10**-9; #wavelength in m\nh=6.626*10**-34;\nc=3*10**8;\nk=1.38*10**-23;\n\n#Calculation\n#from maxwell and boltzmann law, relative population is given by\n#N1/N2=exp(-E1/kT)/exp(-E2/kT)\n#hence N1/N2=exp(-(E1-E2)/kT)=exp((h*new)/(k*T));\n#new=c/lambda\nR=(h*c)/(lamda*k*T);\nRP=math.exp(R);\n\n#Result\nprint(\"relative population between N1 and N2 is\",RP);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=300; #temperature in K\n", + "lamda=500*10**-9; #wavelength in m\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "#from maxwell and boltzmann law, relative population is given by\n", + "#N1/N2=exp(-E1/kT)/exp(-E2/kT)\n", + "#hence N1/N2=exp(-(E1-E2)/kT)=exp((h*new)/(k*T));\n", + "#new=c/lambda\n", + "R=(h*c)/(lamda*k*T);\n", + "RP=math.exp(R);\n", + "\n", + "#Result\n", + "print(\"relative population between N1 and N2 is\",RP);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('relative population between N1 and N2 is', 5.068255595981255e+41)\n" + "text": [ + "('relative population between N1 and N2 is', 5.068255595981255e+41)\n" + ] } ], "prompt_number": 9 @@ -143,19 +282,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.7, Page number 61" + "source": [ + "Example number 2.7, Page number 61" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To examine the possibility of stimulated emission\n\n#importing modules\nimport math\n\n#Variable declaration\nT=300; #temperature in K\nh=6.626*10**-34;\nc=3*10**8;\nk=1.38*10**-23;\nlamda=600*10**-9; #wavelength in m\n\n#Calculation\nR=(h*c)/(lamda*k*T);\nRs=1/(math.exp(R)-1);\n\n#Result\nprint(\"the ratio between stimulated emission to spontaneous emission is\",Rs);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=300; #temperature in K\n", + "h=6.626*10**-34;\n", + "c=3*10**8;\n", + "k=1.38*10**-23;\n", + "lamda=600*10**-9; #wavelength in m\n", + "\n", + "#Calculation\n", + "R=(h*c)/(lamda*k*T);\n", + "Rs=1/(math.exp(R)-1);\n", + "\n", + "#Result\n", + "print(\"the ratio between stimulated emission to spontaneous emission is\",Rs);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)\n" + "text": [ + "('the ratio between stimulated emission to spontaneous emission is', 1.7617782449453023e-35)\n" + ] } ], "prompt_number": 11 @@ -164,19 +325,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.8, Page number 62" + "source": [ + "Example number 2.8, Page number 62" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the efficiency of a He-Ne laser\n\n#importing modules\nimport math\n\n#Variable declaration\nP=5*10**-3; #output power in W\nI=10*10**-3; #current in A\nV=3*10**3; #voltage in V\n\n#Calculation\ne=(P*100)/(I*V);\ne=math.ceil(e*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"efficiency of laser in % is\",e);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "P=5*10**-3; #output power in W\n", + "I=10*10**-3; #current in A\n", + "V=3*10**3; #voltage in V\n", + "\n", + "#Calculation\n", + "e=(P*100)/(I*V);\n", + "e=math.ceil(e*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"efficiency of laser in % is\",e);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('efficiency of laser in % is', 0.016667)\n" + "text": [ + "('efficiency of laser in % is', 0.016667)\n" + ] } ], "prompt_number": 14 @@ -185,19 +366,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.9, Page number 62" + "source": [ + "Example number 2.9, Page number 62" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the intensity of laser beam\n\n#importing modules\nimport math\n\n#Variable declaration\nP=1e-03; #output power in W\nd=1e-06; #diameter in m\n\n#Calculation\nr=d/2; #radius in m\nI=P/(math.pi*r**2); #intensity\nI=I/10**9;\nI=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intensity of laser in W/m^2 is\",I,\"*10**9\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "P=1e-03; #output power in W\n", + "d=1e-06; #diameter in m\n", + "\n", + "#Calculation\n", + "r=d/2; #radius in m\n", + "I=P/(math.pi*r**2); #intensity\n", + "I=I/10**9;\n", + "I=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"intensity of laser in W/m^2 is\",I,\"*10**9\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intensity of laser in W/m^2 is', 1.2733, '*10**9')\n" + "text": [ + "('intensity of laser in W/m^2 is', 1.2733, '*10**9')\n" + ] } ], "prompt_number": 1 @@ -206,19 +408,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.10, Page number 62" + "source": [ + "Example number 2.10, Page number 62" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angular speed and divergence of laser beam\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda=632.8*10**-9; #wavelength in m\nD=5; #distance in m\nd=1*10**-3; #diameter in m\n\n#Calculation\ndeltatheta=lamda/d; #angular speed\ndelta_theta=deltatheta*10**4;\nr=D*deltatheta;\nr1=r*10**3; #converting r from m to mm\nA=math.pi*r**2; #area of the spread\n\n#Result \nprint(\"angular speed in radian is\",delta_theta,\"*10**-4\");\nprint(\"radius of the spread in mm is\",r1);\nprint(\"area of the spread in m^2 is\",A);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda=632.8*10**-9; #wavelength in m\n", + "D=5; #distance in m\n", + "d=1*10**-3; #diameter in m\n", + "\n", + "#Calculation\n", + "deltatheta=lamda/d; #angular speed\n", + "delta_theta=deltatheta*10**4;\n", + "r=D*deltatheta;\n", + "r1=r*10**3; #converting r from m to mm\n", + "A=math.pi*r**2; #area of the spread\n", + "\n", + "#Result \n", + "print(\"angular speed in radian is\",delta_theta,\"*10**-4\");\n", + "print(\"radius of the spread in mm is\",r1);\n", + "print(\"area of the spread in m^2 is\",A);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('angular speed in radian is', 6.328, '*10**-4')\n('radius of the spread in mm is', 3.164)\n('area of the spread in m^2 is', 3.1450157329451454e-05)\n" + "text": [ + "('angular speed in radian is', 6.328, '*10**-4')\n", + "('radius of the spread in mm is', 3.164)\n", + "('area of the spread in m^2 is', 3.1450157329451454e-05)\n" + ] } ], "prompt_number": 2 @@ -226,7 +455,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_3.ipynb b/Engineering_Physics/Chapter_3.ipynb index 59daaddd..eaf6dcb1 100644 --- a/Engineering_Physics/Chapter_3.ipynb +++ b/Engineering_Physics/Chapter_3.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 3" + "name": "", + "signature": "sha256:638145e2db582b1570b31e3d891635b15bb11943d1ff2ba0aa0dc17ebaf02200" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,46 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Fibre Optics" + "source": [ + "Fibre Optics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.1, Page number 98 " + "source": [ + "Example number 3.1, Page number 98 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture of an optical fibre\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1.6; #refractive index of core\nn2=1.5; #refractive index of cladding\n\n#Calculation\nNA=math.sqrt((n1**2)-(n2**2));\nNA=math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"the numerical aperture of the fibre is\",NA);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1.6; #refractive index of core\n", + "n2=1.5; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "NA=math.sqrt((n1**2)-(n2**2));\n", + "NA=math.ceil(NA*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"the numerical aperture of the fibre is\",NA);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the numerical aperture of the fibre is', 0.5568)\n" + "text": [ + "('the numerical aperture of the fibre is', 0.5568)\n" + ] } ], "prompt_number": 4 @@ -38,19 +60,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.2, Page number 98 " + "source": [ + "Example number 3.2, Page number 98 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the numerical aperture and acceptance angle of a fibre\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1.54; #refractive index of core\nn2=1.5; #refractive index of cladding\nn0=1;\n\n#Calculation\nNA=math.sqrt((n1**2)-(n2**2)); #numerical aperture of fibre\nNA=math.ceil(NA*10**5)/10**5; #rounding off to 5 decimals\nalpha=math.asin(NA/n0); #acceptance angle in radians\nalpha=alpha*57.2957795; #converting radians to degrees\nalpha=math.ceil(alpha*10**5)/10**5; #rounding off to 5 decimals\ndeg=int(alpha); #converting to degrees\nt=60*(alpha-deg); \nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"the numerical aperture of the fibre is\",NA);\nprint(\"the acceptance angle of the fibre in degrees is\",alpha);\nprint(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n\n#answer for the angle given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1.54; #refractive index of core\n", + "n2=1.5; #refractive index of cladding\n", + "n0=1;\n", + "\n", + "#Calculation\n", + "NA=math.sqrt((n1**2)-(n2**2)); #numerical aperture of fibre\n", + "NA=math.ceil(NA*10**5)/10**5; #rounding off to 5 decimals\n", + "alpha=math.asin(NA/n0); #acceptance angle in radians\n", + "alpha=alpha*57.2957795; #converting radians to degrees\n", + "alpha=math.ceil(alpha*10**5)/10**5; #rounding off to 5 decimals\n", + "deg=int(alpha); #converting to degrees\n", + "t=60*(alpha-deg); \n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"the numerical aperture of the fibre is\",NA);\n", + "print(\"the acceptance angle of the fibre in degrees is\",alpha);\n", + "print(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n", + "\n", + "#answer for the angle given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the numerical aperture of the fibre is', 0.34872)\n('the acceptance angle of the fibre in degrees is', 20.40905)\n('acceptance angle of the fibre is', 20, 'degrees', 24, 'minutes', 32.581, 'seconds')\n" + "text": [ + "('the numerical aperture of the fibre is', 0.34872)\n", + "('the acceptance angle of the fibre in degrees is', 20.40905)\n", + "('acceptance angle of the fibre is', 20, 'degrees', 24, 'minutes', 32.581, 'seconds')\n" + ] } ], "prompt_number": 7 @@ -59,19 +115,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.3, Page number 99" + "source": [ + "Example number 3.3, Page number 99" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical angle\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1.6; #refractive index of core\nn2=1.49; #refractive index of cladding\n\n#Calculation\nthetac=math.asin(n2/n1); #critical angle in radians\nthetac=thetac*57.2957795; #converting radians to degrees\ntheta_c=math.ceil(thetac*10**3)/10**3; #rounding off to 3 decimals\ndeg=int(thetac); #converting to degrees\nt=60*(thetac-deg); \nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical angle of the fibre in degrees is\",theta_c);\nprint(\"critical angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1.6; #refractive index of core\n", + "n2=1.49; #refractive index of cladding\n", + "\n", + "#Calculation\n", + "thetac=math.asin(n2/n1); #critical angle in radians\n", + "thetac=thetac*57.2957795; #converting radians to degrees\n", + "theta_c=math.ceil(thetac*10**3)/10**3; #rounding off to 3 decimals\n", + "deg=int(thetac); #converting to degrees\n", + "t=60*(thetac-deg); \n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical angle of the fibre in degrees is\",theta_c);\n", + "print(\"critical angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical angle of the fibre in degrees is', 68.631)\n('critical angle of the fibre is', 68, 'degrees', 37, 'minutes', 49.85, 'seconds')\n" + "text": [ + "('the critical angle of the fibre in degrees is', 68.631)\n", + "('critical angle of the fibre is', 68, 'degrees', 37, 'minutes', 49.85, 'seconds')\n" + ] } ], "prompt_number": 10 @@ -80,19 +163,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.4, Page number 99" + "source": [ + "Example number 3.4, Page number 99" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the acceptance angle of a fibre\n\n#importing modules\nimport math\n\n#Variable declaration\nNA=0.15; #numerical aperture\nn2=1.55; #refractive index of cladding\nn0=1.33; #refractive index of water\n\n#Calculation\nn1=math.sqrt((NA**2)+(n2**2)); #refractive index\nn_1=math.ceil(n1*10**5)/10**5; #rounding off to 5 decimals\nalpha=math.asin(math.sqrt(n1**2-n2**2)/n0); #acceptance angle in radians\nalpha=alpha*57.2957795; #converting radians to degrees\nalphaa=math.ceil(alpha*10**3)/10**3; #rounding off to 3 decimals\ndeg=int(alpha); #converting to degrees\nt=60*(alpha-deg); \nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"refractive index of the core is\",n_1);\nprint(\"the acceptance angle of the fibre in degrees is\",alphaa);\nprint(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n\n#answer for acceptance angle given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA=0.15; #numerical aperture\n", + "n2=1.55; #refractive index of cladding\n", + "n0=1.33; #refractive index of water\n", + "\n", + "#Calculation\n", + "n1=math.sqrt((NA**2)+(n2**2)); #refractive index\n", + "n_1=math.ceil(n1*10**5)/10**5; #rounding off to 5 decimals\n", + "alpha=math.asin(math.sqrt(n1**2-n2**2)/n0); #acceptance angle in radians\n", + "alpha=alpha*57.2957795; #converting radians to degrees\n", + "alphaa=math.ceil(alpha*10**3)/10**3; #rounding off to 3 decimals\n", + "deg=int(alpha); #converting to degrees\n", + "t=60*(alpha-deg); \n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"refractive index of the core is\",n_1);\n", + "print(\"the acceptance angle of the fibre in degrees is\",alphaa);\n", + "print(\"acceptance angle of the fibre is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n", + "\n", + "#answer for acceptance angle given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('refractive index of the core is', 1.55725)\n('the acceptance angle of the fibre in degrees is', 6.476)\n('acceptance angle of the fibre is', 6, 'degrees', 28, 'minutes', 32.55, 'seconds')\n" + "text": [ + "('refractive index of the core is', 1.55725)\n", + "('the acceptance angle of the fibre in degrees is', 6.476)\n", + "('acceptance angle of the fibre is', 6, 'degrees', 28, 'minutes', 32.55, 'seconds')\n" + ] } ], "prompt_number": 13 @@ -101,19 +218,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.5, Page number 100" + "source": [ + "Example number 3.5, Page number 100" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the refractive index of cladding\n\n#importing modules\nimport math\n\n#Variable declaration\nNA=0.26; #numerical aperture\nn1=1.5; #refractive index of core\nd=100; #core diameter in micro meter\n\n#Calculation\nd=100*(10**-6); #core diameter in metre\nn2=math.sqrt((n1**2)-(NA**2));\nn2=math.ceil(n2*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"refractive index of the cladding is\",n2);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA=0.26; #numerical aperture\n", + "n1=1.5; #refractive index of core\n", + "d=100; #core diameter in micro meter\n", + "\n", + "#Calculation\n", + "d=100*(10**-6); #core diameter in metre\n", + "n2=math.sqrt((n1**2)-(NA**2));\n", + "n2=math.ceil(n2*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"refractive index of the cladding is\",n2);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('refractive index of the cladding is', 1.4773)\n" + "text": [ + "('refractive index of the cladding is', 1.4773)\n" + ] } ], "prompt_number": 16 @@ -122,19 +260,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 3.6, Page number 100" + "source": [ + "Example number 3.6, Page number 100" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the refractive indices of core and cladding\n\n#importing modules\nimport math\n\n#Variable declaration\nNA=0.26; #numerical aperture\ndelta=0.015; #refractive index difference\n\n#Calculation\n#NA=math.sqrt(n1**2-n2**2)\n#let A=n1**2-n2**2\n#therefore A=NA**2\nA=NA**2;\n#delta=(n1**2-n2**2)/2*(n1**2)\n#let 2*(n1**2) be B\n#therefore B=A/delta\nB=A/delta;\nn1=math.sqrt(B/2);\nn1=math.ceil(n1*100)/100; #rounding off to 2 decimals\nn2=math.sqrt(n1**2-NA**2);\nn2=math.ceil(n2*10**3)/10**3; #rounding off to 4 decimals\n\n#Result\nprint(\"refractive index of the core is\",n1);\nprint(\"refractive index of the cladding is\",n2);\n\n#answer for refractive index of cladding given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "NA=0.26; #numerical aperture\n", + "delta=0.015; #refractive index difference\n", + "\n", + "#Calculation\n", + "#NA=math.sqrt(n1**2-n2**2)\n", + "#let A=n1**2-n2**2\n", + "#therefore A=NA**2\n", + "A=NA**2;\n", + "#delta=(n1**2-n2**2)/2*(n1**2)\n", + "#let 2*(n1**2) be B\n", + "#therefore B=A/delta\n", + "B=A/delta;\n", + "n1=math.sqrt(B/2);\n", + "n1=math.ceil(n1*100)/100; #rounding off to 2 decimals\n", + "n2=math.sqrt(n1**2-NA**2);\n", + "n2=math.ceil(n2*10**3)/10**3; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"refractive index of the core is\",n1);\n", + "print(\"refractive index of the cladding is\",n2);\n", + "\n", + "#answer for refractive index of cladding given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('refractive index of the core is', 1.51)\n('refractive index of the cladding is', 1.488)\n" + "text": [ + "('refractive index of the core is', 1.51)\n", + "('refractive index of the cladding is', 1.488)\n" + ] } ], "prompt_number": 19 @@ -142,7 +313,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_4.ipynb b/Engineering_Physics/Chapter_4.ipynb index 02198aef..d93ccbff 100644 --- a/Engineering_Physics/Chapter_4.ipynb +++ b/Engineering_Physics/Chapter_4.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 4" + "name": "", + "signature": "sha256:2a55c0c681215b0dc959ddeda0187458e8ed07320f22e00a7385acd5044d2ee9" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,47 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Quantum Physics" + "source": [ + "Quantum Physics" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.1, Page number 133 " + "source": [ + "Example number 4.1, Page number 133 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the change in wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.63*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nphi=135; #angle of scattering in degrees\nphi=phi*0.0174532925 #converting degrees to radians \n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n\n#Result\nprint(\"change in wavelength in metres is\",delta_lamda);", + "input": [ + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "phi=135; #angle of scattering in degrees\n", + "phi=phi*0.0174532925 #converting degrees to radians \n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "\n", + "#Result\n", + "print(\"change in wavelength in metres is\",delta_lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('change in wavelength in metres is', 4.1458307496867315e-12)\n" + "text": [ + "('change in wavelength in metres is', 4.1458307496867315e-12)\n" + ] } ], "prompt_number": 6 @@ -38,19 +61,63 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.2, Page number 134 " + "source": [ + "Example number 4.2, Page number 134 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the compton shift, wavelength,energy and angle\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.63*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nlamda=2; #wavelength in angstrom\nlamdaA=lamda*10**-10; #converting lamda from Angstrom to m\nphi=90; #angle of scattering in degrees\nphi=phi*0.0174532925 #converting degrees to radians \n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\ndelta_lamda=delta_lamda*10**10; #converting delta_lamda from m to Angstrom\ndelta_lamda=math.ceil(delta_lamda*10**5)/10**5; #rounding off to 5 decimals\nlamda_dash=delta_lamda+lamda;\nlamdaA_dash=lamda_dash*10**-10; #converting lamda_dash from Angstrom to m\n#energy E=h*new-h*new_dash\nE=h*c*((1/lamdaA)-(1/lamdaA_dash));\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\nnew=c/lamda;\nnew_dash=c/lamda_dash;\ntheta=math.atan((h*new*math.sin(phi))/((h*new)-(h*new_dash*math.cos(phi))));\ntheta=theta*57.2957795; #converting radians to degrees\n\n#Result\nprint(\"change in compton shift in Angstrom is\",delta_lamda);\nprint(\"wavelength of scattered photons in Angstrom is\",lamda_dash);\nprint(\"energy of recoiling electron in J is\",E);\nprint(\"energy of recoiling electron in eV is\",EeV);\nprint(\"angle at which recoiling electron appears in degrees is\",int(theta));\n\n#answers given in the book are wrong", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.63*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=2; #wavelength in angstrom\n", + "lamdaA=lamda*10**-10; #converting lamda from Angstrom to m\n", + "phi=90; #angle of scattering in degrees\n", + "phi=phi*0.0174532925 #converting degrees to radians \n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "delta_lamda=delta_lamda*10**10; #converting delta_lamda from m to Angstrom\n", + "delta_lamda=math.ceil(delta_lamda*10**5)/10**5; #rounding off to 5 decimals\n", + "lamda_dash=delta_lamda+lamda;\n", + "lamdaA_dash=lamda_dash*10**-10; #converting lamda_dash from Angstrom to m\n", + "#energy E=h*new-h*new_dash\n", + "E=h*c*((1/lamdaA)-(1/lamdaA_dash));\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "new=c/lamda;\n", + "new_dash=c/lamda_dash;\n", + "theta=math.atan((h*new*math.sin(phi))/((h*new)-(h*new_dash*math.cos(phi))));\n", + "theta=theta*57.2957795; #converting radians to degrees\n", + "\n", + "#Result\n", + "print(\"change in compton shift in Angstrom is\",delta_lamda);\n", + "print(\"wavelength of scattered photons in Angstrom is\",lamda_dash);\n", + "print(\"energy of recoiling electron in J is\",E);\n", + "print(\"energy of recoiling electron in eV is\",EeV);\n", + "print(\"angle at which recoiling electron appears in degrees is\",int(theta));\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('change in compton shift in Angstrom is', 0.02429)\n('wavelength of scattered photons in Angstrom is', 2.02429)\n('energy of recoiling electron in J is', 1.1933272900621974e-17)\n('energy of recoiling electron in eV is', 74.482)\n('angle at which recoiling electron appears in degrees is', 45)\n" + "text": [ + "('change in compton shift in Angstrom is', 0.02429)\n", + "('wavelength of scattered photons in Angstrom is', 2.02429)\n", + "('energy of recoiling electron in J is', 1.1933272900621974e-17)\n", + "('energy of recoiling electron in eV is', 74.482)\n", + "('angle at which recoiling electron appears in degrees is', 45)\n" + ] } ], "prompt_number": 10 @@ -59,19 +126,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.3, Page number 135" + "source": [ + "Example number 4.3, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the compton shift, wavelength of the scattered photon\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm0=9.1*10**-31; #mass of the electron in kg\nc=3*10**8; #velocity of light in m/s\nphi=60; #angle of scattering in degrees\nphi=phi*0.0174532925; #converting degrees to radians\nE=10**6; #energy of photon in eV\nE=E*1.6*10**-19; #converting eV into J\n\n#Calculation\ndelta_lamda=(h*(1-math.cos(phi)))/(m0*c);\ndelta_lamda=delta_lamda*10**10; #converting metre to angstrom\ndelta_lamda=math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\nlamda=(h*c)/E;\nlamdaA=lamda*10**10; #converting metre to angstrom\nlamda_dash=delta_lamda+lamdaA;\nlamda_dash=math.ceil(lamda_dash*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"compton shift in angstrom is\",delta_lamda);\nprint(\"energy of incident photon in m\",lamda);\nprint(\"wavelength of scattered photons in angstrom is\",lamda_dash);\n\n#answer for wavelength of scattered photon given in the book is wrong", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m0=9.1*10**-31; #mass of the electron in kg\n", + "c=3*10**8; #velocity of light in m/s\n", + "phi=60; #angle of scattering in degrees\n", + "phi=phi*0.0174532925; #converting degrees to radians\n", + "E=10**6; #energy of photon in eV\n", + "E=E*1.6*10**-19; #converting eV into J\n", + "\n", + "#Calculation\n", + "delta_lamda=(h*(1-math.cos(phi)))/(m0*c);\n", + "delta_lamda=delta_lamda*10**10; #converting metre to angstrom\n", + "delta_lamda=math.ceil(delta_lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "lamda=(h*c)/E;\n", + "lamdaA=lamda*10**10; #converting metre to angstrom\n", + "lamda_dash=delta_lamda+lamdaA;\n", + "lamda_dash=math.ceil(lamda_dash*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"compton shift in angstrom is\",delta_lamda);\n", + "print(\"energy of incident photon in m\",lamda);\n", + "print(\"wavelength of scattered photons in angstrom is\",lamda_dash);\n", + "\n", + "#answer for wavelength of scattered photon given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('compton shift in angstrom is', 0.0122)\n('energy of incident photon in m', 1.242375e-12)\n('wavelength of scattered photons in angstrom is', 0.025)\n" + "text": [ + "('compton shift in angstrom is', 0.0122)\n", + "('energy of incident photon in m', 1.242375e-12)\n", + "('wavelength of scattered photons in angstrom is', 0.025)\n" + ] } ], "prompt_number": 13 @@ -80,19 +181,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.4, Page number 135" + "source": [ + "Example number 4.4, Page number 135" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of photons emitted\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda=5893; #wavelength in angstrom\nP=60; #output power in Watt\n\n#Calculation\nlamda=lamda*10**-10; #wavelength in metre\nE=(h*c)/lamda;\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**4)/10**4; #rounding off to 4 decimals\nN=P/E;\n\n#Result\nprint(\"energy of photon in J is\",E);\nprint(\"energy of photon in eV is\",EeV);\nprint(\"number of photons emitted per se cond is\",N);\n\n#answer for energy in eV given in the book is wrong", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=5893; #wavelength in angstrom\n", + "P=60; #output power in Watt\n", + "\n", + "#Calculation\n", + "lamda=lamda*10**-10; #wavelength in metre\n", + "E=(h*c)/lamda;\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**4)/10**4; #rounding off to 4 decimals\n", + "N=P/E;\n", + "\n", + "#Result\n", + "print(\"energy of photon in J is\",E);\n", + "print(\"energy of photon in eV is\",EeV);\n", + "print(\"number of photons emitted per se cond is\",N);\n", + "\n", + "#answer for energy in eV given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of photon in J is', 3.373154590191753e-19)\n('energy of photon in eV is', 2.1054)\n('number of photons emitted per se cond is', 1.7787503773015396e+20)\n" + "text": [ + "('energy of photon in J is', 3.373154590191753e-19)\n", + "('energy of photon in eV is', 2.1054)\n", + "('number of photons emitted per se cond is', 1.7787503773015396e+20)\n" + ] } ], "prompt_number": 15 @@ -101,19 +231,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.5, Page number 136" + "source": [ + "Example number 4.5, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the momentum, energy and mass of a photon\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda=10; #wavelength in angstrom\n\n#Calculation\nlamda=lamda*10**-10; #wavelength in metre\nE=(h*c)/lamda;\nEeV=E/(1.602176565*10**-19); #converting J to eV\nEeV=EeV*10**-3; #converting eV to keV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\nP=h/lamda;\nM=h/(lamda*c);\n\n#Result\nprint(\"energy of photon in J is\",E);\nprint(\"energy of photon in keV is\",EeV);\nprint(\"momentum in kg m/sec is\",P);\nprint(\"mass of photon in kg is\",M);\n\n#answer for energy of photon in keV given in the book is wrong by 1 decimal", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda=10; #wavelength in angstrom\n", + "\n", + "#Calculation\n", + "lamda=lamda*10**-10; #wavelength in metre\n", + "E=(h*c)/lamda;\n", + "EeV=E/(1.602176565*10**-19); #converting J to eV\n", + "EeV=EeV*10**-3; #converting eV to keV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "P=h/lamda;\n", + "M=h/(lamda*c);\n", + "\n", + "#Result\n", + "print(\"energy of photon in J is\",E);\n", + "print(\"energy of photon in keV is\",EeV);\n", + "print(\"momentum in kg m/sec is\",P);\n", + "print(\"mass of photon in kg is\",M);\n", + "\n", + "#answer for energy of photon in keV given in the book is wrong by 1 decimal" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy of photon in J is', 1.9878e-16)\n('energy of photon in keV is', 1.241)\n('momentum in kg m/sec is', 6.626e-25)\n('mass of photon in kg is', 2.2086666666666664e-33)\n" + "text": [ + "('energy of photon in J is', 1.9878e-16)\n", + "('energy of photon in keV is', 1.241)\n", + "('momentum in kg m/sec is', 6.626e-25)\n", + "('mass of photon in kg is', 2.2086666666666664e-33)\n" + ] } ], "prompt_number": 18 @@ -122,19 +284,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.6, Page number 136" + "source": [ + "Example number 4.6, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\ne=1.602*10**-19;\nV=1.25; #potential difference in kV\n\n#Calculation\nV=V*10**3; #converting kV to V\nlamda=h/math.sqrt(2*m*e*V);\nlamda=lamda*10**10; #converting metre to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "e=1.602*10**-19;\n", + "V=1.25; #potential difference in kV\n", + "\n", + "#Calculation\n", + "V=V*10**3; #converting kV to V\n", + "lamda=h/math.sqrt(2*m*e*V);\n", + "lamda=lamda*10**10; #converting metre to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 0.3471)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 0.3471)\n" + ] } ], "prompt_number": 21 @@ -143,19 +327,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.7, Page number 136" + "source": [ + "Example number 4.7, Page number 136" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nE=45; #energy of electron in eV\nE=E*1.6*10**-19; #energy in J\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\n\n#Calculation\nlamda=h/math.sqrt(2*m*E);\nlamda=lamda*10**10; #converting metres to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "E=45; #energy of electron in eV\n", + "E=E*1.6*10**-19; #energy in J\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*E);\n", + "lamda=lamda*10**10; #converting metres to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 1.8305)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 1.8305)\n" + ] } ], "prompt_number": 24 @@ -164,19 +369,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.8, Page number 137" + "source": [ + "Example number 4.8, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nv=10**7; #velocity of electron in m/sec\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\n\n#Calculation\nlamda=h/(m*v);\nlamda=lamda*10**10; #converting metres to angstrom\nlamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"de Broglie wavelength in angstrom is\",lamda);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "v=10**7; #velocity of electron in m/sec\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "\n", + "#Calculation\n", + "lamda=h/(m*v);\n", + "lamda=lamda*10**10; #converting metres to angstrom\n", + "lamda=math.ceil(lamda*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength in angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength in angstrom is', 0.7282)\n" + "text": [ + "('de Broglie wavelength in angstrom is', 0.7282)\n" + ] } ], "prompt_number": 25 @@ -185,19 +410,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.9, Page number 137" + "source": [ + "Example number 4.9, Page number 137" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the de Broglie wavelength of alpha particle\n\n#importing modules\nimport math\n\n#Variable declaration\nV=1000; #potential difference in V\nh=6.626*10**-34; #plancks constant in Js\nm=1.67*10**-27; #mass of proton in kg\ne=1.6*10**-19; #charge of electron in J\n\n#Calculation\nlamda=h/math.sqrt(2*m*e*V);\n\n#Result\nprint(\"de Broglie wavelength of alpha particle in metre is\",lamda);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "V=1000; #potential difference in V\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=1.67*10**-27; #mass of proton in kg\n", + "e=1.6*10**-19; #charge of electron in J\n", + "\n", + "#Calculation\n", + "lamda=h/math.sqrt(2*m*e*V);\n", + "\n", + "#Result\n", + "print(\"de Broglie wavelength of alpha particle in metre is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n" + "text": [ + "('de Broglie wavelength of alpha particle in metre is', 9.063964727801313e-13)\n" + ] } ], "prompt_number": 26 @@ -206,19 +450,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.10, Page number 138" + "source": [ + "Example number 4.10, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of finding the particle\n\n#importing modules\nimport math\n\n#Variable declaration\nL=25; #width of potential in armstrong\ndelta_x=0.05; #interval in armstrong\nn=1; #particle is in its least energy\nx=L/2; #particle is at the centre\npi=180; #angle in degrees\n\n#Calculation\npi=pi*0.0174532925; #angle in radians\nL=L*10**-10; #width in m\ndelta_x=delta_x*10**-10; #interval in m\n#probability P = integration of (A**2)*(math.sin(n*pi*x/L))**2*delta_x\n#but A=math.sqrt(2/L)\n#since the particle is in a small interval integration need not be applied\n#therefore P=2*(L**(-1))*(math.sin(n*pi*x/L))**2*delta_x\nP=2*(L**(-1))*((math.sin(n*pi*x/L))**2)*delta_x;\nP=math.ceil(P*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"probability of finding the particle is\",P);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "L=25; #width of potential in armstrong\n", + "delta_x=0.05; #interval in armstrong\n", + "n=1; #particle is in its least energy\n", + "x=L/2; #particle is at the centre\n", + "pi=180; #angle in degrees\n", + "\n", + "#Calculation\n", + "pi=pi*0.0174532925; #angle in radians\n", + "L=L*10**-10; #width in m\n", + "delta_x=delta_x*10**-10; #interval in m\n", + "#probability P = integration of (A**2)*(math.sin(n*pi*x/L))**2*delta_x\n", + "#but A=math.sqrt(2/L)\n", + "#since the particle is in a small interval integration need not be applied\n", + "#therefore P=2*(L**(-1))*(math.sin(n*pi*x/L))**2*delta_x\n", + "P=2*(L**(-1))*((math.sin(n*pi*x/L))**2)*delta_x;\n", + "P=math.ceil(P*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"probability of finding the particle is\",P);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of finding the particle is', 0.004)\n" + "text": [ + "('probability of finding the particle is', 0.004)\n" + ] } ], "prompt_number": 27 @@ -227,19 +499,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.11, Page number 138" + "source": [ + "Example number 4.11, Page number 138" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of electron in eV\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=((n**2)*h**2)/(8*m*L**2);\nEeV=E/(1.6*10**-19); #converting J to eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of electron in J is\",E);\nprint(\"lowest energy of electron in eV is\",EeV);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=((n**2)*h**2)/(8*m*L**2);\n", + "EeV=E/(1.6*10**-19); #converting J to eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of electron in J is\",E);\n", + "print(\"lowest energy of electron in eV is\",EeV);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of electron in J is', 6.030752197802197e-18)\n('lowest energy of electron in eV is', 37.693)\n" + "text": [ + "('lowest energy of electron in J is', 6.030752197802197e-18)\n", + "('lowest energy of electron in eV is', 37.693)\n" + ] } ], "prompt_number": 28 @@ -248,19 +544,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.12, Page number 139" + "source": [ + "Example number 4.12, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of the system\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=(2*(n**2)*h**2)/(8*m*L**2);\nE=E/(1.6*10**-19); #converting J to eV\nE=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of system in eV is\",E);", + "input": [ + " \n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=(2*(n**2)*h**2)/(8*m*L**2);\n", + "E=E/(1.6*10**-19); #converting J to eV\n", + "E=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of system in eV is\",E);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of system in eV is', 75.385)\n" + "text": [ + "('lowest energy of system in eV is', 75.385)\n" + ] } ], "prompt_number": 29 @@ -269,19 +587,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.13, Page number 139" + "source": [ + "Example number 4.13, Page number 139" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lowest energy of the system and quantum numbers\n\n#importing modules\nimport math\n\n#Variable declaration\nh=6.626*10**-34; #plancks constant in Js\nm=9.1*10**-31; #mass of the electron in kg\nL=1; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\n#according to pauli's exclusion principle, 1st electron occupies n1=1 and second electron occupies n2=2\nn1=1;\nn2=2;\nE=((2*(n1**2)*h**2)/(8*m*L**2))+(((n2**2)*h**2)/(8*m*L**2));\nE=E/(1.6*10**-19); #converting J to eV\nE=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"lowest energy of system in eV is\",E);\nprint(\"quantum numbers are\");\nprint(\"n=1,l=0,mL=0,mS=+1/2\");\nprint(\"n=1,l=0,mL=0,mS=-1/2\");\nprint(\"n=2,l=0,mL=0,mS=+1/2\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "L=1; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "#according to pauli's exclusion principle, 1st electron occupies n1=1 and second electron occupies n2=2\n", + "n1=1;\n", + "n2=2;\n", + "E=((2*(n1**2)*h**2)/(8*m*L**2))+(((n2**2)*h**2)/(8*m*L**2));\n", + "E=E/(1.6*10**-19); #converting J to eV\n", + "E=math.ceil(E*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of system in eV is\",E);\n", + "print(\"quantum numbers are\");\n", + "print(\"n=1,l=0,mL=0,mS=+1/2\");\n", + "print(\"n=1,l=0,mL=0,mS=-1/2\");\n", + "print(\"n=2,l=0,mL=0,mS=+1/2\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of system in eV is', 226.154)\nquantum numbers are\nn=1,l=0,mL=0,mS=+1/2\nn=1,l=0,mL=0,mS=-1/2\nn=2,l=0,mL=0,mS=+1/2\n" + "text": [ + "('lowest energy of system in eV is', 226.154)\n", + "quantum numbers are\n", + "n=1,l=0,mL=0,mS=+1/2\n", + "n=1,l=0,mL=0,mS=-1/2\n", + "n=2,l=0,mL=0,mS=+1/2\n" + ] } ], "prompt_number": 30 @@ -290,19 +641,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.14, Page number 140" + "source": [ + "Example number 4.14, Page number 140" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mass of the particle\n\n#Variable declaration\nn=1;\nh=6.626*10**-34; #plancks constant in Js\nL=100; #width of potential well in angstrom\n\n#Calculation\nL=L*10**-10; #converting angstrom into metre\nE=0.025; #lowest energy in eV\nE=E*(1.6*10**-19); #converting eV to J\nm=((n**2)*h**2)/(8*E*L**2);\n\n#Result\nprint(\"mass of the particle in kg is\",m);", + "input": [ + " \n", + "#Variable declaration\n", + "n=1;\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "L=100; #width of potential well in angstrom\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #converting angstrom into metre\n", + "E=0.025; #lowest energy in eV\n", + "E=E*(1.6*10**-19); #converting eV to J\n", + "m=((n**2)*h**2)/(8*E*L**2);\n", + "\n", + "#Result\n", + "print(\"mass of the particle in kg is\",m);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mass of the particle in kg is', 1.3719961249999998e-31)\n" + "text": [ + "('mass of the particle in kg is', 1.3719961249999998e-31)\n" + ] } ], "prompt_number": 31 @@ -311,19 +681,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.15, Page number 141" + "source": [ + "Example number 4.15, Page number 141" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy density\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nT=6000; #temperature in K\nh=6.626*10**-34; #plancks constant in Js\nc=3*10**8; #velocity of light in m/s\nlamda1=450; #wavelength in nm\nlamda2=460; #wavelength in nm\n\n#Calculation\nlamda1=lamda1*10**-9; #converting nm to metre\nlamda2=lamda2*10**-9; #converting nm to metre\nnew1=c/lamda1;\nnew2=c/lamda2;\nnew=(new1+new2)/2;\nA=math.exp((h*new)/(k*T));\nrho_v=(8*math.pi*h*new**3)/(A*c**3);\n\n#Result\nprint(\"energy density of the black body in J/m^3 is\",rho_v);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "T=6000; #temperature in K\n", + "h=6.626*10**-34; #plancks constant in Js\n", + "c=3*10**8; #velocity of light in m/s\n", + "lamda1=450; #wavelength in nm\n", + "lamda2=460; #wavelength in nm\n", + "\n", + "#Calculation\n", + "lamda1=lamda1*10**-9; #converting nm to metre\n", + "lamda2=lamda2*10**-9; #converting nm to metre\n", + "new1=c/lamda1;\n", + "new2=c/lamda2;\n", + "new=(new1+new2)/2;\n", + "A=math.exp((h*new)/(k*T));\n", + "rho_v=(8*math.pi*h*new**3)/(A*c**3);\n", + "\n", + "#Result\n", + "print(\"energy density of the black body in J/m^3 is\",rho_v);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy density of the black body in J/m^3 is', 9.033622836188887e-16)\n" + "text": [ + "('energy density of the black body in J/m^3 is', 9.033622836188887e-16)\n" + ] } ], "prompt_number": 32 @@ -331,7 +731,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_6.ipynb b/Engineering_Physics/Chapter_6.ipynb index 1445b978..df63cdce 100644 --- a/Engineering_Physics/Chapter_6.ipynb +++ b/Engineering_Physics/Chapter_6.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 6" + "name": "", + "signature": "sha256:95589aa74fb7b8b919d364696d403ce9619ba363e3435f491e57c82d78d5e42c" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,53 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Crystallography" + "source": [ + "Crystallography" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.1, Page number 185" + "source": [ + "Example number 6.1, Page number 185" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the density of diamond\n\n#importing modules\nimport math\n\n#Variable declaration\nr=0.071; #radius in nm\nN=6.022*10**26; \n\n#Calculation\nr=r*10**-9; #converting r from nm to m\n#mass of carbon atom m = 12/N\nm=12/N;\n#mass of diamond M = 8*mass of one carbon atom\nM=8*m;\n#volume of diamond V = (8*r/sqrt(3))^3\nV=(8*r/math.sqrt(3))**3;\nd=M/V; #density in kg/m^3\nd=math.ceil(d*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"density of diamond in kg/m^3 is\",d);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r=0.071; #radius in nm\n", + "N=6.022*10**26; \n", + "\n", + "#Calculation\n", + "r=r*10**-9; #converting r from nm to m\n", + "#mass of carbon atom m = 12/N\n", + "m=12/N;\n", + "#mass of diamond M = 8*mass of one carbon atom\n", + "M=8*m;\n", + "#volume of diamond V = (8*r/sqrt(3))^3\n", + "V=(8*r/math.sqrt(3))**3;\n", + "d=M/V; #density in kg/m^3\n", + "d=math.ceil(d*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"density of diamond in kg/m^3 is\",d);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of diamond in kg/m^3 is', 4520.31)\n" + "text": [ + "('density of diamond in kg/m^3 is', 4520.31)\n" + ] } ], "prompt_number": 3 @@ -38,19 +67,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.2, Page number 185" + "source": [ + "Example number 6.2, Page number 185" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the percentage volume change\n\n#importing modules\nimport math\n\n#Variable declaration\naBCC=0.332; #lattice constant in nm\naHCP=0.296; #lattice constant in nm\nc=0.468; #c in nm\n\n#Calculation\naBCC=aBCC*10**-9; #converting nm to m\nVbcc=aBCC**3;\naHCP=aHCP*10**-9; #converting nm to m\nc=c*10**-9; #converting nm to m\nVhcp=6*(math.sqrt(3)/4)*aHCP**2*c;\nV=Vhcp-Vbcc;\nVch=(V*100)/Vbcc;\nVch=math.ceil(Vch*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"percentage change in volume is\",Vch);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "aBCC=0.332; #lattice constant in nm\n", + "aHCP=0.296; #lattice constant in nm\n", + "c=0.468; #c in nm\n", + "\n", + "#Calculation\n", + "aBCC=aBCC*10**-9; #converting nm to m\n", + "Vbcc=aBCC**3;\n", + "aHCP=aHCP*10**-9; #converting nm to m\n", + "c=c*10**-9; #converting nm to m\n", + "Vhcp=6*(math.sqrt(3)/4)*aHCP**2*c;\n", + "V=Vhcp-Vbcc;\n", + "Vch=(V*100)/Vbcc;\n", + "Vch=math.ceil(Vch*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"percentage change in volume is\",Vch);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('percentage change in volume is', 191.12)\n" + "text": [ + "('percentage change in volume is', 191.12)\n" + ] } ], "prompt_number": 4 @@ -59,19 +116,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.3, Page number 186" + "source": [ + "Example number 6.3, Page number 186" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the density\n\n#importing modules\nimport math\n\n#Variable declaration\nr=1.278; #atomic radius of Cu in Angstrom\nA=63.54; #atomic weight of Cu\nn=4; #for FCC n=4\nNa=6.022*10**26;\n\n#Calculation\nr=r*10**-10; #converting atomic radius from Angstrom to m\na=2*math.sqrt(2)*r; \nrho=(n*A)/(Na*a**3);\nrho=math.ceil(rho*100)/100; #rounding off to 2 decimals\n\n#Result\nprint(\"density of Cu in kg/m^3 is\",rho);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "r=1.278; #atomic radius of Cu in Angstrom\n", + "A=63.54; #atomic weight of Cu\n", + "n=4; #for FCC n=4\n", + "Na=6.022*10**26;\n", + "\n", + "#Calculation\n", + "r=r*10**-10; #converting atomic radius from Angstrom to m\n", + "a=2*math.sqrt(2)*r; \n", + "rho=(n*A)/(Na*a**3);\n", + "rho=math.ceil(rho*100)/100; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"density of Cu in kg/m^3 is\",rho);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of Cu in kg/m^3 is', 8935.92)\n" + "text": [ + "('density of Cu in kg/m^3 is', 8935.92)\n" + ] } ], "prompt_number": 6 @@ -80,19 +162,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.4, Page number 186" + "source": [ + "Example number 6.4, Page number 186" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the distance between adjacent atoms\n\n#importing modules\nimport math\nimport numpy as np\n\n#Variable declaration\nrho=2180; #density of NaCl in kg/m^3\nwNa=23; #atomic weight of Na\nwCl=35.5; #atomic weight of Cl\nn=4; #for FCC n=4\nNa=6.022*10**26;\n\n#Calculation\nA=wNa+wCl; #molecular weight of NaCl\nx=np.reciprocal(3.);\na=((n*A)/(Na*rho))**x;\n\n#Result\nprint(\"interatomic distance in NaCl in m is\",a); \n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "rho=2180; #density of NaCl in kg/m^3\n", + "wNa=23; #atomic weight of Na\n", + "wCl=35.5; #atomic weight of Cl\n", + "n=4; #for FCC n=4\n", + "Na=6.022*10**26;\n", + "\n", + "#Calculation\n", + "A=wNa+wCl; #molecular weight of NaCl\n", + "x=np.reciprocal(3.);\n", + "a=((n*A)/(Na*rho))**x;\n", + "\n", + "#Result\n", + "print(\"interatomic distance in NaCl in m is\",a); \n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interatomic distance in NaCl in m is', 5.6278114346454509e-10)\n" + "text": [ + "('interatomic distance in NaCl in m is', 5.6278114346454509e-10)\n" + ] } ], "prompt_number": 7 @@ -101,19 +207,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.5, Page number 187" + "source": [ + "Example number 6.5, Page number 187" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the interplanar spacing\n\n#importing modules\nimport math\n\n#Variable declaration\na=0.42; #lattice constant in nm\nh1=1;\nk1=0;\nl1=1; #indices of the plane (101)\nh2=2;\nk2=2;\nl2=1; #indices of the plane (221)\n\n#Calculation\na=a*10**-9; #converting from nm to m\nd1=a/math.sqrt((h1**2)+(k1**2)+(l1**2)); #interplanar spacing for plane (101)\nd1=d1*10**9; #converting from m to nm\nd1=math.ceil(d1*10**5)/10**5; #rounding off to 5 decimals\nd2=a/math.sqrt((h2**2)+(k2**2)+(l2**2)); #interplanar spacing for plane (221)\nd2=d2*10**9; #converting from m to nm\n\n#Result\nprint(\"interplanar spacing for (101) in nm is\",d1);\nprint(\"interplanar spacing for (221) in nm is\",d2);\n\n", + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a=0.42; #lattice constant in nm\n", + "h1=1;\n", + "k1=0;\n", + "l1=1; #indices of the plane (101)\n", + "h2=2;\n", + "k2=2;\n", + "l2=1; #indices of the plane (221)\n", + "\n", + "#Calculation\n", + "a=a*10**-9; #converting from nm to m\n", + "d1=a/math.sqrt((h1**2)+(k1**2)+(l1**2)); #interplanar spacing for plane (101)\n", + "d1=d1*10**9; #converting from m to nm\n", + "d1=math.ceil(d1*10**5)/10**5; #rounding off to 5 decimals\n", + "d2=a/math.sqrt((h2**2)+(k2**2)+(l2**2)); #interplanar spacing for plane (221)\n", + "d2=d2*10**9; #converting from m to nm\n", + "\n", + "#Result\n", + "print(\"interplanar spacing for (101) in nm is\",d1);\n", + "print(\"interplanar spacing for (221) in nm is\",d2);\n", + "\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interplanar spacing for (101) in nm is', 0.29699)\n('interplanar spacing for (221) in nm is', 0.14)\n" + "text": [ + "('interplanar spacing for (101) in nm is', 0.29699)\n", + "('interplanar spacing for (221) in nm is', 0.14)\n" + ] } ], "prompt_number": 8 @@ -122,19 +257,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.6, Page number 187" + "source": [ + "Example number 6.6, Page number 187" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To identify the axial intercepts\n\n#Variable declaration\nh1=1;\nk1=0;\nl1=2; #indices for plane (102)\nh2=2;\nk2=3;\nl2=1; #indices for plane (231)\nh3=3;\nk3=-1;\nl3=2; #indices for plane (31'2)\n\n#Calculation\n#intercepts made by the plane is a/h, b/k, c/l\n#for plane (102) intercepts are a/1=a, b/0=infinite, c/2\n#for plane (231) intercepts are a/2, b/3, c/1=c\n#for plane (31'2) intercepts are a/3=a, b/-1=-b, c/2\n\n#Result\nprint(\"for plane (102) intercepts are a/1=a, b/0=infinite, c/2\");\nprint(\"for plane (231) intercepts are a/2, b/3, c/1=c\");\nprint(\"for plane (312) intercepts are a/3=a, b/-1=-b, c/2\");\n", + "input": [ + " \n", + "#Variable declaration\n", + "h1=1;\n", + "k1=0;\n", + "l1=2; #indices for plane (102)\n", + "h2=2;\n", + "k2=3;\n", + "l2=1; #indices for plane (231)\n", + "h3=3;\n", + "k3=-1;\n", + "l3=2; #indices for plane (31'2)\n", + "\n", + "#Calculation\n", + "#intercepts made by the plane is a/h, b/k, c/l\n", + "#for plane (102) intercepts are a/1=a, b/0=infinite, c/2\n", + "#for plane (231) intercepts are a/2, b/3, c/1=c\n", + "#for plane (31'2) intercepts are a/3=a, b/-1=-b, c/2\n", + "\n", + "#Result\n", + "print(\"for plane (102) intercepts are a/1=a, b/0=infinite, c/2\");\n", + "print(\"for plane (231) intercepts are a/2, b/3, c/1=c\");\n", + "print(\"for plane (312) intercepts are a/3=a, b/-1=-b, c/2\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "for plane (102) intercepts are a/1=a, b/0=infinite, c/2\nfor plane (231) intercepts are a/2, b/3, c/1=c\nfor plane (312) intercepts are a/3=a, b/-1=-b, c/2\n" + "text": [ + "for plane (102) intercepts are a/1=a, b/0=infinite, c/2\n", + "for plane (231) intercepts are a/2, b/3, c/1=c\n", + "for plane (312) intercepts are a/3=a, b/-1=-b, c/2\n" + ] } ], "prompt_number": 10 @@ -143,19 +307,57 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.7, Page number 188" + "source": [ + "Example number 6.7, Page number 188" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the angle between 2 planes\n\n#importing modules\nimport math\n\n#Variable declaration\nu1=1;\nv1=1;\nw1=1; #indices for plane (111)\nu2=2;\nv2=1;\nw2=2; #indices for plane (212)\n\n#Calculation\nA=u1*u2+v1*v2+w1*w2; \nB1=math.sqrt((u1**2)+(v1**2)+(w1**2));\nB2=math.sqrt((u2**2)+(v2**2)+(w2**2));\nB=A/(B1*B2);\nB=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\ntheta=math.acos(B); #angle in radian\ntheta=theta*57.2957795; #converting radian to degrees\ntheeta=math.ceil(theta*10**3)/10**3; #rounding off to 3 decimals\ndeg=int(theta); #converting to degrees\nt=60*(theta-deg);\nmi=int(t); #converting to minutes\nsec=60*(t-mi); #converting to seconds\nsec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"angle between the planes in degrees is\",theeta);\nprint(\"angle between the planes is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "u1=1;\n", + "v1=1;\n", + "w1=1; #indices for plane (111)\n", + "u2=2;\n", + "v2=1;\n", + "w2=2; #indices for plane (212)\n", + "\n", + "#Calculation\n", + "A=u1*u2+v1*v2+w1*w2; \n", + "B1=math.sqrt((u1**2)+(v1**2)+(w1**2));\n", + "B2=math.sqrt((u2**2)+(v2**2)+(w2**2));\n", + "B=A/(B1*B2);\n", + "B=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n", + "theta=math.acos(B); #angle in radian\n", + "theta=theta*57.2957795; #converting radian to degrees\n", + "theeta=math.ceil(theta*10**3)/10**3; #rounding off to 3 decimals\n", + "deg=int(theta); #converting to degrees\n", + "t=60*(theta-deg);\n", + "mi=int(t); #converting to minutes\n", + "sec=60*(t-mi); #converting to seconds\n", + "sec=math.ceil(sec*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"angle between the planes in degrees is\",theeta);\n", + "print(\"angle between the planes is\",deg,\"degrees\",mi,\"minutes\",sec,\"seconds\");\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('angle between the planes in degrees is', 15.783)\n('angle between the planes is', 15, 'degrees', 46, 'minutes', 57.85, 'seconds')\n" + "text": [ + "('angle between the planes in degrees is', 15.783)\n", + "('angle between the planes is', 15, 'degrees', 46, 'minutes', 57.85, 'seconds')\n" + ] } ], "prompt_number": 13 @@ -164,12 +366,16 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.8, Page number 188" + "source": [ + "Example number 6.8, Page number 188" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#sketching the crystallographic planes", + "input": [ + "#sketching the crystallographic planes" + ], "language": "python", "metadata": {}, "outputs": [], @@ -179,19 +385,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.9, Page number 189" + "source": [ + "Example number 6.9, Page number 189" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the lattice constant\n\n#importing modules\nimport math\n\n#Variable declaration\nd=0.2338; #interplanar distance in nm\nh=-1;\nk=1;\nl=1; #indices of the plane (1'11)\n\n#Calculation\nd=d*10**-9; #converting from nm to m\na=d*math.sqrt((h**2)+(k**2)+(l**2));\na=a*10**9; #converting lattice constant from m to nm\na=math.ceil(a*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"lattice constant in nm is\",a);\n\n", + "input": [ + "\n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "d=0.2338; #interplanar distance in nm\n", + "h=-1;\n", + "k=1;\n", + "l=1; #indices of the plane (1'11)\n", + "\n", + "#Calculation\n", + "d=d*10**-9; #converting from nm to m\n", + "a=d*math.sqrt((h**2)+(k**2)+(l**2));\n", + "a=a*10**9; #converting lattice constant from m to nm\n", + "a=math.ceil(a*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"lattice constant in nm is\",a);\n", + "\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lattice constant in nm is', 0.40496)\n" + "text": [ + "('lattice constant in nm is', 0.40496)\n" + ] } ], "prompt_number": 15 @@ -200,19 +430,63 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.10, Page number 189" + "source": [ + "Example number 6.10, Page number 189" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To show that for a simple cubic system d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n\n#importing modules\nimport math\n\n#variable declaration\nh1=1;\nk1=0;\nl1=0; #indices for plane (100)\nh2=1;\nk2=1;\nl2=0; #indices for plane (110)\nh3=1;\nk3=1;\nl3=1; #indices for plane (111)\n\n#Calculation\n#d=a/math.sqrt((h**2)+(k**2)+(l**2))\n#d100=a/math.sqrt((h1**2)+(k1**2)+(l1**2))\nx1=math.sqrt((h1**2)+(k1**2)+(l1**2));\n#d100=a/x1 = a/1 = a\n#d110=a/math.sqrt((h2**2)+(k2**2)+(l2**2))\nx2=math.sqrt((h2**2)+(k2**2)+(l2**2));\nx2=math.ceil(x2*10**4)/10**4; #rounding off to 4 decimals\n#d110=a/x2 = a/sqrt(2)\n#d111=a/math.sqrt((h3**2)+(k3**2)+(l3**2))\nx3=math.sqrt((h3**2)+(k3**2)+(l3**2));\nx3=math.ceil(x3*10**4)/10**4; #rounding off to 4 decimals\n#d111=a/x3 = a/sqrt(3)\n#hence d100:d110:d111=a:a/sqrt(2):a/sqrt(3)\n#multiplying RHS by sqrt(6) we get d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n\n#Result\nprint(\"value of x1 is\",x1);\nprint(\"value of x2 is\",x2);\nprint(\"value of x3 is\",x3);\nprint(\"d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "h1=1;\n", + "k1=0;\n", + "l1=0; #indices for plane (100)\n", + "h2=1;\n", + "k2=1;\n", + "l2=0; #indices for plane (110)\n", + "h3=1;\n", + "k3=1;\n", + "l3=1; #indices for plane (111)\n", + "\n", + "#Calculation\n", + "#d=a/math.sqrt((h**2)+(k**2)+(l**2))\n", + "#d100=a/math.sqrt((h1**2)+(k1**2)+(l1**2))\n", + "x1=math.sqrt((h1**2)+(k1**2)+(l1**2));\n", + "#d100=a/x1 = a/1 = a\n", + "#d110=a/math.sqrt((h2**2)+(k2**2)+(l2**2))\n", + "x2=math.sqrt((h2**2)+(k2**2)+(l2**2));\n", + "x2=math.ceil(x2*10**4)/10**4; #rounding off to 4 decimals\n", + "#d110=a/x2 = a/sqrt(2)\n", + "#d111=a/math.sqrt((h3**2)+(k3**2)+(l3**2))\n", + "x3=math.sqrt((h3**2)+(k3**2)+(l3**2));\n", + "x3=math.ceil(x3*10**4)/10**4; #rounding off to 4 decimals\n", + "#d111=a/x3 = a/sqrt(3)\n", + "#hence d100:d110:d111=a:a/sqrt(2):a/sqrt(3)\n", + "#multiplying RHS by sqrt(6) we get d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n", + "\n", + "#Result\n", + "print(\"value of x1 is\",x1);\n", + "print(\"value of x2 is\",x2);\n", + "print(\"value of x3 is\",x3);\n", + "print(\"d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('value of x1 is', 1.0)\n('value of x2 is', 1.4143)\n('value of x3 is', 1.7321)\nd100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n" + "text": [ + "('value of x1 is', 1.0)\n", + "('value of x2 is', 1.4143)\n", + "('value of x3 is', 1.7321)\n", + "d100:d110:d111=sqrt(6):sqrt(3):sqrt(2)\n" + ] } ], "prompt_number": 16 @@ -221,19 +495,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.11, Page number 190" + "source": [ + "Example number 6.11, Page number 190" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the ratio of intercepts in a simple cubic crystal\n\n#variable declaration\nh=2;\nk=3;\nl=1; #indices for plane (231)\n\n#Calculation\n#intercepts made by the plane is a/h, b/k, c/l\n#for a cubic unit cell, a=b=c\n#for plane (231) intercepts are a/2, a/3, a/1 = a\n#ratio of the intercepts is 1/2:1/3:1\n#LCM is 6. multiplying by LCM, we get ratio l1:l2:l3 = 3:2:6\n\n#Result\nprint(\"l1:l2:l3 = 3:2:6\");", + "input": [ + " \n", + "#variable declaration\n", + "h=2;\n", + "k=3;\n", + "l=1; #indices for plane (231)\n", + "\n", + "#Calculation\n", + "#intercepts made by the plane is a/h, b/k, c/l\n", + "#for a cubic unit cell, a=b=c\n", + "#for plane (231) intercepts are a/2, a/3, a/1 = a\n", + "#ratio of the intercepts is 1/2:1/3:1\n", + "#LCM is 6. multiplying by LCM, we get ratio l1:l2:l3 = 3:2:6\n", + "\n", + "#Result\n", + "print(\"l1:l2:l3 = 3:2:6\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "l1:l2:l3 = 3:2:6\n" + "text": [ + "l1:l2:l3 = 3:2:6\n" + ] } ], "prompt_number": 17 @@ -242,19 +536,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.12, Page number 190" + "source": [ + "Example number 6.12, Page number 190" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the lengths of intercepts along Y and Z axes\n\n#variable declaration\nh=1;\nk=2;\nl=3; #indices for plane (123)\nl1=0.8; #l1 in armstrong\na=0.8; #a in armstrong\nb=1.2; #b in armstrong\nc=1.5; #c in armstrong\n\n#Calculation\n#intercepts made by the plane is a/h, b/k, c/l\n#for plane (123) intercepts are a/1 = a, b/2, c/3\n#ratio of the intercepts l1:l2:l3 = a:b/2:c/3\n#thus 0.8:l2:l3 = 0.8:1.2/2:1.5/3\nl2=1.2/2; #l2 in armstrong\nl3=1.5/3; #l3 in armstrong\n\n#Result\nprint(\"value of l2 in armstrong is\",l2);\nprint(\"value of l3 in armstrong is\",l3);", + "input": [ + " \n", + "#variable declaration\n", + "h=1;\n", + "k=2;\n", + "l=3; #indices for plane (123)\n", + "l1=0.8; #l1 in armstrong\n", + "a=0.8; #a in armstrong\n", + "b=1.2; #b in armstrong\n", + "c=1.5; #c in armstrong\n", + "\n", + "#Calculation\n", + "#intercepts made by the plane is a/h, b/k, c/l\n", + "#for plane (123) intercepts are a/1 = a, b/2, c/3\n", + "#ratio of the intercepts l1:l2:l3 = a:b/2:c/3\n", + "#thus 0.8:l2:l3 = 0.8:1.2/2:1.5/3\n", + "l2=1.2/2; #l2 in armstrong\n", + "l3=1.5/3; #l3 in armstrong\n", + "\n", + "#Result\n", + "print(\"value of l2 in armstrong is\",l2);\n", + "print(\"value of l3 in armstrong is\",l3);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('value of l2 in armstrong is', 0.6)\n('value of l3 in armstrong is', 0.5)\n" + "text": [ + "('value of l2 in armstrong is', 0.6)\n", + "('value of l3 in armstrong is', 0.5)\n" + ] } ], "prompt_number": 18 @@ -263,19 +584,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.13, Page number 191" + "source": [ + "Example number 6.13, Page number 191" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the nearest neighbour distance\n\n#Calculation\n#in simple cubic unit cell, corner atom is the nearest neighbour to another corner atom. \n#Hence nearest neighbour distance is a.\n#in BCC the body centered atom is the nearest neighbour to a corner atom.\n#the distance between body centered atom and corner atom is 2r\n#but r=sqrt(3)*a/4\n#distance = 2*sqrt(3)*a/4 = sqrt(3)*a/2\n#in FCC the face centered atom is the nearest neighbour to a corner atom.\n#the distance between face centered atom and corner atom is 2r\n#but r = a/sqrt(8)\n#distance = 2*a/sqrt(8) = a/sqrt(2)\n\n#Result\nprint(\"in simple cubic unit cell nearest neighbour distance is a\");\nprint(\"in body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\");\nprint(\"in face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\");", + "input": [ + " \n", + "#Calculation\n", + "#in simple cubic unit cell, corner atom is the nearest neighbour to another corner atom. \n", + "#Hence nearest neighbour distance is a.\n", + "#in BCC the body centered atom is the nearest neighbour to a corner atom.\n", + "#the distance between body centered atom and corner atom is 2r\n", + "#but r=sqrt(3)*a/4\n", + "#distance = 2*sqrt(3)*a/4 = sqrt(3)*a/2\n", + "#in FCC the face centered atom is the nearest neighbour to a corner atom.\n", + "#the distance between face centered atom and corner atom is 2r\n", + "#but r = a/sqrt(8)\n", + "#distance = 2*a/sqrt(8) = a/sqrt(2)\n", + "\n", + "#Result\n", + "print(\"in simple cubic unit cell nearest neighbour distance is a\");\n", + "print(\"in body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\");\n", + "print(\"in face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "in simple cubic unit cell nearest neighbour distance is a\nin body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\nin face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\n" + "text": [ + "in simple cubic unit cell nearest neighbour distance is a\n", + "in body centered cubic unit cell nearest neighbour distance is sqrt(3)*a/2\n", + "in face centered cubic unit cell nearest neighbour distance is a/sqrt(2)\n" + ] } ], "prompt_number": 19 @@ -284,19 +629,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.14, Page number 191" + "source": [ + "Example number 6.14, Page number 191" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the spacing of the lattice plane\n\n#importing modules\nimport math\n\n#variable declaration\na=2.04; #lattice parameter in armstrong\nh=2;\nk=1;\nl=2; #indices for plane (212)\n\n#Calculation\na=a*10**-10; #converting from armstrong to m\nd=a/math.sqrt((h**2)+(k**2)+(l**2));\nd=d*10**10; #converting from m to armstrong\nd=math.ceil(d*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"interplanar distance in armstrong is\",d);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "a=2.04; #lattice parameter in armstrong\n", + "h=2;\n", + "k=1;\n", + "l=2; #indices for plane (212)\n", + "\n", + "#Calculation\n", + "a=a*10**-10; #converting from armstrong to m\n", + "d=a/math.sqrt((h**2)+(k**2)+(l**2));\n", + "d=d*10**10; #converting from m to armstrong\n", + "d=math.ceil(d*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"interplanar distance in armstrong is\",d);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interplanar distance in armstrong is', 0.681)\n" + "text": [ + "('interplanar distance in armstrong is', 0.681)\n" + ] } ], "prompt_number": 20 @@ -305,19 +673,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.15, Page number 191" + "source": [ + "Example number 6.15, Page number 191" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of atoms per unit cell\n\n#importing modules\nimport math\n\n#variable declaration\nr=1.278; #radius of Cu in armstrong\nM=63.54; #atomic weight of Cu\nrho=8980; #density in kg/m^3\nNa=6.022*10**26;\n\n#Calculation\nr=r*10**-10; #radius in m\na=math.sqrt(8)*r;\nn=(rho*Na*a**3)/M;\n\n#Result\nprint(\"interatomic distance in m is\",a);\nprint(\"number of atoms per Cu unit cell is\",int(n));", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "r=1.278; #radius of Cu in armstrong\n", + "M=63.54; #atomic weight of Cu\n", + "rho=8980; #density in kg/m^3\n", + "Na=6.022*10**26;\n", + "\n", + "#Calculation\n", + "r=r*10**-10; #radius in m\n", + "a=math.sqrt(8)*r;\n", + "n=(rho*Na*a**3)/M;\n", + "\n", + "#Result\n", + "print(\"interatomic distance in m is\",a);\n", + "print(\"number of atoms per Cu unit cell is\",int(n));" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('interatomic distance in m is', 3.6147298654256317e-10)\n('number of atoms per Cu unit cell is', 4)\n" + "text": [ + "('interatomic distance in m is', 3.6147298654256317e-10)\n", + "('number of atoms per Cu unit cell is', 4)\n" + ] } ], "prompt_number": 21 @@ -326,19 +718,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.16, Page number 192" + "source": [ + "Example number 6.16, Page number 192" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Miller indices \n\n#variable declaration\na=0.429;\nb=1;\nc=0.379; #intercepts of an orthorhombic crystal\n\n#Calculation\n#ratio of intercepts are 0.214:1:0.188 = (a/0.429)*0.214:1:(c/0.379)*0.188 = a/2:b:c/2\n#thus the coefficients are 1/2:1:1/2. inverses are 2,1,2.\n#thus miller indices for the first plane are (212)\n#ratio of intercepts are 0.858:1:0.754 = (a/0.429)*0.0.858:1:(c/0.379)*0.754 = 2a:b:2c\n#thus the coefficients are 2:1:2. inverses are 1/2,1,1/2. LCM is 2. multiplying with LCM we get 1,2,1\n#thus miller indices for the second plane are (121)\n#ratio of intercepts are 0.429:infinite:0.126 = (a/0.429)*0.429:infinite:(c/0.379)*0.126 = a:infiniteb:c/3\n#thus the coefficients are 1:infinte:1/3. inverses are 1,0,3.\n#thus miller indices for the third plane are (103)\n\n#Result\nprint(\"miller indices for the first plane are (212)\");\nprint(\"miller indices for the second plane are (121)\");\nprint(\"miller indices for the third plane are (103)\");\n", + "input": [ + " \n", + "#variable declaration\n", + "a=0.429;\n", + "b=1;\n", + "c=0.379; #intercepts of an orthorhombic crystal\n", + "\n", + "#Calculation\n", + "#ratio of intercepts are 0.214:1:0.188 = (a/0.429)*0.214:1:(c/0.379)*0.188 = a/2:b:c/2\n", + "#thus the coefficients are 1/2:1:1/2. inverses are 2,1,2.\n", + "#thus miller indices for the first plane are (212)\n", + "#ratio of intercepts are 0.858:1:0.754 = (a/0.429)*0.0.858:1:(c/0.379)*0.754 = 2a:b:2c\n", + "#thus the coefficients are 2:1:2. inverses are 1/2,1,1/2. LCM is 2. multiplying with LCM we get 1,2,1\n", + "#thus miller indices for the second plane are (121)\n", + "#ratio of intercepts are 0.429:infinite:0.126 = (a/0.429)*0.429:infinite:(c/0.379)*0.126 = a:infiniteb:c/3\n", + "#thus the coefficients are 1:infinte:1/3. inverses are 1,0,3.\n", + "#thus miller indices for the third plane are (103)\n", + "\n", + "#Result\n", + "print(\"miller indices for the first plane are (212)\");\n", + "print(\"miller indices for the second plane are (121)\");\n", + "print(\"miller indices for the third plane are (103)\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "miller indices for the first plane are (212)\nmiller indices for the second plane are (121)\nmiller indices for the third plane are (103)\n" + "text": [ + "miller indices for the first plane are (212)\n", + "miller indices for the second plane are (121)\n", + "miller indices for the third plane are (103)\n" + ] } ], "prompt_number": 12 @@ -347,19 +767,66 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.17, Page number 193" + "source": [ + "Example number 6.17, Page number 193" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of atoms per unit area\n\n#importing modules\nimport math\nimport numpy as np\n\n#variable declaration\nh1=1;\nk1=0;\nl1=0; #indices of the first plane (100)\nh2=1;\nk2=1;\nl2=0; #indices of the second plane (110)\nh3=1;\nk3=1;\nl3=1; #indices of the third plane (111)\n\n#Calculation\nn_1=np.reciprocal(4.);\nn_2=np.reciprocal(2.);\nn_3=np.reciprocal(6.);\nn1=(n_1*4)+1; #number of atoms per unit cell in (100)\n#number of atoms per m^2 is 2/a**2. but a=sqrt(8)*r.\n#hence number of atoms per m^2 is 1/(4*r**2)\nn2=(n_1*4)+(2*n_2); #number of atoms per unit cell in (110)\n#number of atoms per m^2 is 1/a*sqrt(2)*a. but a=sqrt(8)*r.\n#hence number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\nn3=(n_3*3)+(3*n_2); #number of atoms per unit cell in (111)\n#number of atoms per m^2 is 2/(sqrt(3)/4)*a**2. but a=4*r.\n#hence number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n\n#Result\nprint(\"number of atoms per unit cell in (100)\",n1);\nprint(\"number of atoms per m^2 is 1/(4*r**2)\");\nprint(\"number of atoms per unit cell in (110)\",n2);\nprint(\"number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\");\nprint(\"number of atoms per unit cell in (111)\",n3);\nprint(\"number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\");\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "import numpy as np\n", + "\n", + "#variable declaration\n", + "h1=1;\n", + "k1=0;\n", + "l1=0; #indices of the first plane (100)\n", + "h2=1;\n", + "k2=1;\n", + "l2=0; #indices of the second plane (110)\n", + "h3=1;\n", + "k3=1;\n", + "l3=1; #indices of the third plane (111)\n", + "\n", + "#Calculation\n", + "n_1=np.reciprocal(4.);\n", + "n_2=np.reciprocal(2.);\n", + "n_3=np.reciprocal(6.);\n", + "n1=(n_1*4)+1; #number of atoms per unit cell in (100)\n", + "#number of atoms per m^2 is 2/a**2. but a=sqrt(8)*r.\n", + "#hence number of atoms per m^2 is 1/(4*r**2)\n", + "n2=(n_1*4)+(2*n_2); #number of atoms per unit cell in (110)\n", + "#number of atoms per m^2 is 1/a*sqrt(2)*a. but a=sqrt(8)*r.\n", + "#hence number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\n", + "n3=(n_3*3)+(3*n_2); #number of atoms per unit cell in (111)\n", + "#number of atoms per m^2 is 2/(sqrt(3)/4)*a**2. but a=4*r.\n", + "#hence number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n", + "\n", + "#Result\n", + "print(\"number of atoms per unit cell in (100)\",n1);\n", + "print(\"number of atoms per m^2 is 1/(4*r**2)\");\n", + "print(\"number of atoms per unit cell in (110)\",n2);\n", + "print(\"number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\");\n", + "print(\"number of atoms per unit cell in (111)\",n3);\n", + "print(\"number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('number of atoms per unit cell in (100)', 2.0)\nnumber of atoms per m^2 is 1/(4*r**2)\n('number of atoms per unit cell in (110)', 2.0)\nnumber of atoms per m^2 is 1/(8*sqrt(2)*r**2)\n('number of atoms per unit cell in (111)', 2.0)\nnumber of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n" + "text": [ + "('number of atoms per unit cell in (100)', 2.0)\n", + "number of atoms per m^2 is 1/(4*r**2)\n", + "('number of atoms per unit cell in (110)', 2.0)\n", + "number of atoms per m^2 is 1/(8*sqrt(2)*r**2)\n", + "('number of atoms per unit cell in (111)', 2.0)\n", + "number of atoms per m^2 is 1/(2*sqrt(3)*r**2)\n" + ] } ], "prompt_number": 22 @@ -368,19 +835,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 6.18, Page number 194" + "source": [ + "Example number 6.18, Page number 194" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the atomic packing fraction and ionic packing fraction of NaCl\n\n#importing modules\nimport math\n\n#variable declaration\nr=0.97; #radius of Na+ ion in armstrong\nR=1.81; #radius of Cl- ion in armstrong\n\n#Calculation\n#atomic packing factor=packing density PD\n#PD=Volume of atoms/Volume of unit cell\n#volume of unit cell=a**3\n#volume of atoms=number of atoms*volume of 1 atom = 4*(4/3)*math.pi*r**3\n#but r=a/sqrt(8). hence PD = 4*(4/3)*math.pi*(a/(2*sqrt(2)))**3*(1/a**3) = 0.74\n#atomic packing factor = 0.74\nr=r*10**-10; #radius of Na+ ion in m\nR=R*10**-10; #radius of Cl- ion in m\nVna = (4*4*math.pi*r**3)/3; #volume of Na atoms\nVcl = (4*4*math.pi*R**3)/3; #volume of Cl atoms \nV=(2*(r+R))**3; #volume of unit cell\nIPF=(Vna+Vcl)/V; #ionic packing factor\nIPF=math.ceil(IPF*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"atomic packing factor = 0.74\");\nprint(\"ionic packing factor of NaCl crystal is\",IPF);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#variable declaration\n", + "r=0.97; #radius of Na+ ion in armstrong\n", + "R=1.81; #radius of Cl- ion in armstrong\n", + "\n", + "#Calculation\n", + "#atomic packing factor=packing density PD\n", + "#PD=Volume of atoms/Volume of unit cell\n", + "#volume of unit cell=a**3\n", + "#volume of atoms=number of atoms*volume of 1 atom = 4*(4/3)*math.pi*r**3\n", + "#but r=a/sqrt(8). hence PD = 4*(4/3)*math.pi*(a/(2*sqrt(2)))**3*(1/a**3) = 0.74\n", + "#atomic packing factor = 0.74\n", + "r=r*10**-10; #radius of Na+ ion in m\n", + "R=R*10**-10; #radius of Cl- ion in m\n", + "Vna = (4*4*math.pi*r**3)/3; #volume of Na atoms\n", + "Vcl = (4*4*math.pi*R**3)/3; #volume of Cl atoms \n", + "V=(2*(r+R))**3; #volume of unit cell\n", + "IPF=(Vna+Vcl)/V; #ionic packing factor\n", + "IPF=math.ceil(IPF*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"atomic packing factor = 0.74\");\n", + "print(\"ionic packing factor of NaCl crystal is\",IPF);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "atomic packing factor = 0.74\n('ionic packing factor of NaCl crystal is', 0.6671)\n" + "text": [ + "atomic packing factor = 0.74\n", + "('ionic packing factor of NaCl crystal is', 0.6671)\n" + ] } ], "prompt_number": 24 @@ -388,7 +887,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_7.ipynb b/Engineering_Physics/Chapter_7.ipynb index c59443c9..acb1144d 100644 --- a/Engineering_Physics/Chapter_7.ipynb +++ b/Engineering_Physics/Chapter_7.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 7" + "name": "", + "signature": "sha256:0a8ebb52dee60395969030b1d2962543e204a93314e21a66724d3bafb10b7ddf" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,59 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Crystal Imperfections" + "source": [ + "Crystal Imperfections" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.1, Page number 207 " + "source": [ + "Example number 7.1, Page number 207 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of vacancies and vacancy fraction\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nEv=0.98; #energy in eV/atom\nT1=900; #temperature in C\nT2=1000;\nA=6.022*10**26; #avagadro's constant\nw=196.9; #atomic weight in g/mol\nd=18.63; #density in g/cm^3\n\n#Calculation\nEv=Ev*1.6*10**-19; #converting eV to J\nd=d*10**3; #converting g/cm^3 into kg/m^3\nN=(A*d)/w;\nn=N*math.exp(-Ev/(k*T1));\n#let valency fraction n/N be V\nV=math.exp(-Ev/(k*T2));\n\n#Result\nprint(\"concentration of atoms per m^3 is\",N);\nprint(\"number of vacancies per m^3 is\",n);\nprint(\"valency fraction is\",V);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "Ev=0.98; #energy in eV/atom\n", + "T1=900; #temperature in C\n", + "T2=1000;\n", + "A=6.022*10**26; #avagadro's constant\n", + "w=196.9; #atomic weight in g/mol\n", + "d=18.63; #density in g/cm^3\n", + "\n", + "#Calculation\n", + "Ev=Ev*1.6*10**-19; #converting eV to J\n", + "d=d*10**3; #converting g/cm^3 into kg/m^3\n", + "N=(A*d)/w;\n", + "n=N*math.exp(-Ev/(k*T1));\n", + "#let valency fraction n/N be V\n", + "V=math.exp(-Ev/(k*T2));\n", + "\n", + "#Result\n", + "print(\"concentration of atoms per m^3 is\",N);\n", + "print(\"number of vacancies per m^3 is\",n);\n", + "print(\"valency fraction is\",V);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of atoms per m^3 is', 5.69780904012189e+28)\n('number of vacancies per m^3 is', 1.8742498047705634e+23)\n('valency fraction is', 1.1625392535344139e-05)\n" + "text": [ + "('concentration of atoms per m^3 is', 5.69780904012189e+28)\n", + "('number of vacancies per m^3 is', 1.8742498047705634e+23)\n", + "('valency fraction is', 1.1625392535344139e-05)\n" + ] } ], "prompt_number": 2 @@ -38,19 +73,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.2, Page number 208 " + "source": [ + "Example number 7.2, Page number 208 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the energy for vacancy formation\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nA=6.022*10**26; #avagadro's constant\nT=1073; #temperature in K\nn=3.6*10**23; #number of vacancies\nd=9.5; #density in g/cm^3\nw=107.9; #atomic weight in g/mol\n\n#Calculation\nd=d*10**3; #converting g/cm^3 into kg/m^3\nN=(A*d)/w; #concentration of atoms\nE=k*T*math.log((N/n), ); #energy in J\nEeV=E/(1.602176565*10**-19); #energy in eV\nEeV=math.ceil(EeV*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"concentration of atoms per m^3 is\",N);\nprint(\"energy for vacancy formation in J\",E);\nprint(\"energy for vacancy formation in eV\",EeV);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "A=6.022*10**26; #avagadro's constant\n", + "T=1073; #temperature in K\n", + "n=3.6*10**23; #number of vacancies\n", + "d=9.5; #density in g/cm^3\n", + "w=107.9; #atomic weight in g/mol\n", + "\n", + "#Calculation\n", + "d=d*10**3; #converting g/cm^3 into kg/m^3\n", + "N=(A*d)/w; #concentration of atoms\n", + "E=k*T*math.log((N/n), ); #energy in J\n", + "EeV=E/(1.602176565*10**-19); #energy in eV\n", + "EeV=math.ceil(EeV*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"concentration of atoms per m^3 is\",N);\n", + "print(\"energy for vacancy formation in J\",E);\n", + "print(\"energy for vacancy formation in eV\",EeV);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of atoms per m^3 is', 5.3020389249304915e+28)\n('energy for vacancy formation in J', 1.762092900344914e-19)\n('energy for vacancy formation in eV', 1.1)\n" + "text": [ + "('concentration of atoms per m^3 is', 5.3020389249304915e+28)\n", + "('energy for vacancy formation in J', 1.762092900344914e-19)\n", + "('energy for vacancy formation in eV', 1.1)\n" + ] } ], "prompt_number": 6 @@ -59,19 +124,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.3, Page number 209 " + "source": [ + "Example number 7.3, Page number 209 " + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of Schotky defect\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**26; #avagadro's constant\nk=1.38*10**-23;\nw1=39.1; #atomic weight of K\nw2=35.45; #atomic weight of Cl\nEs=2.6; #energy formation in eV\nT=500; #temperature in C\nd=1.955; #density in g/cm^3\n\n#Calculation\nEs=Es*1.6*10**-19; #converting eV to J\nT=T+273; #temperature in K\nd=d*10**3; #converting g/cm^3 into kg/m^3\nN=(A*d)/(w1+w2);\nn=N*math.exp(-Es/(2*k*T));\n\n#Result\nprint(\"number of Schotky defect per m^3 is\",n);\n\n#answer given in the book is wrong by 3rd decimal point", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**26; #avagadro's constant\n", + "k=1.38*10**-23;\n", + "w1=39.1; #atomic weight of K\n", + "w2=35.45; #atomic weight of Cl\n", + "Es=2.6; #energy formation in eV\n", + "T=500; #temperature in C\n", + "d=1.955; #density in g/cm^3\n", + "\n", + "#Calculation\n", + "Es=Es*1.6*10**-19; #converting eV to J\n", + "T=T+273; #temperature in K\n", + "d=d*10**3; #converting g/cm^3 into kg/m^3\n", + "N=(A*d)/(w1+w2);\n", + "n=N*math.exp(-Es/(2*k*T));\n", + "\n", + "#Result\n", + "print(\"number of Schotky defect per m^3 is\",n);\n", + "\n", + "#answer given in the book is wrong by 3rd decimal point" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('number of Schotky defect per m^3 is', 5.373777171020081e+19)\n" + "text": [ + "('number of Schotky defect per m^3 is', 5.373777171020081e+19)\n" + ] } ], "prompt_number": 7 @@ -79,7 +173,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_8.ipynb b/Engineering_Physics/Chapter_8.ipynb index 40606862..be4820c5 100644 --- a/Engineering_Physics/Chapter_8.ipynb +++ b/Engineering_Physics/Chapter_8.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 8" + "name": "", + "signature": "sha256:a97623c1294ef4fbd99f1423addadcfc2341e13ca402c26d0b2a69dd71e1782a" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,44 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Conducting materials" + "source": [ + "Conducting materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.1, Page number 231" + "source": [ + "Example number 8.1, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electrical resistivity\n\n#Variable declaration\nm=9.1*10**-31; #mass of the electron in kg\nn=2.533*10**28; #concentration of electrons per m^3\ne=1.6*10**-19;\ntow_r=3.1*10**-14; #relaxation time in sec\n\n#Calculation\nrho=m/(n*(e**2*tow_r));\n\n#Result\nprint(\"electrical resistivity in ohm metre is\",rho);", + "input": [ + " \n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "n=2.533*10**28; #concentration of electrons per m^3\n", + "e=1.6*10**-19;\n", + "tow_r=3.1*10**-14; #relaxation time in sec\n", + "\n", + "#Calculation\n", + "rho=m/(n*(e**2*tow_r));\n", + "\n", + "#Result\n", + "print(\"electrical resistivity in ohm metre is\",rho);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n" + "text": [ + "('electrical resistivity in ohm metre is', 4.526937967219795e-08)\n" + ] } ], "prompt_number": 1 @@ -38,19 +58,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.2, Page number 231" + "source": [ + "Example number 8.2, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap of semiconductor\n\n#importing modules\nimport math\n\n#Variable declaration\ns=3.75*10**3; #slope\nk=1.38*10**-23;\n\n#Calculation\nEg=2*k*s;\nEg=Eg/(1.6*10**-19); #converting J to eV\nEg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"band gap of semiconductor in eV is\",Eg);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "s=3.75*10**3; #slope\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "Eg=2*k*s;\n", + "Eg=Eg/(1.6*10**-19); #converting J to eV\n", + "Eg=math.ceil(Eg*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of semiconductor in eV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of semiconductor in eV is', 0.647)\n" + "text": [ + "('band gap of semiconductor in eV is', 0.647)\n" + ] } ], "prompt_number": 3 @@ -59,19 +99,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.3, Page number 231" + "source": [ + "Example number 8.3, Page number 231" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of occupation of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nT=989; #temperature in C\nk=1.38*10**-23;\n#let E-EF be E\nE=0.5; #occupied level of electron in eV\n\n#Calculation\nT=T+273; #temperature in K\nE=E*1.6*10**-19; #converting eV to J\n#let fermi=dirac distribution function f(E) be f\nf=1/(1+math.exp(E/(k*T)));\nf=math.ceil(f*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"probability of occupation of electrons is\",f);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=989; #temperature in C\n", + "k=1.38*10**-23;\n", + "#let E-EF be E\n", + "E=0.5; #occupied level of electron in eV\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "E=E*1.6*10**-19; #converting eV to J\n", + "#let fermi=dirac distribution function f(E) be f\n", + "f=1/(1+math.exp(E/(k*T)));\n", + "f=math.ceil(f*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"probability of occupation of electrons is\",f);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of occupation of electrons is', 0.011)\n" + "text": [ + "('probability of occupation of electrons is', 0.011)\n" + ] } ], "prompt_number": 4 @@ -80,19 +144,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.4, Page number 232" + "source": [ + "Example number 8.4, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the drift velocity of free electrons\n\n#Variable declaration\nmew_e=0.0035; #mobility of electrons in m^2/Vs\nE=0.5; #electric field strength in V/m\n\n#Calculation\nvd=mew_e*E;\nvd=vd*10**3;\n\n#Result\nprint(\"drift velocity of free electrons in m/sec is\",vd,\"*10**-3\");\n\n#answer given in the book is wrong", + "input": [ + " \n", + "mew_e=0.0035; #mobility of electrons in m^2/Vs\n", + "E=0.5; #electric field strength in V/m\n", + "\n", + "#Calculation\n", + "vd=mew_e*E;\n", + "vd=vd*10**3;\n", + "\n", + "#Result\n", + "print(\"drift velocity of free electrons in m/sec is\",vd,\"*10**-3\");\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n" + "text": [ + "('drift velocity of free electrons in m/sec is', 1.75, '*10**-3')\n" + ] } ], "prompt_number": 1 @@ -101,19 +182,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.5, Page number 232" + "source": [ + "Example number 8.5, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mobility of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nA=6.022*10**23; #avagadro number\ne=1.6*10**-19;\nrho=1.73*10**-8; #resistivity of Cu in ohm metre\nw=63.5; #atomic weight \nd=8.92*10**3; #density in kg/m^3\n\n#Calculation\nd=d*10**3;\nsigma=1/rho;\nsigmaa=sigma/10**7;\nsigmaa=math.ceil(sigmaa*10**3)/10**3; #rounding off to 3 decimals\nn=(d*A)/w;\nmew=sigma/(n*e); #mobility of electrons\nmew=mew*10**3;\nmew=math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"electrical conductivity in ohm-1 m-1\",sigmaa,\"*10**7\");\nprint(\"concentration of carriers per m^3\",n);\nprint(\"mobility of electrons in m^2/Vsec is\",mew,\"*10**-3\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "A=6.022*10**23; #avagadro number\n", + "e=1.6*10**-19;\n", + "rho=1.73*10**-8; #resistivity of Cu in ohm metre\n", + "w=63.5; #atomic weight \n", + "d=8.92*10**3; #density in kg/m^3\n", + "\n", + "#Calculation\n", + "d=d*10**3;\n", + "sigma=1/rho;\n", + "sigmaa=sigma/10**7;\n", + "sigmaa=math.ceil(sigmaa*10**3)/10**3; #rounding off to 3 decimals\n", + "n=(d*A)/w;\n", + "mew=sigma/(n*e); #mobility of electrons\n", + "mew=mew*10**3;\n", + "mew=math.ceil(mew*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"electrical conductivity in ohm-1 m-1\",sigmaa,\"*10**7\");\n", + "print(\"concentration of carriers per m^3\",n);\n", + "print(\"mobility of electrons in m^2/Vsec is\",mew,\"*10**-3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical conductivity in ohm-1 m-1', 5.781, '*10**7')\n('concentration of carriers per m^3', 8.459250393700786e+28)\n('mobility of electrons in m^2/Vsec is', 4.2708, '*10**-3')\n" + "text": [ + "('electrical conductivity in ohm-1 m-1', 5.781, '*10**7')\n", + "('concentration of carriers per m^3', 8.459250393700786e+28)\n", + "('mobility of electrons in m^2/Vsec is', 4.2708, '*10**-3')\n" + ] } ], "prompt_number": 16 @@ -122,19 +235,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.6, Page number 232" + "source": [ + "Example number 8.6, Page number 232" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fermi energy\n\n#importing modules\nimport math\n\n#Variable declaration\nn=18.1*10**28; #concentration of electrons per m^3\nh=6.62*10**-34; #planck constant in Js\nme=9.1*10**-31; #mass of electron in kg\n\n#Calculation\nX=h**2/(8*me);\nE_F0=X*(((3*n)/math.pi)**(2/3));\nE_F0=E_F0/(1.6*10**-19); #converting J to eV\n\n#Result\nprint(\"Fermi energy in eV is\",E_F0);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=18.1*10**28; #concentration of electrons per m^3\n", + "h=6.62*10**-34; #planck constant in Js\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "X=h**2/(8*me);\n", + "E_F0=X*(((3*n)/math.pi)**(2/3));\n", + "E_F0=E_F0/(1.6*10**-19); #converting J to eV\n", + "\n", + "#Result\n", + "print(\"Fermi energy in eV is\",E_F0);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Fermi energy in eV is', 3.762396978021977e-19)\n" + "text": [ + "('Fermi energy in eV is', 3.762396978021977e-19)\n" + ] } ], "prompt_number": 18 @@ -143,19 +279,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.7, Page number 233" + "source": [ + "Example number 8.7, Page number 233" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the concentration of free electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nE_F0=5.5; #fermi energy in eV\nh=6.63*10**-34; #planck constant in Js\nme=9.1*10**-31; #mass of electron in kg\n\n#Calculation\nE_F0=E_F0*1.6*10**-19; #converting eV to J\nn=((2*me*E_F0)**(3/2))*((8*math.pi)/(3*h**3));\n\n#Result\nprint(\"concentration of free electrons per unit volume of silver per m^3 is\",n);\n\n#answer given in the book is wrong\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "E_F0=5.5; #fermi energy in eV\n", + "h=6.63*10**-34; #planck constant in Js\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "E_F0=E_F0*1.6*10**-19; #converting eV to J\n", + "n=((2*me*E_F0)**(3/2))*((8*math.pi)/(3*h**3));\n", + "\n", + "#Result\n", + "print(\"concentration of free electrons per unit volume of silver per m^3 is\",n);\n", + "\n", + "#answer given in the book is wrong\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of free electrons per unit volume of silver per m^3 is', 4.603965704817037e+52)\n" + "text": [ + "('concentration of free electrons per unit volume of silver per m^3 is', 4.603965704817037e+52)\n" + ] } ], "prompt_number": 19 @@ -164,19 +322,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.8, Page number 233" + "source": [ + "Example number 8.8, Page number 233" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the probability of an electron\n\n#importing modules\nimport math\n\n#Variable declaration\nEg=1.07; #energy gap of silicon in eV\nk=1.38*10**-23;\nT=298; #temperature in K\n\n#Calculation\nEg=Eg*1.6*10**-19; #converting eV to J\n#let the probability of electron f(E) be X\n#X=1/(1+exp((E-Ef)/(k*T)))\n#but E=Ec and Ec-Ef=Eg/2\nX=1/(1+math.exp(Eg/(2*k*T)))\n\n#Result\nprint(\"probability of an electron thermally excited is\",X);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Eg=1.07; #energy gap of silicon in eV\n", + "k=1.38*10**-23;\n", + "T=298; #temperature in K\n", + "\n", + "#Calculation\n", + "Eg=Eg*1.6*10**-19; #converting eV to J\n", + "#let the probability of electron f(E) be X\n", + "#X=1/(1+exp((E-Ef)/(k*T)))\n", + "#but E=Ec and Ec-Ef=Eg/2\n", + "X=1/(1+math.exp(Eg/(2*k*T)))\n", + "\n", + "#Result\n", + "print(\"probability of an electron thermally excited is\",X);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of an electron thermally excited is', 9.122602463573379e-10)\n" + "text": [ + "('probability of an electron thermally excited is', 9.122602463573379e-10)\n" + ] } ], "prompt_number": 21 @@ -185,19 +366,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.9, Page number 234" + "source": [ + "Example number 8.9, Page number 234" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the fermi energy and temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nk=1.38*10**-23;\nm=9.1*10**-31; #mass of the electron in kg\nvf=0.86*10**6; #fermi velocity in m/sec\n\n#Calculation\nEfj=(m*vf**2)/2;\nEf=Efj/(1.6*10**-19); #converting J to eV\nEf=math.ceil(Ef*10**3)/10**3; #rounding off to 3 decimals\nTf=Efj/k;\nTf=Tf/10**4;\nTf=math.ceil(Tf*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"fermi energy of metal in J is\",Efj);\nprint(\"fermi energy of metal in eV is\",Ef);\nprint(\"fermi temperature in K is\",Tf,\"*10**4\");\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "k=1.38*10**-23;\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "vf=0.86*10**6; #fermi velocity in m/sec\n", + "\n", + "#Calculation\n", + "Efj=(m*vf**2)/2;\n", + "Ef=Efj/(1.6*10**-19); #converting J to eV\n", + "Ef=math.ceil(Ef*10**3)/10**3; #rounding off to 3 decimals\n", + "Tf=Efj/k;\n", + "Tf=Tf/10**4;\n", + "Tf=math.ceil(Tf*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"fermi energy of metal in J is\",Efj);\n", + "print(\"fermi energy of metal in eV is\",Ef);\n", + "print(\"fermi temperature in K is\",Tf,\"*10**4\");\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi energy of metal in J is', 3.3651800000000002e-19)\n('fermi energy of metal in eV is', 2.104)\n('fermi temperature in K is', 2.4386, '*10**4')\n" + "text": [ + "('fermi energy of metal in J is', 3.3651800000000002e-19)\n", + "('fermi energy of metal in eV is', 2.104)\n", + "('fermi temperature in K is', 2.4386, '*10**4')\n" + ] } ], "prompt_number": 24 @@ -206,19 +415,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.10, Page number 234" + "source": [ + "Example number 8.10, Page number 234" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Lorentz number\n\n#Variable declaration\nsigma=5.82*10**7; #electrical conductivity in ohm^-1m^-1\nK=387; #thermal conductivity of Cu in W/mK\nT=27; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nL=K/(sigma*T);\n\n#Result\nprint(\"lorentz number in W ohm/K^2 is\",L);\n", + "input": [ + " \n", + "#Variable declaration\n", + "sigma=5.82*10**7; #electrical conductivity in ohm^-1m^-1\n", + "K=387; #thermal conductivity of Cu in W/mK\n", + "T=27; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "L=K/(sigma*T);\n", + "\n", + "#Result\n", + "print(\"lorentz number in W ohm/K^2 is\",L);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n" + "text": [ + "('lorentz number in W ohm/K^2 is', 2.2164948453608246e-08)\n" + ] } ], "prompt_number": 25 @@ -227,19 +453,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.11, Page number 235" + "source": [ + "Example number 8.11, Page number 235" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the electrical conductivity, thermal conductivity and Lorentz number\n\n#importing modules\nimport math\n\n#Variable declaration\nm=9.1*10**-31; #mass of the electron in kg\ne=1.6*10**-19;\nk=1.38*10**-23;\nn=8.49*10**28; #concentration of electrons in Cu per m^3\ntow_r=2.44*10**-14; #relaxation time in sec\nT=20; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nsigma=(n*(e**2)*tow_r)/m;\nsigmaa=sigma/10**7;\nsigmaa=math.ceil(sigmaa*10**4)/10**4; #rounding off to 4 decimals\nK=(n*(math.pi**2)*(k**2)*T*tow_r)/(3*m);\nK=math.ceil(K*100)/100; #rounding off to 2 decimals\nL=K/(sigma*T);\n\n#Result\nprint(\"electrical conductivity in ohm^-1 m^-1 is\",sigmaa,\"*10**7\");\nprint(\"thermal conductivity in W/mK is\",K);\nprint(\"Lorentz number in W ohm/K^2 is\",L);\n\n#answer for lorentz number given in the book is wrong\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m=9.1*10**-31; #mass of the electron in kg\n", + "e=1.6*10**-19;\n", + "k=1.38*10**-23;\n", + "n=8.49*10**28; #concentration of electrons in Cu per m^3\n", + "tow_r=2.44*10**-14; #relaxation time in sec\n", + "T=20; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "sigma=(n*(e**2)*tow_r)/m;\n", + "sigmaa=sigma/10**7;\n", + "sigmaa=math.ceil(sigmaa*10**4)/10**4; #rounding off to 4 decimals\n", + "K=(n*(math.pi**2)*(k**2)*T*tow_r)/(3*m);\n", + "K=math.ceil(K*100)/100; #rounding off to 2 decimals\n", + "L=K/(sigma*T);\n", + "\n", + "#Result\n", + "print(\"electrical conductivity in ohm^-1 m^-1 is\",sigmaa,\"*10**7\");\n", + "print(\"thermal conductivity in W/mK is\",K);\n", + "print(\"Lorentz number in W ohm/K^2 is\",L);\n", + "\n", + "#answer for lorentz number given in the book is wrong\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('electrical conductivity in ohm^-1 m^-1 is', 5.8277, '*10**7')\n('thermal conductivity in W/mK is', 417.89)\n('Lorentz number in W ohm/K^2 is', 2.4473623172034308e-08)\n" + "text": [ + "('electrical conductivity in ohm^-1 m^-1 is', 5.8277, '*10**7')\n", + "('thermal conductivity in W/mK is', 417.89)\n", + "('Lorentz number in W ohm/K^2 is', 2.4473623172034308e-08)\n" + ] } ], "prompt_number": 29 @@ -247,7 +507,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/Chapter_9.ipynb b/Engineering_Physics/Chapter_9.ipynb index 4524cd7c..f85c8366 100644 --- a/Engineering_Physics/Chapter_9.ipynb +++ b/Engineering_Physics/Chapter_9.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter 9" + "name": "", + "signature": "sha256:5fb520695164101d75312a7c320e0464f4d51d8732e4ed917802ba694545ac3e" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,45 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Semiconducting materials" + "source": [ + "Semiconducting materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.1, Page number 266" + "source": [ + "Example number 9.1, Page number 266" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the number of charge carriers\n\n#Variable declaration\nmew_e=0.36; #mobility of electrons in m^2/Vs\nmew_h=0.14; #mobility of holes in m^2/Vs\nsigma=2.2; #conductivity in ohm-1 m-1\nT=300; #temperature in K\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nni=sigma/(e*(mew_e+mew_h)); #carrier concentration per m^3\n\n#Result\nprint(\"carrier concentration of an intrinsic semiconductor per m^3 is\",ni);", + "input": [ + " \n", + "#Variable declaration\n", + "mew_e=0.36; #mobility of electrons in m^2/Vs\n", + "mew_h=0.14; #mobility of holes in m^2/Vs\n", + "sigma=2.2; #conductivity in ohm-1 m-1\n", + "T=300; #temperature in K\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "ni=sigma/(e*(mew_e+mew_h)); #carrier concentration per m^3\n", + "\n", + "#Result\n", + "print(\"carrier concentration of an intrinsic semiconductor per m^3 is\",ni);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('carrier concentration of an intrinsic semiconductor per m^3 is', 2.75e+19)\n" + "text": [ + "('carrier concentration of an intrinsic semiconductor per m^3 is', 2.75e+19)\n" + ] } ], "prompt_number": 1 @@ -38,19 +59,65 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.2, Page number 266" + "source": [ + "Example number 9.2, Page number 266" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the band gap\n\n#importing modules\nimport math\nimport numpy as np\nfrom __future__ import division\n\n#Variable declaration\nT1=20; #temperature in C\nT2=100; #temperature in C\nsigma_i20=250; #conductivity in ohm-1 m-1\nsigma_i100=1100; #conductivity in ohm-1 m-1\nk=1.38*10**-23;\n\n#Calculation\nT1K=T1+273; #temperature in K\nT2K=T2+273; #temperature in K\nT_1K=T1K**(-1);\nT_2K=T2K**(-1);\nT_1=T_2K-T_1K;\nT_2=T2K/T1K;\nTk=T_1**(-1);\nT_k=(T_2)**(3/2);\n#intrinsic carrier concentration at T1K is ni20 = 2*((2*math.pi*k*m*293)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*293))\n#intrinsic carrier concentration at T2K is ni100 = 2*((2*math.pi*k*m*373)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*373))\n#dividing ni20/ni100 = (293/373)**(3/2)*(math.exp(-Eg/(2*k*293))/math.exp(-Eg/(2*k*373)))\n#ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n#sigma_i20/sigma_i100 = (ni20*e*(mew_e+mew_h))/(ni100*e*(mew_e+mew_h)) = ni20/ni100\n#therefore sigma_i20/sigma_i100 = ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n#math.exp((-Eg/(2*k))*((1/293)-(1/373))) = (sigma_i20/sigma_i100)*(373/293)**(3/2)\n#by taking log on both sides we get (-Eg/(2*k))*((1/293)-(1/373)) = np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\n#Eg=2*k*(((1/373)-(1/293))**(-1))*np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\nEg=2*k*Tk*np.log((sigma_i20/sigma_i100)*T_k); #band gap in J\nEgeV=Eg*6.241*10**18; #converting J to eV\nEgeV=math.ceil(EgeV*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"band gap of the semiconductor in J is\",Eg);\nprint(\"band gap of the semiconductor in eV is\",EgeV);\n\n#answer for band gap in eV given in the book is wrong in the 4th decimal point", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "import numpy as np\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "T1=20; #temperature in C\n", + "T2=100; #temperature in C\n", + "sigma_i20=250; #conductivity in ohm-1 m-1\n", + "sigma_i100=1100; #conductivity in ohm-1 m-1\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "T1K=T1+273; #temperature in K\n", + "T2K=T2+273; #temperature in K\n", + "T_1K=T1K**(-1);\n", + "T_2K=T2K**(-1);\n", + "T_1=T_2K-T_1K;\n", + "T_2=T2K/T1K;\n", + "Tk=T_1**(-1);\n", + "T_k=(T_2)**(3/2);\n", + "#intrinsic carrier concentration at T1K is ni20 = 2*((2*math.pi*k*m*293)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*293))\n", + "#intrinsic carrier concentration at T2K is ni100 = 2*((2*math.pi*k*m*373)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-Eg/(2*k*373))\n", + "#dividing ni20/ni100 = (293/373)**(3/2)*(math.exp(-Eg/(2*k*293))/math.exp(-Eg/(2*k*373)))\n", + "#ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n", + "#sigma_i20/sigma_i100 = (ni20*e*(mew_e+mew_h))/(ni100*e*(mew_e+mew_h)) = ni20/ni100\n", + "#therefore sigma_i20/sigma_i100 = ni20/ni100 = (293/373)**(3/2)*math.exp((-Eg/(2*k))((1/293)-(1/373)))\n", + "#math.exp((-Eg/(2*k))*((1/293)-(1/373))) = (sigma_i20/sigma_i100)*(373/293)**(3/2)\n", + "#by taking log on both sides we get (-Eg/(2*k))*((1/293)-(1/373)) = np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\n", + "#Eg=2*k*(((1/373)-(1/293))**(-1))*np.log((sigma_i20/sigma_i100)*(373/293)**(3/2))\n", + "Eg=2*k*Tk*np.log((sigma_i20/sigma_i100)*T_k); #band gap in J\n", + "EgeV=Eg*6.241*10**18; #converting J to eV\n", + "EgeV=math.ceil(EgeV*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"band gap of the semiconductor in J is\",Eg);\n", + "print(\"band gap of the semiconductor in eV is\",EgeV);\n", + "\n", + "#answer for band gap in eV given in the book is wrong in the 4th decimal point" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('band gap of the semiconductor in J is', 4.2210259829756855e-20)\n('band gap of the semiconductor in eV is', 0.2635)\n" + "text": [ + "('band gap of the semiconductor in J is', 4.2210259829756855e-20)\n", + "('band gap of the semiconductor in eV is', 0.2635)\n" + ] } ], "prompt_number": 3 @@ -59,19 +126,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.3, Page number 267" + "source": [ + "Example number 9.3, Page number 267" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Hall voltage\n\n#Variable declaration\nI=10**-2; #current in Ampere\nl=100; #length in mm\nd=1; #thickness in mm\nw=10; #breadth in mm\nB=0.5; #magnetic field in Wb/m^2\nRH=3.66*10**-4; #hall coefficient in m^3/C\n\n#Calculation\nw=w*10**-3; #width in m\nVH=(B*I*RH)/w; #hall voltage\nVH=VH*10**4;\n\n#Result\nprint(\"Hall voltage in V is\",VH,\"*10**-4\");", + "input": [ + " \n", + "#Variable declaration\n", + "I=10**-2; #current in Ampere\n", + "l=100; #length in mm\n", + "d=1; #thickness in mm\n", + "w=10; #breadth in mm\n", + "B=0.5; #magnetic field in Wb/m^2\n", + "RH=3.66*10**-4; #hall coefficient in m^3/C\n", + "\n", + "#Calculation\n", + "w=w*10**-3; #width in m\n", + "VH=(B*I*RH)/w; #hall voltage\n", + "VH=VH*10**4;\n", + "\n", + "#Result\n", + "print(\"Hall voltage in V is\",VH,\"*10**-4\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Hall voltage in V is', 1.83, '*10**-4')\n" + "text": [ + "('Hall voltage in V is', 1.83, '*10**-4')\n" + ] } ], "prompt_number": 1 @@ -80,19 +168,57 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.4, Page number 268" + "source": [ + "Example number 9.4, Page number 268" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the concentration of holes and electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nsigma=300; #conductivity in S/cm\nT=300; #temperature in K\nni=1.5*10**10 #carrier concentration per cm^3\nmew_e=1300; #mobility of electrons in cm^2/Vs\nmew_h=500; #mobility of holes in cm^2/Vs\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nsigma=sigma*10**2; #sigma in S/m\nmew_e=mew_e*10**-4; #mobility of electrons in m^2/Vs\nND=sigma/(e*mew_e); #concentration of electron per m^3\nni=ni*10**6; #carrier concentration per m^3\np=ni**2/ND; #hole concentration per m^3\np=p/10**8;\np=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\nmew_h=mew_h*10**-4; #mobility of holes in m^2/Vs\nNA=sigma/(e*mew_h); #concentration of hole per m^3\nn=ni**2/NA; #electron concentration per m^3\nn=n/10**7;\n\n#Result\nprint(\"concentration of electron for N-type semiconductor per m^3\",ND);\nprint(\"hole concentration per m^3\",p,\"*10**8\");\nprint(\"concentration of hole for P-type semiconductor per m^3\",NA);\nprint(\"electron concentration per m^3\",int(n),\"*10**7\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "sigma=300; #conductivity in S/cm\n", + "T=300; #temperature in K\n", + "ni=1.5*10**10 #carrier concentration per cm^3\n", + "mew_e=1300; #mobility of electrons in cm^2/Vs\n", + "mew_h=500; #mobility of holes in cm^2/Vs\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "sigma=sigma*10**2; #sigma in S/m\n", + "mew_e=mew_e*10**-4; #mobility of electrons in m^2/Vs\n", + "ND=sigma/(e*mew_e); #concentration of electron per m^3\n", + "ni=ni*10**6; #carrier concentration per m^3\n", + "p=ni**2/ND; #hole concentration per m^3\n", + "p=p/10**8;\n", + "p=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\n", + "mew_h=mew_h*10**-4; #mobility of holes in m^2/Vs\n", + "NA=sigma/(e*mew_h); #concentration of hole per m^3\n", + "n=ni**2/NA; #electron concentration per m^3\n", + "n=n/10**7;\n", + "\n", + "#Result\n", + "print(\"concentration of electron for N-type semiconductor per m^3\",ND);\n", + "print(\"hole concentration per m^3\",p,\"*10**8\");\n", + "print(\"concentration of hole for P-type semiconductor per m^3\",NA);\n", + "print(\"electron concentration per m^3\",int(n),\"*10**7\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of electron for N-type semiconductor per m^3', 1.4423076923076921e+24)\n('hole concentration per m^3', 1.561, '*10**8')\n('concentration of hole for P-type semiconductor per m^3', 3.7499999999999995e+24)\n('electron concentration per m^3', 6, '*10**7')\n" + "text": [ + "('concentration of electron for N-type semiconductor per m^3', 1.4423076923076921e+24)\n", + "('hole concentration per m^3', 1.561, '*10**8')\n", + "('concentration of hole for P-type semiconductor per m^3', 3.7499999999999995e+24)\n", + "('electron concentration per m^3', 6, '*10**7')\n" + ] } ], "prompt_number": 11 @@ -101,19 +227,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.5, Page number 269" + "source": [ + "Example number 9.5, Page number 269" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the type of charge carriers and the carrier concentration\n\n#importing modules\nimport math\n\n#Variable declaration\nRH=-3.68*10**-5; #hall coefficient in m^3/C\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\n#hall coefficient is negative implies charge carriers are electrons\nn=(3*math.pi)/(8*(-RH)*e); #carrier concentration\n\n#Result\nprint(\"charge carriers are electrons\");\nprint(\"carrier concentration per m^3 is\",n);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "RH=-3.68*10**-5; #hall coefficient in m^3/C\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "#hall coefficient is negative implies charge carriers are electrons\n", + "n=(3*math.pi)/(8*(-RH)*e); #carrier concentration\n", + "\n", + "#Result\n", + "print(\"charge carriers are electrons\");\n", + "print(\"carrier concentration per m^3 is\",n);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "charge carriers are electrons\n('carrier concentration per m^3 is', 2.000844505937792e+23)\n" + "text": [ + "charge carriers are electrons\n", + "('carrier concentration per m^3 is', 2.000844505937792e+23)\n" + ] } ], "prompt_number": 13 @@ -122,19 +269,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.6, Page number 269" + "source": [ + "Example number 9.6, Page number 269" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To compare the intrinsic carrier density\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nEg1=0.36; #energy gap of 1st material in eV\nEg2=0.72; #energy gap of 2nd material in eV\nT=300; #temperature in K\nmh=9*10**-31;\nme=9*10**-31; \n#given that 2*k*T=0.052; \n#consider X=2*k*T\nX=0.052;\n\n#Calculation\n#intrinsic carrier concentration for A niA = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.36/(2*k*T))\n#intrinsic carrier concentration for B niB = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.72/(2*k*T))\n#dividing niA/niB = math.exp(-0.36/(2*k*T))*math.exp(0.72/(2*k*T))\n#let niA/niB be A\nA = math.exp(-0.36/X)*math.exp(0.72/X);\nA=A/10**3;\nA=math.ceil(A*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"ratio of intrinsic carrier densities of A and B is\",A,\"*10**3\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "Eg1=0.36; #energy gap of 1st material in eV\n", + "Eg2=0.72; #energy gap of 2nd material in eV\n", + "T=300; #temperature in K\n", + "mh=9*10**-31;\n", + "me=9*10**-31; \n", + "#given that 2*k*T=0.052; \n", + "#consider X=2*k*T\n", + "X=0.052;\n", + "\n", + "#Calculation\n", + "#intrinsic carrier concentration for A niA = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.36/(2*k*T))\n", + "#intrinsic carrier concentration for B niB = 2*((2*math.pi*k*T*m)/h**2)**(3/2)*((me*mh)/m**2)**(3/4)*math.exp(-0.72/(2*k*T))\n", + "#dividing niA/niB = math.exp(-0.36/(2*k*T))*math.exp(0.72/(2*k*T))\n", + "#let niA/niB be A\n", + "A = math.exp(-0.36/X)*math.exp(0.72/X);\n", + "A=A/10**3;\n", + "A=math.ceil(A*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"ratio of intrinsic carrier densities of A and B is\",A,\"*10**3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('ratio of intrinsic carrier densities of A and B is', 1.01544, '*10**3')\n" + "text": [ + "('ratio of intrinsic carrier densities of A and B is', 1.01544, '*10**3')\n" + ] } ], "prompt_number": 16 @@ -143,19 +321,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.7, Page number 270" + "source": [ + "Example number 9.7, Page number 270" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the mobility of electrons\n\n#importing modules\nimport math\n\n#Variable declaration\nND=2*10**22; #concentration of electron per m^3\nsigma=112; #conductivity in ohm-1 m-1\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nmew=sigma/(ND*e); #mobility of electrons \nmew=math.ceil(mew*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"mobility of electrons in m^2/Vs is\",mew);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "ND=2*10**22; #concentration of electron per m^3\n", + "sigma=112; #conductivity in ohm-1 m-1\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "mew=sigma/(ND*e); #mobility of electrons \n", + "mew=math.ceil(mew*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"mobility of electrons in m^2/Vs is\",mew);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mobility of electrons in m^2/Vs is', 0.035)\n" + "text": [ + "('mobility of electrons in m^2/Vs is', 0.035)\n" + ] } ], "prompt_number": 17 @@ -164,19 +362,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.8, Page number 270" + "source": [ + "Example number 9.8, Page number 270" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the Hall voltage\n\n#importing modules\nimport math\n\n#Variable declaration\nw=500; #thickness in micrometre\nA=2.5*10**-3; #area of cross section in cm^-2\nIx=1; #current in ampere\nBz=10; #magnetic field in Wb/cm^2\nn=10**16; #donor concentration in m^-3\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nBz=Bz*10**-4; #magnetic field in Wb/m^2\nw=w*10**-6; #thickness in m\nRH=(3*math.pi)/(8*n*e); #hall coefficient\nVH=(Bz*Ix*RH)/w; #hall voltage\nVH=VH/10**3;\nVH=math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"hall voltage in V is\",VH,\"*10**3\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "w=500; #thickness in micrometre\n", + "A=2.5*10**-3; #area of cross section in cm^-2\n", + "Ix=1; #current in ampere\n", + "Bz=10; #magnetic field in Wb/cm^2\n", + "n=10**16; #donor concentration in m^-3\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "Bz=Bz*10**-4; #magnetic field in Wb/m^2\n", + "w=w*10**-6; #thickness in m\n", + "RH=(3*math.pi)/(8*n*e); #hall coefficient\n", + "VH=(Bz*Ix*RH)/w; #hall voltage\n", + "VH=VH/10**3;\n", + "VH=math.ceil(VH*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"hall voltage in V is\",VH,\"*10**3\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('hall voltage in V is', 1.4727, '*10**3')\n" + "text": [ + "('hall voltage in V is', 1.4727, '*10**3')\n" + ] } ], "prompt_number": 23 @@ -185,19 +410,53 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.9, Page number 271" + "source": [ + "Example number 9.9, Page number 271" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To find the ratio between conductivity of intrinsic semiconductor\n\n#importing modules\nimport math\nfrom __future__ import division\nimport numpy as np\n\n#Variable declaration\nEg=1.2; #energy gap in eV\nT1=300; #temperature in K\nT2=600; #temperature in K\nk=1.38*10**-23;\n\n#Calculation\nT_1=T1**(-1);\nT_2=T2**(-1);\nT=T_1-T_2;\nEg=Eg*1.602*10**-19; #Eg in J\n#sigma_300=ni300*e*(mew_e+mew_h)\n#sigma_600=ni600*e*(mew_e+mew_h)\n#sigma_600/sigma_300 = ni600/ni300\n#ni600/ni300 =((T2/T1)**(3/2))*math.exp(-Eg/(2*k*T2))*math.exp(Eg/(2*k*T1));\n#ni600/ni300 =((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T;\n#let ni600/ni300 be X\nX=((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T);\n\n\n#Result\nprint(\"ratio between the conductivity of material is\",int(X));\n\n#answer given in the book is wrong", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "import numpy as np\n", + "\n", + "#Variable declaration\n", + "Eg=1.2; #energy gap in eV\n", + "T1=300; #temperature in K\n", + "T2=600; #temperature in K\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "T_1=T1**(-1);\n", + "T_2=T2**(-1);\n", + "T=T_1-T_2;\n", + "Eg=Eg*1.602*10**-19; #Eg in J\n", + "#sigma_300=ni300*e*(mew_e+mew_h)\n", + "#sigma_600=ni600*e*(mew_e+mew_h)\n", + "#sigma_600/sigma_300 = ni600/ni300\n", + "#ni600/ni300 =((T2/T1)**(3/2))*math.exp(-Eg/(2*k*T2))*math.exp(Eg/(2*k*T1));\n", + "#ni600/ni300 =((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T;\n", + "#let ni600/ni300 be X\n", + "X=((T2/T1)**(3/2))*math.exp((Eg/(2*k))*T);\n", + "\n", + "\n", + "#Result\n", + "print(\"ratio between the conductivity of material is\",int(X));\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('ratio between the conductivity of material is', 311270)\n" + "text": [ + "('ratio between the conductivity of material is', 311270)\n" + ] } ], "prompt_number": 25 @@ -206,19 +465,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.10, Page number 272" + "source": [ + "Example number 9.10, Page number 272" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the intrinsic carrier concentration\n\n#importing modules\nimport math\n\n#Variable declaration\nsigma=10**-6; #electrical conductivity in ohm-1 m-1\nmew_e=0.85; #electron mobility in m^2/Vs\nmew_h=0.04; #hole mobility in m^2/Vs\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nni=sigma/(e*(mew_e+mew_h)); #intrinsic carrier concentration\nni=ni/10**12;\nni=math.ceil(ni*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intrinsic carrier concentration per m^3 is\",ni,\"*10**12\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "sigma=10**-6; #electrical conductivity in ohm-1 m-1\n", + "mew_e=0.85; #electron mobility in m^2/Vs\n", + "mew_h=0.04; #hole mobility in m^2/Vs\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "ni=sigma/(e*(mew_e+mew_h)); #intrinsic carrier concentration\n", + "ni=ni/10**12;\n", + "ni=math.ceil(ni*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"intrinsic carrier concentration per m^3 is\",ni,\"*10**12\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intrinsic carrier concentration per m^3 is', 7.0225, '*10**12')\n" + "text": [ + "('intrinsic carrier concentration per m^3 is', 7.0225, '*10**12')\n" + ] } ], "prompt_number": 27 @@ -227,19 +508,61 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 9.11, Page number 272" + "source": [ + "Example number 9.11, Page number 272" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the density of impurity atoms and concentration of minority carriers\n\n#importing modules\nimport math\n\n#Variable declaration\nrho_p=10; #resistivity of p-type Si in ohm cm\nrho_n=10; #resistivity of n-type Si in ohm cm\nmew_e=1350; #electron mobility in cm^2/Vs\nmew_h=480; #hole mobility in cm^2/Vs\nni=1.5*10**10; #carrier concentration in cm^-3\ne=1.6*10**-19; #electron charge in C\n\n#Calculation\nrho_p=rho_p*10**-2;#resistivity of p-type Si in ohm m\nsigma_p=1/rho_p; #electrical conductivity\nmew_h=mew_h*10**-3;\nNA=sigma_p/(e*mew_h); #acceptor concentration\nni=ni*10**6; #carrier concentration in m^-3\nn=ni**2/NA; #concentration of minority carriers in m^-3\nn=n/10**12;\nn=math.ceil(n*10**4)/10**4; #rounding off to 4 decimals\nrho_n=rho_n*10**-2; #resistivity of n-type Si in ohm m\nsigma_n=1/rho_n; #electrical conductivity\nmew_e=mew_e*10**-3;\nND=sigma_n/(e*mew_e); #donor concentration\np=(ni**2)/ND; #concentration of minority carriers in m^-3\np=p/10**12;\np=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"donor concentration per m^3 is\",ND);\nprint(\"concentration of minority carriers per m^3\",p,\"*10**12\");\nprint(\"acceptor concentration per m^3 is\",NA);\nprint(\"concentration of minority carriers per m^3 is\",n,\"*10**12\");", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "rho_p=10; #resistivity of p-type Si in ohm cm\n", + "rho_n=10; #resistivity of n-type Si in ohm cm\n", + "mew_e=1350; #electron mobility in cm^2/Vs\n", + "mew_h=480; #hole mobility in cm^2/Vs\n", + "ni=1.5*10**10; #carrier concentration in cm^-3\n", + "e=1.6*10**-19; #electron charge in C\n", + "\n", + "#Calculation\n", + "rho_p=rho_p*10**-2;#resistivity of p-type Si in ohm m\n", + "sigma_p=1/rho_p; #electrical conductivity\n", + "mew_h=mew_h*10**-3;\n", + "NA=sigma_p/(e*mew_h); #acceptor concentration\n", + "ni=ni*10**6; #carrier concentration in m^-3\n", + "n=ni**2/NA; #concentration of minority carriers in m^-3\n", + "n=n/10**12;\n", + "n=math.ceil(n*10**4)/10**4; #rounding off to 4 decimals\n", + "rho_n=rho_n*10**-2; #resistivity of n-type Si in ohm m\n", + "sigma_n=1/rho_n; #electrical conductivity\n", + "mew_e=mew_e*10**-3;\n", + "ND=sigma_n/(e*mew_e); #donor concentration\n", + "p=(ni**2)/ND; #concentration of minority carriers in m^-3\n", + "p=p/10**12;\n", + "p=math.ceil(p*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"donor concentration per m^3 is\",ND);\n", + "print(\"concentration of minority carriers per m^3\",p,\"*10**12\");\n", + "print(\"acceptor concentration per m^3 is\",NA);\n", + "print(\"concentration of minority carriers per m^3 is\",n,\"*10**12\");" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('donor concentration per m^3 is', 4.6296296296296284e+19)\n('concentration of minority carriers per m^3', 4.861, '*10**12')\n('acceptor concentration per m^3 is', 1.3020833333333331e+20)\n('concentration of minority carriers per m^3 is', 1.7281, '*10**12')\n" + "text": [ + "('donor concentration per m^3 is', 4.6296296296296284e+19)\n", + "('concentration of minority carriers per m^3', 4.861, '*10**12')\n", + "('acceptor concentration per m^3 is', 1.3020833333333331e+20)\n", + "('concentration of minority carriers per m^3 is', 1.7281, '*10**12')\n" + ] } ], "prompt_number": 33 @@ -247,7 +570,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/chapter1_2.ipynb b/Engineering_Physics/chapter1_2.ipynb index 33cd96c8..bd2e1aac 100644 --- a/Engineering_Physics/chapter1_2.ipynb +++ b/Engineering_Physics/chapter1_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter1" + "name": "", + "signature": "sha256:18ac31f959977ef2080ed3a1b1a6990ce93e604dcfb0f72ab45c0c28a2428e0e" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,44 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Quantum Mechanics and Quantum Computing" + "source": [ + "Quantum Mechanics and Quantum Computing" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.1, Page number 41" + "source": [ + "Example number 1.1, Page number 41" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#to calculate the de Broglie wavelength\n\n#Variable declaration\nc=3*10**8 #velocity of light in m/s\nh=6.626*10**-34 #planks constant \nm=1.67*10**-27 #mass of proton\n\n#Calculation\nv=c/10 #velocity of proton\nlamda=h/(m*v) #de Broglie wave length\n\n#Result\nprint(\"the de Broglie wavelength in m is \",lamda);\n", + "input": [ + "\n", + "#Variable declaration\n", + "c=3*10**8 #velocity of light in m/s\n", + "h=6.626*10**-34 #planks constant \n", + "m=1.67*10**-27 #mass of proton\n", + "\n", + "#Calculation\n", + "v=c/10 #velocity of proton\n", + "lamda=h/(m*v) #de Broglie wave length\n", + "\n", + "#Result\n", + "print(\"the de Broglie wavelength in m is \",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the de Broglie wavelength in m is ', 1.3225548902195607e-14)\n" + "text": [ + "('the de Broglie wavelength in m is ', 1.3225548902195607e-14)\n" + ] } ], "prompt_number": 17 @@ -38,19 +58,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.2, Page number 42" + "source": [ + "Example number 1.2, Page number 42" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de Broglie wavelength of an electron\n\n#importing modules\nimport math\n\n#Variable declaration\nV=400; #potential in Volts\n\n#Calculation\nlamda=12.56/math.sqrt(V); #de Broglie wavelength\n\n#Result\nprint(\"The de Broglie wavelength in Armstrong is\",lamda);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "V=400; #potential in Volts\n", + "\n", + "#Calculation\n", + "lamda=12.56/math.sqrt(V); #de Broglie wavelength\n", + "\n", + "#Result\n", + "print(\"The de Broglie wavelength in Armstrong is\",lamda);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in Armstrong is', 0.628)\n" + "text": [ + "('The de Broglie wavelength in Armstrong is', 0.628)\n" + ] } ], "prompt_number": 19 @@ -59,19 +98,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.3, Page number 42\n" + "source": [ + "Example number 1.3, Page number 42\n" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de Broglie wavelength of neutron\n\n#importing modules\nimport math\n\n#Variable declaration\nm=1.674*10**(-27); #mass of neutron in kg\nh=6.626*10**(-34);\nE=0.025; #kinetic energy in eV\n\n#Calculation\nEj=E*1.6*10**-19; #kinetic energy in J\nlamda=h/math.sqrt(2*m*Ej); #de Broglie wavelength\nlamdaA=lamda*10**10; #converting wavelength from m to Armstrong\nlamdaA=math.ceil(lamdaA*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"The de Broglie wavelength in metres is\",lamda);\nprint(\"The de Broglie wavelength in Armstrong is\",lamdaA);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "m=1.674*10**(-27); #mass of neutron in kg\n", + "h=6.626*10**(-34);\n", + "E=0.025; #kinetic energy in eV\n", + "\n", + "#Calculation\n", + "Ej=E*1.6*10**-19; #kinetic energy in J\n", + "lamda=h/math.sqrt(2*m*Ej); #de Broglie wavelength\n", + "lamdaA=lamda*10**10; #converting wavelength from m to Armstrong\n", + "lamdaA=math.ceil(lamdaA*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"The de Broglie wavelength in metres is\",lamda);\n", + "print(\"The de Broglie wavelength in Armstrong is\",lamdaA);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in metres is', 1.81062582829353e-10)\n('The de Broglie wavelength in Armstrong is', 1.811)\n" + "text": [ + "('The de Broglie wavelength in metres is', 1.81062582829353e-10)\n", + "('The de Broglie wavelength in Armstrong is', 1.811)\n" + ] } ], "prompt_number": 20 @@ -80,19 +143,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.4, Page number 42" + "source": [ + "Example number 1.4, Page number 42" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de Broglie wavelength of an electron\n\n#importing modules\nimport math\n\n#Variable declaration\nV=1600; #potential in Volts\n\n#Calculation\nlamda=12.56/math.sqrt(V); #de Broglie wavelength\nlamda=math.ceil(lamda*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"The de Broglie wavelength in Armstrong is\",lamda);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "V=1600; #potential in Volts\n", + "\n", + "#Calculation\n", + "lamda=12.56/math.sqrt(V); #de Broglie wavelength\n", + "lamda=math.ceil(lamda*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"The de Broglie wavelength in Armstrong is\",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in Armstrong is', 0.32)\n" + "text": [ + "('The de Broglie wavelength in Armstrong is', 0.32)\n" + ] } ], "prompt_number": 21 @@ -101,19 +182,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.5, Page number 42" + "source": [ + "Example number 1.5, Page number 42" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the uncertainity in momentum\n\n#importing modules\nimport math\n\n#Variable declaration\ndeltax=0.2; #distance in armstrong\nh=6.626*10**(-34);\n\n#Calculation\ndelta_xm=deltax*10**-10; #distance in m\ndelta_p=h/(2*math.pi*delta_xm);\n\n#Result\nprint(\"The uncertainity in momentum of electron in kg m/sec is\",delta_p);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "deltax=0.2; #distance in armstrong\n", + "h=6.626*10**(-34);\n", + "\n", + "#Calculation\n", + "delta_xm=deltax*10**-10; #distance in m\n", + "delta_p=h/(2*math.pi*delta_xm);\n", + "\n", + "#Result\n", + "print(\"The uncertainity in momentum of electron in kg m/sec is\",delta_p);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The uncertainity in momentum of electron in kg m/sec is', 5.2728032646344916e-24)\n" + "text": [ + "('The uncertainity in momentum of electron in kg m/sec is', 5.2728032646344916e-24)\n" + ] } ], "prompt_number": 22 @@ -122,19 +222,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.6, Page number 43" + "source": [ + "Example number 1.6, Page number 43" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the lowest energy of electron\n\n#importing modules\nimport math\n\n#Variable declaration\nn1=1;\nn2=1;\nn3=1; #values in lowest energy\nh=6.62*10**(-34);\nM=9.1*10**-31; #mass in kg\nL=0.1; #side in nm\n\n#Calculation\nL=L*10**-9; #side in m\nn=(n1**2)+(n2**2)+(n3**2);\nE1=(n*h**2)/(8*M*L**2); #energy in j\nE1eV=E1/(1.6*10**-19); #energy in eV\nE1eV=math.ceil(E1eV*10)/10; #rounding off to 1 decimals\n\n#Result\nprint(\"lowest energy of electron in Joule is\",E1);\nprint(\"lowest energy of electron is eV\",E1eV);\n\n#answer for lowest energy in eV given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n1=1;\n", + "n2=1;\n", + "n3=1; #values in lowest energy\n", + "h=6.62*10**(-34);\n", + "M=9.1*10**-31; #mass in kg\n", + "L=0.1; #side in nm\n", + "\n", + "#Calculation\n", + "L=L*10**-9; #side in m\n", + "n=(n1**2)+(n2**2)+(n3**2);\n", + "E1=(n*h**2)/(8*M*L**2); #energy in j\n", + "E1eV=E1/(1.6*10**-19); #energy in eV\n", + "E1eV=math.ceil(E1eV*10)/10; #rounding off to 1 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of electron in Joule is\",E1);\n", + "print(\"lowest energy of electron is eV\",E1eV);\n", + "\n", + "#answer for lowest energy in eV given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of electron in Joule is', 1.8059505494505486e-17)\n('lowest energy of electron is eV', 112.9)\n" + "text": [ + "('lowest energy of electron in Joule is', 1.8059505494505486e-17)\n", + "('lowest energy of electron is eV', 112.9)\n" + ] } ], "prompt_number": 23 @@ -143,19 +273,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.7, Page number 43" + "source": [ + "Example number 1.7, Page number 43" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de Broglie wavelength of neutron\n\n#importing modules\nimport math\n\n#Variable declaration\nM=9.1*10**(-31); #mass of electron in kg\nh=6.66*10**(-34);\nE=2000; #kinetic energy in eV\n\n#Calculation\nEj=E*1.6*10**-19; #kinetic energy in J\nlamda=h/math.sqrt(2*M*Ej); #de Broglie wavelength\nlamdaA=lamda*10**9; #converting wavelength from m to nm\nlamdaA=math.ceil(lamdaA*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"The de Broglie wavelength in nm is\",lamdaA);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "M=9.1*10**(-31); #mass of electron in kg\n", + "h=6.66*10**(-34);\n", + "E=2000; #kinetic energy in eV\n", + "\n", + "#Calculation\n", + "Ej=E*1.6*10**-19; #kinetic energy in J\n", + "lamda=h/math.sqrt(2*M*Ej); #de Broglie wavelength\n", + "lamdaA=lamda*10**9; #converting wavelength from m to nm\n", + "lamdaA=math.ceil(lamdaA*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"The de Broglie wavelength in nm is\",lamdaA);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in nm is', 0.028)\n" + "text": [ + "('The de Broglie wavelength in nm is', 0.028)\n" + ] } ], "prompt_number": 24 @@ -164,19 +316,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.8, Page number 43" + "source": [ + "Example number 1.8, Page number 43" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the minimum energy of electron\n\n#importing modules\nimport math\n\n#Variable declaration\nn=1; #for minimum energy\nh=6.626*10**(-34);\nm=9.1*10**-31; #mass in kg\nL=4*10**-10; #size in m\n\n#Calculation\nE1=(n*h**2)/(8*m*L**2); #energy in j\n\n#Result\nprint(\"lowest energy of electron in Joule is\",E1);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "n=1; #for minimum energy\n", + "h=6.626*10**(-34);\n", + "m=9.1*10**-31; #mass in kg\n", + "L=4*10**-10; #size in m\n", + "\n", + "#Calculation\n", + "E1=(n*h**2)/(8*m*L**2); #energy in j\n", + "\n", + "#Result\n", + "print(\"lowest energy of electron in Joule is\",E1);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of electron in Joule is', 3.7692201236263733e-19)\n" + "text": [ + "('lowest energy of electron in Joule is', 3.7692201236263733e-19)\n" + ] } ], "prompt_number": 23 @@ -185,19 +359,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.9, Page number 44" + "source": [ + "Example number 1.9, Page number 44" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the velocity and kinetic energy of electron\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nh=6.626*10**(-34);\nm=9.1*10**-31; #mass in kg\nlamda=1.66*10**-10; #wavelength in m\n\n#Calculation\nv=h/(m*lamda); #velocity in m/sec\nv_km=v*10**-3; #velocity in km/sec\nE=(1/2)*m*v**2; #kinetic energy in joule\nEeV=E/(1.6*10**-19); #energy in eV\nEeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"velocity of electron in m/sec is\",round(v));\nprint(\"velocity of electron in km/sec is\",round(v_km));\nprint(\"kinetic energy of electron in Joule is\",E);\nprint(\"kinetic energy of electron in eV is\",EeV);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "h=6.626*10**(-34);\n", + "m=9.1*10**-31; #mass in kg\n", + "lamda=1.66*10**-10; #wavelength in m\n", + "\n", + "#Calculation\n", + "v=h/(m*lamda); #velocity in m/sec\n", + "v_km=v*10**-3; #velocity in km/sec\n", + "E=(1/2)*m*v**2; #kinetic energy in joule\n", + "EeV=E/(1.6*10**-19); #energy in eV\n", + "EeV=math.ceil(EeV*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"velocity of electron in m/sec is\",round(v));\n", + "print(\"velocity of electron in km/sec is\",round(v_km));\n", + "print(\"kinetic energy of electron in Joule is\",E);\n", + "print(\"kinetic energy of electron in eV is\",EeV);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('velocity of electron in m/sec is', 4386337.0)\n('velocity of electron in km/sec is', 4386.0)\n('kinetic energy of electron in Joule is', 8.754176510091736e-18)\n('kinetic energy of electron in eV is', 54.714)\n" + "text": [ + "('velocity of electron in m/sec is', 4386337.0)\n", + "('velocity of electron in km/sec is', 4386.0)\n", + "('kinetic energy of electron in Joule is', 8.754176510091736e-18)\n", + "('kinetic energy of electron in eV is', 54.714)\n" + ] } ], "prompt_number": 26 @@ -206,19 +410,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.10, Page number 44" + "source": [ + "Example number 1.10, Page number 44" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the wavelength of an electron\n\n#importing modules\nimport math\n\n#Variable decleration\nV=15; #potential in kV\n\n#Calculation\nv=V*10**3; #potential in V\nlamda=12.26/math.sqrt(v); #de Broglie wavelength\nlamda=math.ceil(lamda*10**2)/10**2 #rounding off to 2 decimals\n\n#result\nprint(\"The de Broglie wavelength in Armstrong is\",lamda);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable decleration\n", + "V=15; #potential in kV\n", + "\n", + "#Calculation\n", + "v=V*10**3; #potential in V\n", + "lamda=12.26/math.sqrt(v); #de Broglie wavelength\n", + "lamda=math.ceil(lamda*10**2)/10**2 #rounding off to 2 decimals\n", + "\n", + "#result\n", + "print(\"The de Broglie wavelength in Armstrong is\",lamda);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in Armstrong is', 0.11)\n" + "text": [ + "('The de Broglie wavelength in Armstrong is', 0.11)\n" + ] } ], "prompt_number": 27 @@ -227,19 +450,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.11, Page number 44\n" + "source": [ + "Example number 1.11, Page number 44\n" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de Broglie wavelength of neutron\n\n#importing modules\nimport math\n\n#Calculation\nm=1.675*10**-27; #mass of neutron in kg\nh=6.626*10**-34;\nE=10; #kinetic energy in keV\n\n#Calculation\nEeV=E*10**3; #Energy in eV\nEj=EeV*1.6*10**-19; #kinetic energy in J\nv=math.sqrt(2*Ej/m); #velocity in m/s\nlamda=h/(m*v); #de broglie wavelength in m\nlamda_A=lamda*10**10; #de broglie wavelength in armstrong\nlamda_A=math.ceil(lamda_A*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"The velocity in m/sec is\",round(v));\nprint(\"The de Broglie wavelength in metres is\",lamda);\nprint(\"The de Broglie wavelength in Armstrong is\",lamda_A);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Calculation\n", + "m=1.675*10**-27; #mass of neutron in kg\n", + "h=6.626*10**-34;\n", + "E=10; #kinetic energy in keV\n", + "\n", + "#Calculation\n", + "EeV=E*10**3; #Energy in eV\n", + "Ej=EeV*1.6*10**-19; #kinetic energy in J\n", + "v=math.sqrt(2*Ej/m); #velocity in m/s\n", + "lamda=h/(m*v); #de broglie wavelength in m\n", + "lamda_A=lamda*10**10; #de broglie wavelength in armstrong\n", + "lamda_A=math.ceil(lamda_A*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"The velocity in m/sec is\",round(v));\n", + "print(\"The de Broglie wavelength in metres is\",lamda);\n", + "print(\"The de Broglie wavelength in Armstrong is\",lamda_A);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The velocity in m/sec is', 1382189.0)\n('The de Broglie wavelength in metres is', 2.861996093951046e-13)\n('The de Broglie wavelength in Armstrong is', 0.0029)\n" + "text": [ + "('The velocity in m/sec is', 1382189.0)\n", + "('The de Broglie wavelength in metres is', 2.861996093951046e-13)\n", + "('The de Broglie wavelength in Armstrong is', 0.0029)\n" + ] } ], "prompt_number": 28 @@ -248,19 +499,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.12, Page number 45" + "source": [ + "Example number 1.12, Page number 45" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de Broglie wavelength of electron\n\n#importing modules\nimport math\n\n#Variable decleration\nm=9.1*10**-31; #mass of electron in kg\nh=6.6*10**-34;\nE=2; #kinetic energy in keV\n\n#Calculation\nEeV=E*10**3; #Energy in eV\nEj=EeV*1.6*10**-19; #kinetic energy in J\np=math.sqrt(2*m*Ej); #momentum\nlamda=h/p; #de broglie wavelength in m\nlamda_A=lamda*10**10; #de broglie wavelength in armstrong\nlamda_A=math.ceil(lamda_A*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"The de Broglie wavelength in metres is\",lamda);\nprint(\"The de Broglie wavelength in Armstrong is\",lamda_A);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable decleration\n", + "m=9.1*10**-31; #mass of electron in kg\n", + "h=6.6*10**-34;\n", + "E=2; #kinetic energy in keV\n", + "\n", + "#Calculation\n", + "EeV=E*10**3; #Energy in eV\n", + "Ej=EeV*1.6*10**-19; #kinetic energy in J\n", + "p=math.sqrt(2*m*Ej); #momentum\n", + "lamda=h/p; #de broglie wavelength in m\n", + "lamda_A=lamda*10**10; #de broglie wavelength in armstrong\n", + "lamda_A=math.ceil(lamda_A*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"The de Broglie wavelength in metres is\",lamda);\n", + "print(\"The de Broglie wavelength in Armstrong is\",lamda_A);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in metres is', 2.7348483695436575e-11)\n('The de Broglie wavelength in Armstrong is', 0.2735)\n" + "text": [ + "('The de Broglie wavelength in metres is', 2.7348483695436575e-11)\n", + "('The de Broglie wavelength in Armstrong is', 0.2735)\n" + ] } ], "prompt_number": 29 @@ -269,19 +546,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.13, Page number 45" + "source": [ + "Example number 1.13, Page number 45" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the wavelength of thermal neutron\n\n#import module\nimport math\n\n#Variable decleration\nm=1.676*10**-27; #mass of neutron in kg\nh=6.62*10**-34;\nE=0.025; #kinetic energy in eV\n\n#Calculation\nEj=E*1.6*10**-19; #kinetic energy in J\nv=math.sqrt(2*Ej/m); #velocity in m/s\nlamda=h/(m*v); #wavelength in m\nlamda_A=lamda*10**10; #de broglie wavelength in armstrong\nlamda_A=math.ceil(lamda_A*10**5)/10**5 #rounding off to 5 decimals\n\n#Result\nprint(\"The neutrons wavelength in metres is\",lamda);\nprint(\"The wavelength in Armstrong is\",lamda_A);\n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "m=1.676*10**-27; #mass of neutron in kg\n", + "h=6.62*10**-34;\n", + "E=0.025; #kinetic energy in eV\n", + "\n", + "#Calculation\n", + "Ej=E*1.6*10**-19; #kinetic energy in J\n", + "v=math.sqrt(2*Ej/m); #velocity in m/s\n", + "lamda=h/(m*v); #wavelength in m\n", + "lamda_A=lamda*10**10; #de broglie wavelength in armstrong\n", + "lamda_A=math.ceil(lamda_A*10**5)/10**5 #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"The neutrons wavelength in metres is\",lamda);\n", + "print(\"The wavelength in Armstrong is\",lamda_A);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The neutrons wavelength in metres is', 1.8079065940980725e-10)\n('The wavelength in Armstrong is', 1.80791)\n" + "text": [ + "('The neutrons wavelength in metres is', 1.8079065940980725e-10)\n", + "('The wavelength in Armstrong is', 1.80791)\n" + ] } ], "prompt_number": 30 @@ -290,19 +592,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.14, Page number 45" + "source": [ + "Example number 1.14, Page number 45" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the wavelength of an electron\n\n#import module\nimport math\n\n#Variable decleration\nV=10; #potential in kV\n\n#Calculation\nV=V*10**3; #potential in V\nlamda=12.26/math.sqrt(V); #wavelength\n\n#Result\nprint(\"The wavelength in Armstrong is\",lamda);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "V=10; #potential in kV\n", + "\n", + "#Calculation\n", + "V=V*10**3; #potential in V\n", + "lamda=12.26/math.sqrt(V); #wavelength\n", + "\n", + "#Result\n", + "print(\"The wavelength in Armstrong is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The wavelength in Armstrong is', 0.1226)\n" + "text": [ + "('The wavelength in Armstrong is', 0.1226)\n" + ] } ], "prompt_number": 31 @@ -311,19 +631,56 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.15, Page number 45" + "source": [ + "Example number 1.15, Page number 45" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the first three permitted levels of electron\n\n#import module\nimport math\n\n#Varialble decleration\nh=6.626*10**-34;\nm=9.1*10**-31; #mass in kg\nl=1; #width in armstrong\n\n#Calculation\nL=l*10**-10; #width in m\n#permitted electron energies En=(n**2*h**2)/(8*m*L**2)\n#let X = h**2/(8*m*L**2)\nX = h**2/(8*m*L**2); #energy in J\nXeV=X/(1.6*10**-19); #energy in eV\n#in the 1st level n1=1\nn1=1;\nE1=(n1**2)*XeV; #energy in eV\n\n#in second level n2=2\nn2=2;\nE2=(n2**2)*XeV; #energy in eV\n#in third level n3=\nn3=3;\nE3=(n3**2)*XeV; #energy in eV\n\n#Result\nprint(\"minimum energy the electron can have in eV is\",round(E1));\nprint(\"other values of energy are in eV and in eV\",round(E2),round(E3));\n\n#answers given in the book are wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Varialble decleration\n", + "h=6.626*10**-34;\n", + "m=9.1*10**-31; #mass in kg\n", + "l=1; #width in armstrong\n", + "\n", + "#Calculation\n", + "L=l*10**-10; #width in m\n", + "#permitted electron energies En=(n**2*h**2)/(8*m*L**2)\n", + "#let X = h**2/(8*m*L**2)\n", + "X = h**2/(8*m*L**2); #energy in J\n", + "XeV=X/(1.6*10**-19); #energy in eV\n", + "#in the 1st level n1=1\n", + "n1=1;\n", + "E1=(n1**2)*XeV; #energy in eV\n", + "\n", + "#in second level n2=2\n", + "n2=2;\n", + "E2=(n2**2)*XeV; #energy in eV\n", + "#in third level n3=\n", + "n3=3;\n", + "E3=(n3**2)*XeV; #energy in eV\n", + "\n", + "#Result\n", + "print(\"minimum energy the electron can have in eV is\",round(E1));\n", + "print(\"other values of energy are in eV and in eV\",round(E2),round(E3));\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('minimum energy the electron can have in eV is', 38.0)\n('other values of energy are in eV and in eV', 151.0, 339.0)\n" + "text": [ + "('minimum energy the electron can have in eV is', 38.0)\n", + "('other values of energy are in eV and in eV', 151.0, 339.0)\n" + ] } ], "prompt_number": 32 @@ -332,19 +689,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.16, Page number 46\n" + "source": [ + "Example number 1.16, Page number 46\n" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the probability of finding the particle\n\n#import module\nimport math\n\n#Variable decleration\nn=1; #lowest state\nL=10; #width in armstrong\n\n#Calculation\nL=L*10**-10; #width in m\nx=L/2;\ndelta_x=1; #interval in armstrong\ndelta_x=delta_x*10**-10; #interval in m\npsi1=(math.sqrt(2/L))*math.sin(math.pi*x/L);\nA=psi1**2;\np=A*delta_x;\np=math.ceil(p*10)/10; #de broglie wavelength in armstrong\n\n#Result\nprint(\"probability of finding the particle is \",p);\n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "n=1; #lowest state\n", + "L=10; #width in armstrong\n", + "\n", + "#Calculation\n", + "L=L*10**-10; #width in m\n", + "x=L/2;\n", + "delta_x=1; #interval in armstrong\n", + "delta_x=delta_x*10**-10; #interval in m\n", + "psi1=(math.sqrt(2/L))*math.sin(math.pi*x/L);\n", + "A=psi1**2;\n", + "p=A*delta_x;\n", + "p=math.ceil(p*10)/10; #de broglie wavelength in armstrong\n", + "\n", + "#Result\n", + "print(\"probability of finding the particle is \",p);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of finding the particle is ', 0.2)\n" + "text": [ + "('probability of finding the particle is ', 0.2)\n" + ] } ], "prompt_number": 33 @@ -353,19 +735,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.17, Page number 46" + "source": [ + "Example number 1.17, Page number 46" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the Fermi energy of the metal\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=970; #density of Na in kg/m^3\nn=6.02*10**26;\nh=6.62*10**(-34);\nm=9.1*10**-31; #mass in kg\nw=23; #atomic weight\n\n#Calculation\nN=(d*n)/w; #number of atoms per m^3\nA=(h**2)/(8*m);\nB=(3*N)/math.pi;\nEf=A*B**(2/3);\nEfeV=Ef/(1.6*10**-19);\nEfeV=math.ceil(EfeV*10**2)/10**2 #rounding of to 2 decimals\n\n#Result\nprint(\"fermi energy of Na in eV is\",EfeV);\n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "d=970; #density of Na in kg/m^3\n", + "n=6.02*10**26;\n", + "h=6.62*10**(-34);\n", + "m=9.1*10**-31; #mass in kg\n", + "w=23; #atomic weight\n", + "\n", + "#Calculation\n", + "N=(d*n)/w; #number of atoms per m^3\n", + "A=(h**2)/(8*m);\n", + "B=(3*N)/math.pi;\n", + "Ef=A*B**(2/3);\n", + "EfeV=Ef/(1.6*10**-19);\n", + "EfeV=math.ceil(EfeV*10**2)/10**2 #rounding of to 2 decimals\n", + "\n", + "#Result\n", + "print(\"fermi energy of Na in eV is\",EfeV);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi energy of Na in eV is', 3.16)\n" + "text": [ + "('fermi energy of Na in eV is', 3.16)\n" + ] } ], "prompt_number": 34 @@ -374,19 +783,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.18, Page number 46" + "source": [ + "Example number 1.18, Page number 46" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the lowest energy of electron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nn1=1;\nn2=1;\nn3=1; #values in lowest energy\nh=6.62*10**(-34);\nm=9.1*10**-31; #mass in kg\nL=0.1; #side in nm\n\n#Calculation\nL=L*10**-9; #side in m\nn=(n1**2)+(n2**2)+(n3**2);\nE1=(n*h**2)/(8*m*L**2); #energy in j\nE1eV=E1/(1.6*10**-19); #energy in eV\nE1eV=math.ceil(E1eV*10**1)/10**1 #rounding off to 2 decimals\n\n#Result\nprint(\"lowest energy of electron in Joule is\",E1);\nprint(\"lowest energy of electron in eV is\",E1eV);\n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "n1=1;\n", + "n2=1;\n", + "n3=1; #values in lowest energy\n", + "h=6.62*10**(-34);\n", + "m=9.1*10**-31; #mass in kg\n", + "L=0.1; #side in nm\n", + "\n", + "#Calculation\n", + "L=L*10**-9; #side in m\n", + "n=(n1**2)+(n2**2)+(n3**2);\n", + "E1=(n*h**2)/(8*m*L**2); #energy in j\n", + "E1eV=E1/(1.6*10**-19); #energy in eV\n", + "E1eV=math.ceil(E1eV*10**1)/10**1 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"lowest energy of electron in Joule is\",E1);\n", + "print(\"lowest energy of electron in eV is\",E1eV);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('lowest energy of electron in Joule is', 1.8059505494505486e-17)\n('lowest energy of electron in eV is', 112.9)\n" + "text": [ + "('lowest energy of electron in Joule is', 1.8059505494505486e-17)\n", + "('lowest energy of electron in eV is', 112.9)\n" + ] } ], "prompt_number": 35 @@ -395,19 +833,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.19, Page number 47" + "source": [ + "Example number 1.19, Page number 47" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de broglie wavelength of neutron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nmn=1.676*10**-27; #mass of neutron in kg\nme=9.1*10**-31; #mass of electron in kg\nh=6.62*10**-34;\nc=3*10**8; #velocity of light in m/sec\n\n#Calculation\nEn=2*me*c**2;\nlamda=h/math.sqrt(2*mn*En); #wavelength in m\nlamda_A=lamda*10**10; #converting lamda from m to A\nlamda_A=math.ceil(lamda_A*10**6)/10**6 #rounding off to 6 decimals\n\n#Result\nprint(\"The de broglie wavelength in Angstrom is\",lamda_A);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "mn=1.676*10**-27; #mass of neutron in kg\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "h=6.62*10**-34;\n", + "c=3*10**8; #velocity of light in m/sec\n", + "\n", + "#Calculation\n", + "En=2*me*c**2;\n", + "lamda=h/math.sqrt(2*mn*En); #wavelength in m\n", + "lamda_A=lamda*10**10; #converting lamda from m to A\n", + "lamda_A=math.ceil(lamda_A*10**6)/10**6 #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"The de broglie wavelength in Angstrom is\",lamda_A);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de broglie wavelength in Angstrom is', 0.000283)\n" + "text": [ + "('The de broglie wavelength in Angstrom is', 0.000283)\n" + ] } ], "prompt_number": 36 @@ -416,19 +878,58 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.20, Page number 47 ***************************************************************************" + "source": [ + "Example number 1.20, Page number 47 ***************************************************************************" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the energies of electron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nn2=2; #second quantum state\nn4=4; #fourth quantum state\nh=6.626*10**-34;\nm=9.1*10**-31; #mass in kg\na=2; #potential box length in armstrong\n\n#Calculation\na=a*10**-10; #length in m\nA=n2**2*h**2;\nB=8*m*a**2;\nE2=A/B; #energy in j\nE2eV=E2/(1.6*10**-19); #energy in eV\nC=n4**2*h**2;\nE4=C/B; #energy in j\nE4eV=E4/(1.6*10**-19); #energy in eV\n\n#Result\nprint(\"energy corresponding to second quantum state in Joule is\",E2);\nprint(\"energy corresponding to second quantum state in eV is\",E2eV);\nprint(\"energy corresponding to fourth quantum state in Joule is\",E4);\nprint(\"energy corresponding to fourth quantum state in eV is\",E4eV);\n\n\n#answers given in the book are wrong", + "input": [ + "\n", + "\n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "n2=2; #second quantum state\n", + "n4=4; #fourth quantum state\n", + "h=6.626*10**-34;\n", + "m=9.1*10**-31; #mass in kg\n", + "a=2; #potential box length in armstrong\n", + "\n", + "#Calculation\n", + "a=a*10**-10; #length in m\n", + "A=n2**2*h**2;\n", + "B=8*m*a**2;\n", + "E2=A/B; #energy in j\n", + "E2eV=E2/(1.6*10**-19); #energy in eV\n", + "C=n4**2*h**2;\n", + "E4=C/B; #energy in j\n", + "E4eV=E4/(1.6*10**-19); #energy in eV\n", + "\n", + "#Result\n", + "print(\"energy corresponding to second quantum state in Joule is\",E2);\n", + "print(\"energy corresponding to second quantum state in eV is\",E2eV);\n", + "print(\"energy corresponding to fourth quantum state in Joule is\",E4);\n", + "print(\"energy corresponding to fourth quantum state in eV is\",E4eV);\n", + "\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy corresponding to second quantum state in Joule is', 6.030752197802197e-18)\n('energy corresponding to second quantum state in eV is', 37.69220123626373)\n('energy corresponding to fourth quantum state in Joule is', 2.412300879120879e-17)\n('energy corresponding to fourth quantum state in eV is', 150.7688049450549)\n" + "text": [ + "('energy corresponding to second quantum state in Joule is', 6.030752197802197e-18)\n", + "('energy corresponding to second quantum state in eV is', 37.69220123626373)\n", + "('energy corresponding to fourth quantum state in Joule is', 2.412300879120879e-17)\n", + "('energy corresponding to fourth quantum state in eV is', 150.7688049450549)\n" + ] } ], "prompt_number": 13 @@ -437,19 +938,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.21, Page number 48 ***********" + "source": [ + "Example number 1.21, Page number 48 ***********" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the spacing of the crystal\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nV=344; #accelerated voltage in V\nn=1; #first reflection\ntheta=60; #glancing angle in degrees\n\n#Calculation\nlamda=12.27/math.sqrt(V);\nd=(n*lamda)/(2*math.sin(theta));\n\n#Result\nprint(\"The spacing of the crystal in Angstrom is\",lamda);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "V=344; #accelerated voltage in V\n", + "n=1; #first reflection\n", + "theta=60; #glancing angle in degrees\n", + "\n", + "#Calculation\n", + "lamda=12.27/math.sqrt(V);\n", + "d=(n*lamda)/(2*math.sin(theta));\n", + "\n", + "#Result\n", + "print(\"The spacing of the crystal in Angstrom is\",lamda);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The spacing of the crystal in Angstrom is', 0.6615540636030947)\n" + "text": [ + "('The spacing of the crystal in Angstrom is', 0.6615540636030947)\n" + ] } ], "prompt_number": 38 @@ -458,19 +980,61 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.22, Page number 49 *************" + "source": [ + "Example number 1.22, Page number 49 *************" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the energies of electron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nn2=2; #second quantum state\nn3=3; #fourth quantum state\nh=6.626*10**-34;\nm=9.1*10**-31; #mass in kg\na=1*10**-10; #width of potential well in m\n\n#Calculation\nB=8*m*a**2;\nE1=h**2/B; #ground state energy\nE1eV=E1/(1.6*10**-19); #energy in eV\nA=n2**2*h**2;\nE2=A/B; #energy in j\nE2eV=E2/(1.6*10**-19); #energy in eV\nC=n3**2*h**2;\nE3=C/B; #energy in j\nE3eV=E3/(1.6*10**-19); #energy in eV\nE1=math.ceil(E1*10**3)/10**3 #rounding off to 3 decimals\nE1eV=math.ceil(E1eV*10**3)/10**3 #rounding off to 3 decimals\nE2eV=math.ceil(E2eV*10**3)/10**3 #rounding off to 3 decimals\nE3eV=math.ceil(E3eV*10**3)/10**3 #rounding off to 3 decimals\n\n#Result\nprint(\"ground state energy in Joule is\",E1);\nprint(\"ground state energy in eV is\",E1eV);\nprint(\"first energy state in eV is\",E2eV);\nprint(\"second energy state in eV is\",E3eV);\n\n#answers given in the book are wrong by one decimal", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "n2=2; #second quantum state\n", + "n3=3; #fourth quantum state\n", + "h=6.626*10**-34;\n", + "m=9.1*10**-31; #mass in kg\n", + "a=1*10**-10; #width of potential well in m\n", + "\n", + "#Calculation\n", + "B=8*m*a**2;\n", + "E1=h**2/B; #ground state energy\n", + "E1eV=E1/(1.6*10**-19); #energy in eV\n", + "A=n2**2*h**2;\n", + "E2=A/B; #energy in j\n", + "E2eV=E2/(1.6*10**-19); #energy in eV\n", + "C=n3**2*h**2;\n", + "E3=C/B; #energy in j\n", + "E3eV=E3/(1.6*10**-19); #energy in eV\n", + "E1=math.ceil(E1*10**3)/10**3 #rounding off to 3 decimals\n", + "E1eV=math.ceil(E1eV*10**3)/10**3 #rounding off to 3 decimals\n", + "E2eV=math.ceil(E2eV*10**3)/10**3 #rounding off to 3 decimals\n", + "E3eV=math.ceil(E3eV*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"ground state energy in Joule is\",E1);\n", + "print(\"ground state energy in eV is\",E1eV);\n", + "print(\"first energy state in eV is\",E2eV);\n", + "print(\"second energy state in eV is\",E3eV);\n", + "\n", + "#answers given in the book are wrong by one decimal" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('ground state energy in Joule is', 0.001)\n('ground state energy in eV is', 37.693)\n('first energy state in eV is', 150.769)\n('second energy state in eV is', 339.23)\n" + "text": [ + "('ground state energy in Joule is', 0.001)\n", + "('ground state energy in eV is', 37.693)\n", + "('first energy state in eV is', 150.769)\n", + "('second energy state in eV is', 339.23)\n" + ] } ], "prompt_number": 39 @@ -479,12 +1043,35 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.23, Page number 49" + "source": [ + "Example number 1.23, Page number 49" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the energy required to jump an electron\n\n#import module\nimport math\n\n#Variable decleration\nn3=3; #fourth quantum state\nh=6.626*10**-34;\nm=9.1*10**-31; #mass in kg\n\n\n#ground state energy E1 = h**2/(8*m*a**2)\n#second excited state E3 = (9*h**2)/(8*m*a**2)\n#required energy E = E3-E1\n#E = (9*h**2)/(8*m*a**2) - h**2/(8*m*a**2)\n#E = (h**2/(8*m*a**2))*(9-1)\n#therefore E = (8*h**2)/(8*m*a**2)\n#hence E = (h**2)/(m*a**2)\n\n#Result \n# the required energy is E = (h**2)/(m*a**2)", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "n3=3; #fourth quantum state\n", + "h=6.626*10**-34;\n", + "m=9.1*10**-31; #mass in kg\n", + "\n", + "\n", + "#ground state energy E1 = h**2/(8*m*a**2)\n", + "#second excited state E3 = (9*h**2)/(8*m*a**2)\n", + "#required energy E = E3-E1\n", + "#E = (9*h**2)/(8*m*a**2) - h**2/(8*m*a**2)\n", + "#E = (h**2/(8*m*a**2))*(9-1)\n", + "#therefore E = (8*h**2)/(8*m*a**2)\n", + "#hence E = (h**2)/(m*a**2)\n", + "\n", + "#Result \n", + "# the required energy is E = (h**2)/(m*a**2)" + ], "language": "python", "metadata": {}, "outputs": [], @@ -494,19 +1081,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.24, Page number 50" + "source": [ + "Example number 1.24, Page number 50" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the minimum uncertainity in velocity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\ndelta_x=10**-8; #length of box in m\nh=6.626*10**-34;\nm=9.1*10**-31; #mass in kg\n\n#Calculation\ndelta_v=h/(m*delta_x); #uncertainity in m/sec\ndelta_vk=delta_v*10**-3; #uncertainity in km/sec\ndelta_vk=math.ceil(delta_vk*10**2)/10**2 #rounding off to 2 decimals\n\n#Result\nprint(\"minimum uncertainity in velocity in m/sec is\",round(delta_v));\nprint(\"minimum uncertainity in velocity in km/sec is\",delta_vk);\n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "delta_x=10**-8; #length of box in m\n", + "h=6.626*10**-34;\n", + "m=9.1*10**-31; #mass in kg\n", + "\n", + "#Calculation\n", + "delta_v=h/(m*delta_x); #uncertainity in m/sec\n", + "delta_vk=delta_v*10**-3; #uncertainity in km/sec\n", + "delta_vk=math.ceil(delta_vk*10**2)/10**2 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"minimum uncertainity in velocity in m/sec is\",round(delta_v));\n", + "print(\"minimum uncertainity in velocity in km/sec is\",delta_vk);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('minimum uncertainity in velocity in m/sec is', 72813.0)\n('minimum uncertainity in velocity in km/sec is', 72.82)\n" + "text": [ + "('minimum uncertainity in velocity in m/sec is', 72813.0)\n", + "('minimum uncertainity in velocity in km/sec is', 72.82)\n" + ] } ], "prompt_number": 40 @@ -515,19 +1126,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.25, Page number 50" + "source": [ + "Example number 1.25, Page number 50" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the de broglie wavelength of proton\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nmp=1.6*10**-27; #mass of proton in kg\nme=9.1*10**-31; #mass of electron in kg\nh=6.626*10**(-34);\nc=3*10**10; #velocity of light in m/sec\n\n#Calculation\nEp=me*c**2;\nlamda=h/math.sqrt(2*mp*Ep); #wavelength in m\nlamda_A=lamda*10**10; #converting lamda from m to A\n\n#Result\nprint(\"The de broglie wavelength in Angstrom is\",lamda_A);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "mp=1.6*10**-27; #mass of proton in kg\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "h=6.626*10**(-34);\n", + "c=3*10**10; #velocity of light in m/sec\n", + "\n", + "#Calculation\n", + "Ep=me*c**2;\n", + "lamda=h/math.sqrt(2*mp*Ep); #wavelength in m\n", + "lamda_A=lamda*10**10; #converting lamda from m to A\n", + "\n", + "#Result\n", + "print(\"The de broglie wavelength in Angstrom is\",lamda_A);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de broglie wavelength in Angstrom is', 4.092931643497047e-06)\n" + "text": [ + "('The de broglie wavelength in Angstrom is', 4.092931643497047e-06)\n" + ] } ], "prompt_number": 41 @@ -536,19 +1170,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 1.26, Page number 51 *************************************************" + "source": [ + "Example number 1.26, Page number 51 *************************************************" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the glancing angle\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nm=1.675*10**(-27); #mass of neutron in kg\nh=6.626*10**(-34);\nn=1; #diffractive order\nd=0.314; #spacing in nm\nE=0.04; #kinetic energy in eV\n\n#Calculation\nd=d*10**-9; #spacing in m\nEj=E*1.6*10**-19; #kinetic energy in J\nlamda=h/math.sqrt(2*m*Ej); #de Broglie wavelength\nlamdaA=lamda*10**9; #converting wavelength from m to nm\ntheta=math.asin((n*lamda)/(2*d));\nprint(\"The de Broglie wavelength in metres is\",lamda);\nprint(\"The de Broglie wavelength in nm is\",lamdaA);\nprint(\"glancing angle in degrees is\",theta);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "m=1.675*10**(-27); #mass of neutron in kg\n", + "h=6.626*10**(-34);\n", + "n=1; #diffractive order\n", + "d=0.314; #spacing in nm\n", + "E=0.04; #kinetic energy in eV\n", + "\n", + "#Calculation\n", + "d=d*10**-9; #spacing in m\n", + "Ej=E*1.6*10**-19; #kinetic energy in J\n", + "lamda=h/math.sqrt(2*m*Ej); #de Broglie wavelength\n", + "lamdaA=lamda*10**9; #converting wavelength from m to nm\n", + "theta=math.asin((n*lamda)/(2*d));\n", + "print(\"The de Broglie wavelength in metres is\",lamda);\n", + "print(\"The de Broglie wavelength in nm is\",lamdaA);\n", + "print(\"glancing angle in degrees is\",theta);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('The de Broglie wavelength in metres is', 1.4309980469755228e-10)\n('The de Broglie wavelength in nm is', 0.1430998046975523)\n('glancing angle in degrees is', 0.2298853909391574)\n" + "text": [ + "('The de Broglie wavelength in metres is', 1.4309980469755228e-10)\n", + "('The de Broglie wavelength in nm is', 0.1430998046975523)\n", + "('glancing angle in degrees is', 0.2298853909391574)\n" + ] } ], "prompt_number": 16 @@ -556,7 +1220,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/chapter2_2.ipynb b/Engineering_Physics/chapter2_2.ipynb index 95f30057..a118db3c 100644 --- a/Engineering_Physics/chapter2_2.ipynb +++ b/Engineering_Physics/chapter2_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter2" + "name": "", + "signature": "sha256:04561aafd347865fa8c83acfb9b60eb84db275f85862655b442f546023cadd1e" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,46 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Electron Theory of Metals" + "source": [ + "Electron Theory of Metals" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.1, Page number 69" + "source": [ + "Example number 2.1, Page number 69" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the Fermi function\n\n#import module\nimport math\n\n#Calculation\n# given that E-Ef = kT\n# fermi function FE = 1/(1+exp((E-Ef)/kT)\n# therefore FE = 1/(1+exp(kT/kT));\n# FE = 1/(1+exp(1))\nFE=1/(1+math.exp(1));\nFE=math.ceil(FE*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"fermi function is\",FE);", + "input": [ + "\n", + "#import module\n", + "import math\n", + "\n", + "#Calculation\n", + "# given that E-Ef = kT\n", + "# fermi function FE = 1/(1+exp((E-Ef)/kT)\n", + "# therefore FE = 1/(1+exp(kT/kT));\n", + "# FE = 1/(1+exp(1))\n", + "FE=1/(1+math.exp(1));\n", + "FE=math.ceil(FE*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"fermi function is\",FE);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi function is', 0.27)\n" + "text": [ + "('fermi function is', 0.27)\n" + ] } ], "prompt_number": 5 @@ -38,19 +60,38 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.2, Page number 69" + "source": [ + "Example number 2.2, Page number 69" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the Fermi function\n\n#import module\nimport math\n\n#Calculation\n# given that E-Ef = kT\n# fermi function FE = 1/(1+exp((E-Ef)/kT)\n# therefore FE = 1/(1+exp(kT/kT));\n# FE = 1/(1+exp(1))\nFE=1/(1+math.exp(1));\nFE=math.ceil(FE*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"fermi function is\",FE);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Calculation\n", + "# given that E-Ef = kT\n", + "# fermi function FE = 1/(1+exp((E-Ef)/kT)\n", + "# therefore FE = 1/(1+exp(kT/kT));\n", + "# FE = 1/(1+exp(1))\n", + "FE=1/(1+math.exp(1));\n", + "FE=math.ceil(FE*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"fermi function is\",FE);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi function is', 0.269)\n" + "text": [ + "('fermi function is', 0.269)\n" + ] } ], "prompt_number": 6 @@ -59,19 +100,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.3, Page number 69" + "source": [ + "Example number 2.3, Page number 69" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nFE=10/100; #fermi function is 10%\nEf=5.5; #fermi energy of silver in eV\nk=1.38*10**-23;\n\n#Calculation\nE=Ef+(Ef/100);\n#FE=1/(1+math.exp((E-Ef)/(k*T)))\n#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))\n#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))\n#therefore log((1/FE)-1) = (E-Ef)/(k*T)\n#therefore T = (E-Ef)/(k*math.log((1/FE)-1))\n#let X=E-Ef; \nX=E-Ef; #energy in eV\nX=X*1.6*10**-19; #energy in J\nT = (X/(k*math.log((1/FE)-1)));\nT=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"temperature in K is\",T);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "FE=10/100; #fermi function is 10%\n", + "Ef=5.5; #fermi energy of silver in eV\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "E=Ef+(Ef/100);\n", + "#FE=1/(1+math.exp((E-Ef)/(k*T)))\n", + "#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))\n", + "#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))\n", + "#therefore log((1/FE)-1) = (E-Ef)/(k*T)\n", + "#therefore T = (E-Ef)/(k*math.log((1/FE)-1))\n", + "#let X=E-Ef; \n", + "X=E-Ef; #energy in eV\n", + "X=X*1.6*10**-19; #energy in J\n", + "T = (X/(k*math.log((1/FE)-1)));\n", + "T=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"temperature in K is\",T);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('temperature in K is', 290.23)\n" + "text": [ + "('temperature in K is', 290.23)\n" + ] } ], "prompt_number": 8 @@ -80,19 +151,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.4, Page number 70 **************************************" + "source": [ + "Example number 2.4, Page number 70 **************************************" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\n#let X=E-Ef\nX=0.5; #E-Ef=0.5 in eV\n\n#Calculation\nX=X*1.6*10**-19; #X in J\nFE=1/100; #fermi function is 1% \nk=1.38*10**-23;\n#FE=1/(1+exp(X/(k*T)))\n#therefore 1/FE = 1+math.exp(X/(k*T))\n#therefore (1/FE)-1 = math.exp(X/(k*T))\n#therefore log((1/FE)-1) = X/(k*T)\n#but log(x) = 2.303*math.log10(x)\n#therefore T = X/(k*math.log((1/FE)-1))\n#but log(x)=2.303*math.log10(x)\n#therefore T = X/(k*2.303*math.log10((1/FE)-1))\nT = X/(k*2.303*math.log10((1/FE)-1));\n\n#Result\nprint(\"temperature in K is\",T);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "#let X=E-Ef\n", + "X=0.5; #E-Ef=0.5 in eV\n", + "\n", + "#Calculation\n", + "X=X*1.6*10**-19; #X in J\n", + "FE=1/100; #fermi function is 1% \n", + "k=1.38*10**-23;\n", + "#FE=1/(1+exp(X/(k*T)))\n", + "#therefore 1/FE = 1+math.exp(X/(k*T))\n", + "#therefore (1/FE)-1 = math.exp(X/(k*T))\n", + "#therefore log((1/FE)-1) = X/(k*T)\n", + "#but log(x) = 2.303*math.log10(x)\n", + "#therefore T = X/(k*math.log((1/FE)-1))\n", + "#but log(x)=2.303*math.log10(x)\n", + "#therefore T = X/(k*2.303*math.log10((1/FE)-1))\n", + "T = X/(k*2.303*math.log10((1/FE)-1));\n", + "\n", + "#Result\n", + "print(\"temperature in K is\",T);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('temperature in K is', 1261.3505710887953)\n" + "text": [ + "('temperature in K is', 1261.3505710887953)\n" + ] } ], "prompt_number": 14 @@ -101,19 +202,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.5, Page number 71 *******" + "source": [ + "Example number 2.5, Page number 71 *******" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the density and mobility of electrons in silver\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nrho_s=10.5*10**3; #density in kg/m^3\nNA=6.02*10**26; #avagadro number per kmol\nMA=107.9; \n\n#Calculation\nn=(rho_s*NA)/MA;\nsigma=6.8*10**7;\ne=1.6*10**-19; #charge in coulomb\nmew=sigma/(n*e);\nmew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"density of electrons is\",n);\nprint(\"mobility of electrons in silver in m^2/Vs is\",mew);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "rho_s=10.5*10**3; #density in kg/m^3\n", + "NA=6.02*10**26; #avagadro number per kmol\n", + "MA=107.9; \n", + "\n", + "#Calculation\n", + "n=(rho_s*NA)/MA;\n", + "sigma=6.8*10**7;\n", + "e=1.6*10**-19; #charge in coulomb\n", + "mew=sigma/(n*e);\n", + "mew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"density of electrons is\",n);\n", + "print(\"mobility of electrons in silver in m^2/Vs is\",mew);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of electrons is', 5.85820203892493e+28)\n('mobility of electrons in silver in m^2/Vs is', 0.007255)\n" + "text": [ + "('density of electrons is', 5.85820203892493e+28)\n", + "('mobility of electrons in silver in m^2/Vs is', 0.007255)\n" + ] } ], "prompt_number": 16 @@ -122,19 +249,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.6, Page number 71 ***" + "source": [ + "Example number 2.6, Page number 71 ***" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the mobility and average time of collision of electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=8.92*10**3; #density in kg/m^3\nrho=1.73*10**-8; #resistivity in ohm-m\nm=9.1*10**-31; #mass in kg\nw=63.5; #atomic weight\ne=1.6*10**-19; #charge in coulomb\nA=6.02*10**26; #avagadro number\n\n#Calculation\nn=(d*A)/w;\nmew=1/(rho*n*e);\ntow=m/(n*(e**2)*rho);\nmew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"mobility of electrons in Copper in m/Vs is\",mew);\nprint(\"average time of collision of electrons in copper in sec is\",tow);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "d=8.92*10**3; #density in kg/m^3\n", + "rho=1.73*10**-8; #resistivity in ohm-m\n", + "m=9.1*10**-31; #mass in kg\n", + "w=63.5; #atomic weight\n", + "e=1.6*10**-19; #charge in coulomb\n", + "A=6.02*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "n=(d*A)/w;\n", + "mew=1/(rho*n*e);\n", + "tow=m/(n*(e**2)*rho);\n", + "mew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"mobility of electrons in Copper in m/Vs is\",mew);\n", + "print(\"average time of collision of electrons in copper in sec is\",tow);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mobility of electrons in Copper in m/Vs is', 0.004273)\n('average time of collision of electrons in copper in sec is', 2.4297841992299697e-14)\n" + "text": [ + "('mobility of electrons in Copper in m/Vs is', 0.004273)\n", + "('average time of collision of electrons in copper in sec is', 2.4297841992299697e-14)\n" + ] } ], "prompt_number": 18 @@ -143,19 +298,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.7, Page number 72" + "source": [ + "Example number 2.7, Page number 72" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the relaxation time of conduction electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nrho=1.54*10**-8; #resistivity in ohm-m\nn=5.8*10**28; #electron/m^3\nm=9.108*10**-31; #mass in kg\ne=1.602*10**-19; #charge in coulomb\n\n#Calculation\ntow=m/(n*(e**2)*rho);\n\n#Result\nprint(\"relaxation time of conduction electrons in sec is\",tow);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "rho=1.54*10**-8; #resistivity in ohm-m\n", + "n=5.8*10**28; #electron/m^3\n", + "m=9.108*10**-31; #mass in kg\n", + "e=1.602*10**-19; #charge in coulomb\n", + "\n", + "#Calculation\n", + "tow=m/(n*(e**2)*rho);\n", + "\n", + "#Result\n", + "print(\"relaxation time of conduction electrons in sec is\",tow);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('relaxation time of conduction electrons in sec is', 3.973281032516849e-14)\n" + "text": [ + "('relaxation time of conduction electrons in sec is', 3.973281032516849e-14)\n" + ] } ], "prompt_number": 19 @@ -164,19 +340,49 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.8, Page number 73" + "source": [ + "Example number 2.8, Page number 73" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nFE=10/100; #fermi function is 10%\nEf=5.5; #fermi energy of silver in eV\nk=1.38*10**-23;\n\n#Calculation\nE=Ef+(Ef/100);\n#FE=1/(1+math.exp((E-Ef)/(k*T)))\n#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))\n#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))\n#therefore log((1/FE)-1) = (E-Ef)/(k*T)\n#therefore T = (E-Ef)/(k*math.log((1/FE)-1))\n#let X=E-Ef; \nX=E-Ef; #energy in eV\nX=X*1.6*10**-19; #energy in J\nT = (X/(k*math.log((1/FE)-1)));\nT=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"temperature in K is\",T);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "FE=10/100; #fermi function is 10%\n", + "Ef=5.5; #fermi energy of silver in eV\n", + "k=1.38*10**-23;\n", + "\n", + "#Calculation\n", + "E=Ef+(Ef/100);\n", + "#FE=1/(1+math.exp((E-Ef)/(k*T)))\n", + "#therefore 1/FE = 1+math.exp((E-Ef)/(k*T))\n", + "#therefore (1/FE)-1 = math.exp((E-Ef)/(k*T))\n", + "#therefore log((1/FE)-1) = (E-Ef)/(k*T)\n", + "#therefore T = (E-Ef)/(k*math.log((1/FE)-1))\n", + "#let X=E-Ef; \n", + "X=E-Ef; #energy in eV\n", + "X=X*1.6*10**-19; #energy in J\n", + "T = (X/(k*math.log((1/FE)-1)));\n", + "T=math.ceil(T*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"temperature in K is\",T);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('temperature in K is', 290.23)\n" + "text": [ + "('temperature in K is', 290.23)\n" + ] } ], "prompt_number": 21 @@ -185,19 +391,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.9, Page number 73" + "source": [ + "Example number 2.9, Page number 73" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the Fermi distribution function\n\n#import module\nimport math\n\n#Calculation\n# given that E-Ef = kT\n# fermi function FpE = 1/(1+exp((E-Ef)/kT)\n# therefore FpE = 1/(1+exp(kT/kT));\n# FpE = 1/(1+exp(1))\nFpE=1/(1+math.exp(1));\nFpE=math.ceil(FpE*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"fermi function is\",FpE);\n#the presence of electron at that energy level is not certain", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Calculation\n", + "# given that E-Ef = kT\n", + "# fermi function FpE = 1/(1+exp((E-Ef)/kT)\n", + "# therefore FpE = 1/(1+exp(kT/kT));\n", + "# FpE = 1/(1+exp(1))\n", + "FpE=1/(1+math.exp(1));\n", + "FpE=math.ceil(FpE*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"fermi function is\",FpE);\n", + "#the presence of electron at that energy level is not certain" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('fermi function is', 0.27)\n" + "text": [ + "('fermi function is', 0.27)\n" + ] } ], "prompt_number": 23 @@ -206,12 +432,36 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.10, Page number 74 ****************************" + "source": [ + "Example number 2.10, Page number 74 ****************************" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the number of states per unit volume\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nm=9.1*10**-31; #mass in kg\nh=6.626*10**-34;\nA=(8*m)**(3/2);\n\n#Calculation\nB=math.pi/(2*h**3);\nEfeV=3.10; #fermi energy in eV\nEf=EfeV*1.6*10**-19; #fermi energy in J\nEFeV=EfeV+0.02; #energy after interval in eV\nEF=EFeV*1.6*10**-19; #energy after interval in J\nfunction Q=f(E),Q=A*B*math.sqrt(E),endfunction\nI=intg(Ef,EF,f)\n\n#Result\nprint(\"number of energy states per unit volume is\",I);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "m=9.1*10**-31; #mass in kg\n", + "h=6.626*10**-34;\n", + "A=(8*m)**(3/2);\n", + "\n", + "#Calculation\n", + "B=math.pi/(2*h**3);\n", + "EfeV=3.10; #fermi energy in eV\n", + "Ef=EfeV*1.6*10**-19; #fermi energy in J\n", + "EFeV=EfeV+0.02; #energy after interval in eV\n", + "EF=EFeV*1.6*10**-19; #energy after interval in J\n", + "function Q=f(E),Q=A*B*math.sqrt(E),endfunction\n", + "I=intg(Ef,EF,f)\n", + "\n", + "#Result\n", + "print(\"number of energy states per unit volume is\",I);" + ], "language": "python", "metadata": {}, "outputs": [ @@ -230,19 +480,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.11, Page number 74" + "source": [ + "Example number 2.11, Page number 74" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the mean free path of electron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nT=300; #temperature in K\nn=8.5*10**28; #density per m^3\nrho=1.69*10**-8; #resistivity in ohm/m^3\nme=9.11*10**-31; #mass of electron in kg\ne=1.6*10**-19; #charge in coulomb\nKB=1.38*10**-23; #boltzmann constant in J/k\n\n#Calculation\nlamda=math.sqrt(3*KB*me*T)/(n*(e**2)*rho);\n\n#Result\nprint(\"mean free path of electron in m is\",lamda);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "T=300; #temperature in K\n", + "n=8.5*10**28; #density per m^3\n", + "rho=1.69*10**-8; #resistivity in ohm/m^3\n", + "me=9.11*10**-31; #mass of electron in kg\n", + "e=1.6*10**-19; #charge in coulomb\n", + "KB=1.38*10**-23; #boltzmann constant in J/k\n", + "\n", + "#Calculation\n", + "lamda=math.sqrt(3*KB*me*T)/(n*(e**2)*rho);\n", + "\n", + "#Result\n", + "print(\"mean free path of electron in m is\",lamda);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mean free path of electron in m is', 2.892506814374228e-09)\n" + "text": [ + "('mean free path of electron in m is', 2.892506814374228e-09)\n" + ] } ], "prompt_number": 27 @@ -251,19 +526,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.12, Page number 75" + "source": [ + "Example number 2.12, Page number 75" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the relaxation time of conduction electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nrho=1.43*10**-8; #resistivity in ohm-m\nn=6.5*10**28; #electron/m^3\nm=9.11*10**-34; #mass in kg\ne=1.6*10**-19; #charge in coulomb\n\n#Calculation\ntow=m/(n*(e**2)*rho);\n\n#Result\nprint(\"relaxation time of conduction electrons in sec is\",tow);", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "rho=1.43*10**-8; #resistivity in ohm-m\n", + "n=6.5*10**28; #electron/m^3\n", + "m=9.11*10**-34; #mass in kg\n", + "e=1.6*10**-19; #charge in coulomb\n", + "\n", + "#Calculation\n", + "tow=m/(n*(e**2)*rho);\n", + "\n", + "#Result\n", + "print(\"relaxation time of conduction electrons in sec is\",tow);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('relaxation time of conduction electrons in sec is', 3.8285032275416887e-17)\n" + "text": [ + "('relaxation time of conduction electrons in sec is', 3.8285032275416887e-17)\n" + ] } ], "prompt_number": 28 @@ -272,19 +567,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.13, Page number 75 ******" + "source": [ + "Example number 2.13, Page number 75 ******" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the mobility and average time of collision of electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=8.92*10**3; #density in kg/m^3\nrho=1.73*10**-8; #resistivity in ohm-m\nm=9.1*10**-31; #mass in kg\nM=63.5; #atomic weight\ne=1.6*10**-19; #charge in coulomb\nA=6.02*10**26; #avagadro number\n\n#Calculation\nn=(d*A)/M;\nmew=1/(rho*n*e);\ntow=m/(n*(e**2)*rho);\nmew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n\n#Result\nprint(\"mobility of electrons in Copper in m/Vs is\",mew);\nprint(\"average time of collision of electrons in copper in sec is\",tow);", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "d=8.92*10**3; #density in kg/m^3\n", + "rho=1.73*10**-8; #resistivity in ohm-m\n", + "m=9.1*10**-31; #mass in kg\n", + "M=63.5; #atomic weight\n", + "e=1.6*10**-19; #charge in coulomb\n", + "A=6.02*10**26; #avagadro number\n", + "\n", + "#Calculation\n", + "n=(d*A)/M;\n", + "mew=1/(rho*n*e);\n", + "tow=m/(n*(e**2)*rho);\n", + "mew=math.ceil(mew*10**6)/10**6; #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"mobility of electrons in Copper in m/Vs is\",mew);\n", + "print(\"average time of collision of electrons in copper in sec is\",tow);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('mobility of electrons in Copper in m/Vs is', 0.004273)\n('average time of collision of electrons in copper in sec is', 2.4297841992299697e-14)\n" + "text": [ + "('mobility of electrons in Copper in m/Vs is', 0.004273)\n", + "('average time of collision of electrons in copper in sec is', 2.4297841992299697e-14)\n" + ] } ], "prompt_number": 31 @@ -293,19 +615,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.14, Page number 76" + "source": [ + "Example number 2.14, Page number 76" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the order of magnitude of velocity of molecules\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nMH=1.008*2*1.67*10**-27; #mass in kg\nT=30; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nKB=1.38*10**-23; #boltzmann constant in J/k\nKE=(3/2)*KB*T; #kinetic energy in J\nKEeV=KE*6.24*10**18; #kinetic energy in eV\ncbar=math.sqrt((3*KB*T)/MH);\n\n#Result\nprint(\"average kinetic energy in J is\",KE);\nprint(\"average kinetic energy in eV is\",KEeV);\nprint(\"velocity of molecules in m/s is\",cbar);\n\n#answers for average kinetic energy in eV and velocity of electrons given in the book are wrong", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "MH=1.008*2*1.67*10**-27; #mass in kg\n", + "T=30; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "KB=1.38*10**-23; #boltzmann constant in J/k\n", + "KE=(3/2)*KB*T; #kinetic energy in J\n", + "KEeV=KE*6.24*10**18; #kinetic energy in eV\n", + "cbar=math.sqrt((3*KB*T)/MH);\n", + "\n", + "#Result\n", + "print(\"average kinetic energy in J is\",KE);\n", + "print(\"average kinetic energy in eV is\",KEeV);\n", + "print(\"velocity of molecules in m/s is\",cbar);\n", + "\n", + "#answers for average kinetic energy in eV and velocity of electrons given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('average kinetic energy in J is', 6.2720999999999986e-21)\n('average kinetic energy in eV is', 0.039137903999999994)\n('velocity of molecules in m/s is', 1930.269663853336)\n" + "text": [ + "('average kinetic energy in J is', 6.2720999999999986e-21)\n", + "('average kinetic energy in eV is', 0.039137903999999994)\n", + "('velocity of molecules in m/s is', 1930.269663853336)\n" + ] } ], "prompt_number": 33 @@ -314,19 +664,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.15, Page number 77 ****" + "source": [ + "Example number 2.15, Page number 77 ****" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the velocity of an electron and proton\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEe=10; #electron kinetic energy in eV\nEp=10; #proton kinetic energy in eV\nme=9.1*10**-31; #mass of electron in kg\nmp=1.67*10**-27; #mass of proton in kg\n\n#Calculation\nEeeV=Ee*1.6*10**-19; #electron kinetic energy in J\nEpeV=Ep*1.6*10**-19; #proton kinetic energy in J\ncebar=math.sqrt((2*EeeV)/me);\ncpbar=math.sqrt((2*EpeV)/mp);\n\n#Result\nprint(\"velocity of electron in m/s is\",cebar);\nprint(\"velocity of proton in m/s is\",cpbar);\n\n#answers given in the book are wrong", + "input": [ + " \n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "Ee=10; #electron kinetic energy in eV\n", + "Ep=10; #proton kinetic energy in eV\n", + "me=9.1*10**-31; #mass of electron in kg\n", + "mp=1.67*10**-27; #mass of proton in kg\n", + "\n", + "#Calculation\n", + "EeeV=Ee*1.6*10**-19; #electron kinetic energy in J\n", + "EpeV=Ep*1.6*10**-19; #proton kinetic energy in J\n", + "cebar=math.sqrt((2*EeeV)/me);\n", + "cpbar=math.sqrt((2*EpeV)/mp);\n", + "\n", + "#Result\n", + "print(\"velocity of electron in m/s is\",cebar);\n", + "print(\"velocity of proton in m/s is\",cpbar);\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('velocity of electron in m/s is', 1875228.9237539817)\n('velocity of proton in m/s is', 43774.05241316662)\n" + "text": [ + "('velocity of electron in m/s is', 1875228.9237539817)\n", + "('velocity of proton in m/s is', 43774.05241316662)\n" + ] } ], "prompt_number": 35 @@ -335,19 +712,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.16, Page number 77" + "source": [ + "Example number 2.16, Page number 77" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the drift velocity of free electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nA=10; #area of cross section in mm^2\nA=A*10**-6; #area of cross section in m^2\ni=100; #current in amp\nn=8.5*10**28; #number of electrons per mm^3\ne=1.6*10**-19; #electron charge in coulumb\n\n#Calculation\nvd=1/(n*A*e);\n\n#Result\nprint(\"drift velocity in m/s is\",vd);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "A=10; #area of cross section in mm^2\n", + "A=A*10**-6; #area of cross section in m^2\n", + "i=100; #current in amp\n", + "n=8.5*10**28; #number of electrons per mm^3\n", + "e=1.6*10**-19; #electron charge in coulumb\n", + "\n", + "#Calculation\n", + "vd=1/(n*A*e);\n", + "\n", + "#Result\n", + "print(\"drift velocity in m/s is\",vd);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('drift velocity in m/s is', 7.3529411764705884e-06)\n" + "text": [ + "('drift velocity in m/s is', 7.3529411764705884e-06)\n" + ] } ], "prompt_number": 36 @@ -356,19 +757,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 2.17, Page number 78" + "source": [ + "Example number 2.17, Page number 78" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the thermal conductivity of copper\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\ntow=3*10**-14; #relaxation time in sec\nn=8*10**28; #density of electrons per m^3\nKB=1.38*10**-23; #boltzmann constant in J/k\nT=0; #temperature in C\n\n#Calculation\nT=T+273; #temperature in K\nm=9.1*10**-31; #mass of electron in kg\nsigma_T=((3*n*tow*(KB**2)*T)/(2*m));\nsigma_T=math.ceil(sigma_T*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"thermal conductivity of copper in ohm-1 is\",sigma_T);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "tow=3*10**-14; #relaxation time in sec\n", + "n=8*10**28; #density of electrons per m^3\n", + "KB=1.38*10**-23; #boltzmann constant in J/k\n", + "T=0; #temperature in C\n", + "\n", + "#Calculation\n", + "T=T+273; #temperature in K\n", + "m=9.1*10**-31; #mass of electron in kg\n", + "sigma_T=((3*n*tow*(KB**2)*T)/(2*m));\n", + "sigma_T=math.ceil(sigma_T*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"thermal conductivity of copper in ohm-1 is\",sigma_T);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('thermal conductivity of copper in ohm-1 is', 205.68)\n" + "text": [ + "('thermal conductivity of copper in ohm-1 is', 205.68)\n" + ] } ], "prompt_number": 38 @@ -376,7 +801,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/chapter4_2.ipynb b/Engineering_Physics/chapter4_2.ipynb index b8bc5e59..80203b2d 100644 --- a/Engineering_Physics/chapter4_2.ipynb +++ b/Engineering_Physics/chapter4_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter4" + "name": "", + "signature": "sha256:544912fca601384def1f6da3b02bc7431b47e0d8f9efa5f2e7d2a367448daaa6" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Magnetic Properties" + "source": [ + "Magnetic Properties" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.1, Page number 119" + "source": [ + "Example number 4.1, Page number 119" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the relative permeability of iron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=6.5*10**-4; #magnetic field in T\nM=1.4; #field with iron\n\n#Calculation\nchi=M/H;\nmew_r=1+chi;\nmew_r=math.ceil(mew_r*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"relative permeability of iron is\",mew_r);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "H=6.5*10**-4; #magnetic field in T\n", + "M=1.4; #field with iron\n", + "\n", + "#Calculation\n", + "chi=M/H;\n", + "mew_r=1+chi;\n", + "mew_r=math.ceil(mew_r*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"relative permeability of iron is\",mew_r);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('relative permeability of iron is', 2154.85)\n" + "text": [ + "('relative permeability of iron is', 2154.85)\n" + ] } ], "prompt_number": 2 @@ -38,19 +64,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.2, Page number 119" + "source": [ + "Example number 4.2, Page number 119" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the relative permeability of ferromagnetic material\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=220; #field in amp/m\nM=3300; #magnetisation in amp/m\n\n#Calculation\nchi=M/H;\nmew_r=1+chi;\n\n#Result\nprint(\"relative permeability is\",mew_r);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "H=220; #field in amp/m\n", + "M=3300; #magnetisation in amp/m\n", + "\n", + "#Calculation\n", + "chi=M/H;\n", + "mew_r=1+chi;\n", + "\n", + "#Result\n", + "print(\"relative permeability is\",mew_r);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('relative permeability is', 16.0)\n" + "text": [ + "('relative permeability is', 16.0)\n" + ] } ], "prompt_number": 3 @@ -59,19 +105,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.3, Page number 120 *****" + "source": [ + "Example number 4.3, Page number 120 *****" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the change in magnetic moment\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=5.29*10**-11; #radius of orbit in m\nB=2; #applied field in Tesla\ne=1.602*10**-19; #charge of electron in coulomb\nm=9.108*10**-31; #mass of electron in kg\n\n#Calculation\nmew=(e**2)*(r**2)*B/(4*m);\n\n#Result\nprint(\"magnetic moment in Am^2 is\",mew);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=5.29*10**-11; #radius of orbit in m\n", + "B=2; #applied field in Tesla\n", + "e=1.602*10**-19; #charge of electron in coulomb\n", + "m=9.108*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "mew=(e**2)*(r**2)*B/(4*m);\n", + "\n", + "#Result\n", + "print(\"magnetic moment in Am^2 is\",mew);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic moment in Am^2 is', 3.94260574090909e-29)\n" + "text": [ + "('magnetic moment in Am^2 is', 3.94260574090909e-29)\n" + ] } ], "prompt_number": 5 @@ -80,19 +147,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.4, Page number 120" + "source": [ + "Example number 4.4, Page number 120" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the intensity of magnetisation and flux density\n\n#import module\nimport math\n\n#Variable decleration\nchi=0.5*10**-5; #susceptibility \nH=10**6; #field strength in amp/m\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nI=chi*H;\nB=mew_0*(I+H);\nB=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"intensity of magnetisation in Amp/m is\",I);\nprint(\"flux density in Weber/m^2 is\",B);\n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "chi=0.5*10**-5; #susceptibility \n", + "H=10**6; #field strength in amp/m\n", + "\n", + "#Calculation\n", + "mew_0=4*math.pi*10**-7;\n", + "I=chi*H;\n", + "B=mew_0*(I+H);\n", + "B=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"intensity of magnetisation in Amp/m is\",I);\n", + "print(\"flux density in Weber/m^2 is\",B);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intensity of magnetisation in Amp/m is', 5.0)\n('flux density in Weber/m^2 is', 1.257)\n" + "text": [ + "('intensity of magnetisation in Amp/m is', 5.0)\n", + "('flux density in Weber/m^2 is', 1.257)\n" + ] } ], "prompt_number": 7 @@ -101,19 +191,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.5, Page number 120" + "source": [ + "Example number 4.5, Page number 120" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the average number of bohr magnetons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\ne=2.86; #edge in armstrong\ne=e*10**-10; #edge in m\nIs=1.76*10**6; #magnetisation in amp/m\nmewB=9.27*10**-24; #1 bohr magneton in amp m^2\n\n#Calculation\nN=2/(e**3); #density per m^3\nmewbar=Is/N;\nmew_bar=mewbar/mewB;\nmew_bar=math.ceil(mew_bar*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"average dipole moment in mewB is\",mew_bar);", + "input": [ + " \n", + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "e=2.86; #edge in armstrong\n", + "e=e*10**-10; #edge in m\n", + "Is=1.76*10**6; #magnetisation in amp/m\n", + "mewB=9.27*10**-24; #1 bohr magneton in amp m^2\n", + "\n", + "#Calculation\n", + "N=2/(e**3); #density per m^3\n", + "mewbar=Is/N;\n", + "mew_bar=mewbar/mewB;\n", + "mew_bar=math.ceil(mew_bar*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"average dipole moment in mewB is\",mew_bar);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('average dipole moment in mewB is', 2.221)\n" + "text": [ + "('average dipole moment in mewB is', 2.221)\n" + ] } ], "prompt_number": 10 @@ -122,19 +237,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.6, Page number 121 ***" + "source": [ + "Example number 4.6, Page number 121 ***" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the magnetisation and flux density\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=10**6; #magnetic field in amp/m\nchi=1.5*10**-3; #susceptibility\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nM=chi*H;\nB=mew_0*(M+H);\n\n#Result\nprint(\"magnetisation in Amp/m is\",M);\nprint(\"flux density in Tesla is\",B);\n\n#answer for flux density given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "H=10**6; #magnetic field in amp/m\n", + "chi=1.5*10**-3; #susceptibility\n", + "\n", + "#Calculation\n", + "mew_0=4*math.pi*10**-7;\n", + "M=chi*H;\n", + "B=mew_0*(M+H);\n", + "\n", + "#Result\n", + "print(\"magnetisation in Amp/m is\",M);\n", + "print(\"flux density in Tesla is\",B);\n", + "\n", + "#answer for flux density given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetisation in Amp/m is', 1500.0)\n('flux density in Tesla is', 1.258522017028071)\n" + "text": [ + "('magnetisation in Amp/m is', 1500.0)\n", + "('flux density in Tesla is', 1.258522017028071)\n" + ] } ], "prompt_number": 11 @@ -143,19 +283,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.7, Page number 121" + "source": [ + "Example number 4.7, Page number 121" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the magnetisation and flux density\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nchi=3.7*10**-3; #susceptibility \nH=10**4; #field strength in amp/m\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nM=chi*H;\nB=mew_0*(M+H);\nB=math.ceil(B*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"magnetisation in Amp/m is\",M);\nprint(\"flux density in Weber/m^2 is\",B);\n\n#answer for flux density given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "chi=3.7*10**-3; #susceptibility \n", + "H=10**4; #field strength in amp/m\n", + "\n", + "#Calculation\n", + "mew_0=4*math.pi*10**-7;\n", + "M=chi*H;\n", + "B=mew_0*(M+H);\n", + "B=math.ceil(B*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"magnetisation in Amp/m is\",M);\n", + "print(\"flux density in Weber/m^2 is\",B);\n", + "\n", + "#answer for flux density given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetisation in Amp/m is', 37.0)\n('flux density in Weber/m^2 is', 0.01262)\n" + "text": [ + "('magnetisation in Amp/m is', 37.0)\n", + "('flux density in Weber/m^2 is', 0.01262)\n" + ] } ], "prompt_number": 13 @@ -164,19 +330,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.8, Page number 121" + "source": [ + "Example number 4.8, Page number 121" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the change in magnetic moment\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=0.052*10**-9; #radius of orbit in m\nB=1; #magnetic field in Wb/m^2\ne=1.6*10**-19; #charge of electron in coulomb\nm=9.1*10**-31; #mass of electron in kg\n\n#Calculation\ndmew=(e**2)*(r**2)*B/(4*m);\n\n#Result\nprint(\"magnetic moment in Am^2 is\",dmew);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=0.052*10**-9; #radius of orbit in m\n", + "B=1; #magnetic field in Wb/m^2\n", + "e=1.6*10**-19; #charge of electron in coulomb\n", + "m=9.1*10**-31; #mass of electron in kg\n", + "\n", + "#Calculation\n", + "dmew=(e**2)*(r**2)*B/(4*m);\n", + "\n", + "#Result\n", + "print(\"magnetic moment in Am^2 is\",dmew);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic moment in Am^2 is', 1.901714285714286e-29)\n" + "text": [ + "('magnetic moment in Am^2 is', 1.901714285714286e-29)\n" + ] } ], "prompt_number": 14 @@ -185,19 +374,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.9, Page number 122" + "source": [ + "Example number 4.9, Page number 122" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the intensity of magnetisation and flux density\n\n#import module\nimport math\n\n#Variable decleration\nchi=-0.5*10**-5; #susceptibility \nH=9.9*10**4; #field strength in amp/m\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nI=chi*H;\nB=mew_0*H*(1+chi);\nI=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\nB=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intensity of magnetisation in Amp/m is\",I);\nprint(\"flux density in Weber/m^2 is\",B);\n\n#answer for flux density given in the book is wrong ", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "chi=-0.5*10**-5; #susceptibility \n", + "H=9.9*10**4; #field strength in amp/m\n", + "\n", + "#Calculation\n", + "mew_0=4*math.pi*10**-7;\n", + "I=chi*H;\n", + "B=mew_0*H*(1+chi);\n", + "I=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n", + "B=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"intensity of magnetisation in Amp/m is\",I);\n", + "print(\"flux density in Weber/m^2 is\",B);\n", + "\n", + "#answer for flux density given in the book is wrong " + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intensity of magnetisation in Amp/m is', -0.495)\n('flux density in Weber/m^2 is', 0.1245)\n" + "text": [ + "('intensity of magnetisation in Amp/m is', -0.495)\n", + "('flux density in Weber/m^2 is', 0.1245)\n" + ] } ], "prompt_number": 18 @@ -206,19 +421,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.10, Page number 122" + "source": [ + "Example number 4.10, Page number 122" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the flux density at centre and dipole moment\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=6.1*10**-11; #radius of H atom in m\nnew=8.8*10**15; #frequency in rev/sec\ne=1.6*10**-19;\n\n#Calculation\nmew0=4*math.pi*10**-7;\ni=e*new;\nB=(mew0*i)/(2*r);\nmew=i*math.pi*(r**2);\ni=math.ceil(i*10**7)/10**7; #rounding off to 7 decimals\nB=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"current in amp is\",i);\nprint(\"magnetic induction in weber/m^2 is\",B);\nprint(\"dipole moment in amp m^2 is\",mew);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=6.1*10**-11; #radius of H atom in m\n", + "new=8.8*10**15; #frequency in rev/sec\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "mew0=4*math.pi*10**-7;\n", + "i=e*new;\n", + "B=(mew0*i)/(2*r);\n", + "mew=i*math.pi*(r**2);\n", + "i=math.ceil(i*10**7)/10**7; #rounding off to 7 decimals\n", + "B=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"current in amp is\",i);\n", + "print(\"magnetic induction in weber/m^2 is\",B);\n", + "print(\"dipole moment in amp m^2 is\",mew);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('current in amp is', 0.0014081)\n('magnetic induction in weber/m^2 is', 14.503)\n('dipole moment in amp m^2 is', 1.645933169972273e-23)\n" + "text": [ + "('current in amp is', 0.0014081)\n", + "('magnetic induction in weber/m^2 is', 14.503)\n", + "('dipole moment in amp m^2 is', 1.645933169972273e-23)\n" + ] } ], "prompt_number": 22 @@ -227,19 +471,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.11, Page number 123" + "source": [ + "Example number 4.11, Page number 123" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the average number of Bohr magnetons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nIs=1.96*10**6; #saturation magnetisation in amp/m\na=3; #cube edge of iron in armstrong\na=a*10**-10; #cube edge of iron in m\nmew_b=9.27*10**-24; #bohr magneton in amp/m^2\nn=2; #number of atoms per unit cell\n\n#Calculation\nN=n/(a**3);\nmewbar=Is/N;\nmew_ab=mewbar/mew_b;\nmew_ab=math.ceil(mew_ab*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"average number of Bohr magnetons in bohr magneton per atom is\",mew_ab);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "Is=1.96*10**6; #saturation magnetisation in amp/m\n", + "a=3; #cube edge of iron in armstrong\n", + "a=a*10**-10; #cube edge of iron in m\n", + "mew_b=9.27*10**-24; #bohr magneton in amp/m^2\n", + "n=2; #number of atoms per unit cell\n", + "\n", + "#Calculation\n", + "N=n/(a**3);\n", + "mewbar=Is/N;\n", + "mew_ab=mewbar/mew_b;\n", + "mew_ab=math.ceil(mew_ab*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"average number of Bohr magnetons in bohr magneton per atom is\",mew_ab);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('average number of Bohr magnetons in bohr magneton per atom is', 2.8544)\n" + "text": [ + "('average number of Bohr magnetons in bohr magneton per atom is', 2.8544)\n" + ] } ], "prompt_number": 24 @@ -248,19 +517,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.12, Page number 123" + "source": [ + "Example number 4.12, Page number 123" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the magnetic force and relative permeability\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nI=3000; #magnetisation in amp/m\nB=0.005; #flux density in weber/m^2\n\n#Calculation\nmew0=4*math.pi*10**-7;\nH=(B/mew0)-I;\nmew_r=(I/H)+1;\nH=math.ceil(H*10**3)/10**3; #rounding off to 3 decimals\nmew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"magnetic force in amp/m is\",H);\nprint(\"relative permeability is\",mew_r);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "I=3000; #magnetisation in amp/m\n", + "B=0.005; #flux density in weber/m^2\n", + "\n", + "#Calculation\n", + "mew0=4*math.pi*10**-7;\n", + "H=(B/mew0)-I;\n", + "mew_r=(I/H)+1;\n", + "H=math.ceil(H*10**3)/10**3; #rounding off to 3 decimals\n", + "mew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"magnetic force in amp/m is\",H);\n", + "print(\"relative permeability is\",mew_r);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnetic force in amp/m is', 978.874)\n('relative permeability is', 4.065)\n" + "text": [ + "('magnetic force in amp/m is', 978.874)\n", + "('relative permeability is', 4.065)\n" + ] } ], "prompt_number": 28 @@ -269,19 +565,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.13, Page number 124" + "source": [ + "Example number 4.13, Page number 124" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the permeability\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=1800; #magnetising field in amp/m\nphi=3*10**-5; #magnetic flux in weber\nA=0.2; #cross sectional area in cm^2\n\n#Calculation\nA=A*10**-4; #cross sectional area in m^2\nB=phi/A;\nmew=B/H;\nmew=math.ceil(mew*10**8)/10**8 #rounding off to 8 decimals\n\n#Result\nprint(\"the permeability in Henry/m is\",mew);\n\n#answer given in the book is wron", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "H=1800; #magnetising field in amp/m\n", + "phi=3*10**-5; #magnetic flux in weber\n", + "A=0.2; #cross sectional area in cm^2\n", + "\n", + "#Calculation\n", + "A=A*10**-4; #cross sectional area in m^2\n", + "B=phi/A;\n", + "mew=B/H;\n", + "mew=math.ceil(mew*10**8)/10**8 #rounding off to 8 decimals\n", + "\n", + "#Result\n", + "print(\"the permeability in Henry/m is\",mew);\n", + "\n", + "#answer given in the book is wron" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the permeability in Henry/m is', 0.00083334)\n" + "text": [ + "('the permeability in Henry/m is', 0.00083334)\n" + ] } ], "prompt_number": 31 @@ -290,19 +611,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.14, Page number 124 ********************" + "source": [ + "Example number 4.14, Page number 124 ********************" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the magnetic dipole moment and torque\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=0.04; #radius of circular loop in m\ni=1000; #current in mA\ni=i*10**-3; #current in amp\nB=10**-3; #magnetic flux density in Wb/m^2\ntheta=45; #angle in degrees\n\n#Calculation\nA=math.pi*(r**2);\nmew=i*A;\ntow=i*B*math.cos(theta);\nmew=math.ceil(mew*10**6)/10**6 #rounding off to 6 decimals\n\n#Result\nprint(\"the magnetic dipole moment in amp m^2 is\",mew);\nprint(\"the torque in Nm is\",tow);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=0.04; #radius of circular loop in m\n", + "i=1000; #current in mA\n", + "i=i*10**-3; #current in amp\n", + "B=10**-3; #magnetic flux density in Wb/m^2\n", + "theta=45; #angle in degrees\n", + "\n", + "#Calculation\n", + "A=math.pi*(r**2);\n", + "mew=i*A;\n", + "tow=i*B*math.cos(theta);\n", + "mew=math.ceil(mew*10**6)/10**6 #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"the magnetic dipole moment in amp m^2 is\",mew);\n", + "print(\"the torque in Nm is\",tow);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the magnetic dipole moment in amp m^2 is', 0.005027)\n('the torque in Nm is', 0.0005253219888177298)\n" + "text": [ + "('the magnetic dipole moment in amp m^2 is', 0.005027)\n", + "('the torque in Nm is', 0.0005253219888177298)\n" + ] } ], "prompt_number": 36 @@ -311,19 +659,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.15, Page number 125" + "source": [ + "Example number 4.15, Page number 125" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the hysterisis loss per cycle\n\n#import module\nimport math\n\n#Variable decleration\nA=100; #area of hysteris loop in m^2\nB=0.01; #flux density in wb/m^2\nH=40; #magnetic field in amp/m\nM=7650; #atomic weight in kg/m^3\n\n#Calculation\nhl=A*B*H;\n\n#Result\nprint(\"the hysterisis loss per cycle in J/m^3 is\",hl);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "\n", + "#Variable decleration\n", + "A=100; #area of hysteris loop in m^2\n", + "B=0.01; #flux density in wb/m^2\n", + "H=40; #magnetic field in amp/m\n", + "M=7650; #atomic weight in kg/m^3\n", + "\n", + "#Calculation\n", + "hl=A*B*H;\n", + "\n", + "#Result\n", + "print(\"the hysterisis loss per cycle in J/m^3 is\",hl);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the hysterisis loss per cycle in J/m^3 is', 40.0)\n" + "text": [ + "('the hysterisis loss per cycle in J/m^3 is', 40.0)\n" + ] } ], "prompt_number": 38 @@ -332,19 +700,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 4.17, Page number 125" + "source": [ + "Example number 4.17, Page number 125" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the hysterisis power loss and power loss\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nhl=200; #hysterisis loss per cycle in J/m^3\nM=7650; #atomic weight in kg/m^3\nm=100; #magnetisation cycles per second\n\n#Calculation\nhpl=hl*m;\npl=hpl/M;\npl=math.ceil(pl*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"hysterisis power loss per second in watt/m^3 is\",hpl);\nprint(\"the power loss in watt/kg is\",pl); \n", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "hl=200; #hysterisis loss per cycle in J/m^3\n", + "M=7650; #atomic weight in kg/m^3\n", + "m=100; #magnetisation cycles per second\n", + "\n", + "#Calculation\n", + "hpl=hl*m;\n", + "pl=hpl/M;\n", + "pl=math.ceil(pl*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"hysterisis power loss per second in watt/m^3 is\",hpl);\n", + "print(\"the power loss in watt/kg is\",pl); \n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('hysterisis power loss per second in watt/m^3 is', 20000)\n('the power loss in watt/kg is', 2.6144)\n" + "text": [ + "('hysterisis power loss per second in watt/m^3 is', 20000)\n", + "('the power loss in watt/kg is', 2.6144)\n" + ] } ], "prompt_number": 40 @@ -352,7 +744,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/chapter5_2.ipynb b/Engineering_Physics/chapter5_2.ipynb index 66e0fe37..14018aea 100644 --- a/Engineering_Physics/chapter5_2.ipynb +++ b/Engineering_Physics/chapter5_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter5" + "name": "", + "signature": "sha256:19dabe1afe46093105a84b4746899bd5b483ca26e3b557510765740ff72179af" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,47 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Superconductivity" + "source": [ + "Superconductivity" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.1, Page number 148" + "source": [ + "Example number 5.1, Page number 148" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical feild at 2K\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=3.7; #in kelvin\nHc_0=0.0306; \nT=2\n\n#Calculation\nHc_2k=Hc_0*(1-((T/Tc)**2));\nHc_2k=math.ceil(Hc_2k*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"the critical feild at 2K in tesla is\",Hc_2k);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=3.7; #in kelvin\n", + "Hc_0=0.0306; \n", + "T=2\n", + "\n", + "#Calculation\n", + "Hc_2k=Hc_0*(1-((T/Tc)**2));\n", + "Hc_2k=math.ceil(Hc_2k*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"the critical feild at 2K in tesla is\",Hc_2k);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical feild at 2K in tesla is', 0.02166)\n" + "text": [ + "('the critical feild at 2K in tesla is', 0.02166)\n" + ] } ], "prompt_number": 4 @@ -38,19 +61,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.2, Page number 149\n" + "source": [ + "Example number 5.2, Page number 149\n" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical current\n\n#importing modules\nimport math\n\n#Variable declaration\nT=4.2; #in kelvin\nTc=7.18; #in kelvin\nHc_0=6.5*10**4; #in amp per meter\nD=10**-3\n\n#Calculation\nR=D/2; #radius is equal to half of diameter\nHc_T=Hc_0*(1-((T/Tc)**2));\nHc_T=math.ceil(Hc_T*10)/10; #rounding off to 1 decimals\nIc=2*math.pi*R*Hc_T #critical current is calculated by 2*pi*r*Hc(T)\nIc=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical feild in Tesla is\",round(Hc_T));\nprint(\"the critical current in Amp is\",Ic);\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "T=4.2; #in kelvin\n", + "Tc=7.18; #in kelvin\n", + "Hc_0=6.5*10**4; #in amp per meter\n", + "D=10**-3\n", + "\n", + "#Calculation\n", + "R=D/2; #radius is equal to half of diameter\n", + "Hc_T=Hc_0*(1-((T/Tc)**2));\n", + "Hc_T=math.ceil(Hc_T*10)/10; #rounding off to 1 decimals\n", + "Ic=2*math.pi*R*Hc_T #critical current is calculated by 2*pi*r*Hc(T)\n", + "Ic=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical feild in Tesla is\",round(Hc_T));\n", + "print(\"the critical current in Amp is\",Ic);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical feild in Tesla is', 42759.0)\n('the critical current in Amp is', 134.34)\n" + "text": [ + "('the critical feild in Tesla is', 42759.0)\n", + "('the critical current in Amp is', 134.34)\n" + ] } ], "prompt_number": 19 @@ -59,19 +108,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.3, Page number 149\n" + "source": [ + "Example number 5.3, Page number 149\n" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the pentration depth at 0k\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda_T=75 #in nm\nT=3.5 \nHgTc=4.12 #in K\n\n#Calculation\nlamda_o=lamda_T*math.sqrt(1-((T/HgTc)**4));\nlamda_o=math.ceil(lamda_o*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the pentration depth at 0k is\",lamda_o);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda_T=75 #in nm\n", + "T=3.5 \n", + "HgTc=4.12 #in K\n", + "\n", + "#Calculation\n", + "lamda_o=lamda_T*math.sqrt(1-((T/HgTc)**4));\n", + "lamda_o=math.ceil(lamda_o*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the pentration depth at 0k is\",lamda_o);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the pentration depth at 0k is', 51.92)\n" + "text": [ + "('the pentration depth at 0k is', 51.92)\n" + ] } ], "prompt_number": 29 @@ -80,19 +149,58 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.4, Page number 150" + "source": [ + "Example number 5.4, Page number 150" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical magnitude\n\n#importing modules\nimport math\n\n#Variable declaration\nlamda_T1=396 #pentration depth in armstrong\nlamda_T2=1730 #pentration depth in armstrong\nT1=3 #temperature in K\nT2=7.1 #temperature in K\n\n#Calculation\n#lamda_T2**2=lamda_0**2*(((Tc**4-T2**4)/Tc**4)**-1)\n#lamda_T1**2=lamda_0**2*(((Tc**4-T1**4)/Tc**4)**-1)\n#dividing lamda_T2**2 by lamda_T1**2 = (Tc**4-T1**4)/(Tc**4-T2**4)\n#let A=lamda_T2**2 and B=lamda_T1**2\nA=lamda_T2**2\nB=lamda_T1**2\nC=A/B\nC=math.ceil(C*10**4)/10**4; #rounding off to 4 decimals\nX=T1**4\nY=T2**4\nY=math.ceil(Y*10**2)/10**2; #rounding off to 2 decimals\n#C*((TC**4)-Y)=(Tc**4)-X\n#C*(Tc**4)-(Tc**4)=C*Y-X\n#(Tc**4)*(C-1)=(C*Y)-X\n#let Tc**4 be D\n#D*(C-1)=(C*Y)-X\nD=((C*Y)-X)/(C-1)\nD=math.ceil(D*10)/10; #rounding off to 1 decimals\nTc=D**(1/4)\nTc=math.ceil(Tc*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"the pentration depth at 0k is\",Tc);", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "lamda_T1=396 #pentration depth in armstrong\n", + "lamda_T2=1730 #pentration depth in armstrong\n", + "T1=3 #temperature in K\n", + "T2=7.1 #temperature in K\n", + "\n", + "#Calculation\n", + "#lamda_T2**2=lamda_0**2*(((Tc**4-T2**4)/Tc**4)**-1)\n", + "#lamda_T1**2=lamda_0**2*(((Tc**4-T1**4)/Tc**4)**-1)\n", + "#dividing lamda_T2**2 by lamda_T1**2 = (Tc**4-T1**4)/(Tc**4-T2**4)\n", + "#let A=lamda_T2**2 and B=lamda_T1**2\n", + "A=lamda_T2**2\n", + "B=lamda_T1**2\n", + "C=A/B\n", + "C=math.ceil(C*10**4)/10**4; #rounding off to 4 decimals\n", + "X=T1**4\n", + "Y=T2**4\n", + "Y=math.ceil(Y*10**2)/10**2; #rounding off to 2 decimals\n", + "#C*((TC**4)-Y)=(Tc**4)-X\n", + "#C*(Tc**4)-(Tc**4)=C*Y-X\n", + "#(Tc**4)*(C-1)=(C*Y)-X\n", + "#let Tc**4 be D\n", + "#D*(C-1)=(C*Y)-X\n", + "D=((C*Y)-X)/(C-1)\n", + "D=math.ceil(D*10)/10; #rounding off to 1 decimals\n", + "Tc=D**(1/4)\n", + "Tc=math.ceil(Tc*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"the pentration depth at 0k is\",Tc);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the pentration depth at 0k is', 7.1932)\n" + "text": [ + "('the pentration depth at 0k is', 7.1932)\n" + ] } ], "prompt_number": 44 @@ -101,19 +209,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.5, Page number 150" + "source": [ + "Example number 5.5, Page number 150" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical feild at 5K\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=7.2 #in K\nHo=6.5*10**3 #in amp per m\nT=5 #in K\n\n#Calculation\nHc=Ho*(1-((T/Tc)**2))\nHc=math.ceil(Hc*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical magnetic feild at 5K in amp per m is\",Hc)\n\n# answer given in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=7.2 #in K\n", + "Ho=6.5*10**3 #in amp per m\n", + "T=5 #in K\n", + "\n", + "#Calculation\n", + "Hc=Ho*(1-((T/Tc)**2))\n", + "Hc=math.ceil(Hc*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical magnetic feild at 5K in amp per m is\",Hc)\n", + "\n", + "# answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical magnetic feild at 5K in amp per m is', 3365.36)\n" + "text": [ + "('the critical magnetic feild at 5K in amp per m is', 3365.36)\n" + ] } ], "prompt_number": 33 @@ -122,19 +252,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.6, Page number 151" + "source": [ + "Example number 5.6, Page number 151" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical feild at 2.5K\n\n#importing modules\nimport math\n\n#Variable declaration\nTc=3.5 #in K\nHo=3.2*10**3 #in amp per m\nT=2.5 #in K\n\n#Calculation\nHc=Ho*(1-((T/Tc)**2))\nHc=math.ceil(Hc*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical magnetic feild at 5K in amp per m is\",Hc)\n\n#answer in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Tc=3.5 #in K\n", + "Ho=3.2*10**3 #in amp per m\n", + "T=2.5 #in K\n", + "\n", + "#Calculation\n", + "Hc=Ho*(1-((T/Tc)**2))\n", + "Hc=math.ceil(Hc*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical magnetic feild at 5K in amp per m is\",Hc)\n", + "\n", + "#answer in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical magnetic feild at 5K in amp per m is', 1567.35)\n" + "text": [ + "('the critical magnetic feild at 5K in amp per m is', 1567.35)\n" + ] } ], "prompt_number": 45 @@ -143,19 +295,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.7, Page number 151" + "source": [ + "Example number 5.7, Page number 151" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the transition temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nHc=5*10**3 #in amp per m\nHo=2*10**4 #in amp per m\nT=6 #in K\n\n#Calculation\nTc=T/math.sqrt(1-(Hc/Ho))\nTc=math.ceil(Tc*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical magnetic feild at 5K in amp per m is\",Tc)\n\n#answer in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Hc=5*10**3 #in amp per m\n", + "Ho=2*10**4 #in amp per m\n", + "T=6 #in K\n", + "\n", + "#Calculation\n", + "Tc=T/math.sqrt(1-(Hc/Ho))\n", + "Tc=math.ceil(Tc*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical magnetic feild at 5K in amp per m is\",Tc)\n", + "\n", + "#answer in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical magnetic feild at 5K in amp per m is', 6.93)\n" + "text": [ + "('the critical magnetic feild at 5K in amp per m is', 6.93)\n" + ] } ], "prompt_number": 66 @@ -164,19 +338,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.8, Page number 152" + "source": [ + "Example number 5.8, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical current\n\n#importing modules\nimport math\n\n#Variable declaration\nHc=2*10**3 #in amp per m\nR=0.02 #in m\n\n#Calculation\nIc=2*math.pi*R*Hc\nIc=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the critical current is\",Ic)\n\n#answer in the book is wrong", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Hc=2*10**3 #in amp per m\n", + "R=0.02 #in m\n", + "\n", + "#Calculation\n", + "Ic=2*math.pi*R*Hc\n", + "Ic=math.ceil(Ic*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the critical current is\",Ic)\n", + "\n", + "#answer in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical magnetic feild at 5K in amp per m is', 251.33)\n" + "text": [ + "('the critical magnetic feild at 5K in amp per m is', 251.33)\n" + ] } ], "prompt_number": 2 @@ -185,19 +380,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.9, Page number 152" + "source": [ + "Example number 5.9, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the isotopic mass of M2\n\n#importing modules\nimport math\n\n#Variable declaration\nM1=199.5 #in a.m.u\nT1=5 #in K\nT2=5.1 #in K\n\n#Calculation\nM2=((T1/T2)**2)*M1\nM2=math.ceil(M2*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"the isotopic mass of M2 is\",M2)", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "M1=199.5 #in a.m.u\n", + "T1=5 #in K\n", + "T2=5.1 #in K\n", + "\n", + "#Calculation\n", + "M2=((T1/T2)**2)*M1\n", + "M2=math.ceil(M2*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"the isotopic mass of M2 is\",M2)" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the isotopic mass of M2 is', 191.754)\n" + "text": [ + "('the isotopic mass of M2 is', 191.754)\n" + ] } ], "prompt_number": 4 @@ -206,19 +421,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.10, Page number 152" + "source": [ + "Example number 5.10, Page number 152" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical magnetic feild and critical current\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nD=3*10**-3 #in meters\nTc=8 #in K \nT=5 #in K \nHo=5*10**4\n\n#Calculation\nR=D/2\nHc=Ho*(1-((T/Tc)**2))\nIc=2*math.pi*R*Hc\nIc=math.ceil(Ic*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"critical magnetic feild in amp per m is\",round(Hc));\nprint(\"critical current in amp is\",Ic);\n\n#answer in the book is wrong", + "input": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "D=3*10**-3 #in meters\n", + "Tc=8 #in K \n", + "T=5 #in K \n", + "Ho=5*10**4\n", + "\n", + "#Calculation\n", + "R=D/2\n", + "Hc=Ho*(1-((T/Tc)**2))\n", + "Ic=2*math.pi*R*Hc\n", + "Ic=math.ceil(Ic*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"critical magnetic feild in amp per m is\",round(Hc));\n", + "print(\"critical current in amp is\",Ic);\n", + "\n", + "#answer in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('critical magnetic feild in amp per m is', 30469.0)\n('critical current in amp is', 287.162)\n" + "text": [ + "('critical magnetic feild in amp per m is', 30469.0)\n", + "('critical current in amp is', 287.162)\n" + ] } ], "prompt_number": 22 @@ -227,19 +468,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.11, Page number 153" + "source": [ + "Example number 5.11, Page number 153" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the critical temperature\n\n#importing modules\nimport math\n\n#Variable declaration\nM1=199.5 \nM2=203.4 \nTc1=4.185 #in K\n\n#Calculation\nTc2=Tc1*math.sqrt(M1/M2)\nTc2=math.ceil(Tc2*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"the critical temperature is\",Tc2)", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "\n", + "#Variable declaration\n", + "M1=199.5 \n", + "M2=203.4 \n", + "Tc1=4.185 #in K\n", + "\n", + "#Calculation\n", + "Tc2=Tc1*math.sqrt(M1/M2)\n", + "Tc2=math.ceil(Tc2*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"the critical temperature is\",Tc2)" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical temperature is', 4.145)\n" + "text": [ + "('the critical temperature is', 4.145)\n" + ] } ], "prompt_number": 3 @@ -248,19 +509,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.12, Page number 154" + "source": [ + "Example number 5.12, Page number 154" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#To calculate the EM wave frequency\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\nV=8.5*10**-6 #in volts\ne=1.6*10**-19 #in C\nh=6.626*10**-24\n\n#Calculation\nnew=2*e*V/h\nnew=math.ceil(new*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"EM wave generated frequency in Hz is\",new)\n\n", + "input": [ + " \n", + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "V=8.5*10**-6 #in volts\n", + "e=1.6*10**-19 #in C\n", + "h=6.626*10**-24\n", + "\n", + "#Calculation\n", + "new=2*e*V/h\n", + "new=math.ceil(new*10**5)/10**5; #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"EM wave generated frequency in Hz is\",new)\n", + "\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('EM wave generated frequency in Hz is', 0.41051)\n" + "text": [ + "('EM wave generated frequency in Hz is', 0.41051)\n" + ] } ], "prompt_number": 24 @@ -269,19 +552,35 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.13, Page number 154" + "source": [ + "Example number 5.13, Page number 154" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#to calculate the critical temperature at 6mm presure of Hg\n\n#Variable declaration\np1=1 #in mm\np2=6 #in mm\nTc1=5 #in K\n\n#Calculation\nTc2=Tc1*(p2/p1);\n\n#Result\nprint(\"the critical temperature in K is\",round(Tc2))", + "input": [ + " \n", + "#Variable declaration\n", + "p1=1 #in mm\n", + "p2=6 #in mm\n", + "Tc1=5 #in K\n", + "\n", + "#Calculation\n", + "Tc2=Tc1*(p2/p1);\n", + "\n", + "#Result\n", + "print(\"the critical temperature in K is\",round(Tc2))" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the critical temperature in K is', 30.0)\n" + "text": [ + "('the critical temperature in K is', 30.0)\n" + ] } ], "prompt_number": 14 @@ -290,19 +589,37 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 5.14, Page number 154\n" + "source": [ + "Example number 5.14, Page number 154\n" + ] }, { "cell_type": "code", "collapsed": false, - "input": "#to calculate maximum critical temperature\n\n#Variable declaration\nTc=8.7 #in K\nHc=6*10**5 #in A per m\nHo=3*10**6 #in A per m\n\n#Calculation\nT=Tc*(math.sqrt(1-(Hc/Ho)))\n\n#Result\nprint(\" maximum critical temperature in K is\",T)\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#Variable declaration\n", + "Tc=8.7 #in K\n", + "Hc=6*10**5 #in A per m\n", + "Ho=3*10**6 #in A per m\n", + "\n", + "#Calculation\n", + "T=Tc*(math.sqrt(1-(Hc/Ho)))\n", + "\n", + "#Result\n", + "print(\" maximum critical temperature in K is\",T)\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "(' maximum critical temperature in K is', 7.781516561699267)\n" + "text": [ + "(' maximum critical temperature in K is', 7.781516561699267)\n" + ] } ], "prompt_number": 15 @@ -310,7 +627,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/chapter7_2.ipynb b/Engineering_Physics/chapter7_2.ipynb index 617f6cbd..d4161b18 100644 --- a/Engineering_Physics/chapter7_2.ipynb +++ b/Engineering_Physics/chapter7_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter7" + "name": "", + "signature": "sha256:b26f0e8151a54ecdc596868a34547e181ac6dce2c5aea4a02c15b80e1401fd4f" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,59 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Semiconductors" + "source": [ + "Semiconductors" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.1, Page number 251" + "source": [ + "Example number 7.1, Page number 251" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the number of electron hole pairs\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nT1=300; #temp in K\nT2=310; #temp in K\nni1=2.5*10**19; #per cubic metre\nEgeV1=0.72; #value of Eg in eV\nEgeV2=1.12; #value of Eg in eV\n\n#Calculation\nEg1=EgeV1*1.6*10**-19; #Eg in J\nEg2=EgeV2*1.6*10**-19; #Eg in J\nKB=1.38*10**-23; #boltzmann constant in J/k\n#density of electron hole pair is ni = A*(T**(3/2))*exp(-Eg/(2*KB*T))\n#let (T**(3/2))*exp(-Eg/(2*KB*T)) be X\nX1=(T1**(3/2))*math.exp(-Eg1/(2*KB*T1));\nX2=(T2**(3/2))*math.exp(-Eg2/(2*KB*T2));\n#therefore ni1=A*X1 and ni2=A*X2. dividing ni2/ni1 we get X2/X1\nni2=ni1*(X2/X1);\n\n#Result\nprint(\"the number of electron hole pairs per cubic metre is\",ni2);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "T1=300; #temp in K\n", + "T2=310; #temp in K\n", + "ni1=2.5*10**19; #per cubic metre\n", + "EgeV1=0.72; #value of Eg in eV\n", + "EgeV2=1.12; #value of Eg in eV\n", + "\n", + "#Calculation\n", + "Eg1=EgeV1*1.6*10**-19; #Eg in J\n", + "Eg2=EgeV2*1.6*10**-19; #Eg in J\n", + "KB=1.38*10**-23; #boltzmann constant in J/k\n", + "#density of electron hole pair is ni = A*(T**(3/2))*exp(-Eg/(2*KB*T))\n", + "#let (T**(3/2))*exp(-Eg/(2*KB*T)) be X\n", + "X1=(T1**(3/2))*math.exp(-Eg1/(2*KB*T1));\n", + "X2=(T2**(3/2))*math.exp(-Eg2/(2*KB*T2));\n", + "#therefore ni1=A*X1 and ni2=A*X2. dividing ni2/ni1 we get X2/X1\n", + "ni2=ni1*(X2/X1);\n", + "\n", + "#Result\n", + "print(\"the number of electron hole pairs per cubic metre is\",ni2);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the number of electron hole pairs per cubic metre is', 2.3207901206362184e+16)\n" + "text": [ + "('the number of electron hole pairs per cubic metre is', 2.3207901206362184e+16)\n" + ] } ], "prompt_number": 1 @@ -38,19 +73,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.2, Page number 251" + "source": [ + "Example number 7.2, Page number 251" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the charge carrier density and electron mobility\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nRH=3.66*10**-4; #hall coefficient in m^3/coulomb\nsigma=112; #conductivity in ohm-1 m-1\ne=1.6*10**-19;\n\n#Calculation\nne=1/(RH*e);\n#sigma = e*ne*(mew_e+mew_h)\n#assuming mew_h = 0\nmew_e=sigma/(e*ne);\n\n#Result\nprint(\"the charge carrier density per m^3 is\",ne);\nprint(\"electron mobility in m^2/Vs is\",mew_e);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "RH=3.66*10**-4; #hall coefficient in m^3/coulomb\n", + "sigma=112; #conductivity in ohm-1 m-1\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "ne=1/(RH*e);\n", + "#sigma = e*ne*(mew_e+mew_h)\n", + "#assuming mew_h = 0\n", + "mew_e=sigma/(e*ne);\n", + "\n", + "#Result\n", + "print(\"the charge carrier density per m^3 is\",ne);\n", + "print(\"electron mobility in m^2/Vs is\",mew_e);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the charge carrier density per m^3 is', 1.7076502732240434e+22)\n('electron mobility in m^2/Vs is', 0.040992)\n" + "text": [ + "('the charge carrier density per m^3 is', 1.7076502732240434e+22)\n", + "('electron mobility in m^2/Vs is', 0.040992)\n" + ] } ], "prompt_number": 2 @@ -59,19 +121,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.3, Page number 252" + "source": [ + "Example number 7.3, Page number 252" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the conductivity of intrinsic silicon and resultant conductivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nni=1.5*10**16; #intrinsic concentration per m^3\ne=1.6*10**-19;\nmew_e=0.13; #mobility of electrons in m^2/Vs\nmew_h=0.05; #mobility of holes in m^2/Vs\nND=5*10**20; #conductivity in atoms/m^3\n\n#Calculation\nsigma1=ni*e*(mew_e+mew_h);\nnd=(ni**2)/ND;\nsigma2=ND*e*mew_e;\nNA=5*10**20;\nna=(ni**2)/NA;\nsigma3=NA*e*mew_h;\nsigma1=math.ceil(sigma1*10**7)/10**7; #rounding off to 7 decimals\nsigma2=math.ceil(sigma2*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"intrinsic conductivity of Si in ohm-1 m-1 is\",sigma1);\nprint(\"conductivity of Si during donor impurity in ohm-1 m-1 is\",sigma2);\nprint(\"conductivity of Si during acceptor impurity in ohm-1 m-1 is\",round(sigma3));", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "ni=1.5*10**16; #intrinsic concentration per m^3\n", + "e=1.6*10**-19;\n", + "mew_e=0.13; #mobility of electrons in m^2/Vs\n", + "mew_h=0.05; #mobility of holes in m^2/Vs\n", + "ND=5*10**20; #conductivity in atoms/m^3\n", + "\n", + "#Calculation\n", + "sigma1=ni*e*(mew_e+mew_h);\n", + "nd=(ni**2)/ND;\n", + "sigma2=ND*e*mew_e;\n", + "NA=5*10**20;\n", + "na=(ni**2)/NA;\n", + "sigma3=NA*e*mew_h;\n", + "sigma1=math.ceil(sigma1*10**7)/10**7; #rounding off to 7 decimals\n", + "sigma2=math.ceil(sigma2*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"intrinsic conductivity of Si in ohm-1 m-1 is\",sigma1);\n", + "print(\"conductivity of Si during donor impurity in ohm-1 m-1 is\",sigma2);\n", + "print(\"conductivity of Si during acceptor impurity in ohm-1 m-1 is\",round(sigma3));" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('intrinsic conductivity of Si in ohm-1 m-1 is', 0.000432)\n('conductivity of Si during donor impurity in ohm-1 m-1 is', 10.41)\n('conductivity of Si during acceptor impurity in ohm-1 m-1 is', 4.0)\n" + "text": [ + "('intrinsic conductivity of Si in ohm-1 m-1 is', 0.000432)\n", + "('conductivity of Si during donor impurity in ohm-1 m-1 is', 10.41)\n", + "('conductivity of Si during acceptor impurity in ohm-1 m-1 is', 4.0)\n" + ] } ], "prompt_number": 7 @@ -80,19 +175,54 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.4, Page number 253" + "source": [ + "Example number 7.4, Page number 253" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the conductivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nsigma1=2; #conductivity in ohm-1 m-1\nEgeV=0.72; #band gap in eV\nKB=1.38*10**-23; #boltzmann constant\nT1=20; #temp in C\nT2=40; #temp in C\n\n#Calculation\nEg=EgeV*1.6*10**-19; #in J\nT1=T1+273; #temp in K\nT2=T2+273; #temp in K\n#sigma2/sigma1 = exp((-Eg/(2*KB))*((1/T2)-(1/T1)))\n#by taking log on both sides we get 2.303*log10(sigma2/sigma1) = (Eg/(2*KB))*((1/T1)-(1/T2))\n#let (Eg/(2*KB))*((1/T1)-(1/T2)) be X\nX=(Eg/(2*KB))*((1/T1)-(1/T2));\n#let log10(sigma2/sigma1) be Y\nY=X/2.303;\n#log10(sigma2/sigma1) = log10(sigma2)-log10(sigma1)\n#let log10(sigma2) be A\nA=Y+math.log10(sigma1);\nsigma2=10**A;\nsigma2=math.ceil(sigma2*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"the conductivity in mho m-1 is\",sigma2);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "sigma1=2; #conductivity in ohm-1 m-1\n", + "EgeV=0.72; #band gap in eV\n", + "KB=1.38*10**-23; #boltzmann constant\n", + "T1=20; #temp in C\n", + "T2=40; #temp in C\n", + "\n", + "#Calculation\n", + "Eg=EgeV*1.6*10**-19; #in J\n", + "T1=T1+273; #temp in K\n", + "T2=T2+273; #temp in K\n", + "#sigma2/sigma1 = exp((-Eg/(2*KB))*((1/T2)-(1/T1)))\n", + "#by taking log on both sides we get 2.303*log10(sigma2/sigma1) = (Eg/(2*KB))*((1/T1)-(1/T2))\n", + "#let (Eg/(2*KB))*((1/T1)-(1/T2)) be X\n", + "X=(Eg/(2*KB))*((1/T1)-(1/T2));\n", + "#let log10(sigma2/sigma1) be Y\n", + "Y=X/2.303;\n", + "#log10(sigma2/sigma1) = log10(sigma2)-log10(sigma1)\n", + "#let log10(sigma2) be A\n", + "A=Y+math.log10(sigma1);\n", + "sigma2=10**A;\n", + "sigma2=math.ceil(sigma2*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"the conductivity in mho m-1 is\",sigma2);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the conductivity in mho m-1 is', 4.97)\n" + "text": [ + "('the conductivity in mho m-1 is', 4.97)\n" + ] } ], "prompt_number": 11 @@ -101,19 +231,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.5, Page number 253" + "source": [ + "Example number 7.5, Page number 253" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the concentration of holes and electrons \n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nmew_n=1300*10**-4; #in m^2/Vs\nmew_p=500*10**-4; #in m^2/Vs\nsigma=3*10**4; #conductivity in ohm-1 m-1\ne=1.6*10**-19;\n\n#Calculation\nN=sigma/(e*mew_n);\nni=1.5*10**16; #per m^3\np=(ni**2)/N;\nP=sigma/(e*mew_p);\nn=(ni**2)/P;\nN=math.ceil(N*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"concentration of electrons in n-type per cubic metre are\",N);\nprint(\"concentration of holes in n-type per cubic metre are\",round(p));\nprint(\"concentration of electrons in p-type per cubic metre are\",round(n));\nprint(\"concentration of holes in p-type per cubic metre are\",P);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "mew_n=1300*10**-4; #in m^2/Vs\n", + "mew_p=500*10**-4; #in m^2/Vs\n", + "sigma=3*10**4; #conductivity in ohm-1 m-1\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "N=sigma/(e*mew_n);\n", + "ni=1.5*10**16; #per m^3\n", + "p=(ni**2)/N;\n", + "P=sigma/(e*mew_p);\n", + "n=(ni**2)/P;\n", + "N=math.ceil(N*10**4)/10**4; #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"concentration of electrons in n-type per cubic metre are\",N);\n", + "print(\"concentration of holes in n-type per cubic metre are\",round(p));\n", + "print(\"concentration of electrons in p-type per cubic metre are\",round(n));\n", + "print(\"concentration of holes in p-type per cubic metre are\",P);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of electrons in n-type per cubic metre are', 1.4423076923076921e+24)\n('concentration of holes in n-type per cubic metre are', 156000000.0)\n('concentration of electrons in p-type per cubic metre are', 60000000.0)\n('concentration of holes in p-type per cubic metre are', 3.7499999999999995e+24)\n" + "text": [ + "('concentration of electrons in n-type per cubic metre are', 1.4423076923076921e+24)\n", + "('concentration of holes in n-type per cubic metre are', 156000000.0)\n", + "('concentration of electrons in p-type per cubic metre are', 60000000.0)\n", + "('concentration of holes in p-type per cubic metre are', 3.7499999999999995e+24)\n" + ] } ], "prompt_number": 16 @@ -122,19 +284,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.6, Page number 254" + "source": [ + "Example number 7.6, Page number 254" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the resistivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nni=2.37*10**19; #intrinsic carrier density per m^3\nmew_e=0.38; #in m**2/Vs\nmew_n=0.18; #in m**2/Vs\n\n#Calculation\ne=1.6*10**-19;\nsigmai=ni*e*(mew_e+mew_n);\nrho=1/sigmai;\nrho=math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"resistivity in ohm m is\",rho);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "ni=2.37*10**19; #intrinsic carrier density per m^3\n", + "mew_e=0.38; #in m**2/Vs\n", + "mew_n=0.18; #in m**2/Vs\n", + "\n", + "#Calculation\n", + "e=1.6*10**-19;\n", + "sigmai=ni*e*(mew_e+mew_n);\n", + "rho=1/sigmai;\n", + "rho=math.ceil(rho*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"resistivity in ohm m is\",rho);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('resistivity in ohm m is', 0.471)\n" + "text": [ + "('resistivity in ohm m is', 0.471)\n" + ] } ], "prompt_number": 19 @@ -143,19 +328,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.7, Page number 254" + "source": [ + "Example number 7.7, Page number 254" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the position of fermi level\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEg=1.12; #band gap in eV\nK=1.38*10**-23;\nT=300; #temp in K\n\n#Calculation\n#EF = (Eg/2)+(3*K*T/4)*log(mh/me)\n#given me=0.12m0 and mh=0.28m0. therefore mh/me = 0.28/0.12 \n#let mh/me be X. therefore X=0.28/0.12 \nX=0.28/0.12;\nEF=(Eg/2)+((3*K*T/4)*math.log(X));\n\n#Result\nprint(\"the position of fermi level in eV is\",EF);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "Eg=1.12; #band gap in eV\n", + "K=1.38*10**-23;\n", + "T=300; #temp in K\n", + "\n", + "#Calculation\n", + "#EF = (Eg/2)+(3*K*T/4)*log(mh/me)\n", + "#given me=0.12m0 and mh=0.28m0. therefore mh/me = 0.28/0.12 \n", + "#let mh/me be X. therefore X=0.28/0.12 \n", + "X=0.28/0.12;\n", + "EF=(Eg/2)+((3*K*T/4)*math.log(X));\n", + "\n", + "#Result\n", + "print(\"the position of fermi level in eV is\",EF);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the position of fermi level in eV is', 0.56)\n" + "text": [ + "('the position of fermi level in eV is', 0.56)\n" + ] } ], "prompt_number": 21 @@ -164,19 +375,47 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.8, Page number 254" + "source": [ + "Example number 7.8, Page number 254" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the concentration of intrinsic charge carriers\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nKB=1.38*10**-23;\nT=300; #temp in K\nh=6.626*10**-34;\nm0=9.11*10**-31;\nmh=m0;\nme=m0;\nEgeV=0.7; #energy gap in eV\n\n#Calculation\nEg=EgeV*1.6*10**-19; #in J\nA=((2*math.pi*KB/(h**2))**(3/2))*(me*mh)**(3/4);\nB=T**(3/2);\nC=math.exp(-Eg/(2*KB*T));\nni=2*A*B*C;\n\n#Result\nprint(\"concentration of intrinsic charge carriers per cubic metre is\",ni);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "KB=1.38*10**-23;\n", + "T=300; #temp in K\n", + "h=6.626*10**-34;\n", + "m0=9.11*10**-31;\n", + "mh=m0;\n", + "me=m0;\n", + "EgeV=0.7; #energy gap in eV\n", + "\n", + "#Calculation\n", + "Eg=EgeV*1.6*10**-19; #in J\n", + "A=((2*math.pi*KB/(h**2))**(3/2))*(me*mh)**(3/4);\n", + "B=T**(3/2);\n", + "C=math.exp(-Eg/(2*KB*T));\n", + "ni=2*A*B*C;\n", + "\n", + "#Result\n", + "print(\"concentration of intrinsic charge carriers per cubic metre is\",ni);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration of intrinsic charge carriers per cubic metre is', 3.3481803992458756e+19)\n" + "text": [ + "('concentration of intrinsic charge carriers per cubic metre is', 3.3481803992458756e+19)\n" + ] } ], "prompt_number": 22 @@ -185,19 +424,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.9, Page number 255" + "source": [ + "Example number 7.9, Page number 255" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the resistivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nni=2.4*10**19;\nmew_e=0.39;\nmew_h=0.19;\ne=1.6*10**-19;\n\n#Result\nsigmai=ni*e*(mew_e+mew_h);\nrhoi=1/sigmai;\nrhoi=math.ceil(rhoi*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"resistivity in ohm m is\",rhoi);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "ni=2.4*10**19;\n", + "mew_e=0.39;\n", + "mew_h=0.19;\n", + "e=1.6*10**-19;\n", + "\n", + "#Result\n", + "sigmai=ni*e*(mew_e+mew_h);\n", + "rhoi=1/sigmai;\n", + "rhoi=math.ceil(rhoi*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"resistivity in ohm m is\",rhoi);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('resistivity in ohm m is', 0.45)\n" + "text": [ + "('resistivity in ohm m is', 0.45)\n" + ] } ], "prompt_number": 24 @@ -206,19 +468,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.10, Page number 255" + "source": [ + "Example number 7.10, Page number 255" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the resistance\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nl=1; #length in cm\nl=l*10**-2; #length in m\ne=1.6*10**-19;\nw=1; #width in mm\nt=1; #thickness in mm\n\n#Calculation\nw=w*10**-3; #width in m\nt=t*10**-3; #thickness in m\nA=w*t;\nni=2.5*10**19;\nmew_e=0.39;\nmew_p=0.19;\nsigma=ni*e*(mew_p+mew_e);\nR=l/(sigma*A);\n\n#Result\nprint(\"resistance of intrinsic Ge rod in ohm is\",R);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "l=1; #length in cm\n", + "l=l*10**-2; #length in m\n", + "e=1.6*10**-19;\n", + "w=1; #width in mm\n", + "t=1; #thickness in mm\n", + "\n", + "#Calculation\n", + "w=w*10**-3; #width in m\n", + "t=t*10**-3; #thickness in m\n", + "A=w*t;\n", + "ni=2.5*10**19;\n", + "mew_e=0.39;\n", + "mew_p=0.19;\n", + "sigma=ni*e*(mew_p+mew_e);\n", + "R=l/(sigma*A);\n", + "\n", + "#Result\n", + "print(\"resistance of intrinsic Ge rod in ohm is\",R);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('resistance of intrinsic Ge rod in ohm is', 4310.3448275862065)\n" + "text": [ + "('resistance of intrinsic Ge rod in ohm is', 4310.3448275862065)\n" + ] } ], "prompt_number": 25 @@ -227,19 +518,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.11, Page number 255" + "source": [ + "Example number 7.11, Page number 255" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the conductivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEg=1.1; #energy gap in eV\nm=9.109*10**-31;\nk=1.38*10**-23;\nT=300;\ne=1.6*10**-19;\nh=6.626*10**-34;\nmew_e=0.48; #electron mobility\nmew_h=0.013; #hole mobility\n\n#Calculation\nC=2*(2*math.pi*m*k/(h**2))**(3/2);\nX=2*k*T/e;\nY=-Eg/X;\nA=math.exp(Y);\nni=C*(T**(3/2))*A;\nsigma=ni*e*(mew_e+mew_h);\nsigma=math.ceil(sigma*10**6)/10**6 #rounding off to 6 decimals\n\n#Result\nprint(\"conductivity in ohm-1 m-1 is\",sigma);\n\n# answer given in the book is wrong, Page number 255", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "Eg=1.1; #energy gap in eV\n", + "m=9.109*10**-31;\n", + "k=1.38*10**-23;\n", + "T=300;\n", + "e=1.6*10**-19;\n", + "h=6.626*10**-34;\n", + "mew_e=0.48; #electron mobility\n", + "mew_h=0.013; #hole mobility\n", + "\n", + "#Calculation\n", + "C=2*(2*math.pi*m*k/(h**2))**(3/2);\n", + "X=2*k*T/e;\n", + "Y=-Eg/X;\n", + "A=math.exp(Y);\n", + "ni=C*(T**(3/2))*A;\n", + "sigma=ni*e*(mew_e+mew_h);\n", + "sigma=math.ceil(sigma*10**6)/10**6 #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"conductivity in ohm-1 m-1 is\",sigma);\n", + "\n", + "# answer given in the book is wrong, Page number 255" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('conductivity in ohm-1 m-1 is', 0.001162)\n" + "text": [ + "('conductivity in ohm-1 m-1 is', 0.001162)\n" + ] } ], "prompt_number": 28 @@ -248,19 +572,50 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.12, Page number 256" + "source": [ + "Example number 7.12, Page number 256" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the intrinsic carrier density and conductivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nm=9.109*10**-31;\nk=1.38*10**-23;\nT=300;\ne=1.6*10**-19;\nh=6.626*10**-34;\nEg=0.7;\nmew_e=0.4; #electron mobility\nmew_h=0.2; #hole mobility\n\n#Calculation\nC=2*(2*math.pi*m*k/((h**2)))**(3/2);\nX=2*k*T/e;\nni=C*(T**(3/2))*math.exp(-Eg/X);\nsigma=ni*e*(mew_e+mew_h);\nsigma=math.ceil(sigma*10**3)/10**3 #rounding off to 3 decimals\n\n#Result\nprint(\"conductivity in ohm-1 m-1\",sigma);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "m=9.109*10**-31;\n", + "k=1.38*10**-23;\n", + "T=300;\n", + "e=1.6*10**-19;\n", + "h=6.626*10**-34;\n", + "Eg=0.7;\n", + "mew_e=0.4; #electron mobility\n", + "mew_h=0.2; #hole mobility\n", + "\n", + "#Calculation\n", + "C=2*(2*math.pi*m*k/((h**2)))**(3/2);\n", + "X=2*k*T/e;\n", + "ni=C*(T**(3/2))*math.exp(-Eg/X);\n", + "sigma=ni*e*(mew_e+mew_h);\n", + "sigma=math.ceil(sigma*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"conductivity in ohm-1 m-1\",sigma);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('conductivity in ohm-1 m-1', 3.214)\n" + "text": [ + "('conductivity in ohm-1 m-1', 3.214)\n" + ] } ], "prompt_number": 30 @@ -269,19 +624,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.13, Page number 256" + "source": [ + "Example number 7.13, Page number 256" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the energy band gap\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nk=8.616*10**-5;\nT1=20; #temp in C\nT1=T1+273; #temp in K\nT2=32; #temp in C\nrho2=4.5; #resistivity in ohm m\nrho1=2; #resistivity in ohm m\n\n#Calculation\nT2=T2+273; #temp in K\ndy=math.log10(rho2)-math.log10(rho1);\ndx=(1/T1)-(1/T2);\nEg=2*k*dy/dx;\nEg=math.ceil(Eg*10**3)/10**3 #rounding off to 3 decimals\n\n#Result\nprint(\"energy band gap in eV is\",Eg);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "k=8.616*10**-5;\n", + "T1=20; #temp in C\n", + "T1=T1+273; #temp in K\n", + "T2=32; #temp in C\n", + "rho2=4.5; #resistivity in ohm m\n", + "rho1=2; #resistivity in ohm m\n", + "\n", + "#Calculation\n", + "T2=T2+273; #temp in K\n", + "dy=math.log10(rho2)-math.log10(rho1);\n", + "dx=(1/T1)-(1/T2);\n", + "Eg=2*k*dy/dx;\n", + "Eg=math.ceil(Eg*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"energy band gap in eV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy band gap in eV is', 0.452)\n" + "text": [ + "('energy band gap in eV is', 0.452)\n" + ] } ], "prompt_number": 1 @@ -290,19 +672,46 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.13, Page number 256" + "source": [ + "Example number 7.13, Page number 256" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the energy band gap\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nk=8.616*10**-5;\nT1=20; #temp in C\nT2=32; ##temp in C\nrho2=4.5; #resistivity in ohm m\nrho1=2; #resistivity in ohm m\n\n#Calculation\nT1=T1+273; #temp in K\nT2=T2+273; #temp in K\ndy=math.log10(rho2)-math.log10(rho1);\ndx=(1/T1)-(1/T2);\nEg=2*k*dy/dx;\nEg=math.ceil(Eg*10**3)/10**3 #rounding off to 3 decimals\n\n#Result\nprint(\"energy band gap in eV is\",Eg);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "k=8.616*10**-5;\n", + "T1=20; #temp in C\n", + "T2=32; ##temp in C\n", + "rho2=4.5; #resistivity in ohm m\n", + "rho1=2; #resistivity in ohm m\n", + "\n", + "#Calculation\n", + "T1=T1+273; #temp in K\n", + "T2=T2+273; #temp in K\n", + "dy=math.log10(rho2)-math.log10(rho1);\n", + "dx=(1/T1)-(1/T2);\n", + "Eg=2*k*dy/dx;\n", + "Eg=math.ceil(Eg*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"energy band gap in eV is\",Eg);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('energy band gap in eV is', 0.452)\n" + "text": [ + "('energy band gap in eV is', 0.452)\n" + ] } ], "prompt_number": 3 @@ -311,19 +720,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.14, Page number 257" + "source": [ + "Example number 7.14, Page number 257" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the temperature\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEgeV=1; #energy in eV\nk=1.38*10**-23;\nEg=EgeV*1.602*10**-19; #in J\n#EF can be taken as (Ev+0.5)eV\n#therefore (Ev+0.5)eV = (Ec+Ev)/2--------(1)\n#let fermi level shift by 10% then (Ev+0.6)eV = ((Ec+Ev)/2)+((3*k*T/4)*log(4))-----(2)\n#subtracting (1) from (2)\n#0.1 eV = (3*k*T/4)*math.log(4)\nE=0.1; #energy in eV\nE=E*1.602*10**-19; #energy in J\nT=(4*E)/(3*k*math.log(4));\n\n#Result\nprint(\"temperature in K is\",T);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "EgeV=1; #energy in eV\n", + "k=1.38*10**-23;\n", + "Eg=EgeV*1.602*10**-19; #in J\n", + "#EF can be taken as (Ev+0.5)eV\n", + "#therefore (Ev+0.5)eV = (Ec+Ev)/2--------(1)\n", + "#let fermi level shift by 10% then (Ev+0.6)eV = ((Ec+Ev)/2)+((3*k*T/4)*log(4))-----(2)\n", + "#subtracting (1) from (2)\n", + "#0.1 eV = (3*k*T/4)*math.log(4)\n", + "E=0.1; #energy in eV\n", + "E=E*1.602*10**-19; #energy in J\n", + "T=(4*E)/(3*k*math.log(4));\n", + "\n", + "#Result\n", + "print(\"temperature in K is\",T);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('temperature in K is', 1116.520509905372)\n" + "text": [ + "('temperature in K is', 1116.520509905372)\n" + ] } ], "prompt_number": 6 @@ -332,19 +766,62 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.15, Page number 257" + "source": [ + "Example number 7.15, Page number 257" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the conductivity of intrinsic silicon\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nni=1.5*10**16;\ne=1.6*10**-19;\nmew_e=0.13;\nmew_h=0.05;\n\n#Calculation\nsigma=ni*e*(mew_e+mew_h);\nM=28.1; #atomic weight of Si\nd=2.33*10**3; #density in kg/m^3\nv=M/d;\nN=6.02*10**26;\nN1=N/v;\n#1 donor type impurity is added to 1 impurity atom\nND=N1/(10**8);\np=(ni**2)/ND;\nsigma_exd=ND*e*mew_e;\n#1 acceptor type impurity is added to 1 impurity atom\nNa=N1/(10**8);\nn=(ni**2)/Na;\nsigma_exa=Na*e*mew_h;\nsigma=math.ceil(sigma*10**7)/10**7 #rounding off to 7 decimals\nsigma_exd=math.ceil(sigma_exd*10**3)/10**3 #rounding off to 3 decimals\nsigma_exa=math.ceil(sigma_exa*10**3)/10**3 #rounding off to 3 decimals\n\n#Result\nprint(\"conductivity in ohm-1 m-1 is\",sigma);\nprint(\"number of Si atoms per m^3 is\",N1);\nprint(\"conductivity for donor type impurity in ohm-1 m-1 is\",sigma_exd);\nprint(\"conductivity for acceptor type impurity in ohm-1 m-1 is\",sigma_exa);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "ni=1.5*10**16;\n", + "e=1.6*10**-19;\n", + "mew_e=0.13;\n", + "mew_h=0.05;\n", + "\n", + "#Calculation\n", + "sigma=ni*e*(mew_e+mew_h);\n", + "M=28.1; #atomic weight of Si\n", + "d=2.33*10**3; #density in kg/m^3\n", + "v=M/d;\n", + "N=6.02*10**26;\n", + "N1=N/v;\n", + "#1 donor type impurity is added to 1 impurity atom\n", + "ND=N1/(10**8);\n", + "p=(ni**2)/ND;\n", + "sigma_exd=ND*e*mew_e;\n", + "#1 acceptor type impurity is added to 1 impurity atom\n", + "Na=N1/(10**8);\n", + "n=(ni**2)/Na;\n", + "sigma_exa=Na*e*mew_h;\n", + "sigma=math.ceil(sigma*10**7)/10**7 #rounding off to 7 decimals\n", + "sigma_exd=math.ceil(sigma_exd*10**3)/10**3 #rounding off to 3 decimals\n", + "sigma_exa=math.ceil(sigma_exa*10**3)/10**3 #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"conductivity in ohm-1 m-1 is\",sigma);\n", + "print(\"number of Si atoms per m^3 is\",N1);\n", + "print(\"conductivity for donor type impurity in ohm-1 m-1 is\",sigma_exd);\n", + "print(\"conductivity for acceptor type impurity in ohm-1 m-1 is\",sigma_exa);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('conductivity in ohm-1 m-1 is', 0.000432)\n('number of Si atoms per m^3 is', 4.991672597864769e+28)\n('conductivity for donor type impurity in ohm-1 m-1 is', 10.383)\n('conductivity for acceptor type impurity in ohm-1 m-1 is', 3.994)\n" + "text": [ + "('conductivity in ohm-1 m-1 is', 0.000432)\n", + "('number of Si atoms per m^3 is', 4.991672597864769e+28)\n", + "('conductivity for donor type impurity in ohm-1 m-1 is', 10.383)\n", + "('conductivity for acceptor type impurity in ohm-1 m-1 is', 3.994)\n" + ] } ], "prompt_number": 10 @@ -353,19 +830,41 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.16, Page number 258" + "source": [ + "Example number 7.16, Page number 258" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the diffusion coefficient of electrons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nT=300; #temperature in K\nKB=1.38*10**-23;\ne=1.6*10**-19;\nmew_e=0.19; #mobility of electrons in m^2/Vs\n\n#Calculation\nDn=mew_e*KB*T/e;\nDn=math.ceil(Dn*10**6)/10**6 #rounding off to 6 decimals\n\n#Result\nprint(\"diffusion coefficient of electrons in m^2/s is\",Dn);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "T=300; #temperature in K\n", + "KB=1.38*10**-23;\n", + "e=1.6*10**-19;\n", + "mew_e=0.19; #mobility of electrons in m^2/Vs\n", + "\n", + "#Calculation\n", + "Dn=mew_e*KB*T/e;\n", + "Dn=math.ceil(Dn*10**6)/10**6 #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"diffusion coefficient of electrons in m^2/s is\",Dn);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('diffusion coefficient of electrons in m^2/s is', 0.004917)\n" + "text": [ + "('diffusion coefficient of electrons in m^2/s is', 0.004917)\n" + ] } ], "prompt_number": 13 @@ -374,19 +873,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.17, Page number 259" + "source": [ + "Example number 7.17, Page number 259" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the Hall voltage\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nRH=3.66*10**-4; #hall coefficient in m^3/coulomb\nI=10**-2; #current in amp\nB=0.5; #magnetic field in wb/m^2\nt=1; #thickness in mm\n\n#Calculation\nt=t*10**-3; #thickness in m\nVH=(RH*I*B)/t;\nVH=VH*10**3; #converting from Volts to mV\n\n#Result\nprint(\"Hall voltage in mV is\",VH);", + "input": [ + " \n", + "\n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "RH=3.66*10**-4; #hall coefficient in m^3/coulomb\n", + "I=10**-2; #current in amp\n", + "B=0.5; #magnetic field in wb/m^2\n", + "t=1; #thickness in mm\n", + "\n", + "#Calculation\n", + "t=t*10**-3; #thickness in m\n", + "VH=(RH*I*B)/t;\n", + "VH=VH*10**3; #converting from Volts to mV\n", + "\n", + "#Result\n", + "print(\"Hall voltage in mV is\",VH);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Hall voltage in mV is', 1.83)\n" + "text": [ + "('Hall voltage in mV is', 1.83)\n" + ] } ], "prompt_number": 14 @@ -395,19 +918,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.18, Page number 259" + "source": [ + "Example number 7.18, Page number 259" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the density and mobility of charge carrier\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nRH=-7.35*10**-5; #hall coefficient\ne=1.6*10**-19;\nsigma=200;\n\n#Calculation\nn=(-1/(RH*e));\nmew=sigma/(n*e);\n\n#Result\nprint(\"density of charge carriers in m^3 is\",n);\nprint(\"mobility of charge carriers in m^2/Vs is\",mew);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "RH=-7.35*10**-5; #hall coefficient\n", + "e=1.6*10**-19;\n", + "sigma=200;\n", + "\n", + "#Calculation\n", + "n=(-1/(RH*e));\n", + "mew=sigma/(n*e);\n", + "\n", + "#Result\n", + "print(\"density of charge carriers in m^3 is\",n);\n", + "print(\"mobility of charge carriers in m^2/Vs is\",mew);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of charge carriers in m^3 is', 8.503401360544217e+22)\n('mobility of charge carriers in m^2/Vs is', 0.0147)\n" + "text": [ + "('density of charge carriers in m^3 is', 8.503401360544217e+22)\n", + "('mobility of charge carriers in m^2/Vs is', 0.0147)\n" + ] } ], "prompt_number": 15 @@ -416,19 +962,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.19, Page number 259" + "source": [ + "Example number 7.19, Page number 259" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the magnitude of Hall voltage\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nI=50; #current in amp\nB=1.5; #magnetic field in T\nn=8.4*10**28; #free electron concentration in electron/m^3\nt=0.5; #thickness in cm\ne=1.6*10**-19;\n\n#Calculation\nt=t*10**-2; #thickness in m\nVH=(I*B)/(n*e*t);\nVH=VH*10**6; #converting VH from V to micro V\nVH=math.ceil(VH*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"magnitude of Hall voltage in microVolt is\",VH);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "I=50; #current in amp\n", + "B=1.5; #magnetic field in T\n", + "n=8.4*10**28; #free electron concentration in electron/m^3\n", + "t=0.5; #thickness in cm\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "t=t*10**-2; #thickness in m\n", + "VH=(I*B)/(n*e*t);\n", + "VH=VH*10**6; #converting VH from V to micro V\n", + "VH=math.ceil(VH*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"magnitude of Hall voltage in microVolt is\",VH);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('magnitude of Hall voltage in microVolt is', 1.1161)\n" + "text": [ + "('magnitude of Hall voltage in microVolt is', 1.1161)\n" + ] } ], "prompt_number": 17 @@ -437,19 +1008,44 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.20, Page number 260" + "source": [ + "Example number 7.20, Page number 260" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate mew and n\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nRH=3.66*10**-4;\ne=1.6*10**-19;\nrho_n=8.93*10**-3;\n\n#Calculation\nn=1/(RH*e);\nmew_e=RH/rho_n;\nmew_e=math.ceil(mew_e*10**5)/10**5 #rounding off to 5 decimals\n\n#Result\nprint(\"n per m^3 is\",n);\nprint(\"mew_e in m^2/V is\",mew_e);", + "input": [ + " \n", + "\n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "RH=3.66*10**-4;\n", + "e=1.6*10**-19;\n", + "rho_n=8.93*10**-3;\n", + "\n", + "#Calculation\n", + "n=1/(RH*e);\n", + "mew_e=RH/rho_n;\n", + "mew_e=math.ceil(mew_e*10**5)/10**5 #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"n per m^3 is\",n);\n", + "print(\"mew_e in m^2/V is\",mew_e);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('n per m^3 is', 1.7076502732240434e+22)\n('mew_e in m^2/V is', 0.04099)\n" + "text": [ + "('n per m^3 is', 1.7076502732240434e+22)\n", + "('mew_e in m^2/V is', 0.04099)\n" + ] } ], "prompt_number": 19 @@ -458,19 +1054,51 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.21, Page number 260" + "source": [ + "Example number 7.21, Page number 260" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the conductivity and equilibrium hole concentration\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nmew_e=0.13; #electron mobility in m^2/Vs\nmew_h=0.048; #hole mobility in m^2/Vs\nni=1.5*10**16;\ne=1.6*10**-19;\nT=300; #temp in K\nND=10**23; #density per m^3\n\n#Calculation\nsigmai=ni*e*(mew_e+mew_h);\nsigma=ND*mew_e*e;\np=(ni**2)/ND;\nsigmai=math.ceil(sigmai*10**5)/10**5 #rounding off to 5 decimals\n\n#Result\nprint(\"conductivity of intrinsic Si in s is\",sigmai);\nprint(\"conductivity in s is\",sigma);\nprint(\"equilibrium hole concentration per m^3 is\",round(p));\n\n#answers for sigmai and sigma given in the book are wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "mew_e=0.13; #electron mobility in m^2/Vs\n", + "mew_h=0.048; #hole mobility in m^2/Vs\n", + "ni=1.5*10**16;\n", + "e=1.6*10**-19;\n", + "T=300; #temp in K\n", + "ND=10**23; #density per m^3\n", + "\n", + "#Calculation\n", + "sigmai=ni*e*(mew_e+mew_h);\n", + "sigma=ND*mew_e*e;\n", + "p=(ni**2)/ND;\n", + "sigmai=math.ceil(sigmai*10**5)/10**5 #rounding off to 5 decimals\n", + "\n", + "#Result\n", + "print(\"conductivity of intrinsic Si in s is\",sigmai);\n", + "print(\"conductivity in s is\",sigma);\n", + "print(\"equilibrium hole concentration per m^3 is\",round(p));\n", + "\n", + "#answers for sigmai and sigma given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('conductivity of intrinsic Si in s is', 0.00043)\n('conductivity in s is', 2080.0)\n('equilibrium hole concentration per m^3 is', 2250000000.0)\n" + "text": [ + "('conductivity of intrinsic Si in s is', 0.00043)\n", + "('conductivity in s is', 2080.0)\n", + "('equilibrium hole concentration per m^3 is', 2250000000.0)\n" + ] } ], "prompt_number": 22 @@ -479,19 +1107,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.22, Page number 261" + "source": [ + "Example number 7.22, Page number 261" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the forbidden energy gap\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nT=300; #temp in K\nkB=1.38*10**-23;\nmew_e=0.36; #mobility of electrons in m^2/Vs\ne=1.6*10**-19;\nmew_h=0.7; #mobility of electrons in m^2/Vs\nsigma=2.12; #conductivity in ohm-1 m-1\nC=4.83*10**21; #proportional constant\n\n#Calculation\nni=sigma/(e*(mew_e+mew_h));\n#exp(-Eg/(2*kB*T)) = (C*(T^(3/2)))/ni\n#let X be (C*(T^(3/2)))/ni\nX=(C*(T**(3/2)))/ni;\n#exp(-Eg/(2*kB*T)) = X \n#applyinf log on both sides\n#Eg/(2*kB*T) = log(X)\nEg=2*kB*T*math.log(X);\n\n#Result\nprint(\"forbidden energy gap in eV is\",Eg);\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "T=300; #temp in K\n", + "kB=1.38*10**-23;\n", + "mew_e=0.36; #mobility of electrons in m^2/Vs\n", + "e=1.6*10**-19;\n", + "mew_h=0.7; #mobility of electrons in m^2/Vs\n", + "sigma=2.12; #conductivity in ohm-1 m-1\n", + "C=4.83*10**21; #proportional constant\n", + "\n", + "#Calculation\n", + "ni=sigma/(e*(mew_e+mew_h));\n", + "#exp(-Eg/(2*kB*T)) = (C*(T^(3/2)))/ni\n", + "#let X be (C*(T^(3/2)))/ni\n", + "X=(C*(T**(3/2)))/ni;\n", + "#exp(-Eg/(2*kB*T)) = X \n", + "#applyinf log on both sides\n", + "#Eg/(2*kB*T) = log(X)\n", + "Eg=2*kB*T*math.log(X);\n", + "\n", + "#Result\n", + "print(\"forbidden energy gap in eV is\",Eg);\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('forbidden energy gap in eV is', 1.2016388762259164e-19)\n" + "text": [ + "('forbidden energy gap in eV is', 1.2016388762259164e-19)\n" + ] } ], "prompt_number": 23 @@ -500,19 +1161,59 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.23, Page number 261" + "source": [ + "Example number 7.23, Page number 261" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the probability of occupation\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEg=0.4; #energy gap in eV\nEg=Eg*1.6*10**-19; #Eg in J\nKB=1.38*10**-23;\nT1=0; #temp 1 in C\nT2=50; #temp 2 in C\nT3=100; #temp 3 in C\n\n#Calculation\nT1k=T1+273; #temp 1 in K\nT2k=T2+273; #temp 2 in K\nT3k=T3+273; #temp 3 in K\n#F(E) = 1/(1+(exp((E-Ep)/(KB*T))))\n#but E-Ep = (1/2)*Eg\n#therefore F(E) = 1/(1+(exp(Eg/(2*KB*T))))\nFE1=1/(1+(math.exp(Eg/(2*KB*T1k))));\nFE2=1/(1+(math.exp(Eg/(2*KB*T2k))));\nFE3=1/(1+(math.exp(Eg/(2*KB*T3k))));\nFE1=math.ceil(FE1*10**6)/10**6 #rounding off to 6 decimals\nFE2=math.ceil(FE2*10**6)/10**6 #rounding off to 6 decimals\nFE3=math.ceil(FE3*10**6)/10**6 #rounding off to 6 decimals\n\n#Result\nprint(\"probability of occupation at 0 C in eV is\",FE1);\nprint(\"probability of occupation at 50 C in eV is\",FE2);\nprint(\"probability of occupation at 100 C in eV is\",FE3);\n\n#answers given in the book are wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "Eg=0.4; #energy gap in eV\n", + "Eg=Eg*1.6*10**-19; #Eg in J\n", + "KB=1.38*10**-23;\n", + "T1=0; #temp 1 in C\n", + "T2=50; #temp 2 in C\n", + "T3=100; #temp 3 in C\n", + "\n", + "#Calculation\n", + "T1k=T1+273; #temp 1 in K\n", + "T2k=T2+273; #temp 2 in K\n", + "T3k=T3+273; #temp 3 in K\n", + "#F(E) = 1/(1+(exp((E-Ep)/(KB*T))))\n", + "#but E-Ep = (1/2)*Eg\n", + "#therefore F(E) = 1/(1+(exp(Eg/(2*KB*T))))\n", + "FE1=1/(1+(math.exp(Eg/(2*KB*T1k))));\n", + "FE2=1/(1+(math.exp(Eg/(2*KB*T2k))));\n", + "FE3=1/(1+(math.exp(Eg/(2*KB*T3k))));\n", + "FE1=math.ceil(FE1*10**6)/10**6 #rounding off to 6 decimals\n", + "FE2=math.ceil(FE2*10**6)/10**6 #rounding off to 6 decimals\n", + "FE3=math.ceil(FE3*10**6)/10**6 #rounding off to 6 decimals\n", + "\n", + "#Result\n", + "print(\"probability of occupation at 0 C in eV is\",FE1);\n", + "print(\"probability of occupation at 50 C in eV is\",FE2);\n", + "print(\"probability of occupation at 100 C in eV is\",FE3);\n", + "\n", + "#answers given in the book are wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('probability of occupation at 0 C in eV is', 0.000205)\n('probability of occupation at 50 C in eV is', 0.000762)\n('probability of occupation at 100 C in eV is', 0.001992)\n" + "text": [ + "('probability of occupation at 0 C in eV is', 0.000205)\n", + "('probability of occupation at 50 C in eV is', 0.000762)\n", + "('probability of occupation at 100 C in eV is', 0.001992)\n" + ] } ], "prompt_number": 26 @@ -521,19 +1222,45 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.24, Page number 262" + "source": [ + "Example number 7.24, Page number 262" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the ratio between conductivity\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nEg=1.2; #energy in eV\nEg=Eg*1.6*10**-19; #in J\nKB=1.38*10**-23;\nT1=600; #temp in K\nT2=300; #temp in K\n\n#Calculation\n#sigma is proportional to exp(-Eg/(2*KB*T))\n#let sigma1/sigma2 be R\nR=math.exp((Eg/(2*KB))*((1/T2)-(1/T1)));\n\n#Result\nprint(\"the ratio between conductivity is\",round(R));\n\n#answer given in the book is wrong", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "Eg=1.2; #energy in eV\n", + "Eg=Eg*1.6*10**-19; #in J\n", + "KB=1.38*10**-23;\n", + "T1=600; #temp in K\n", + "T2=300; #temp in K\n", + "\n", + "#Calculation\n", + "#sigma is proportional to exp(-Eg/(2*KB*T))\n", + "#let sigma1/sigma2 be R\n", + "R=math.exp((Eg/(2*KB))*((1/T2)-(1/T1)));\n", + "\n", + "#Result\n", + "print(\"the ratio between conductivity is\",round(R));\n", + "\n", + "#answer given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the ratio between conductivity is', 108467.0)\n" + "text": [ + "('the ratio between conductivity is', 108467.0)\n" + ] } ], "prompt_number": 28 @@ -542,19 +1269,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.25, Page number 263" + "source": [ + "Example number 7.25, Page number 263" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the resistivity of doped Ge\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nni=2.5*10**19; #density of charge carriers in m^3\nr=1/(10**6); #ratio\ne=1.6*10**-19;\nmew_e=0.36; #mobility of electrons in m^2/Vs\nmew_h=0.18; #mobility of holes in m^2/Vs\nN=4.2*10**28; #number of Si atoms per m^3\n\n#Calculation\nNe=r*N;\nNh=(ni**2)/Ne;\nsigma=(Ne*e*mew_e)+(Nh*e*mew_h);\nrho=1/sigma;\nrho=math.ceil(rho*10**8)/10**8 #rounding off to 8 decimals\n\n#Result\nprint(\"number of impurity atoms per m^3 is\",Ne);\nprint(\"the resistivity of doped Ge in ohm m is\",rho);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "ni=2.5*10**19; #density of charge carriers in m^3\n", + "r=1/(10**6); #ratio\n", + "e=1.6*10**-19;\n", + "mew_e=0.36; #mobility of electrons in m^2/Vs\n", + "mew_h=0.18; #mobility of holes in m^2/Vs\n", + "N=4.2*10**28; #number of Si atoms per m^3\n", + "\n", + "#Calculation\n", + "Ne=r*N;\n", + "Nh=(ni**2)/Ne;\n", + "sigma=(Ne*e*mew_e)+(Nh*e*mew_h);\n", + "rho=1/sigma;\n", + "rho=math.ceil(rho*10**8)/10**8 #rounding off to 8 decimals\n", + "\n", + "#Result\n", + "print(\"number of impurity atoms per m^3 is\",Ne);\n", + "print(\"the resistivity of doped Ge in ohm m is\",rho);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('number of impurity atoms per m^3 is', 4.2e+22)\n('the resistivity of doped Ge in ohm m is', 0.00041336)\n" + "text": [ + "('number of impurity atoms per m^3 is', 4.2e+22)\n", + "('the resistivity of doped Ge in ohm m is', 0.00041336)\n" + ] } ], "prompt_number": 30 @@ -563,19 +1319,42 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.26, Page number 264" + "source": [ + "Example number 7.26, Page number 264" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the conductivity of material\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nn=5*10**17; #concentration in m^3\nvd=350; #drift velocity in m/s\nE=1000; #electric field in V/m\ne=1.6*10**-19;\n\n#Calculation\nmew=vd/E;\nsigma=n*e*mew;\nsigma=math.ceil(sigma*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"the conductivity of material in ohm m is\",sigma);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "n=5*10**17; #concentration in m^3\n", + "vd=350; #drift velocity in m/s\n", + "E=1000; #electric field in V/m\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "mew=vd/E;\n", + "sigma=n*e*mew;\n", + "sigma=math.ceil(sigma*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"the conductivity of material in ohm m is\",sigma);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('the conductivity of material in ohm m is', 0.028)\n" + "text": [ + "('the conductivity of material in ohm m is', 0.028)\n" + ] } ], "prompt_number": 32 @@ -584,19 +1363,39 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.27, Page number 264" + "source": [ + "Example number 7.27, Page number 264" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the concentration\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nsigma_e=2.2*10**-4; #conductivity\nmew_e=125*10**-3; #mobility of electrons in m^2/Vs\ne=1.602*10**-19;\n\n#Calculation\nne=sigma_e/(e*mew_e);\n\n#Result\nprint(\"concentration in m^3 is\",ne);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "sigma_e=2.2*10**-4; #conductivity\n", + "mew_e=125*10**-3; #mobility of electrons in m^2/Vs\n", + "e=1.602*10**-19;\n", + "\n", + "#Calculation\n", + "ne=sigma_e/(e*mew_e);\n", + "\n", + "#Result\n", + "print(\"concentration in m^3 is\",ne);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('concentration in m^3 is', 1.0986267166042448e+16)\n" + "text": [ + "('concentration in m^3 is', 1.0986267166042448e+16)\n" + ] } ], "prompt_number": 33 @@ -605,19 +1404,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.28, Page number 265" + "source": [ + "Example number 7.28, Page number 265" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the mobility and density of charge carrier\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nRH=3.66*10**-4; #hall coefficient in m^3/c\nrho_i=8.93*10**-3; #resistivity in ohm m\ne=1.6*10**-19;\n\n#Calculation\nnh=1/(RH*e);\nmew_h=1/(rho_i*nh*e);\nmew_h=math.ceil(mew_h*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"density of charge carriers in m^3 is\",nh);\nprint(\"mobility of charge carriers is %f m^2/Vs\",mew_h);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "RH=3.66*10**-4; #hall coefficient in m^3/c\n", + "rho_i=8.93*10**-3; #resistivity in ohm m\n", + "e=1.6*10**-19;\n", + "\n", + "#Calculation\n", + "nh=1/(RH*e);\n", + "mew_h=1/(rho_i*nh*e);\n", + "mew_h=math.ceil(mew_h*10**4)/10**4 #rounding off to 4 decimals\n", + "\n", + "#Result\n", + "print(\"density of charge carriers in m^3 is\",nh);\n", + "print(\"mobility of charge carriers is %f m^2/Vs\",mew_h);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('density of charge carriers in m^3 is', 1.7076502732240434e+22)\n('mobility of charge carriers is %f m^2/Vs', 0.041)\n" + "text": [ + "('density of charge carriers in m^3 is', 1.7076502732240434e+22)\n", + "('mobility of charge carriers is %f m^2/Vs', 0.041)\n" + ] } ], "prompt_number": 35 @@ -626,19 +1449,52 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 7.29, Page number 265" + "source": [ + "Example number 7.29, Page number 265" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the Hall voltage and charge carrier concentration\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nI=3; #current in mA\nI=I*10**-3; #current in amp\ne=1.6*10**-19;\nRH=3.66*10**-4; #hall coefficient in m^3/C\nB=1; #flux density in w/m^2\nd=2; #dimension along Y in cm\nz=1; #dimension along z in mm\n\n#Calculation\nd=d*10**-2; #dimension along Y in m\nz=z*10**-3; #dimension along z in m\nA=d*z; #area in m^2\nEH=RH*I*B/A;\nVH=EH*d;\nVH=VH*10**3; #converting from V to mV\nn=1/(RH*e);\nVH=math.ceil(VH*10**2)/10**2 #rounding off to 2 decimals\n\n#Result\nprint(\"Hall voltage in mV is\",VH);\nprint(\"charge carrier concentration in m^3 is\",n);", + "input": [ + " \n", + "#import module\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "I=3; #current in mA\n", + "I=I*10**-3; #current in amp\n", + "e=1.6*10**-19;\n", + "RH=3.66*10**-4; #hall coefficient in m^3/C\n", + "B=1; #flux density in w/m^2\n", + "d=2; #dimension along Y in cm\n", + "z=1; #dimension along z in mm\n", + "\n", + "#Calculation\n", + "d=d*10**-2; #dimension along Y in m\n", + "z=z*10**-3; #dimension along z in m\n", + "A=d*z; #area in m^2\n", + "EH=RH*I*B/A;\n", + "VH=EH*d;\n", + "VH=VH*10**3; #converting from V to mV\n", + "n=1/(RH*e);\n", + "VH=math.ceil(VH*10**2)/10**2 #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"Hall voltage in mV is\",VH);\n", + "print(\"charge carrier concentration in m^3 is\",n);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('Hall voltage in mV is', 1.1)\n('charge carrier concentration in m^3 is', 1.7076502732240434e+22)\n" + "text": [ + "('Hall voltage in mV is', 1.1)\n", + "('charge carrier concentration in m^3 is', 1.7076502732240434e+22)\n" + ] } ], "prompt_number": 37 @@ -646,7 +1502,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics/chapter8_2.ipynb b/Engineering_Physics/chapter8_2.ipynb index c344140a..2dc13b1f 100644 --- a/Engineering_Physics/chapter8_2.ipynb +++ b/Engineering_Physics/chapter8_2.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "chapter8" + "name": "", + "signature": "sha256:064d55405a5d05f007b28f32cf39a9f99d10f303fc4084e2d14d99aaeb87858c" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "cell_type": "heading", "level": 1, "metadata": {}, - "source": "Physics of Nano Materials" + "source": [ + "Physics of Nano Materials" + ] }, { "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.1, Page number 320" + "source": [ + "Example number 8.1, Page number 320" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the surface area to volume ratio\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=5; #radius in m\npi=3.14;\n\n#Calculation \nSA=4*pi*r**2; #surface area of sphere in m^2\nV=(4/3)*pi*r**3; #volume of sphere in m^3\nR=SA/V; #ratio\n#surface area to volume ratio can also be given by 3/radius\n\n#Result\nprint(\"surface area to volume ratio of sphere in m-1 is\",R);", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=5; #radius in m\n", + "pi=3.14;\n", + "\n", + "#Calculation \n", + "SA=4*pi*r**2; #surface area of sphere in m^2\n", + "V=(4/3)*pi*r**3; #volume of sphere in m^3\n", + "R=SA/V; #ratio\n", + "#surface area to volume ratio can also be given by 3/radius\n", + "\n", + "#Result\n", + "print(\"surface area to volume ratio of sphere in m-1 is\",R);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('surface area to volume ratio of sphere in m-1 is', 0.6)\n" + "text": [ + "('surface area to volume ratio of sphere in m-1 is', 0.6)\n" + ] } ], "prompt_number": 5 @@ -38,19 +63,43 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.2, Page number 321" + "source": [ + "Example number 8.2, Page number 321" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the surface area to volume ratio\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nd=26; #distance in m\nr=d/2; #radius in m\npi=3.14;\n\n#Calculation\nSA=4*pi*r**2; #surface area of sphere in m^2\nV=(4/3)*pi*r**3; #volume of sphere in m^3\nR=SA/V; #ratio\nR=math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n#surface area to volume ratio can also be given by 3/radius\n\n#Result\nprint(\"surface area to volume ratio of sphere in m-1 is\",R);", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "d=26; #distance in m\n", + "r=d/2; #radius in m\n", + "pi=3.14;\n", + "\n", + "#Calculation\n", + "SA=4*pi*r**2; #surface area of sphere in m^2\n", + "V=(4/3)*pi*r**3; #volume of sphere in m^3\n", + "R=SA/V; #ratio\n", + "R=math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n", + "#surface area to volume ratio can also be given by 3/radius\n", + "\n", + "#Result\n", + "print(\"surface area to volume ratio of sphere in m-1 is\",R);" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('surface area to volume ratio of sphere in m-1 is', 0.231)\n" + "text": [ + "('surface area to volume ratio of sphere in m-1 is', 0.231)\n" + ] } ], "prompt_number": 7 @@ -59,19 +108,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.3, Page number 321" + "source": [ + "Example number 8.3, Page number 321" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the volume of cone\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=1; #radius in m\nh=1; #height in m\npi=3.14\n\n#Calculation\nV=(1/3)*pi*(r**2)*h;\nV=math.ceil(V*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"volume of cone in m^3 is\",V); ", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=1; #radius in m\n", + "h=1; #height in m\n", + "pi=3.14\n", + "\n", + "#Calculation\n", + "V=(1/3)*pi*(r**2)*h;\n", + "V=math.ceil(V*10**2)/10**2; #rounding off to 2 decimals\n", + "\n", + "#Result\n", + "print(\"volume of cone in m^3 is\",V); " + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('volume of cone in m^3 is', 1.05)\n" + "text": [ + "('volume of cone in m^3 is', 1.05)\n" + ] } ], "prompt_number": 11 @@ -80,19 +150,40 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.4, Page number 321" + "source": [ + "Example number 8.4, Page number 321" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the total surface area of cone\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=3; # radius in m\nh=4; # height in m\npi=3.14\n\n#Calculation\nSA=pi*r*math.sqrt((r**2)+(h**2));\nTSA=SA+(pi*r**2);\n\n#Result\nprint(\"total surface area of cone in m^2 is\",TSA);\n", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "r=3; # radius in m\n", + "h=4; # height in m\n", + "pi=3.14\n", + "\n", + "#Calculation\n", + "SA=pi*r*math.sqrt((r**2)+(h**2));\n", + "TSA=SA+(pi*r**2);\n", + "\n", + "#Result\n", + "print(\"total surface area of cone in m^2 is\",TSA);\n" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('total surface area of cone in m^2 is', 75.36)\n" + "text": [ + "('total surface area of cone in m^2 is', 75.36)\n" + ] } ], "prompt_number": 16 @@ -101,19 +192,48 @@ "cell_type": "heading", "level": 2, "metadata": {}, - "source": "Example number 8.5, Page number 322" + "source": [ + "Example number 8.5, Page number 322" + ] }, { "cell_type": "code", "collapsed": false, - "input": "# To calculate the height of cone\n\n#import modules\nimport math\nfrom __future__ import division\n\n#Variable decleration\nV=100; #volume of cone in cubic inches\nr=5; #radius of cone in inches\npi=3.14;\n\n#Calculation\nr_m=r*0.0254; #radius of cone in m\n#volume V=(1/3)*pi*(r**2)*h\n#therefore h = (3*V)/(pi*r**2)\nh=(3*V)/(pi*r**2); #height in inches\nR=3/r_m;\nh=math.ceil(h*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"height of the cone in inches is\",h);\nprint(\"surface area to volume ratio in m-1 is\",R);\n\n#answer for the surface area to volume ratio given in the book is wrong", + "input": [ + " \n", + "#import modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable decleration\n", + "V=100; #volume of cone in cubic inches\n", + "r=5; #radius of cone in inches\n", + "pi=3.14;\n", + "\n", + "#Calculation\n", + "r_m=r*0.0254; #radius of cone in m\n", + "#volume V=(1/3)*pi*(r**2)*h\n", + "#therefore h = (3*V)/(pi*r**2)\n", + "h=(3*V)/(pi*r**2); #height in inches\n", + "R=3/r_m;\n", + "h=math.ceil(h*10**3)/10**3; #rounding off to 3 decimals\n", + "\n", + "#Result\n", + "print(\"height of the cone in inches is\",h);\n", + "print(\"surface area to volume ratio in m-1 is\",R);\n", + "\n", + "#answer for the surface area to volume ratio given in the book is wrong" + ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", - "text": "('height of the cone in inches is', 3.822)\n('surface area to volume ratio in m-1 is', 23.62204724409449)\n" + "text": [ + "('height of the cone in inches is', 3.822)\n", + "('surface area to volume ratio in m-1 is', 23.62204724409449)\n" + ] } ], "prompt_number": 18 @@ -121,7 +241,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] |