diff options
author | debashisdeb | 2014-06-20 15:42:42 +0530 |
---|---|---|
committer | debashisdeb | 2014-06-20 15:42:42 +0530 |
commit | 83c1bfceb1b681b4bb7253b47491be2d8b2014a1 (patch) | |
tree | f54eab21dd3d725d64a495fcd47c00d37abed004 /Engineering_Physics_Aruldhas | |
parent | a78126bbe4443e9526a64df9d8245c4af8843044 (diff) | |
download | Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.gz Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.tar.bz2 Python-Textbook-Companions-83c1bfceb1b681b4bb7253b47491be2d8b2014a1.zip |
removing problem statements
Diffstat (limited to 'Engineering_Physics_Aruldhas')
17 files changed, 3597 insertions, 421 deletions
diff --git a/Engineering_Physics_Aruldhas/Chapter10_1.ipynb b/Engineering_Physics_Aruldhas/Chapter10_1.ipynb index b31ad5ec..a64ad6b4 100644 --- a/Engineering_Physics_Aruldhas/Chapter10_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter10_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter10" + "name": "", + "signature": "sha256:78b8d610d2cc37c12bbe36fc70ba217f440b3e2b1b7e7cbb3aa498d471c77bb0" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,53 @@ "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", + "\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 +67,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 +99,45 @@ "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", + "\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 +146,49 @@ "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", + "\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 +197,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 +241,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 +288,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter11_1.ipynb b/Engineering_Physics_Aruldhas/Chapter11_1.ipynb index 733fe6b7..d5495309 100644 --- a/Engineering_Physics_Aruldhas/Chapter11_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter11_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter11" + "name": "", + "signature": "sha256:ecf05dc207884a73f4d33d07fdee310eee827214d9664476e0cf941cf4d4f512" }, "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,46 @@ "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", + "\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", + "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 +117,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 +162,51 @@ "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", + "\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 +215,48 @@ "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", + "\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 +265,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 +314,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter12_1.ipynb b/Engineering_Physics_Aruldhas/Chapter12_1.ipynb index 440b2d59..7fa73024 100644 --- a/Engineering_Physics_Aruldhas/Chapter12_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter12_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter12" + "name": "", + "signature": "sha256:aab26783619c45961eca2004893b5ed3a4fe23aa4a44df9efa3d63c5d1ff3388" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,60 @@ "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", + "\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 +74,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 +126,47 @@ "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", + "\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 +175,49 @@ "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", + "\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 +225,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter13_1.ipynb b/Engineering_Physics_Aruldhas/Chapter13_1.ipynb index 2366432d..06b2e844 100644 --- a/Engineering_Physics_Aruldhas/Chapter13_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter13_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter13" + "name": "", + "signature": "sha256:23fe0a698ddd73a9b73b082e06aebc62f797877523bf19c5324fc5a8330a2aa8" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,47 @@ "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", + "#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 +61,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 +109,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 +154,41 @@ "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", + "\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,45 @@ "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", + "#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 +244,40 @@ "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", + "#importing modules\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,42 @@ "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", + "\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 +329,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter14_1.ipynb b/Engineering_Physics_Aruldhas/Chapter14_1.ipynb index eb6cc153..63e03042 100644 --- a/Engineering_Physics_Aruldhas/Chapter14_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter14_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter14" + "name": "", + "signature": "sha256:396480b86092e159711151589922125e5821f00167a65ea8819e3cd4725bf191" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,54 @@ "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", + "\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 +68,40 @@ "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", + "\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 +110,41 @@ "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", + "\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 +153,43 @@ "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", + "\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 +198,48 @@ "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", + "\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 +248,47 @@ "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", + "\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 +297,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 +353,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter15_1.ipynb b/Engineering_Physics_Aruldhas/Chapter15_1.ipynb index cfabc2c6..7bc435f1 100644 --- a/Engineering_Physics_Aruldhas/Chapter15_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter15_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter15" + "name": "", + "signature": "sha256:2292e5def6e87e01b63e6b748e8fe3955bb5676e5121c51dac319cd9531c4833" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "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", + "\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 +63,46 @@ "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", + "\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 +111,42 @@ "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", + "\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 +155,49 @@ "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", + "\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 +206,42 @@ "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", + "\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 +250,46 @@ "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", + "\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 +297,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter17_1.ipynb b/Engineering_Physics_Aruldhas/Chapter17_1.ipynb index f0df2691..891f2d43 100644 --- a/Engineering_Physics_Aruldhas/Chapter17_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter17_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter17" + "name": "", + "signature": "sha256:d4400dbe9ddae05e5ab81173c9df50e2e9dde25edf961941bd9c8dc15f5a6fe1" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,51 @@ "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", + "\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 +64,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter18_1.ipynb b/Engineering_Physics_Aruldhas/Chapter18_1.ipynb index aca20375..553fe50f 100644 --- a/Engineering_Physics_Aruldhas/Chapter18_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter18_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter18" + "name": "", + "signature": "sha256:c2afbaf4a700c8f5f48d1946053d882d86bb1b0270a68b2bbedc639668ea43be" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,51 @@ "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", + "\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 +65,40 @@ "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", + "\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 +107,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 +148,42 @@ "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", + "\n", + "\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 +192,46 @@ "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", + "\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 +240,47 @@ "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", + "\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 +288,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter1_1.ipynb b/Engineering_Physics_Aruldhas/Chapter1_1.ipynb index c487a981..7872d7ab 100644 --- a/Engineering_Physics_Aruldhas/Chapter1_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter1_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter1" + "name": "", + "signature": "sha256:381979e560591138195a6149a5aa889c9c7e2cfe41c7a482a0ea4bbe4c24f150" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,52 @@ "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", + "\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 +66,48 @@ "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", + "\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 +116,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 +164,49 @@ "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", + "\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 +215,49 @@ "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", + "\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 +266,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 +311,52 @@ "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", + "\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 +365,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 +414,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 +463,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter2_1.ipynb b/Engineering_Physics_Aruldhas/Chapter2_1.ipynb index f002fd31..fdbf44b5 100644 --- a/Engineering_Physics_Aruldhas/Chapter2_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter2_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter2" + "name": "", + "signature": "sha256:de195a4faed398c9714bc27769421926f24c448f7ad7f1d4cb04dd3cfbb18334" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,61 @@ "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", + "\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 +75,54 @@ "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", + "\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 +131,49 @@ "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", + "\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 +182,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 +236,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter3_1.ipynb b/Engineering_Physics_Aruldhas/Chapter3_1.ipynb index e20ce99f..645d7595 100644 --- a/Engineering_Physics_Aruldhas/Chapter3_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter3_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter3" + "name": "", + "signature": "sha256:bdc5e7b39dc3529751aa6372cd3db8b0870c9abab4c9b51855fb3bce7de6dc73" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,52 @@ "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", + "\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 +66,48 @@ "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", + "\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 +116,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 +158,47 @@ "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", + "\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 +207,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 +251,43 @@ "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", + "\n", + "#importing modules\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 +296,42 @@ "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", + "\n", + "#importing modules\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 +340,39 @@ "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", + "\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 +381,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 +422,41 @@ "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", + "\n", + "#importing modules\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 +464,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter4_1.ipynb b/Engineering_Physics_Aruldhas/Chapter4_1.ipynb index 4cd8a196..cc3fca78 100644 --- a/Engineering_Physics_Aruldhas/Chapter4_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter4_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter4" + "name": "", + "signature": "sha256:3ba769656e990801d788b85df0bb013daae3fbdec7e19bc6ba653a53dfdabcb2" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,62 @@ "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", + "\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 +76,53 @@ "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", + "\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 +131,46 @@ "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", + "\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 +179,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 +228,56 @@ "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", + "\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 +286,53 @@ "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", + "\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 +341,42 @@ "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", + "\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 +385,45 @@ "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", + "\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 +432,45 @@ "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", + "\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 +478,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter5_1.ipynb b/Engineering_Physics_Aruldhas/Chapter5_1.ipynb index 3731e0ad..8b5822ee 100644 --- a/Engineering_Physics_Aruldhas/Chapter5_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter5_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter5" + "name": "", + "signature": "sha256:d6b4557b658267af4573aff55394c33f7ae58a19c1bc5291838cb933f306de2e" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,59 @@ "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", + "\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 +73,44 @@ "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", + "\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 +119,41 @@ "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", + "\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 +162,32 @@ "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", + "\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 +196,44 @@ "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", + "#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 +242,43 @@ "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", + "\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 +286,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [], diff --git a/Engineering_Physics_Aruldhas/Chapter6_1.ipynb b/Engineering_Physics_Aruldhas/Chapter6_1.ipynb index 889b1e18..0de10069 100644 --- a/Engineering_Physics_Aruldhas/Chapter6_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter6_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter6" + "name": "", + "signature": "sha256:1812f754f8541ce5ac6b5aaa71f7eac9ff30ca728d742f618ea7c5d3873d8a96" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,51 @@ "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", + "\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 +65,40 @@ "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", + "\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 +107,40 @@ "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", + "\n", + "#importing modules\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 +149,60 @@ "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", + "\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 +211,43 @@ "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", + "\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 +256,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 +305,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 +349,57 @@ "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", + "\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 +408,46 @@ "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", + "\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 +456,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 +504,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 +557,45 @@ "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", + "\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 +604,49 @@ "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", + "\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 +654,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter7_1.ipynb b/Engineering_Physics_Aruldhas/Chapter7_1.ipynb index 5b1859d1..750a9700 100644 --- a/Engineering_Physics_Aruldhas/Chapter7_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter7_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter7" + "name": "", + "signature": "sha256:7388a73b9b3de996a0d87179cb12d51f5ad7f3cb764b14aa844019e8d2cdb4ea" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,49 @@ "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", + "\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 +63,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 +107,42 @@ "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", + "\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 +151,44 @@ "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", + "\n", + "#importing modules\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 +197,41 @@ "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", + "\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 +240,42 @@ "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", + "\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 +283,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter8_1.ipynb b/Engineering_Physics_Aruldhas/Chapter8_1.ipynb index 8ec25fcf..af1e48b4 100644 --- a/Engineering_Physics_Aruldhas/Chapter8_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter8_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter8" + "name": "", + "signature": "sha256:1888e774039c89bc21625752ef2171fa6b8e8f5f67497ebbdba82729676e8946" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,50 @@ "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", + "\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 +64,40 @@ "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", + "\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 +106,53 @@ "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", + "\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 +161,46 @@ "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", + "\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 +209,47 @@ "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", + "\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 +258,44 @@ "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", + "\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 +304,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 +361,42 @@ "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", + "\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 +405,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 +447,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 +499,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 +553,40 @@ "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", + "\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 +595,56 @@ "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", + "\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 +652,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] diff --git a/Engineering_Physics_Aruldhas/Chapter9_1.ipynb b/Engineering_Physics_Aruldhas/Chapter9_1.ipynb index 50e4b6bd..af5adbcc 100644 --- a/Engineering_Physics_Aruldhas/Chapter9_1.ipynb +++ b/Engineering_Physics_Aruldhas/Chapter9_1.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "Chapter9" + "name": "", + "signature": "sha256:d58e11c98e937b7ff914fc9567035f99fc6ab344053f332f140829887d0ef6cc" }, "nbformat": 3, "nbformat_minor": 0, @@ -11,25 +12,46 @@ "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", + "\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 +60,44 @@ "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", + "\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 +106,52 @@ "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", + "\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 +160,43 @@ "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", + "\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 +205,44 @@ "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", + "\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 +251,99 @@ "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", + "\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 +351,7 @@ { "cell_type": "code", "collapsed": false, - "input": "", + "input": [], "language": "python", "metadata": {}, "outputs": [] |