diff options
Diffstat (limited to 'Applied_Physics_for_Engineers')
22 files changed, 9305 insertions, 0 deletions
diff --git a/Applied_Physics_for_Engineers/Chapter_10.ipynb b/Applied_Physics_for_Engineers/Chapter_10.ipynb new file mode 100755 index 00000000..6c1f1d6b --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_10.ipynb @@ -0,0 +1,264 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10: Electrostatics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1, Page 507" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "m = 4e-013; # Mass of the particle, kg\n", + "q = 2.4e-019; # Charge on particle, C\n", + "d = 2e-002; # Distance between the two horizontally charged plates, m\n", + "g = 9.8; #`Acceleration due to gravity, m/sec-square\n", + "\n", + "#Calculations\n", + "E = (m*g)/q ; # Electric field strength, N/C\n", + "V = E*d; # Potential difference between the two charged horizontal plates, V\n", + "\n", + "#Result\n", + "print \"The potential difference between the two horizontally charged plates = %3.1e V\"%V\n", + "#Incorrect answer in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The potential difference between the two horizontally charged plates = 3.3e+05 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page 507" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "q1 = 1e-009; # Charge at first corner, C\n", + "q2 = 2e-009; # Charge at second corner, C\n", + "q3 = 3e-009; # Charge at third corner, C\n", + "d = 1.; # Side of the equilateral triangle, m\n", + "theta = 30; # Angle at which line joining the observation point to the source charge makes with the side, degrees\n", + "\n", + "#Calculations\n", + "r = (d/2)/cos(theta*pi/180); # Distance of observation point from the charges, m\n", + "#since,1/4*%pi*%eps = 9e+009;\n", + "V = (q1+q2+q3)*(9e+009)/r; # Elecric potential, V\n", + "\n", + "#Result\n", + "print \"The electric potential at the point equidistant from the three corners of the triangle = %4.1f V\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric potential at the point equidistant from the three corners of the triangle = 93.5 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page 508" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "q = 2e-008; \n", + "q1 = q; # Charge at first corner, C\n", + "q2 = -2*q; # Charge at second corner, C\n", + "q3 = 3*q; # Charge at third corner, C\n", + "q4 = 2*q; # Charge at fourth corner, C\n", + "d = 1; # Side of the square, m\n", + "\n", + "#Calculations\n", + "r = round(d*sin(45*pi/180),2); # Distance of centre of the square from each corner, m\n", + "V = (q1+q2+q3+q4)*(9e+009)/r; # Elecric potential at the centre of the square, V \n", + "\n", + "#Result\n", + "print \"The electric potential at the centre of the square = %4d V\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric potential at the centre of the square = 1014 V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6, Page 511" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "V = 60; # Electric potential of smaller drop, volt\n", + "r = 1; # For simplcity assume radius of each small drop to be unity, unit\n", + "q = 1; # For simplicity assume charge on smaller drop to be unity, C\n", + "k = 1; # For simplicity assume Coulomb's constant to be unity, unit\n", + "\n", + "#Calculations\n", + "R = 2**(1./3)*r; # Radius of bigger drop, unit\n", + "Q = 2*q; # Charge on bigger drop, C\n", + "V_prime = k*Q/R*V; # Electric potential of bigger drop, volt\n", + "\n", + "#Result\n", + "print \"The electric potential of new drop = %4.1f V\"%V_prime\n", + "#Incorrect answer in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric potential of new drop = 95.2 V\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7, Page 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "m = 9.1e-031; # Mass of the electron, kg\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "g = 9.8; # Acceleration due to gravity, m/sec-square\n", + "\n", + "#Calculations\n", + "# Electric force, F = e*E, where F = m*g or e*E = m*g\n", + "E = m*g/e; # Electric field which would balance the weight of an electron placed in it, N/C\n", + "\n", + "#Result\n", + "print \"The required electric field strength = %3.1e N/C\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required electric field strength = 5.6e-11 N/C\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.8, Page 512" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "q1 = 8e-007; # First Charge, C\n", + "q2 = -8e-007; # Second Charge, C\n", + "r = 15e-002; # Distance between the two charges, m\n", + "k = 9e+009; # Coulomb's constant, N-metre-square/coulomb-square\n", + "\n", + "#Calculations&#Results\n", + "E1 = k*q1/r**2; # Electric field strength due to charge 8e-007 C\n", + "print \"The electric field strength at midpoint = %3.1e N/C\"%E1\n", + "E2 = abs(k*q2/r**2); # Electric field strength -8e-007 C \n", + "print \"The electric field strength at midpoint = %3.1e N/C\"%E2\n", + "# Total electric field strength at the mid-point is\n", + "E = E1+E2; # Net electric field at mid point, N/C\n", + "print \"The net electric field strength at midpoint = %3.1e N/C\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric field strength at midpoint = 3.2e+05 N/C\n", + "The electric field strength at midpoint = 3.2e+05 N/C\n", + "The net electric field strength at midpoint = 6.4e+05 N/C\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_11.ipynb b/Applied_Physics_for_Engineers/Chapter_11.ipynb new file mode 100755 index 00000000..e3b094b0 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_11.ipynb @@ -0,0 +1,302 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Electromagnetic Theory" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1, Page 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "H_0 = 1; # Amplitude off field vector,in A/m\n", + "mu_0 = 12.56e-7; # Permeability,in weber/A-m \n", + "eps = 8.85e-12; # Permittivity in free space,in C/N-meter-square\n", + "\n", + "#Calculations\n", + "# From the relation between the amplitude of the field vector E and vector H of an EM wave in free space \n", + "E_0 = H_0*(sqrt(mu_0/eps));\n", + "\n", + "#Result\n", + "print \"The amplitude of field vector E in free space = %5.1f V/m\"%E_0\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitude of field vector E in free space = 376.7 V/m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.2, Page 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "E_o = 1e+3; # Amplitude field vector in free space,N/C\n", + "c = 3e+8; # Speed of light,in m/s\n", + "\n", + "#Calculations\n", + "# From the relation between the amplitude of the field vector E and vector H of an EM wave in free space E_o = H_o*(sqrt(mu_o/eps))and B_o = mu_o*H_o, we have\n", + "B_o = E_o/c;\n", + "\n", + "#Result\n", + "print \"The maximum value of magnetic induction vector = %4.2e weber/A-m\"%B_o\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum value of magnetic induction vector = 3.33e-06 weber/A-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.3, Page 560" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "sigma = 5; # Conductivity of the conducting medium, mho/m\n", + "eps_r = 8.85e-12; # Relative electrical permittivity of medium, F/m\n", + "eps_0 = 1; # Electrical permittivity of free space, F/m\n", + "E0 = 250; # Amplitude of applied electric field, V/m\n", + "\n", + "#Calculations\n", + "J = sigma*E0; # Amplitude of conduction current density, A/metre-square\n", + "J_D = eps_r*eps_0*E0*1e+010; # Amplitude of displacement current density, A/metre-square\n", + "omega = sigma/(eps_0*eps_r); # Frequency at which J = J_D\n", + "\n", + "#Results\n", + "print \"The conduction current density = %3dsin(10^10t) A/metre-quare\"%J\n", + "print \"The displacement current density = %5.3fcos(10^10t) A/metre-quare\"%J_D #incorrect answer in the textbook\n", + "print \"The frequency at which J = J_D is %3.1e Hz\"%omega" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The conduction current density = 1250sin(10^10t) A/metre-quare\n", + "The displacement current density = 22.125cos(10^10t) A/metre-quare\n", + "The frequency at which J = J_D is 5.6e+11 Hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.8, Page 565" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "P = 1000; # Energy radiated by the lamp, watt\n", + "r = 2; # Distance from the source at which the electric field intensity is given, m\n", + "\n", + "#Calculations\n", + "S = P/(4*pi*r**2); # Magnitude of Poynting vector, W/metre-square\n", + "# As wave imepdence, Z0 = E/H = 377 and H = E/377, so that with E*H = S we have\n", + "E = 377\n", + "E = sqrt(S*E)\n", + "\n", + "#Result\n", + "print \"The average value of the intensity of electric field of radiation = %4.1f V/m\"%(E)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average value of the intensity of electric field of radiation = 86.6 V/m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9, Page 566" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "S = 2*4.186/60*1e+04; # Solar constant, J/s/metre-square\n", + "# From the poynting vector S = E*H \n", + "C = 377; # Wave Impedence, ohm\n", + "\n", + "#Calculations\n", + "E = sqrt(S*C); # Electric field of radiation, V/m\n", + "H = E/C; # Magnetic field of radiation, A/m\n", + "E0 = E*sqrt(2); # Amplitude of electric field of radiation, V/m \n", + "H0 = H*sqrt(2); # Amplitude of magnetic field of radiation, A/m\n", + "\n", + "#Results\n", + "print \"The amplitude of electric field of radiation = %6.1f V/m\"%E0 #incorrect answer in the textbook\n", + "print \"The amplitude of magnetic field of radiation = %5.3f V/m\"%H0\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amplitude of electric field of radiation = 1025.7 V/m\n", + "The amplitude of magnetic field of radiation = 2.721 V/m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.12, Page 569" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "sigma = 3.54e+007; # Electrical conductivity of Al, mho per metre \n", + "mu = 12.56e-007; # Permeability of the medium, weber/A-m\n", + "f = 71.6e+06; # Frequency of the wave, Hz\n", + "\n", + "#Calculations\n", + "omega = 2*pi*f; # Angular frequency of the wave, rad per sec\n", + "delta = sqrt(2/(sigma*mu*omega)); # Skin depth of the EM wave in Al, m\n", + "\n", + "#Result\n", + "print \"The skin depth of an EM-wave in Al = %2.0f micron\"%(delta/1e-06)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The skin depth of an EM-wave in Al = 10 micron\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.14, Page 571" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "sigma = 5.; # Electrical conductivity, mho per metre \n", + "mu = 12.56e-007; # Permeability of the medium, weber/A-m\n", + "eps_0 = 8.85e-012; # Electric permittivity of free space, C-square/N-m-square\n", + "\n", + "#Calculations&Results\n", + "eps = 70*eps_0; # Electric permittivity of the medium, C-square/N-m-square\n", + "delta = 2/sigma*sqrt(eps/mu); # The skin depth and attenuation constant of sea water\n", + "print \"The skin depth of an EM-wave in sea water = %6.4f m\"%delta\n", + "Beta = 1/delta; # The attenuation constant of sea water, per metre\n", + "print \"The attenuation constant of the sea water = %6.2f m\"%Beta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The skin depth of an EM-wave in sea water = 0.0089 m\n", + "The attenuation constant of the sea water = 112.57 m\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_12.ipynb b/Applied_Physics_for_Engineers/Chapter_12.ipynb new file mode 100755 index 00000000..832a6dfa --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_12.ipynb @@ -0,0 +1,439 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Magnetic Properties of Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1, Page 603" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "H = 5e+3; # Coercivity of a bar magnet, A/m\n", + "L = 0.1; # Length of the solenoid, m\n", + "N = 50; # Turns in solenoid\n", + "n = 500; # Turns/m\n", + "\n", + "#Calculations\n", + "# Using the relation\n", + "I = H/n; # where I is the current through the solenoid\n", + "\n", + "#Result\n", + "print \"The current through the solenoid is = %2d A\"%I\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The current through the solenoid is = 10 A\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2, Page 603" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 500; # Number of turns wound per metre on the solenoid\n", + "i = 0.5; # Current through the solenoid, A\n", + "V = 1e-03; # Volume of iron rod, per metre cube\n", + "mu_r = 1200; # Relative permeability of the iron\n", + "\n", + "#Calculations&Results\n", + "H = n*i; # Magnetic intensity inside solenoid, ampere-turn per metre\n", + "# As B = mu_o * (H + I) => I = B/mu_o - H \n", + "# But B = mu_o * mu_r * H and solving for I \n", + "I = (mu_r - 1) * H;\n", + "print \"The Intensity of magnetisation inside the solenoid, I = %5.3e A/m\"%I\n", + "M = I * V; # Magnetic moment of the rod, ampere metre square \n", + "print \"The magnetic moment of the rod, M = %3d ampere metre square\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Intensity of magnetisation inside the solenoid, I = 2.998e+05 A/m\n", + "The magnetic moment of the rod, M = 299 ampere metre square\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.3, Page 604" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 300; # Number of turns wound per metre on the solenoid\n", + "i = 0.5; # Current through the solenoid, A\n", + "V = 1e-03; # Volume of iron rod, per metre cube\n", + "mu_r = 100; # Relative permeability of the iron\n", + "\n", + "#Calculations&Results\n", + "H = n*i; # Magnetic intensity inside solenoid, ampere-turn per metre\n", + "# As, I = (B-mu_o* H)/mu_o\n", + "#But, B= mu * H = mu_r * mu_o * H and I = (mu_r-1)* H\n", + "I = (mu_r-1)*n*i; \n", + "print \"The Intensity of magnetisation inside the solenoid, I = %5.3e A/m\"%I\n", + "l = 0.2; #length of the rod,m\n", + "r = 5e-3; #radius of the rod,m\n", + "V = 1.57e-5; #V=%pi*r^2*l where the volume of the rod having radius r and length,m\n", + "M = I * V ; # Magnetic moment of the rod, ampere metre square\n", + "print \"The magnetic moment of the rod, M = %5.3f ampere metre square\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Intensity of magnetisation inside the solenoid, I = 1.485e+04 A/m\n", + "The magnetic moment of the rod, M = 0.233 ampere metre square\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4, Page 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "B = 0.0044; # Magnetic flux density, weber/meter square\n", + "mu_o = 4*pi*1e-07; # Relative permeability of the material, henery/m \n", + "I = 3300; # Magnetization of a magnetic material, A/m\n", + "\n", + "#Calculations&Results\n", + "#B = mu_o*(I+H), solving for H \n", + "H = (B/mu_o)- I; # Magnetizing force ,A/m\n", + "print \"The magnetic intensity,H = %3d A/m\"%H\n", + "# Relation between intensity of magnetization and relative permeability \n", + "mu_r = (I/H)+1; #substitute the value of I and H \n", + "print \"The relative permeability, mu_r = %5.2f\"%mu_r\n", + "\n", + "#Incorrect answers in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnetic intensity,H = 201 A/m\n", + "The relative permeability, mu_r = 17.38\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5, Page 605" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu_o = 4*pi*1e-07; # Magnetic permeability of the free space, henery/m\n", + "mu_r = 600;\n", + "mu = mu_o*mu_r; # Magnetic permeability of the medium, henery/m\n", + "n = 500; # Turns in a wire\n", + "i = 0.3; # Current flows through a ring,amp\n", + "r = 12e-02/2; # Mean radius of a ring, m\n", + "\n", + "#Calculations&Results\n", + "B = mu_o*mu_r*n*i/(2*pi*r);\n", + "print \"The magnetic flux density = %2.1f weber/meter-square\"%B\n", + "H = B/mu; # Magnetic intensity, ampere-turns/m\n", + "print \"The magnetic intensity = %5.1f ampere-turns/m\"%H\n", + "mui = B -mu_o\n", + "per = mui/i*100\n", + "print \"The percentage magnetic flux density due to electronic loop currents = \",per,\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnetic flux density = 0.3 weber/meter-square\n", + "The magnetic intensity = 397.9 ampere-turns/m\n", + "The percentage magnetic flux density due to electronic loop currents = 99.999581121 %\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6, Page 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M_i = 4.5; # Intial value of total dipole moment of the sample\n", + "H_i = 0.84; # External magnetic field, tesla\n", + "T_i = 4.2; # Cooling temerature of the sample, K\n", + "H_f = 0.98; # External magnetic field, tesla\n", + "T_f = 2.8; # Cooling temerature of the sample, K\n", + "\n", + "#Calculations\n", + "# According to the curie's law, Mf/Mi = (Hf/Hi)*(Ti/Tf)\n", + "M_f = M_i*H_f/H_i*T_i/T_f;\n", + "\n", + "#Result\n", + "print \"The total dipole moment of the sample = %5.3f joule/tesla\"%M_f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The total dipole moment of the sample = 7.875 joule/tesla\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.7, Page 606" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu_o = 4*pi*1e-07; # Magnetic permeability of free space, henry/m\n", + "n = 1e+29; # Number density of atoms of iron, per metre cube \n", + "p_m = 1.8e-23; # Magnetic moment of each atom, ampere-metre square \n", + "k_B = 1.38e-23; # Boltzmann constant, J/K\n", + "B = 0.1; # Magnetic flux density, weber per metre square\n", + "T = 300; # Absolute room temperature, K\n", + "l = 10e-02; # Length of the iron bar, m\n", + "a = 1e-04; # Area of cross-section of the iron bar, metre square\n", + "\n", + "#Calculations&Results\n", + "V = l*a; # Voluem of the iron bar, metre cube\n", + "chi = n*p_m**2*mu_o/(3*k_B*T);\n", + "print \"The paramagnetic susceptibility of a material = %5.3e\"%chi\n", + "pm_mean = p_m**2*B/(3*k_B*T); # Mean dipole moment of an iron atom, ampere metre-square\n", + "P_m = n*pm_mean; # Dipole moment of the bar, ampere metre-square\n", + "I = n*p_m; # Magnetization of the bar in one domain, ampere/metre\n", + "M = I*V; # Magnetic moment of the bar, ampere metre-square\n", + "print \"The dipole moment of the bar = %5.3e ampere metre-square\"%P_m\n", + "print \"The magnetization of the bar in one domain = %3.1e ampere/metre\"%I\n", + "print \"The magnetic moment of the bar = %2d ampere metre-square\"%M\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The paramagnetic susceptibility of a material = 3.278e-03\n", + "The dipole moment of the bar = 2.609e+02 ampere metre-square\n", + "The magnetization of the bar in one domain = 1.8e+06 ampere/metre\n", + "The magnetic moment of the bar = 18 ampere metre-square\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.8, Page 607" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A = 500; # Area of the B-H loop, joule per metre cube\n", + "n = 50; # Total number of cycles, Hz\n", + "m = 9; # Mass of the core, kg\n", + "d = 7.5e+3; # Density of the core, kg/metre cube\n", + "t = 3600; # Time during which the energy loss takes place, s\n", + "\n", + "#Calculations\n", + "V = m/d; # Volume of the core, metre cube\n", + "E = n*V*A*t; # Hystersis loss of energy per hour, joule\n", + "\n", + "#Result\n", + "print \"The hystersis loss per hour = %5.2eJ\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hystersis loss per hour = 1.08e+05J\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.9, Page 607" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 50; # Total number of cycles per sec, Hz\n", + "V = 1e-03; # Volume of the specimen, metre cube\n", + "t = 1; # Time during which the loss occurs, s\n", + "A = 0.25e+03; # Area of B-H loop, joule per metre cube\n", + "\n", + "#Calculations\n", + "E = n*V*A*t; # Energy loss due to hysteresis, J/s\n", + "\n", + "#Result\n", + "print \"The hystersis loss = %4.1f J/s\"%E\n", + "#incorrect answer in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hystersis loss = 12.5 J/s\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10, Page 608" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-19; # Charge on anlectron, C\n", + "m = 9.1e-31; # Mass of the electron, kg\n", + "r = 5.1e-11; # Radius of the electronic orbit, m\n", + "B = 2.0; # Applied magnetic field, weber per metre-square\n", + "\n", + "#Calculations\n", + "delta_pm = e**2*r**2*B/(4*m);\n", + "\n", + "#Result\n", + "print \"The change in the magnetic dipole moment of the electron = %3.1e A-metre square\"%delta_pm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in the magnetic dipole moment of the electron = 3.7e-29 A-metre square\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_13.ipynb b/Applied_Physics_for_Engineers/Chapter_13.ipynb new file mode 100755 index 00000000..0622b390 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_13.ipynb @@ -0,0 +1,492 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Dielectric Properties of Materials" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1, Page 648" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "from scipy import integrate\n", + "\n", + "#Variable declaration\n", + "q = 1e-006; # Electric charge on either side of the dipole, C\n", + "l = 2e-02; # Dipole length, m\n", + "p = q*l; # Dipole moment for the pair of opposite charges, C-m\n", + "E = 1e+005; # External electric field, N/C\n", + "theta = 90; # Angle which the dipole makes with the external field, degrees\n", + "\n", + "#Calculations&Results\n", + "tau = p*E*sin(theta); # The maximum torque on dipole placed in external electric field, Nm\n", + "print \"The maximum torque = %1.0e N-m\"%tau\n", + "W = p*E*(cos(0)-cos(180*pi/180))\n", + "#W = integrate('p*E*sin(thet)', 'thet', 0, pi); # The work done in rotating the dipole direction = %1.0e J\", W\n", + "print \"The work done in rotating the dipole direction = %1.0e J\"%W\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum torque = 2e-03 N-m\n", + "The work done in rotating the dipole direction = 4e-03 J\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2, Page 648" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "Q = 8e-019; # Charge of the nucleus, C\n", + "p = 3.2e-029; # Electric dipole moment, C-m\n", + "r = 1e-10; # Distance of dipole relative to the nucleus, m\n", + "k = 9e+9; # Coulomb constant, N-meter-square/C-square\n", + "theta = 0; # Angle for radial direction, radian \n", + "\n", + "#Calculations&Results\n", + "F = k*p*Q*sqrt(3*cos(theta**2)+1)/r**3; # The force acting on the dipole in the radial direction, N\n", + "print \"The force acting on the dipole in the radial direction = %3.1e N\"%F\n", + "theta = pi/2; # Angle for perpendicular direction, radian\n", + "F = k*p*Q*sqrt(3*cos(theta)**2+1)/r**3;\n", + "print \"The force acting on the dipole in the direction perpendicular to radial direction = %3.1e N\"%F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The force acting on the dipole in the radial direction = 4.6e-07 N\n", + "The force acting on the dipole in the direction perpendicular to radial direction = 2.3e-07 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.3, Page 649" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "chi_e = 35.4e-12; # Susceptability of the material, C-square/N-meter-square\n", + "eps_0 = 8.85e-12; # Electric permittivity in free space, C-squre/N-meter-square\n", + "\n", + "#Calculations&Results\n", + "K = 1 + (chi_e/eps_0);\n", + "print \"The dielectric constant = %d \"%K\n", + "eps = (eps_0*K); \n", + "print \"The electric permittivity = %5.3e C-square/N-meter square \"%eps\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dielectric constant = 5 \n", + "The electric permittivity = 4.425e-11 C-square/N-meter square \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.4, Page 649" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "eps = 1.46e-10; # Electric permittivity, C-square/n-meter-square\n", + "eps_0 = 8.85e-12; # Permittivity in free space, C-squre/N-meter-square\n", + "\n", + "#Calculations&Results\n", + "K = (eps/eps_0);\n", + "print \"The dielectric constant = %4.1f \"%K\n", + "chi_e = eps_0*(K-1); # Susceptability,in C-square/N-meter-square\n", + "print \"The electric susceptability = %4.2e C-square/N-meter square \"%chi_e\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dielectric constant = 16.5 \n", + "The electric susceptability = 1.37e-10 C-square/N-meter square \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5, Page 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K = 7.0; # Dielectric constant of the slab\n", + "d = 0.01; # Distance between the two parallel plates, m\n", + "V_0 = 100; # Potential difference across the plates, V\n", + "eps_0 = 8.85e-12; # Electric permability of the free space, C-square/N-meter-square\n", + "\n", + "#Calculations&Results\n", + "E_0 = V_0/d; # Electric intensity in the absence of dielectric slab, V/m\n", + "E = E_0/K; # Electric intensity with dielectric slab introduced between the plates, V/m\n", + "print \"The electric field intensity in the presence of the dielectric slab = %4.2e V/m \"%E\n", + "D = (eps_0*K*E); # Electric displacement, C-square/m-square\n", + "print \"The electric displacement in the dielectric slab = %4.2e C-square/meter-square \"%D\n", + "P = eps_0*(K-1)*E; # Electric polarization in the dielectric slab, C-square/m-square\n", + "print \"The electric polarization in the dielectric slab = %3.1e C-square/meter-square \"%P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electric field intensity in the presence of the dielectric slab = 1.43e+03 V/m \n", + "The electric displacement in the dielectric slab = 8.85e-08 C-square/meter-square \n", + "The electric polarization in the dielectric slab = 7.6e-08 C-square/meter-square \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.6, Page 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K = 1.000074; # Dielectric constant of the He\n", + "n = 2.69e+025; # Atomic density of He, atoms/meter-cube\n", + "eps_0 = 8.85e-012; # Electric permability of the free space, C-square/N-meter-square\n", + "E = 1; # Electric field strength, V/m\n", + "\n", + "#Calculations\n", + "p = (eps_0*(K-1)*E)/n; # Dipole moment induced in He, C-m\n", + "\n", + "#Result\n", + "print \"The dipole moment induced in each He atom = %4.2e C-m \"%p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dipole moment induced in each He atom = 2.43e-41 C-m \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7, Page 650" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K = 1.000134; # Dielectric constant of the neon\n", + "n = 2.69e+25; # Atomic density of argon,atoms/meter-cube\n", + "eps_0 = 8.85e-12; # Electric Permability in the free space, C-square/N-meter-square\n", + "E = 90e+03; # External electric field, V/m\n", + "\n", + "#Calculations\n", + "p = eps_0*(K-1)*E/n; # Dipole moment induced in each neon atom, C-m\n", + "alpha = p/E; # Atomic polarizability of neon gas, C-metre-square/V\n", + "\n", + "#Results\n", + "print \"The induced dipole moment of noen atom = %4.2e C-m\"%p\n", + "print \"The electronic polarizability of neon gas = %3.1e C-m-square/V \"%alpha\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The induced dipole moment of noen atom = 3.97e-36 C-m\n", + "The electronic polarizability of neon gas = 4.4e-41 C-m-square/V \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8, Page 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K = 1.0024; # Dielectric constant of the argon\n", + "n = 2.7e+25; # Atomic density of argon,atoms/meter-cube\n", + "eps_0 = 8.85e-12; # Electric Permability in the free space, C-square/N-meter-square\n", + "\n", + "#Calculations\n", + "alpha = eps_0*(K-1)/n;\n", + "\n", + "#Result\n", + "print \"The electronic polarizability of argon atom = %4.1e C-m-square/V \"%alpha\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electronic polarizability of argon atom = 7.9e-40 C-m-square/V \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.9, Page 651" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "K = 2.24; # Dielectric constant \n", + "eps_0 = 8.85e-12; # Electric permability in the free space, C-square/N-meter-square\n", + "rho = 1.6e+003; # Density of CCl4, kg/meter-cube\n", + "M = 156; # Molecular weight of CCl4\n", + "E = 1e+007; # External electric field strength, V/m\n", + "N_A = 6.02e+26; # Avogadro's number, per kmol\n", + "\n", + "#Calculations\n", + "rho_M = rho*N_A/M; # Molecular density of CCl4\n", + "p = eps_0*(K-1)*E/rho_M; # Individual dipole moment of CCL4 molecule, C-m\n", + "\n", + "#Result\n", + "print \"Individual dipole moment of CCL4 molecule = %4.2e C-m \"%p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Individual dipole moment of CCL4 molecule = 1.78e-32 C-m \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.10, Page 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "K = 1.0000684; # Dielectric constant of He at 1 atm\n", + "n = 2.7e+25; # Density of He at 1 atm and 273 K, atoms/meter-cube\n", + "\n", + "#Calculations\n", + "# The atomic polarizibility, alpha = eps_0*(K-1)/n \n", + "# In terms of atomic radius, alpha = 4*%pi*eps_0*R^3 so, we have\n", + "R = ((K-1)/(4*pi*n))**(1./3); # Radius of He atom, m\n", + "\n", + "#Result\n", + "print \"The atomic radius of He = %4.2e m \"%R\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The atomic radius of He = 5.86e-11 m \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.11, Page 652" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "mu = 1.5; # Optical index of refraction of NaCl crystal\n", + "K = 5.6; # Static dielectric constant of NaCl crystal\n", + "\n", + "#Calculations\n", + "P_IP = (1-((mu**2-1)*(K+2))/((mu**2+2)*(K-1)))*100;\n", + "\n", + "#Result\n", + "print \"The percentage of ionic polarizibility in NaCl crystal = %4.1f percent \"%P_IP\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage of ionic polarizibility in NaCl crystal = 51.4 percent \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.12, Page 653" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "K_B = 1.38e-23; # Boltzmann constant, J/mol/K\n", + "T = 300; # Room temperature, K \n", + "eps_0 = 8.85e-12; # Electric permittivity of free space, F/m\n", + "N_A = 6.0e+23; # Avogadro's number\n", + "\n", + "#Calculations\n", + "n2 = N_A*1000; # Number of molecules of non-polar substance in 1000 cc volume\n", + "p_0 = sqrt((9*K_B*T*eps_0*0.023)/n2); # Dipole moment of polar molecules, C-m\n", + "\n", + "#Result\n", + "print \"The dipole moment of polar molecules = %4.3e C-m\"%p_0\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dipole moment of polar molecules = 3.555e-30 C-m\n" + ] + } + ], + "prompt_number": 31 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_14.ipynb b/Applied_Physics_for_Engineers/Chapter_14.ipynb new file mode 100755 index 00000000..c52df589 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_14.ipynb @@ -0,0 +1,652 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14: Solid State Electronics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.1, Page 718" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "mu_h = 0.048; # Mobility of holes, metre square/volt-s\n", + "mu_e = 0.135; # Mobility of electrons, metre square/volt-s \n", + "\n", + "#Calculations\n", + "# For P-type semiconductor\n", + "rho_p = 1e-01; # Resistivity of P type silicon, omh-m\n", + "# As rho_p = 1/(e*N_a*mu_h), solving for N_a\n", + "N_a = 1/(e*rho_p*mu_h); # Density of acceptor atoms, per metre cube\n", + "# For N-type semiconductor\n", + "rho_n = 1e-01; # Resistivity of N type silicon, omh-m\n", + "# As rho_n = 1/(e*N_d*mu_h), solving for N_d\n", + "N_d = 1/(e*rho_n*mu_e); # Density of donor atoms, per metre cube\n", + "\n", + "#Results\n", + "print \"Density of acceptor atoms = %4.2e per metre cube\"%N_a\n", + "print \"Density of donor atoms = %4.2e per metre cube\"%N_d #incorrect answer in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Density of acceptor atoms = 1.30e+21 per metre cube\n", + "Density of donor atoms = 4.63e+20 per metre cube\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.2, Page 718" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "mu_e = 0.36; # Mobility of an electron, metre square/V-s\n", + "mu_h = 0.17; # Mobility of a hole, metre square/V-s\n", + "n_i = 2.5e+018; # Intrinsic concentration of Ge sample, per metre cube\n", + "\n", + "#Calculations\n", + "sigma = e*n_i*(mu_h+mu_e); # Electrical conductivity of Ge sample, mho per metre\n", + "rho = 1/sigma; # Electrical resistivity of Ge, ohm-m\n", + "\n", + "#Results\n", + "print \"The electrical conductivity of intrinsic germanium sample = %5.3f mho/m\"%sigma\n", + "print \"The electrical resistivity of intrinsic germanium sample = %3.1f ohm-m\"%rho\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electrical conductivity of intrinsic germanium sample = 0.212 mho/m\n", + "The electrical resistivity of intrinsic germanium sample = 4.7 ohm-m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.3, Page 719" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "mu_e = 0.13; # Mobility of an electron, metre square/V-s\n", + "mu_h = 0.05; # Mobility of a hole, metre square/V-s\n", + "n_i = 1.5e+016; # Intrinsic concentration of Si, per metre cube\n", + "\n", + "#Calculations\n", + "# Pure Si\n", + "sigma = e*n_i*(mu_h+mu_e); # Electrical conductivity of Si, mho per metre\n", + "# Pure Si doped with donor impurity\n", + "n_e = 5e+028/1e+09; # Concentration of electrons, per metre cube\n", + "sigma_n = e*n_e*mu_e; # Electrical conductivity of Si doped with donor impurity, mho per metre\n", + "# Pure Si doped with acceptor impurity\n", + "n_h = 5e+028/1e+09; # Concentration of holes, per metre cube\n", + "sigma_p = e*n_h*mu_h; # Electrical conductivity of Si doped with acceptor impurity, mho per metre\n", + "\n", + "#Results\n", + "print \"The electrical conductivity of pure Si = %4.2e mho/m\"%sigma\n", + "print \"The electrical conductivity of Si doped with donor impurity = %4.2f mho/m\"%sigma_n\n", + "print \"The electrical conductivity of Si doped with acceptor impurity= %4.2f mho/m\"%sigma_p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electrical conductivity of pure Si = 4.32e-04 mho/m\n", + "The electrical conductivity of Si doped with donor impurity = 1.04 mho/m\n", + "The electrical conductivity of Si doped with acceptor impurity= 0.40 mho/m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.4, Page 720" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "Nd = 1; # For simplicity assume donor concentration to be unity, per metre cube\n", + "Nd_prime = 3*Nd; # Thrice the donor concentration, per metre cube\n", + "dE_CF1 = 0.5; # Energy difference between normal Fermi level and conduction level, eV\n", + "k_BT = 0.03; # Thermal energy at room temperature, eV\n", + "\n", + "#Calculations\n", + "# As Nd_prime/Nd = exp((dE_CF1 - dE_CF2))/k_BT, solving for dE_CF2\n", + "dE_CF2 = dE_CF1-k_BT*log(Nd_prime/Nd); # Energy difference between new postion of Fermi level and conduction level, eV\n", + "\n", + "#Result\n", + "print \"The new postion of Fermi level when donor concentration is trebled = %5.3f eV\"%dE_CF2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The new postion of Fermi level when donor concentration is trebled = 0.467 eV\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.5, Page 721" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "T = 300; # Room temperature, K\n", + "J0 = 300e-03; # Saturation current density of the pn junction diode, A/metre square\n", + "J = 1e+05; # Forward current density of pn junction diode, A/metre square\n", + "k_B = 1.38e-023; # Boltzmann constant, J/K\n", + "eta = 1; # Ideality factor for Ge diode\n", + "\n", + "#Calculations\n", + "# As J = J0*exp(e*V/(eta*k_B*T)), solving for V\n", + "V = eta*k_B*T/e*log(J/J0); # Voltage required to cause a forward current density in pn junction diode, volt\n", + "\n", + "#Results\n", + "print \"The voltage required to cause a forward current density in pn junction diode = %5.3f V\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage required to cause a forward current density in pn junction diode = 0.329 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.6, Page 721" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "T = 300; # Room temperature, K\n", + "J0 = 200e-03; # Saturation current density of the pn junction diode, A/metre square\n", + "J = 5e+04; # Forward current density of pn junction diode, A/metre square\n", + "k_B = 1.38e-023; # Boltzmann constant, J/K\n", + "eta = 1; # Ideality factor for Ge diode\n", + "\n", + "#Calculations\n", + "# As J = J0*exp(e*V/(eta*k_B*T)), solving for V\n", + "V = eta*k_B*T/e*log(J/J0); # Voltage required to cause a forward current density in pn junction diode, volt\n", + "\n", + "#Result\n", + "print \"The voltage required to cause a forward current density in pn junction diode = %5.3f V\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage required to cause a forward current density in pn junction diode = 0.322 V\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.7, Page 722" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "T = 300; # Room temperature, K\n", + "J0 = 300e-03; # Saturation current density of the pn junction diode, A/metre square\n", + "J = 1e+05; # Forward current density of pn junction diode, A/metre square\n", + "k_B = 1.38e-023; # Boltzmann constant, J/K\n", + "eta = 2; # Ideality factor for Ge diode\n", + "\n", + "#Calculations\n", + "# As J = J0*exp(e*V/(eta*k_B*T)), solving for V\n", + "V = eta*k_B*T/e*log(J/J0); # Voltage required to cause a forward current density in pn junction diode, volt\n", + "\n", + "#Result\n", + "print \"The voltage required to cause a forward current density in Si iode = %5.3f V\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage required to cause a forward current density in Si iode = 0.658 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.8, Page 723" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "I = 55e-03; # Forward current through Si diode, A\n", + "V = 3; # Forward bias across Si diode, V\n", + "eta = 2; # Ideality factor for Si diode\n", + "\n", + "#Calculations\n", + "R_dc = V/I; # Static diode resistance, ohm\n", + "R_ac = 0.026*eta/I; # Dynamic diode resistance, ohm\n", + "\n", + "#Results\n", + "print \"The static diode resistance = %4.1f ohm\"%R_dc\n", + "print \"The dynamic diode resistance = %5.3f ohm\"%R_ac\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The static diode resistance = 54.5 ohm\n", + "The dynamic diode resistance = 0.945 ohm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.9, Page 723" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "R_L = 1000; # Load resistance across HWR, ohm\n", + "V_rms = 200; # Rms value of voltage supply, V\n", + "\n", + "#Calculations\n", + "V0 = sqrt(2)*V_rms; # Peak value of voltage, V\n", + "I0 = V0/(R_L*1e-03); # Peak value of current, mA\n", + "I_dc = I0/pi; # Average value of current, mA\n", + "I_rms = I0/2; # Rms value of current, mA\n", + "V_dc = I_dc*R_L/1e+03; # Dc output voltage, V\n", + "PIV = V0; # Peak inverse voltage, V\n", + "\n", + "#Results\n", + "print \"The average value of current = %2d mA\"%I_dc\n", + "print \"The rms value of current = %5.1f mA\"%I_rms\n", + "print \"The dc output voltage = %2d V\"%(V_dc/1)\n", + "print \"PIV = %5.1f V\"%PIV\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average value of current = 90 mA\n", + "The rms value of current = 141.4 mA\n", + "The dc output voltage = 90 V\n", + "PIV = 282.8 V\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.10, Page 724" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "R_L = 980; # Load resistance across FWR, ohm\n", + "R_F = 20.; # Internal resistance of two crystal diodes in FWR, ohm\n", + "V_rms = 50; # Rms value of voltage supply, V\n", + "\n", + "#Calculations\n", + "V0 = sqrt(2)*V_rms; # Peak value of voltage, V\n", + "I0 = V0/((R_L+R_F)*1e-03); # Peak value of current, mA\n", + "I_dc = 2*I0/pi; # Average value of current, mA\n", + "I_rms = I0/sqrt(2); # Rms value of current, mA\n", + "V_dc = I_dc*R_L/1e+03; # Dc output voltage, V\n", + "eta = 81.2/(1+R_F/R_L); # Rectification efficiency\n", + "PIV = 2*V0; # Peak inverse voltage, V\n", + "\n", + "#Results\n", + "print \"The average value of current = %2d mA\"%I_dc\n", + "print \"The rms value of current = %2d mA\"%I_rms\n", + "print \"The dc output voltage = %4.1f V\"%(V_dc/1)\n", + "print \"The rectification efficiency = %4.1f percent\"%eta\n", + "print \"PIV = %5.1f V\"%PIV\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average value of current = 45 mA\n", + "The rms value of current = 50 mA\n", + "The dc output voltage = 44.1 V\n", + "The rectification efficiency = 79.6 percent\n", + "PIV = 141.4 V\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.11, Page 725" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "delta_IC = 1e-03; # Change in collector current, A\n", + "delta_IB = 50e-06; # Change in base current, A\n", + "\n", + "#Calculations\n", + "bta = delta_IC/delta_IB; # Base current amplification factor\n", + "alpha = bta/(1+bta); # Emitter current amplification factor\n", + "\n", + "#Results\n", + "print \"Alpha of BJT = %4.2f\"%alpha\n", + "print \"Beta of BJT = %2d\"%bta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Alpha of BJT = 0.95\n", + "Beta of BJT = 20\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.12, Page 725" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "I_E = 2; # Emitter current, mA\n", + "alpha = 0.88; # Emitter current amplification factor\n", + "\n", + "#Calculations\n", + "I_C = alpha*I_E; # Collector current, mA\n", + "I_B = I_E - I_C; # Base current of BJT in CB mode, mA\n", + "\n", + "#Result\n", + "print \"The base current of BJT in CB mode = %4.2f mA\"%I_B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The base current of BJT in CB mode = 0.24 mA\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.13, Page 725" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "I_CBO = 12.5e-03; # Reverse saturation current, mA\n", + "I_E = 2; # Emitter current, mA\n", + "I_C = 1.97; # Collector current, mA\n", + "\n", + "#Calculations\n", + "# As I_C = alpha*I_E+I_CBO, solving for alpha\n", + "alpha = (I_C - I_CBO)/I_E; # Emitter current gain\n", + "I_B = I_E - I_C; # Base current, mA\n", + "\n", + "#Results\n", + "print \"The emitter current gain = %5.3f\"%alpha\n", + "print \"The base current = %4.2f mA\"%I_B\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The emitter current gain = 0.979\n", + "The base current = 0.03 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14, Page 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "alpha = 0.98; # Emitter current amplification factor\n", + "I_CBO = 5e-06; # Reverse saturation current, A\n", + "\n", + "#Calculations\n", + "bta = alpha/(1-alpha); # Emitter current amplification factor\n", + "I_CEO = 1/(1-alpha)*I_CBO; # Leakage current of BJT in CE mode, mA\n", + "\n", + "#Results\n", + "print \"The base current gain = %2g\"%bta\n", + "print \"The leakage current of BJT in CE mode = %4.2f mA\"%(I_CEO/1e-03)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The base current gain = 49\n", + "The leakage current of BJT in CE mode = 0.25 mA\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.15, Page 726" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R_i = 50; # Dynamic input resistance of PNP transistor, ohm\n", + "R_L = 5e+03; # Load resistance in collector circuit, ohm\n", + "alpha = 0.96; # Emitter current amplification factor\n", + "\n", + "#Calculations\n", + "A_v = alpha*R_L/R_i; # Voltage gain\n", + "A_p = alpha*A_v; # Power gain\n", + "\n", + "#Results\n", + "print \"The voltage gain = %2g\"%A_v\n", + "print \"The power gain = %2d\"%A_p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage gain = 96\n", + "The power gain = 92\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_15.ipynb b/Applied_Physics_for_Engineers/Chapter_15.ipynb new file mode 100755 index 00000000..7405f913 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_15.ipynb @@ -0,0 +1,483 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Digital Electronics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1, Page 771" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 25\n", + "\n", + "#Calculations\n", + "b = bin(n)\n", + "\n", + "#Result\n", + "print \"The binary equivalent of 25 is\",b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binary equivalent of 25 is 0b11001\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2, Page 771" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "def binary_decimal(ni): # Function to convert binary to decimal\n", + " deci = 0;\n", + " i = 0;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/10.)*10\n", + " ni = int(ni/10.);\n", + " deci = deci + rem*2**i;\n", + " i = i + 1;\n", + " return deci\n", + " \n", + "\n", + "def binfrac_decifrac(nf): # Function to convert binary fraction to decimal fraction\n", + " decf = 0;\n", + " i = -1;\n", + " while (i >= -3):\n", + " nf = nf*10;\n", + " rem = round(nf); \n", + " nf = nf-rem;\n", + " decf = decf + rem*2**i;\n", + " i = i - 1;\n", + " return decf\n", + " \n", + "\n", + "n = 101.101; # Initialize the binary number\n", + "n_int = int(n); # Extract the integral part\n", + "n_frac = n-n_int; # Extract the fractional part\n", + "\n", + "#Result\n", + "print \"Decimal equivalent of %7.3f = %5.3f\"%(n, binary_decimal(n_int)+binfrac_decifrac(n_frac))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decimal equivalent of 101.101 = 5.625\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3, Page 772" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "def octal_decimal(n): # Function to convert binary to decimal\n", + " dec = 0;\n", + " i = 0;\n", + " while (n != 0):\n", + " rem = n-int(n/10)*10; \n", + " n = int(n/10);\n", + " dec = dec + rem*8**i;\n", + " i = i + 1;\n", + " return dec\n", + "\n", + "n = 173; # Initialize the octal number\n", + "\n", + "#Result\n", + "print \"Decimal equivalent of %d = %d\"%(n, octal_decimal(n)); \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Decimal equivalent of 173 = 123\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.4, Page 772" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 278\n", + "\n", + "#Calculations\n", + "o = oct(n)\n", + "\n", + "#Result\n", + "print \"The octal equivalent of 278 is\",o" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The octal equivalent of 278 is 0426\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.5, Page 772" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n1 = '10001100'\n", + "n2 = '1011010111'\n", + "\n", + "#Calculations\n", + "x1 = hex(int(n1,2))\n", + "x2 = hex(int(n2,2))\n", + "\n", + "#Results\n", + "print \"The hexadecimal equivalent of 10001100 is\",x1\n", + "print \"The hexadecimal equivalent of 1011010111 is\",x2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hexadecimal equivalent of 10001100 is 0x8c\n", + "The hexadecimal equivalent of 1011010111 is 0x2d7\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.6, Page 772" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n = 72905\n", + "\n", + "#Calculations\n", + "h = hex(n)\n", + "\n", + "#Result\n", + "print \"The hexadecimal equivalent of 278 is\",h" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The hexadecimal equivalent of 278 is 0x11cc9\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.7, Page 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "x1 = 0b11101\n", + "x2 = 0b10111\n", + "\n", + "#Calculations\n", + "x = bin(x1+x2)\n", + "\n", + "#Result\n", + "print \"The required result is\",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required result is 0b110100\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.8, Page 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "def decimal_binary(ni): # Function to convert decimal to binary\n", + " bini = 0;\n", + " i = 1;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/2)*2; \n", + " ni = int(ni/2);\n", + " bini = bini + rem*i;\n", + " i = i * 10;\n", + " return bini\n", + "\n", + "def decifrac_binfrac(nf): # Function to convert binary fraction to decimal fraction\n", + " binf = 0; i = 0.1;\n", + " while (nf != 0):\n", + " nf = nf*2;\n", + " rem = int(nf); \n", + " nf = nf-rem;\n", + " binf = binf + rem*i;\n", + " i = i/10;\n", + " return binf\n", + "\n", + "def binary_decimal(ni): # Function to convert binary to decimal\n", + " deci = 0;\n", + " i = 0;\n", + " while (ni != 0):\n", + " rem = ni-int(ni/10)*10; \n", + " ni = int(ni/10);\n", + " deci = deci + rem*2.**i;\n", + " i = i + 1;\n", + " return deci\n", + "\n", + "def binfrac_decifrac(nf): # Function to convert binary fraction to decimal fraction\n", + " decf = 0;\n", + " i = -1;\n", + " while (i >= -3):\n", + " nf = nf*10;\n", + " rem = round(nf); \n", + " nf = nf-rem;\n", + " decf = decf + rem*2.**i;\n", + " i = i - 1;\n", + " return decf \n", + "\n", + "bin1 = 1011.11; # Initialize the first binary binber\n", + "bin2 = 1011.01; # Initialize the second binary binber\n", + "bin1_int = int(bin1); # Extract the integral part for first\n", + "bin1_frac = bin1-bin1_int; # Extract the fractional part for second\n", + "bin2_int = int(bin2); # Extract the integral part for first\n", + "bin2_frac = bin2-bin2_int; # Extract the fractional part for second\n", + "dec1 = binary_decimal(bin1_int)+binfrac_decifrac(bin1_frac);\n", + "dec2 = binary_decimal(bin2_int)+binfrac_decifrac(bin2_frac);\n", + "dec = dec1+dec2;\n", + "dec_int = int(dec);\n", + "dec_frac = dec-dec_int;\n", + "\n", + "#Result\n", + "print \"%7.2f + %7.2f = %8.2f\"%(bin1, bin2, decimal_binary(dec_int)+decifrac_binfrac(dec_frac))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "1011.11 + 1011.01 = 10111.00\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.9, Page 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "x1 = 0b0111\n", + "x2 = 0b1001\n", + "\n", + "#Calculations\n", + "x = bin(x1-x2)\n", + "\n", + "#Result\n", + "print \"The required result is\",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required result is -0b10\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.10, Page 773" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "x1 = 0b1101\n", + "x2 = 0b1100\n", + "\n", + "#Calculations\n", + "x = bin(x1*x2)\n", + "\n", + "#Result\n", + "print \"The required result is\",x\n", + "#Incorrect solution in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required result is 0b10011100\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.11, Page 774" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "x1 = 0b11001\n", + "x2 = 0b101\n", + "\n", + "#Calculations\n", + "x = bin(x1/x2)\n", + "\n", + "#Result\n", + "print \"The required result is\",x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required result is 0b101\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_16.ipynb b/Applied_Physics_for_Engineers/Chapter_16.ipynb new file mode 100755 index 00000000..43737f91 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_16.ipynb @@ -0,0 +1,431 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Crystal Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.1, Page 820" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "p = 1; q = 2; r = 3; # Coefficients of intercepts along three axes\n", + "\n", + "#Calculations\n", + "p_inv = 1./p; # Reciprocate the first coefficient\n", + "q_inv = 1./q; # Reciprocate the second coefficient\n", + "r_inv = 1./r; # Reciprocate the third coefficient\n", + "mul_fact = p*q*r; # Find l.c.m. of m,n and p\n", + "m1 = p_inv*mul_fact; # Clear the first fraction\n", + "m2 = q_inv*mul_fact; # Clear the second fraction\n", + "m3 = r_inv*mul_fact; # Clear the third fraction\n", + "\n", + "#Result\n", + "print \"The required miller indices are : (%d %d %d) \"%(m1,m2,m3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required miller indices are : (6 3 2) \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.2, Page 820" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "p = 2; q = 3; r = -4; # Coefficients of intercepts along three axes\n", + "\n", + "#Calculations\n", + "p_inv = 1./p; # Reciprocate the first coefficient\n", + "q_inv = 1./q; # Reciprocate the second coefficient\n", + "r_inv = 1./r; # Reciprocate the third coefficient\n", + "mul_fact = p*q*abs(r); # Find l.c.m. of m,n and p\n", + "m1 = p_inv*mul_fact; # Clear the first fraction\n", + "m2 = q_inv*mul_fact; # Clear the second fraction\n", + "m3 = r_inv*mul_fact; # Clear the third fraction\n", + "\n", + "#Result\n", + "print \"The miller indices of laticce plane are : (%d %d %d) \"%(m1,m2,m3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The miller indices of laticce plane are : (12 8 -6) \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.3, Page 821" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import numpy\n", + "\n", + "#Variable declaration\n", + "p = 3; q = 4; r = numpy.inf; # Coefficients of intercepts along three axes\n", + "\n", + "#Calculations\n", + "p_inv = 1./p; # Reciprocate the first coefficient\n", + "q_inv = 1./q; # Reciprocate the second coefficient\n", + "r_inv = 1./r; # Reciprocate the third coefficient\n", + "mul_fact = p*q; # Find l.c.m. of m,n and p\n", + "m1 = p_inv*mul_fact; # Clear the first fraction\n", + "m2 = q_inv*mul_fact; # Clear the second fraction\n", + "m3 = r_inv*mul_fact; # Clear the third fraction\n", + "\n", + "#Result\n", + "print \"The miller indices of the given planes are : (%d %d %d) \"%(m1,m2,m3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The miller indices of the given planes are : (4 3 0) \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.4, Page 822 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "p = 1.2; # First coefficient of intercept along X-axis, angstrom\n", + "a = 1.2\n", + "b = 1.8\n", + "c = 2.0; # Lattice parameters along three axes, angstrom\n", + "h = 2.\n", + "k = 3.\n", + "l = 1.; # Miller indices of lattice plane\n", + "\n", + "#Calculations\n", + "# As p:q:r = a/h:b/k:c/l, solving for q and r\n", + "q = p*(b/k)/(a/h); # Second coefficient of intercept along X-axis, angstrom \n", + "r = p*(c/l)/(a/h); # Third coefficient of intercept along X-axis, angstrom \n", + "\n", + "#Result\n", + "print \"The lengths of the intercepts on Y and Z axes are %3.1f angstrom and %3.1f angstrom respectively\"%(q, r)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lengths of the intercepts on Y and Z axes are 1.2 angstrom and 4.0 angstrom respectively\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.5, Page 822" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M = 58.5; # Molecular weight of NaCl, g-mole\n", + "rho = 2.198e+03; # Density of Nacl, kg per metre cube\n", + "n = 4; # No. of atoms per unit cell for an fcc lattice of NaCl crystal\n", + "NA = 6.023e+26; # Avogadro's No., atoms/k-mol\n", + "\n", + "#Calculations\n", + "# Volume of the unit cell is given by\n", + "# a^3 = M*n/(N*d)\n", + "# Solving for a\n", + "a = (n*M/(rho*NA))**(1./3); # Lattice constant of unit cell of NaCl\n", + "\n", + "#Result\n", + "print \"Lattice constant for the NaCl crystal = %4.2f angstrom\"%(a/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant for the NaCl crystal = 5.61 angstrom\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.6, Page 823" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "M = 119; # Molecular weight of KBr, g-mole\n", + "rho = 2.7; # Density of KBr, g per cm-cube\n", + "n = 4; # No. of atoms per unit cell for an fcc lattice of KBr crystal\n", + "NA = 6.023e+23; # Avogadro's No., atoms/mol\n", + "\n", + "#Calculations\n", + "# Volume of the unit cell is given by\n", + "# a^3 = M*n/(N*d)\n", + "# Solving for a\n", + "a = (n*M/(rho*NA))**(1./3); # Lattice constant of unit cell of KBr\n", + "\n", + "#Result\n", + "print \"Lattice constant for the KBr crystal = %4.2f angstrom\"%(a/1e-008)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant for the KBr crystal = 6.64 angstrom\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.7, Page 823" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "M = 63.5; # Molecular weight of Cu, g-mole\n", + "rho = 8.96; # Density of Cu, g per cm-cube\n", + "n = 4; # No. of atoms per unit cell for an fcc lattice of Cu \n", + "NA = 6.023e+23; # Avogadro's No., atoms/mol\n", + "\n", + "#Calculations\n", + "# Volume of the unit cell is given by\n", + "# a^3 = M*n/(N*d)\n", + "# Solving for a\n", + "a = (n*M/(rho*NA))**(1./3); # Lattice constant of unit cell of Cu\n", + "d = a/sqrt(2); # Distance between the two nearest Cu atoms, angstrom \n", + "\n", + "#Results\n", + "print \"Lattice constant for the Cu crystal = %4.2f angstrom\"%(a/1e-008)\n", + "print \"The distance between the two nearest Cu atoms = %4.2f angstrom\"%(d/1e-008)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Lattice constant for the Cu crystal = 3.61 angstrom\n", + "The distance between the two nearest Cu atoms = 2.55 angstrom\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.8, Page 824" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "a = 1; # For simplicity assume lattice parameter of cubic crystal to be unity, unit\n", + "# For (011) planes\n", + "h = 0; k = 1; l = 1; # Miller Indices for planes in a cubic crystal\n", + "d_011 = a/(h**2+k**2+l**2)**(1./2); # The interplanar spacing for cubic crystals, m\n", + "print \"The interplanar spacing between consecutive (011) planes = a/sqrt(%d)\"%(1/d_011**2)\n", + "\n", + "# For (101) planes\n", + "h = 1; k = 0; l = 1; # Miller Indices for planes in a cubic crystal\n", + "d_101 = a/(h**2+k**2+l**2)**(1./2); # The interplanar spacing for cubic crystals, m\n", + "print \"The interplanar spacing between consecutive (101) planes = a/sqrt(%d)\"%(1/d_101**2)\n", + "\n", + "# For (112) planes\n", + "h = 1; k = 1; l = 2; # Miller Indices for planes in a cubic crystal\n", + "d_112 = a/(h**2+k**2+l**2)**(1./2); # The interplanar spacing for cubic crystals, m\n", + "print \"The interplanar spacing between consecutive (112) planes = a/sqrt(%d)\"%(1/d_112**2) #incorrect answer in textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The interplanar spacing between consecutive (011) planes = a/sqrt(2)\n", + "The interplanar spacing between consecutive (101) planes = a/sqrt(2)\n", + "The interplanar spacing between consecutive (112) planes = a/sqrt(5)\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.9, Page 824" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "a = 4.2e-010; # Lattice parameter of cubic crystal, m\n", + "h = 3; k = 2; l = 1; # Miller Indices for planes in a cubic crystal\n", + "\n", + "#Calculations\n", + "d_321 = a/(h**2+k**2+l**2)**(1./2); # The interplanar spacing for cubic crystals, m\n", + "\n", + "#Result\n", + "print \"The interplanar spacing between consecutive (321) planes = %4.2f angstrom\"%(d_321/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The interplanar spacing between consecutive (321) planes = 1.12 angstrom\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.10, Page 825" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "a = 2.5\n", + "b = 2.5\n", + "c = 1.8; # Lattice parameter of tetragonal crystal, angstrom\n", + "h = 1\n", + "k = 1\n", + "l = 1; # Miller Indices for planes in a tetragonal crystal\n", + "\n", + "#Calculations\n", + "d_hkl = 1/sqrt((h/a)**2+(k/b)**2+(l/c)**2); # The interplanar spacing for tetragonal crystals, m\n", + "\n", + "#Result\n", + "print \"The interplanar spacing between consecutive (111) planes = %4.2f angstrom\"%d_hkl\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The interplanar spacing between consecutive (111) planes = 1.26 angstrom\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_17.ipynb b/Applied_Physics_for_Engineers/Chapter_17.ipynb new file mode 100755 index 00000000..960efeee --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_17.ipynb @@ -0,0 +1,677 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Nuclear Physics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.1, Page 888" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "m_n = 1.675e-027; # Mass of the neutron, kg\n", + "m_p = 1.672e-027; # Mass of the proton, kg\n", + "M_D = 3.343e-027; # Mass of the deutron, kg\n", + "c = 3e+08; # Speed of light, m/s\n", + "\n", + "#Calculations\n", + "delta_m = m_n + m_p - M_D; # Mass defect in the formation of deuterium, kg\n", + "BE = delta_m*c**2; # Binding energy of the deuterium, J\n", + "BE_bar = BE/2; # Binding energy per nucleon of deuterium, J\n", + "\n", + "#Result\n", + "print \"Binding energy per nucleon for the deutron = %5.3f MeV\"%(BE_bar/(e*1e+06))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Binding energy per nucleon for the deutron = 1.125 MeV\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.2, Page 889" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "amu = 931.5; # Energy equivalent of 1 amu, MeV\n", + "m_n = 1.008665; # Mass of the neutron, amu\n", + "m_p = 1.007825; # Mass of the proton, amu\n", + "M_He = 4.002870; # Mass of the heluim nucleus, amu\n", + "c = 3e+08; # Speed of light, m/s\n", + "\n", + "#Calculations\n", + "BE = (2*m_n+2*m_p - M_He)*amu; # Binding energy for the alpha particle, MeV\n", + "\n", + "#Result\n", + "print \"The binding energy for the alpha particle = %2d MeV\"%BE\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The binding energy for the alpha particle = 28 MeV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.4, Page 890" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "\n", + "print \"Values of Z for different values of A are:\"\n", + "for A in range(7,11):\n", + " Z = A/(2+0.015*A**(2./3))\n", + " print round(Z,2),\n", + "\n", + "print \"\\n\\nSince 4.36 is closer to 3, 4Be9 is more stable\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Values of Z for different values of A are:\n", + "3.41 3.88 4.36 4.83 \n", + "\n", + "Since 4.36 is closer to 3, 4Be9 is more stable\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.5, Page 891" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "from sympy import *\n", + "c2 = Symbol('c2')\n", + "\n", + "#Calculations\n", + "#For N14O17\n", + "Q1 = (14.00753+4.00206)*c2-(17.00450+1.00814)*c2\n", + "print \"Since, Q = \",Q1, \"which is negative, the reaction is endothermic\"\n", + "#For Li7He4\n", + "Q2 = (7.01822+1.00814)*c2-(4.00206+4.00206)*c2\n", + "print \"Since, Q = \",Q2, \"which is negative, the reaction is endothermic\"\n", + "#Answers differ due to rounding-off errors in Sympy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since, Q = -0.00305000000000177*c2 which is negative, the reaction is endothermic\n", + "Since, Q = 0.02224*c2 which is negative, the reaction is endothermic\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.7, Page 892" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "mp = 1.00814 #amu\n", + "mn = 1.00898 #amu\n", + "Mp = 30.98356 #amu\n", + "Msi = 30.98515 #amu\n", + "\n", + "#Calculations\n", + "Q = Mp+mn-Msi-mp #amu\n", + "Q = Q*931.5 #MeV\n", + "Eth = Q*(-(Mp+mn)/Mp)\n", + "\n", + "#Result\n", + "print \"Threshold frequency = %.3fMeV\"%Eth\n", + "#Rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Threshold frequency = 0.721MeV\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.8, Page 892\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Q = -7.6342 #MeV\n", + "Mp = 19.0457 #amu\n", + "mi = 1.0087 #amu\n", + "me = 1.00728 #amu\n", + "Ki = 15\n", + "\n", + "#calculations\n", + "Ke = (Q*Mp-(mi-Mp)*Ki)/(me+Mp)\n", + "Eth = Q*(-(Mp+mn)/Mp)\n", + "\n", + "#Result\n", + "print \"Kinetic energy of protons = %.3f MeV\"%Ke\n", + "print \"Threshold frequency = %.3f MeV\"%Eth" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy of protons = 6.241 MeV\n", + "Threshold frequency = 8.039 MeV\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.9, Page 893" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "N_A = 6.023e+023; # Avogadro's number\n", + "E_f = 200*1e+06*e; # Energy released per fission, J\n", + "\n", + "#Calculations\n", + "E_mol = E_f*N_A; # Energy released by one mole of U235, J\n", + "E = E_mol*1000/235; # Energy released by the fission of 1 kg of U235, J\n", + "\n", + "#Result\n", + "print \"The Energy released by the fission of 1 kg of U235 = %4.2e kWh\"%(E/(1000*3600))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Energy released by the fission of 1 kg of U235 = 2.28e+07 kWh\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.10, Page 894" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "E = 3.2e+07; # Energy released per second by the reactor, J\n", + "\n", + "#Calculations\n", + "E_f = 200*1e+06*e; # Energy released per fission, J\n", + "N = E/E_f; # Number of fissions per second of U235, per second\n", + "\n", + "#Result\n", + "print \"The number of U235 atoms undergoing fissions per second = %1.0e\"%N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of U235 atoms undergoing fissions per second = 1e+18\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.11, Page 894" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "N_A = 6.023e+026; # Avogadro's number, per kmol\n", + "P = 2; # Power produced by the fission of U235, watt\n", + "\n", + "#Calculations\n", + "E_f = 200*1e+06*e; # Energy released per fission, J\n", + "FR = P/E_f; # Fission rate of U235, fission/sec\n", + "N = 0.5/235*N_A; # Number of U235 nuclei in 0.5 kg of U235\n", + "E = 200*N; # Energy released in the complete fissioning of 0.5 kg of U235, MeV\n", + "\n", + "#Results\n", + "print \"The fission rate of U235 = %4.2e fissions/sec\"%FR\n", + "print \"The energy released in the complete fissioning of 0.5 kg of U235 = %1.0e kcal\"%(E*1e+06*e/(1000*4.186))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fission rate of U235 = 6.25e+10 fissions/sec\n", + "The energy released in the complete fissioning of 0.5 kg of U235 = 1e+10 kcal\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.12, Page 894" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "R_max = 0.6; # Radius of two dees of the cyclotron, m\n", + "B = 1.6; # Strength of pole pieces of the cyclotron, tesla\n", + "# For proton\n", + "m = 1.67e-027; # Mass of the proton, kg\n", + "q = 1.6e-019; # Charge on a proton, C\n", + "\n", + "#Calculations&Result\n", + "E = 1./2*q**2*R_max**2*B**2/(m*e*1e+06); # Energy of the proton, MeV\n", + "f_proton = q*B/(2*pi*m*1e+06); # Cyclotron oscillator frequency for the proton, MHz\n", + "print \"Energy of the proton = %5.2f MeV\"%E\n", + "print \"Cyclotron frequency for proton = %5.2f MHz\"%f_proton\n", + "# For deuteron\n", + "m = 2*1.67e-027; # Mass of the deuteron, kg\n", + "q = 1.6e-019; # Charge on a deuteron, C\n", + "E = 1./2*q**2*R_max**2*B**2/(m*e*1e+06); # Energy of the deuteron, MeV\n", + "f_deuteron = q*B/(2*pi*m*1e+06); # Cyclotron oscillator frequency for the deuteron, MHz\n", + "print \"Energy of the deuteron = %5.2f MeV\"%E\n", + "print \"Cyclotron frequency for deuteron = %5.2f MHz\"%f_deuteron\n", + "# For alpha-particle\n", + "m = 4*1.67e-027; # Mass of the alpha-particle, kg\n", + "q = 2*1.6e-019; # Charge on a alpha-particle, C\n", + "E = 1./2*q**2*R_max**2*B**2/(m*e*1e+06); # Energy of the deuteron, MeV\n", + "f_alpha = q*B/(2*pi*m*1e+06); # Cyclotron oscillator frequency for the alpha-particle, MHz\n", + "print \"Energy of the alpha-particle = %5.2f MeV\"%E\n", + "print \"Cyclotron frequency for alpha-particle = %5.2f MHz\"%f_alpha\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of the proton = 44.15 MeV\n", + "Cyclotron frequency for proton = 24.40 MHz\n", + "Energy of the deuteron = 22.07 MeV\n", + "Cyclotron frequency for deuteron = 12.20 MHz\n", + "Energy of the alpha-particle = 44.15 MeV\n", + "Cyclotron frequency for alpha-particle = 12.20 MHz\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.13, Page 895" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.67e-013; # Energy equivalent of 1 eV, J/eV\n", + "R_max = 0.75; # Radius of two dees of the cyclotron, m\n", + "f = 15e+06; # Frequency of alternating potential, Hz\n", + "m = 1.67e-027; # Mass of the proton, kg\n", + "\n", + "#Calculations\n", + "# As E = 1/2*q^2*R_max^2*B^2/(m*e) and f = q*B/(2*%pi*m), solving for E\n", + "E = (2*pi**2*m*f**2*R_max**2)/(e);\n", + "\n", + "#Result\n", + "print \"Energy of the protons issuing out of the cyclotron = %6.4f MeV\"%E\n", + "#Incorrect answer in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy of the protons issuing out of the cyclotron = 24.9824 MeV\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.14, Page 896" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C \n", + "c = 3e+08; # Speed of light, m/s\n", + "B_orbit = 0.5; # Magnetic field at the orbit of the betatron, T\n", + "f = 60; # Operating frequency of the betatron, Hz\n", + "\n", + "#Calculations\n", + "omega = 2*pi*f; # Angular frequency of operation, rad/s\n", + "r = 1.6/2; # Radius of stable orbit, m\n", + "K_av = 4*omega*e*r**2*B_orbit/1.6e-019; # Average energy gained by the electron per turn, eV\n", + "K_max = c*e*r*B_orbit/1.6e-019; # Maximum energy gained by the eectron, eV\n", + "\n", + "#Results\n", + "print \"The average energy gained by the electron per turn = %5.1f eV\"%K_av\n", + "print \"The maximum energy gained by the electron = %5.1e eV\"%K_max\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average energy gained by the electron per turn = 482.5 eV\n", + "The maximum energy gained by the electron = 1.2e+08 eV\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.15, Page 896" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "q = 1.6e-019; # Charge on a deuteron, C \n", + "amu = 931.5; # Energy equivalent of 1 amu, MeV\n", + "m0 = 2.0141; # Rest mass of a deuteron, kg\n", + "B0 = 1.5; # Magnetic field at the centre of the synchrocyclotron, T\n", + "B = 1.431; # Magnetic field at the periphery of the synchrocyclotron, T \n", + "\n", + "#Calculations\n", + "f0 = q*B0/(2*3.14*m0*1.67e-027*1e+06); # Maximum frequency of Dee voltage of synhrocyclotron, MHz\n", + "f = 1e+07; # Minimum frequency of Dee voltage, Hz \n", + "m = (q*B)/(2*3.14*f*1.67e-027); # Mass of deuteron at the periphery of the Dee, amu\n", + "K = (m-m0)*amu; # Gain in energy of the deuteron, MeV\n", + "\n", + "#Results\n", + "print \"The maximum frequency of Dee voltage = %5.2f MHz\"%f0\n", + "print \"The gain in energy of the deuteron = %6.2f MeV\"%K\n", + "#Incorrect answer in textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum frequency of Dee voltage = 11.36 MHz\n", + "The gain in energy of the deuteron = 157.47 MeV\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.16, Page 897" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "V = 1000; # Operating voltage of the GM counter, volt\n", + "a = 1e-04 # Radius of GM counter wire, m\n", + "b = 2e-02; # Radius of cathode, m\n", + "\n", + "#Calculations\n", + "E = V/(2.3026*a*log10(b/a)); # Maximum radial field at the surface of central wire of GM tube, V/m\n", + "tau = 1e+09; # Life time of GM tube, counts\n", + "N = tau/(50*60*60*2000); # Life of the GM counter, years\n", + "\n", + "#Results\n", + "print \"The maximum radial field at the surface of central wire of GM tube = %4.2e V/m\"%E\n", + "print \"The life of the GM counter = %4.2f years\"%N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum radial field at the surface of central wire of GM tube = 1.89e+06 V/m\n", + "The life of the GM counter = 2.78 years\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.17, Page 898" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "I = 15.7; # Ionization potential of argon in GM counter, volt\n", + "a = 0.012/2*1e-02; # Radius of GM counter wire, m\n", + "b = 5./2*1e-02; # Radius of cathode, m\n", + "lamda = 7.8e-006; # Mean free path of argon in GM counter, m\n", + "\n", + "#Calculations\n", + "# As E*lambda = I = V*lambda/(2.3026*a*log10(b/a)), solving for V\n", + "V = 2.3026*a*I*log10(b/a)/lamda; # Voltage that must be applied to produce an avalanche in GM tube, volt\n", + "\n", + "#Result\n", + "print \"The voltage that must be applied to produce an avalanche in GM tube = %6.2f volt\"%V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The voltage that must be applied to produce an avalanche in GM tube = 728.52 volt\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17.18, Page 898" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "count_err = 1e-03; # Fractional error in counting\n", + "m = 3; # Plateau slope\n", + "\n", + "#Calculations\n", + "delta_V = count_err*100/m*100; # Maximum permissible voltage fluctuation in a GM counter, volt\n", + "\n", + "#Result\n", + "print \"The maximum permissible voltage fluctuation in a GM counter = %3.1f volts\"%delta_V\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum permissible voltage fluctuation in a GM counter = 3.3 volts\n" + ] + } + ], + "prompt_number": 51 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_19.ipynb b/Applied_Physics_for_Engineers/Chapter_19.ipynb new file mode 100755 index 00000000..0897c570 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_19.ipynb @@ -0,0 +1,294 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Superconductivity" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.1, Page 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T_c = 6.2; # Critical temperature of lead in superconducting state, K\n", + "T = 4; # Temperature at which critical field of lead is to be found out, K\n", + "H_c0 = 0.064; # Critical field for lead at 0 K, MA/m\n", + "\n", + "#Calculation\n", + "H_cT = H_c0*(1-(T/T_c)**2); # Critical field for lead at 4 K, MA/m\n", + "\n", + "#Result\n", + "print \"The critical field for lead at 4 K = %5.3f MA/m\"%H_cT\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical field for lead at 4 K = 0.037 MA/m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.2, Page 959" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "T_c1 = 4.153; # Critical temperature of mercury for its one isotope, K\n", + "M1 = 200.59; # Mass of first isotope of mercury, amu\n", + "M2 = 204; # Mass of second isotope of mercury, amu \n", + "\n", + "#Calculation \n", + "# From isotopic effect of superconductivity,\n", + "# T_c2/T_c1 = sqrt(M1/M2), solving for T_c2\n", + "T_c2 = T_c1*sqrt(M1/M2); # Critical temperature of mercury for second isotope, K\n", + "\n", + "#Result\n", + "print \"The critical temperature of mercury for its isotope of mass 204 amu = %5.3f K\"%T_c2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical temperature of mercury for its isotope of mass 204 amu = 4.118 K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.3, Page 960" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d = 1e-003; # Diameter of aluminium wire, m\n", + "r = d/2; # Radius of aluminium wire, m\n", + "H_c = 7.9e+003; # Critical magnetic field for Al, A/m\n", + "\n", + "#Calculation\n", + "I_c = 2*3.14*r*H_c; # Critical current through superconducting aluminium wire, A\n", + "\n", + "#Result\n", + "print \"The critical current through superconducting aluminium wire = %6.3f A\"%I_c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical current through superconducting aluminium wire = 24.806 A\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.4, Page 960" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T_c = 7.18; # Critical temperature of lead in superconducting state, K\n", + "H_c0 = 6.5e+004; # Critical field for lead at 0 K, A/m\n", + "# At T = 4.2 K\n", + "T = 4.2; # Temperature at which critical field of lead is to be found out, K\n", + "H_cT = H_c0*(1-(T/T_c)**2); # Critical field for lead at 4 K, A/m\n", + "d = 1e-003; # Diameter of lead wire, m\n", + "r = d/2; # Radius of lead wire, m\n", + "I_c = 2*3.14*r*H_cT; # Critical current through superconducting lead wire, A\n", + "J_c = I_c/(3.14*r**2); # Critical current density for superconducting lead wire, A/Sq. meter\n", + "print \"The critical current density at %3.1f K = %5.3e A/Sq.m\"%(T, J_c)\n", + "# At T = 7 K\n", + "T = 7; # Temperature at which critical field of lead is to be found out, K\n", + "H_cT = H_c0*(1-(T/T_c)**2); # Critical field for lead at 4 K, A/m\n", + "d = 1e-003; # Diameter of lead wire, m\n", + "r = d/2; # Radius of lead wire, m\n", + "I_c = 2*3.14*r*H_cT; # Critical current through superconducting lead wire, A\n", + "J_c = I_c/(3.14*r**2); # Critical current density for superconducting lead wire, A/Sq. meter\n", + "print \"The critical current density at %3.1f K = %4.2e A/Sq.m\"%(T, J_c)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical current density at 4.2 K = 1.710e+08 A/Sq.m\n", + "The critical current density at 7.0 K = 1.29e+07 A/Sq.m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.5, Page 961" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T1 = 3; # Initial temperature of lead wire, K\n", + "T2 = 7.1; # Final temperature of lead wire, K\n", + "lambda1 = 39.6; # Initial London penetration depth for lead, mm\n", + "lambda2 = 173; # Final London penetration depth for lead, mm\n", + "\n", + "#Calculations\n", + "# As lambda_T = lambda_0*(1-(T/T_c)^4)^(-1/2) so\n", + "# (lambda1/lambda2)^2 = (T_c^4 - T2^4)/(T_c^4 - T1^4)\n", + "# Solving for T_c\n", + "T_c = ((T2**4-T1**4*(lambda1/lambda2)**2)/(1-(lambda1/lambda2)**2))**(1./4);\n", + "\n", + "#Result\n", + "print \"The critical temperature of lead = %5.3f K\"%T_c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical temperature of lead = 7.193 K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.6, Page 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T_c = 7.2; # Critical temperature of lead in superconducting state, K\n", + "T = 5; # Temperature at which lead loses its superconducting state, K\n", + "H_cT = 3.3e+004; # Critical magnetic field for superconducting lead at 5 K, A/m\n", + "\n", + "#Calculation\n", + "# As H_cT = H_c0*(1-(T/T_c)^2), solving for H_c0\n", + "H_c0 = H_cT/(1-(T/T_c)**2); # Critical field for lead at 0 K, A/m \n", + "\n", + "#Result\n", + "print \"The critical magnetic field for lead at 0 K = %4.2e A/m\"%H_c0\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical magnetic field for lead at 0 K = 6.37e+04 A/m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19.7, Page 962" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "H_c0 = 2e+005; # Critical field for niobium at 0 K, A/m \n", + "H_cT = 1e+005; # Critical magnetic field for superconducting niobium at 5 K, A/m\n", + "T = 8; # Temperature at which lead loses its superconducting state, K\n", + "\n", + "#Calculation\n", + "# As H_cT = H_c0*(1-(T/T_c)^2), solving for T_c\n", + "T_c = T/(1-H_cT/H_c0)**(1./2);\n", + "\n", + "#Result\n", + "print \"The critical temperature for niobium = %6.3f K\"%T_c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The critical temperature for niobium = 11.314 K\n" + ] + } + ], + "prompt_number": 7 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_2.ipynb b/Applied_Physics_for_Engineers/Chapter_2.ipynb new file mode 100755 index 00000000..b9063ed3 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_2.ipynb @@ -0,0 +1,442 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Quantum Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1, Page 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "V = 50; # Given potential difference, V\n", + "\n", + "#Calculations\n", + "lamda = 12.24/sqrt(V); # Wavelength of the light, angstrom\n", + "\n", + "#Result\n", + "print \"The de-broglie wavelength of electron = %4.2f angstrom\"%lamda\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de-broglie wavelength of electron = 1.73 angstrom\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.2, Page 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "h = 6.62e-34; # Planck's constant, J-s\n", + "m0 = 1.6e-27; # Rest mass of proton, kg\n", + "c = 3.0e+8; # Speed of light, in m/s\n", + "v = c/20; # Velocity of the proton, in m/s\n", + "\n", + "#Calculations\n", + "lamda = (h*sqrt(1-v**2/c**2))/(m0*v);\n", + "\n", + "#Result\n", + "print \"The de broglie wavelength associated with the proton = %4.2e m\"%lamda\n", + "#answer differs due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The de broglie wavelength associated with the proton = 2.75e-14 m\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.3, Page 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "c = 3.0e+8; # Speed of light, m/s\n", + "v = 2.0e+8; # Velocity of the proton, m/s\n", + "m0 = 1.6e-27; # Rest mass of proton, kg\n", + "h = 6.62e-34; # Plancks constant,J-s\n", + "\n", + "#Calculations\n", + "lamda = (h*sqrt(1-(v**2/c**2)))/(m0*v);\n", + "\n", + "#Result\n", + "print \"The wavelength of matter wave associated with the proton = %5.3e m\"%lamda\n", + "\n", + "#answer differs due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of matter wave associated with the proton = 1.542e-15 m\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.5, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "a = 0.003; # Accuracy of the electron,in percent\n", + "s = 5e+03; # Speed of the electron,in m/s\n", + "del_v = (a/100)*s; # Change in velocity,in m/s\n", + "m0 = 9.1e-31; # Rest mass of the electron,in kg\n", + "hcut = 1.054e-34; # Plancks constant,J-s\n", + "\n", + "#Calculations\n", + "del_x = hcut/(2*del_v*m0);\n", + "\n", + "#Result\n", + "print \"The uncertainity in the position of the electron = %4.2e m\"%del_x\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainity in the position of the electron = 3.86e-04 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.6, Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "del_t = 2.5e-14; # Lifetime of the hydrogen atom in excited state\n", + "hcut = 1.054e-34; # Planck's constant,in J-s\n", + "e = 1.6e-19; # Charge on electron,in C\n", + "\n", + "#Calculations\n", + "del_E = hcut/(2*del_t*e); # Energy of the state, in eV\n", + "\n", + "#Result\n", + "print \"The minimum error in measurement of lifetime of excited state of hydrogen atom = %6.4f eV\"%del_E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum error in measurement of lifetime of excited state of hydrogen atom = 0.0132 eV\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.7, Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "del_x = 1e-09; # Uncertainty in position of the electron, m\n", + "m0 = 9.1e-031; # Rest mass of an electron, kg\n", + "hcut = 1.054e-034; # Planck's constant,in J-s\n", + "\n", + "#Calculations\n", + "del_v = hcut/(2*del_x*m0); # Uncertainity in velocity of the electron\n", + "\n", + "#Result\n", + "print \"The uncertainity in the velocity of an electron = %4.2e m/s\"%del_v\n", + "#Incorrect answer in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The uncertainity in the velocity of an electron = 5.79e+04 m/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.8, Page 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "hcut = 1.054e-34; # Reduced Planck's constant, Js\n", + "v = 3e+07; # Velocity of the electron, m/s\n", + "c = 3e+08; # Speed of light in vacuum, m/s\n", + "m0 = 9.1e-31; # Rest mass of an electron, kg\n", + "del_v = 3e+08; # Uncertainty in velocity of the electron, m/s\n", + "\n", + "#Calculations\n", + "del_x = (hcut*sqrt(1-v**2/c**2))/(2*m0*del_v);\n", + "\n", + "#Result\n", + "print \"The smallest possible uncertainity in position of the electron = %6.4f angstrom\"%(del_x/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The smallest possible uncertainity in position of the electron = 0.0019 angstrom\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.9, Page 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "n = 1;\n", + "m0 = 9.1e-031; # Mass of the electron, kg\n", + "a = 1e-10; # Width of the box, m\n", + "h = 6.63e-034; # Planck's constant, J-s\n", + "\n", + "#Calculations\n", + "E = n**2*h**2/(8*m0*a**2);\n", + "\n", + "#Result\n", + "print \"The energy of the electron moving in 1D infinetly high potential box = %5.2e J\"%E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of the electron moving in 1D infinetly high potential box = 6.04e-18 J\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.10, Page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "#n = [1,2]; # Shell numbers for two lowest permitted energy of the electron \n", + "m0 = 9.1e-31; # Mass of the electron, kg\n", + "a = 2.5e-10; # Width of the box, m\n", + "h = 6.63e-34; # Planck's constant, J-s\n", + "e = 1.6e-19; # Charge on electron, C\n", + "\n", + "#Calculations&Results\n", + "E = round((h**2)/(8*m0*a**2*e));\n", + "for n in range(1,3):\n", + " print \"The lowest two permitted energy values of an electron are\"\n", + " print E*n**2,\"eV\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest two permitted energy values of an electron are\n", + "6.0 eV\n", + "The lowest two permitted energy values of an electron are\n", + "24.0 eV\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.11, Page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "m0 = 1.67e-27; # Rest mass,in kg\n", + "a = 1e-14; # Size of the box\n", + "h = 6.63e-34; # Planck's constant,in J-s\n", + "n = 1; # Quantum number for lowest energy state\n", + "\n", + "#Calculations\n", + "E_n = n**2*h**2/(8*m0*a**2);\n", + "\n", + "#Result\n", + "print \"The lowest energy of the neutron confined to the nucleus = %4.2e J\"%E_n\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lowest energy of the neutron confined to the nucleus = 3.29e-13 J\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.12, Page 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "m0 = 9.1e-31; # Rest mass, kg\n", + "a = 1e-10; # Length of the box, m\n", + "h = 6.62e-34; # Planck's constat, J-s\n", + "n1 = 1; # Ground state\n", + "n2 = 2; # First excited state\n", + "e = 1.6e-19; # Charge on electron, C\n", + "\n", + "#Calculations\n", + "E1 = (n1**2*h**2)/(8*m0*a**2*e);\n", + "E2 = (n2**2*h**2)/(8*m0*a**2*e);\n", + "del_E = E2-E1; \n", + "\n", + "#Result\n", + "print \"The energy difference between the ground state and the first excited state = %5.1f eV\"%del_E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy difference between the ground state and the first excited state = 112.9 eV\n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_3.ipynb b/Applied_Physics_for_Engineers/Chapter_3.ipynb new file mode 100755 index 00000000..074f94b3 --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_3.ipynb @@ -0,0 +1,581 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: Statistical Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "m = 5.32e-26; # Mass of one oxygen molecule, kg\n", + "k_B = 1.38e-23; # Boltzmann constant, J/K\n", + "T = 200; # Temperature of the system, K\n", + "v = 100; # Speed of the oxygen molecules, m/s\n", + "dv = 1; # Increase in speed of the oxygen molecules, m/s\n", + "\n", + "#Calculations\n", + "P = 4*pi*(m/(2*pi*k_B*T))**(3./2)*exp((-m*v**2)/(2*k_B*T))*v**2*dv;\n", + "\n", + "#Result\n", + "print \"The probability that the speed of oxygen molecule is %4.2e\"%P\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability that the speed of oxygen molecule is 6.13e-04\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2, Page 132" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "A = 32; # Gram atomic mass of oxygen, g/mol\n", + "N_A = 6.023e+026; # Avogadro's number, per kmol\n", + "m = A/N_A; #mass of the molecule, kg\n", + "k_B = 1.38e-23; # Boltzmann constant, J/K \n", + "T = 273; # Temperature of the gas, K\n", + "\n", + "#Calculations&Results\n", + "v_av = 1.59*sqrt(k_B*T/m); # Average speed of oxygen molecule, m/s\n", + "print \"The average speed of oxygen molecule is = %3d m/s\"%v_av\n", + "v_rms = 1.73*sqrt(k_B*T/m); # The mean square speed of oxygen molecule, m/s \n", + "print \"The root mean square speed of oxygen gas molecule is = %3d m/s\"%(ceil(v_rms))\n", + "v_mp = 1.41*sqrt(k_B*T/m); # The most probable speed of oxygen molecule, m/s \n", + "print \"The most probable speed of oxygen molecule is = %3d m/s\"%(ceil(v_mp)) #incorrect answer in the textbook\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The average speed of oxygen molecule is = 423 m/s\n", + "The root mean square speed of oxygen gas molecule is = 461 m/s\n", + "The most probable speed of oxygen molecule is = 376 m/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3, Page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "m_H = 2; # Gram molecular mass of hydrogen, g\n", + "m_O = 32.; # Gram molecular mass of oxygen, g\n", + "k_B = 1.38e-23; # Boltzmann constant, J/K \n", + "v_avO = 1.; # For simplicity average speed of oxygen gas molecule is assumed to be unity, m/s\n", + "v_avH = 2*v_avO; # The average speed of hydrrogen gas molecule, m/s\n", + "T_O = 300.; # Temperature of oxygen gas, K\n", + "\n", + "#Calculations\n", + "# As v_avO/v_av_H = sqrt(T_O/T_H)*sqrt(m_H/m_O), solving for T_H\n", + "T_H = (v_avH/v_avO*sqrt(m_H/m_O)*sqrt(T_O))**2; # Temperature at which the average speed of hydrogen gas molecules is the same as that of oxygen gas molecules, K\n", + "\n", + "#Result\n", + "print \"Temperature at which the average speed of hydrogen gas molecules is the same as that of oxygen gas molecules at 300 K = %2d\"%T_H\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at which the average speed of hydrogen gas molecules is the same as that of oxygen gas molecules at 300 K = 75\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4, Page 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "v_mp = 1; # Most probable speed of gas molecules, m/s\n", + "dv = 1.01*v_mp-0.99*v_mp; # Change in most probable speed, m/s\n", + "v = v_mp; # Speed of the gas molecules, m/s\n", + "\n", + "#Calculations\n", + "Frac = 4/sqrt(pi)*1/v_mp**3*exp(-v**2/v_mp**2)*v**2*dv; \n", + "\n", + "#Result\n", + "print \"The fraction of oxygen gas molecules within one percent of most probable speed = %5.3f\"%Frac\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fraction of oxygen gas molecules within one percent of most probable speed = 0.017\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5, Page 134" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Variable Declaration\n", + "n = 5.; # Number of distinguishable particles which are to be distributed among cells\n", + "n1 = [5, 4, 3, 3, 2]; # Possible occupancy of particles in first cell\n", + "n2 = [0 ,1, 2, 1, 2]; # Possible occupancy of particles in second cell\n", + "n3 = [0 ,0, 0, 1, 1]; # Possible occupancy of particles in third cell\n", + "BIG_W = 0.;\n", + "\n", + "\n", + "print(\"_____________________________________\");\n", + "print(\"n1 n2 n3 5/(n1!n2!n3!)\");\n", + "print(\"_____________________________________\");\n", + "for i in range(5):\n", + " W = math.factorial(n)/(math.factorial(n1[i])*math.factorial(n2[i])*math.factorial(n3[i]));\n", + " if BIG_W < W:\n", + " BIG_W = W;\n", + " ms = [n1[i], n2[i] ,n3[i]];\n", + "\n", + " print \"%d %d %d %d\"%(n1[i], n2[i], n3[i], W);\n", + "\n", + "print \"_____________________________________\";\n", + "print \"The macrostates of most probable distribution with thermodynamic probability %d are:\"%(BIG_W);\n", + "print \"(%d, %d, %d), (%d, %d, %d) and (%d, %d, %d)\"%(ms[0], ms[1], ms[2], ms[1], ms[2], ms[0],ms[2], ms[0], ms[1]);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "_____________________________________\n", + "n1 n2 n3 5/(n1!n2!n3!)\n", + "_____________________________________\n", + "5 0 0 1\n", + "4 1 0 5\n", + "3 2 0 10\n", + "3 1 1 20\n", + "2 2 1 30\n", + "_____________________________________\n", + "The macrostates of most probable distribution with thermodynamic probability 30 are:\n", + "(2, 2, 1), (2, 1, 2) and (1, 2, 2)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6, Page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "g1 = 4; # Intrinsic probability of first cell\n", + "g2 = 2; # Intrinsic probability of second cell\n", + "k = 2; # Number of cells \n", + "n = 8; # Number of distinguishable particles\n", + "n1 = 8; # Number of cells in first compartment\n", + "n2 = n - n1; # Number of cells in second compartment\n", + "\n", + "#Calculations\n", + "W = factorial(n)*1/factorial(n1)*1/factorial(n2)*(g1)**n1*(g2)**n2;\n", + "\n", + "#Result\n", + "print \"The thermodynamic probability of the macrostate (8,0) = %5d\"%W\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thermodynamic probability of the macrostate (8,0) = 65536\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7, Page 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#Variable Declaration\n", + "def st(val):\n", + " str1 = \"\"\n", + " if val == 3 :\n", + " str1 = 'aaa';\n", + " elif val == 2 :\n", + " str1 = 'aa'; \n", + " elif val == 1 :\n", + " str1 = 'a';\n", + " elif val == 0:\n", + " str1 = '0'; \n", + " return str1\n", + "\n", + "g = 3; # Number of cells in first compartment\n", + "n = 3; # Number of bosons\n", + "p = 3;\n", + "r = 1; # Index for number of rows\n", + "print(\"All possible meaningful arrangements of three particles in three cells are:\")\n", + "print(\"__________________________\");\n", + "print(\"Cell 1 Cell 2 Cell 3\");\n", + "print(\"__________________________\");\n", + "\n", + "for i in range(0,g+1):\n", + " for j in range(0,n+1):\n", + " for k in range(0,p+1):\n", + " if (i+j+k == 3):\n", + " print \"%4s %4s %4s\"%(st(i), st(j), st(k)); \n", + " print \"__________________________\";\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "All possible meaningful arrangements of three particles in three cells are:\n", + "__________________________\n", + "Cell 1 Cell 2 Cell 3\n", + "__________________________\n", + " 0 0 aaa\n", + " 0 a aa\n", + " 0 aa a\n", + " 0 aaa 0\n", + "__________________________\n", + " a 0 aa\n", + " a a a\n", + " a aa 0\n", + "__________________________\n", + " aa 0 a\n", + " aa a 0\n", + "__________________________\n", + " aaa 0 0\n", + "__________________________\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8, Page 136" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "g1 = 3; # Number of cells in first compartment\n", + "g2 = 4; # Number of cells in second compartment\n", + "k = 2; # Number of compartments\n", + "n1 = 5; # Number of bosons\n", + "n2 = 0; # Number of with no bosons\n", + "\n", + "#Calculations\n", + "W_50 = factorial(g1+n1-1)*factorial(g2+n2-1)/(factorial(n1)*factorial(g1-1)*factorial(n2)*factorial(g2-1));\n", + "\n", + "#Result\n", + "print \"The probability for the macrostate (5,0) is = %2d\"%W_50\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The probability for the macrostate (5,0) is = 21\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11, Page 138" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "r = 1.86e-10; # Radius of Na, angstrom\n", + "m = 9.1e-31; # Mass of electron,in kg\n", + "h = 6.62e-34; # Planck's constant, J-s\n", + "N = 2; # Number of free electrons in a unit cell of Na\n", + "\n", + "#Calculations\n", + "a = 4*r/sqrt(3); # Volume of Na, m\n", + "V = a**3; # Volume of the unit cell of Na, meter cube\n", + "E = h**2/(2*m)*(3*N/(8*pi*V))**(2./3);\n", + "\n", + "#Result\n", + "print \"The fermi energy of the Na at absolute zero is = %4.2e J\"%E\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fermi energy of the Na at absolute zero is = 5.02e-19 J\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12, Page 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "m = 9.1e-31; # mass of electron, kg\n", + "h = 6.62e-34; # Planck's constant, J-s\n", + "V = 108/10.5*1e-06; # Volume of 1 gm mole of silver, metre-cube\n", + "N = 6.023e+023; # Avogadro's number\n", + "\n", + "#Calculations\n", + "E_F = h**2/(2*m)*(3*N/(8*pi*V))**(2./3); # Fermi energy at absolute zero, J\n", + "\n", + "#Result\n", + "print \"The fermi energy of the silver at absolute zero = %4.2e J\"%E_F\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fermi energy of the silver at absolute zero = 8.80e-19 J\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13, Page 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "pbe = 24.2e22 #electrons/cm^3\n", + "pcs = 0.91e22 #electrons/cm^3\n", + "efbe = 14.44 #ev\n", + "\n", + "#Calculations\n", + "Efcs = efbe*((pcs/pbe)**(2./3))\n", + "\n", + "#Result\n", + "print \"Fermi energy of free electrons in cesium = %.3f eV\"%Efcs\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fermi energy of free electrons in cesium = 1.621 eV\n" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14, Page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "m = 9.1e-31; # Mass of the elecron, kg \n", + "h = 6.63e-34; # Planck's constant, Js\n", + "EF = 4.72*e; # Fermi energy of free electrons in Li, J\n", + "\n", + "#Calculations\n", + "rho = 8*pi/3*(2*m*EF/h**2)**(3./2); # Electron density at absolute zero, electrons/metre-cube\n", + "\n", + "#Result\n", + "print \"The electron density in lithium at absolute zero = %4.2e electrons/metre-cube\"%rho\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The electron density in lithium at absolute zero = 4.63e+28 electrons/metre-cube\n" + ] + } + ], + "prompt_number": 47 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15, Page 140" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "e = 1.6e-019; # Energy equivalent of 1 eV, J/eV\n", + "k_B = 1.38e-023; # Boltzmann constant, J/K\n", + "f_E = 0.01; # Probability that a state with energy 0.5 eV above the Fermi energy is occupied by an electron, eV \n", + "delta_E = 0.5; # Energy difference (E-Ef)of fermi energy, eV\n", + "\n", + "#Calculations\n", + "# Since f_E = 1/(exp((E-Ef)/(k_B*T))+1), solvinf for T \n", + "T = delta_E/(log((1-f_E)/f_E)*k_B/e); # Temperature at which the level above the fermi level is occupied by the electron, K\n", + "\n", + "#Result\n", + "print \"The temperature at which the level above the fermi level is occupied by the electron = %4d K\"%ceil(T)\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature at which the level above the fermi level is occupied by the electron = 1262 K\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_4.ipynb b/Applied_Physics_for_Engineers/Chapter_4.ipynb new file mode 100755 index 00000000..6943795a --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_4.ipynb @@ -0,0 +1,813 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Geometrical Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2, Page 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "r = 1; # For convenience assume radius of the circle to be unity, unit\n", + "alpha = 0.8*r; # Distance of light source from the centre of the spherical shell, unit\n", + "\n", + "#Calculations\n", + "cos_phi_by_2 = sqrt((alpha+1)/(4*alpha));\n", + "\n", + "#Result\n", + "print \"cos(phi/2) = %d/4\"%(cos_phi_by_2*4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cos(phi/2) = 3/4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3, Page 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f1 = 5.; # Focal length of thin convex lens, cm \n", + "f2 = 3.; # Focal length of thin convex lens, cm \n", + "d = 2.; # Separation between the lenses, cm\n", + "\n", + "#Calculations\n", + "F = (1./f1)+(1./f2)-(d/(f1*f2)); # Equivalent focal length of a combination of the two lenses, cm\n", + "\n", + "#Result\n", + "print \"The equivalent focal length of the combination of lenses = %3.1f cm\"%F\n", + "#incorrect answers in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent focal length of the combination of lenses = 0.4 cm\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4, Page 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "P1 = 5; # Power of first converging lens, diopter\n", + "P2 = 4; # Power of second converging lens, diopter\n", + "d = 0.1; # Separation distance between two lenses, cm\n", + "\n", + "#Calculations\n", + "P = P1+P2-d*P1*P2;\n", + "f = 1/P*100; # The corresponding value of the focal length of the lens combination, cm\n", + "\n", + "#Result\n", + "print \"The focal length of the combination of lenses of given powers = %5.2f cm\"%f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The focal length of the combination of lenses of given powers = 14.29 cm\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5, Page 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f1 = 30.; # Focal length first convex lens, cm \n", + "f2 = -50.; # Focal length of second convex lens, cm \n", + "d = 20.; # Separation distance between lenses, cm \n", + "\n", + "#Calculations\n", + "F = f1*f2/(f1+f2-d); # Equivalent focal length of a combination of the two lenses, cm\n", + "\n", + "#Result\n", + "print \"The equivalent focal length of the combination = %4.1f cm\"%F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent focal length of the combination = 37.5 cm\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7, Page 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f1 = 4.; # Focal length of thin convex lens, cm \n", + "f2 = 12.; # Focal length of thin convex lens, cm \n", + "d = 8.; # Separation distance between the lenses, cm\n", + "\n", + "#Calculations&Results\n", + "F = f1*f2/(f1+f2-d); # Equivalent focal length of the combination, cm\n", + "L1H1 = d*F/f2; # Distance of first principal point H1 from first lens, cm\n", + "print \"The distance of the first principal point H1 from the first lens = %d cm\"%L1H1\n", + "L2H2 = -d*F/f1; # Distance of first principal point H2 from second lens, cm\n", + "print \"The distance of the second principal point H2 from the second lens = %d cm\"%L2H2\n", + "L1F1 = -F*(1-d/f2); # Distance of first focal point F1 from first lens, cm\n", + "print \"The distance of the first focal point F1 from the first lens = %d cm\"%L1F1\n", + "L2F2 = F*(1-d/f1); # Distance of second focal point F2 from first lens, cm\n", + "print \"The distance of the second focal point F2 from the second lens= %d cm\"%L2F2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance of the first principal point H1 from the first lens = 4 cm\n", + "The distance of the second principal point H2 from the second lens = -12 cm\n", + "The distance of the first focal point F1 from the first lens = -2 cm\n", + "The distance of the second focal point F2 from the second lens= -6 cm\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8, Page 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f1 = 25.; # Focal length of thin convex lens, cm \n", + "f2 = -15.; # Focal length of thin concave lens, cm \n", + "d = 15.; # Separation distance between the lenses, cm \n", + "\n", + "#Calculations&Results\n", + "# We know that, F = f1*f2/f1+f2-d then\n", + "F = f1*f2/(f1+f2-d); # The equivalent focal length of the combination\n", + "L1H1 = d*F/f2; # The distance of the first principal point H1 from the first lens, cm\n", + "print \"The distance of the first principal point H1 from the first lens = %d cm\"%L1H1\n", + "L2H2 = -d*F/f1; # The distance of the second principal point H2 from the first lens, cm\n", + "print \"The distance of the second principal point H2 from the second lens = %d cm\"%L2H2\n", + "L1F1 = -F*(1-d/f2); # The distance of the first focal point F1 from the first lens, cm\n", + "print \"The distance of the first focal point H1 from the first lens = %d cm\"%L1F1\n", + "L2F2 = F*(1-d/f1); # The distance of the second principal point F2 from the first lens, cm\n", + "print \"The distance of the second focal point H2 from the second lens= %d cm\"%L2F2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance of the first principal point H1 from the first lens = -75 cm\n", + "The distance of the second principal point H2 from the second lens = -45 cm\n", + "The distance of the first focal point H1 from the first lens = -150 cm\n", + "The distance of the second focal point H2 from the second lens= 30 cm\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9, Page 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.linalg import solve\n", + "from numpy import *\n", + "\n", + "#Variable declaration\n", + "w1 = 0.024; # Magnitude of the print ersive power of first lens\n", + "w2 = 0.036; # Magnitude of the print ersive power of second lens\n", + "\n", + "#Calculations\n", + "# Let 1/f1 = x and 1/f2 = y, then\n", + "# The condition for achromatic combination of two lenses, w1/f1 + w2/f2 = 0 => w1*x + w2*y = 0 --- [i]\n", + "F = 90.; # Given focal length, cm\n", + "# Also F = 1/f1 + 1/f2 => F = x + y ---- (II)\n", + "A = array([[w1 ,w2],[ 1, 1]]); # Square matrix\n", + "B = array([0,1/F]); # Column vector\n", + "X = solve(A,B)\n", + "f1 = 1/X[0]; # Focal length of convex lens, cm\n", + "f2 = 1/X[1]; # Focal length of concave lens, cm\n", + "\n", + "#Results\n", + "print \"The focal length of convex lens = %.f cm\"%((f1))\n", + "print \"The focal length of concave lens = %.f cm\"%((f2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The focal length of convex lens = 30 cm\n", + "The focal length of concave lens = -45 cm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10, Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from scipy.linalg import solve\n", + "from numpy import *\n", + "\n", + "\n", + "#Variable declaration\n", + "w1 = 0.02; # Magnitude of the dispersive power of first lens\n", + "w2 = 0.04; # Magnitude of the dispersive power of second lens\n", + "\n", + "#Calculations\n", + "# Let 1/f1 = x and 1/f2 = y, then\n", + "# The condition for achromatic combination of two lenses, w1/f1 + w2/f2 = 0 => w1*x + w2*y = 0 --- (I)\n", + "F = 20.; # Given focal length of achromatic doublet, cm\n", + "# Also F = 1/f1 + 1/f2 => F = x + y ---- (II)\n", + "A = [[w1, w2], [1, 1]]; # Square matrix\n", + "B = [0,1/F]; # Column vector\n", + "X = solve(A,B); # Characteristic roots of the simultaneous equations, cm\n", + "f1 = 1/X[0]; # Focal length of convex lens, cm\n", + "f2 = 1/X[1]; # Focal length of concave lens, cm\n", + "\n", + "#Results\n", + "print \"The focal length of convex lens = %2d cm\"%(ceil(f1))\n", + "print \"The focal length of concave lens = %2d cm\"%(ceil(f2))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The focal length of convex lens = 10 cm\n", + "The focal length of concave lens = -20 cm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11, Page 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "from numpy import *\n", + "from scipy.linalg import solve\n", + "#Variable declaration\n", + "w1 = 0.017; # Magnitude of the print ersive power of first lens\n", + "w2 = 0.034; # Magnitude of the print ersive power of second lens\n", + "\n", + "\n", + "# Let 1/f1 = x and 1/f2 = y, then\n", + "# The condition for achromatic combination of two lenses, w1/f1 + w2/f2 = 0 => w1*x + w2*y = 0 --- [i]\n", + "F = 40.; # Given focal length of achromatic doublet, cm\n", + "# Also F = 1/f1 + 1/f2 => F = x + y ---- (II)\n", + "A = [[w1, w2],[ 1, 1]]; # Square matrix\n", + "B = [0,1/F]; # Column vector\n", + "X = solve(A,B); # Characteristic roots of the simulmath.taneous equations, cm\n", + "f1 = 1/X[0]; # Focal length of convex lens, cm\n", + "f2 = 1/X[1]; # Focal length of concave lens, cm\n", + "# For the convex lens\n", + "R2 = -25.; # Radius of curvature of the contact surface, cm \n", + "mu = 1.5; # Mean refractive index of crown glass\n", + "# From the Lens Maker formula, 1/f = (mu - 1)*(1/R1-1/R2), solving for R1\n", + "f = f1;\n", + "R1 = 1/(1/(f*(mu-1))+1/R2); # Radius of curvature of second surface of first lens, cm\n", + "print \"The radius of curvature of second surface of first lens = %5.2f cm\"%R1\n", + "# For the concave lens\n", + "R1 = -25.; # Radius of curvature of the contact surface, cm \n", + "mu = 1.7; # Mean refractive index of flint glass\n", + "# From the Lens Maker formula, 1/f = (mu - 1)*(1/R1-1/R2), solving for R1\n", + "f = f2;\n", + "R2 = 1/(1/R1-1/(f*(mu-1))); # Radius of curvature of second surface of second lens, cm\n", + "print \"The radius of curvature of second surface of second lens = %5.2f cm\"%R2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of curvature of second surface of first lens = 16.67 cm\n", + "The radius of curvature of second surface of second lens = -233.33 cm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12, Page 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "# For flint glass\n", + "mu_C = 1.665; # Refractive index of flint glass for C line\n", + "mu_F = 1.700; # Refractive index of flint glass for F line\n", + "\n", + "#Calculations\n", + "mu_D = (mu_F+mu_C)/2; # Refractive index of flint glass for D line\n", + "w2 = (mu_F-mu_C)/(mu_D-1); # Magnitude of the dispersive power of second lens of flint glass\n", + "# For crown glass\n", + "mu_C = 1.510; # Refractive index of crown glass for C line\n", + "mu_F = 1.536; # Refractive index of crown glass for F line\n", + "mu_D = (mu_F+mu_C)/2; # Refractive index of flint glass for D line\n", + "w1 = (mu_F-mu_C)/(mu_D-1); # Magnitude of the dispersive power of second lens of crown glass\n", + "f = 50.; # Focal length of acromatic doublet, cm\n", + "FD = f*(w2-w1)/w2; # Focal length of D line of the Fraunhofer spectrum due to convex lens of crown glass\n", + "FC = FD*(mu_D - 1)/(mu_C - 1); # Focal length of C component of converging lens, cm\n", + "\n", + "#Result\n", + "print \"The focal length of C component of converging lens = %4.2f cm\"%FC\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The focal length of C component of converging lens = 1.57 cm\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13, Page 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "F = 50.; # Equivalent focal length of combination of two lenses, cm\n", + "\n", + "#Calculations\n", + "#d = f1+f2/2, condition for no chromatic aberration (1)\n", + "#d = f2-f1, condition for minimum spherical aberration (2)\n", + "# From (1) and (2), f1 = 3*d/2, f2 = d/2\n", + "# As 1/F = 1/f1 + 1/f2 - d/(f1*f2), solving for d\n", + "d = 4./3*50; # Distance of separation betwen two lenses, cm\n", + "f1 = 3*d/2,\n", + "f2 = d/2;\n", + "\n", + "#Results\n", + "print \"f1 = %.f cm\"%(f1)\n", + "print \"f2 = %5.2f cm\"%(f2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f1 = 100 cm\n", + "f2 = 33.33 cm\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14, Page 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "mu_R = 1.5230; # Refractive index for red wavelength\n", + "mu_V = 1.5145; # Refractive index for violet wavelength\n", + "R1 = 40.; # Radius of curvature for red wavelength, cm\n", + "R2 = -10.; # Radius of curvature for violet wavelength, cm\n", + "\n", + "#Calculations\n", + "# As 1/f = (mu - 1)*(1/R1 - 1/R2), solving for fV and fR\n", + "fV = 1./((mu_V-1)*(1/R1-1/R2)); # Focal length for violet wavelength, cm \n", + "fR = 1./((mu_R-1)*(1/R1-1/R2)); # Focal length for violet wavelength, cm \n", + "l = fR - fV; # Longitudinal chromatic aberration, cm\n", + "\n", + "#Result\n", + "print \"The longitudinal chromatic aberration = %5.3f cm\"%(abs(l))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The longitudinal chromatic aberration = 0.253 cm\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15, Page 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "F = 10; # Equivalent focal length of a combination of two lenses, cm\n", + "d = 2; # Separation distance between two lenses, cm\n", + "\n", + "#Calculations\n", + "# As d = f1-f2, condition for minimum spherical aberration => f1 = d+f2\n", + "# and F = f1*f2/(f1+f2-d), so solving for f2\n", + "f2 = 2*F-d; # Focal length of second lens, cm\n", + "f1 = d+f2; # Focal length of first lens, cm\n", + "\n", + "#Result\n", + "print \"f1 = %2d cm, f2 = %2d cm\"%(f1, f2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f1 = 20 cm, f2 = 18 cm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16, Page 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "mu = 1.6; # Refractive index of aplanatic surface\n", + "R = 3.2; # Radius of curvature, cm\n", + "\n", + "#Calculations&Results\n", + "R1 = R/mu; # First radius of the aplanatic surface, cm \n", + "print \"R1 = %3.1f cm\"%R1\n", + "R2 = R*mu; # Second radius of the aplanatic surface, cm \n", + "print \"R2 = %4.2f cm\"%R2\n", + "#Since the image of an object at one aplanatic point will be formed by the sphere at the other aplantic point,so the is\n", + "m = mu**2; # The lateral magnification of the image\n", + "print \"The lateral magnification of the image = %4.2f\"%m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 = 2.0 cm\n", + "R2 = 5.12 cm\n", + "The lateral magnification of the image = 2.56\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17, Page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "mu = 1.52; # Refractive index of aplanatic surface\n", + "R = 30; # Radius of curvature, cm\n", + "\n", + "#Calculations&Results\n", + "R1 = R/mu; # First radius of the aplanatic surface, cm \n", + "print \"R1 = %5.2f cm\"%R1\n", + "R2 = R*mu; # Second radius of the aplanatic surface, cm \n", + "print \"R2 = %4.1f cm\"%R2\n", + "#Since the image of an object at one aplanatic point will be formed by the sphere at the other aplantic point,so the is\n", + "m = mu**2; # The lateral magnification of the image\n", + "print \"The lateral magnification of the image = %4.2f\"%m\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 = 19.74 cm\n", + "R2 = 45.6 cm\n", + "The lateral magnification of the image = 2.31\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18, Page 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "F = 5; # Equivalent focal length of Huygens eyepiece, cm\n", + "\n", + "#Calculations\n", + "# as f1 = 3*f, f2 = f and d = 2*f, therefore\n", + "f = 2./3*F; # Focal length of base lens, cm\n", + "f1 = 3*f; # Focal length of field lens, cm\n", + "\n", + "#Result\n", + "print \"The focal length of the field lens = %2d cm\"%f1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The focal length of the field lens = 10 cm\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19, Page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "f = 10; # Given focal length of each lens, cm\n", + "f1 = f; # Focal length of first lens, cm \n", + "f2 = f; # Focal length of second lens, cm\n", + "\n", + "#Calculations\n", + "d = 2./3*f; # Separation distance between two lenses, cm\n", + "F = f1*f2/(f1+f2-d); # Equivalent focal length of Ramsden eyepiece, cm\n", + "\n", + "#Result\n", + "print \"The equivalent focal length of the field lenses is = %3.1f cm\"%F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The equivalent focal length of the field lenses is = 7.5 cm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.20, Page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d = 10; # Distance between the two thin plano convex lenses in the Huygens eyepiece, \n", + "\n", + "#Calculations&Results\n", + "f = d/2; # Base focal length\n", + "f1 = 3*f; # Focal length of the first component lens, cm\n", + "print \"f1 = %d cm\"%f1\n", + "f2 = f; # Focal length of the second component lens, cm\n", + "print \"f2 = %d cm\"%f2\n", + "F = 3./2*f; # Equivalent focal length of the lens, cm\n", + "print \"F = %3.1f cm\"%F\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f1 = 15 cm\n", + "f2 = 5 cm\n", + "F = 7.5 cm\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21, Page 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "F = 4.2; # Equivalent focal length of Ramsden eyepiece, cm\n", + "#F = 3/4*f, Equivalent focal length of Ramsden eyepiece, \n", + "f = 5.6; #focal length,in cm\n", + "\n", + "#Calculations&Results\n", + "f1 = f;\n", + "f2 = f;\n", + "print \"f1 = %3.1f cm\"%f1\n", + "print \"f2 = %3.1f cm\"%f2\n", + "d = 2./3*f;\n", + "print \"d = %4.2f cm\"%d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f1 = 5.6 cm\n", + "f2 = 5.6 cm\n", + "d = 3.73 cm\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_5.ipynb b/Applied_Physics_for_Engineers/Chapter_5.ipynb new file mode 100755 index 00000000..4bf3ba3a --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_5.ipynb @@ -0,0 +1,1468 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Physical Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1, Page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "n1 = 10; # Order of interference maximum for lambda = 7000 angstrom\n", + "lambda1 = 7000; # Wavelength of the light, angstrom\n", + "lambda2 = 5000; # Wavelength of the light, angstrom\n", + "\n", + "#Calculations\n", + "# As W = D*lambda/(2*d) then, x = n1*D*lambda1/(2*d) = n2*D*lambda2/(2*d), solving for n2\n", + "n2 = n1*lambda1/lambda2; # Order of interference maximum for lambda = 5000 angstrom\n", + "\n", + "#Result\n", + "print \"The order of interference maximum for wavelength of 5000 angstrom = %2d \"%n2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The order of interference maximum for wavelength of 5000 angstrom = 14 \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2, Page 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "D = 1.6; # Distance between the slit and the screen, m\n", + "a = 0.4; # Distance between the slit and the biprism, m\n", + "mu = 1.52; # Refractive index of the material of biprism\n", + "W = 1e-004; # Fringe width, m\n", + "lamda = 5.893e-007; # Wavelength of light used, m\n", + "\n", + "#Calculations\n", + "# As W = lambda*D/(2*a(mu-1)*alpha then\n", + "alpha = ((lamda*D)/(2*a*(mu-1)*W))*180/pi; # Angle of biprism, degrees\n", + "\n", + "#Result\n", + "print \"The angle of the biprism = %3.1f degrees\"%alpha\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of the biprism = 1.3 degrees\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3, Page 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "lamda = 5.890e-7; # Wavelength of source of light, m \n", + "mu = 1.6; #refractive index of the mica sheet\n", + "\n", + "#Calculations\n", + "# As del_x = W*(mu-1)*t/lambda, where del_x = 3*W, solving for t\n", + "t = 3*lamda/(mu-1); # Thickness of the mica sheet, m \n", + "\n", + "#Result\n", + "print \"The thickness of the mica sheet = %5.3e cm\"%(t/1e-02)\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of the mica sheet = 2.945e-04 cm\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4, Page 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "lamda = 6.0e-7; # Wavelength of the monochromatic light, m\n", + "D = 1; # Distance between the screen and the two coherent sources, m \n", + "W = 5e-004; # Fringe width, m\n", + "\n", + "#Calculations\n", + "d = lamda*D/(W*1e-03); # Distance between two coherent sources, mm\n", + "\n", + "\n", + "print \"The distance between the two coherent sources = %3.1f mm\"%d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between the two coherent sources = 1.2 mm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5, Page 298" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "D = 1; # Distance between slits and the screen, m\n", + "mu = 1.5; # Refractive index of the material of biprism\n", + "a = 0.5; # The distance between the slit and the biprism, m \n", + "W = 1.35e-004; # Width of the fringes, m\n", + "\n", + "#Calculations\n", + "alpha = (180.-179.)/2*pi/180; # Acute angle of biprism, radian\n", + "lamda = 2*a*(mu-1)*alpha*W/D; # Wavelength of light used, m\n", + "\n", + "#Result\n", + "print \"The wavelength of light used = %4d angstrom\"%(lamda/1e-10)\n", + "#Incorrect answer in the textbook" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of light used = 5890 angstrom\n" + ] + } + ], + "prompt_number": 59 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6, Page 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "lamda = 6.328e-007; # Wavelength of the monochromatic light, m\n", + "D = 40; # Distance between the slits and the screen, m \n", + "W = 0.1; # Distance between the interference maxima, m\n", + "\n", + "#Calculations\n", + "d = lamda*D/W; # Distance between the slits, m\n", + "\n", + "#Result\n", + "print \"The distance between the slits = %6.4f mm\"%(d/1e-03)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between the slits = 0.2531 mm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7, Page 299" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "lamda = 5.0e-007; # Wavelength of the monochromatic light, m\n", + "D = 1; # Distance between the silts and the screen, m\n", + "d = 5e-004/2; # Half of the distance between the two slits, m\n", + "mu = 1.5; # Refractive index of glass\n", + "t = 1.5e-006; # Thickness of thin glass plate, m\n", + "\n", + "#Calculations\n", + "del_x = D*(mu-1)*t/(2*d);\n", + "\n", + "#Result\n", + "print \"The lateral shift of central maximum = %3.1f mm\"%(del_x/1e-03)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The lateral shift of central maximum = 1.5 mm\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8, Page 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable Declaration\n", + "lamda = 6.0e-007; # Wavelength of the light, m\n", + "mu = 1.463; # Refrctive index of a soap bubble film\n", + "n = 0; # Value of n for smallest thickness\n", + "r = 0; # Angle of refraction for normal incidence\n", + "\n", + "#Calculations\n", + "# As 2*mu*t*cos(r) = (2*n+1)*lambda/2, solving for t\n", + "t = (2*n+1)*lamda/(4*mu*cos(r)); # The thickness of a soap bubble film, m \n", + "\n", + "#Result\n", + "print \"The thickness of a soap bubble film = %5.1f angstrom\"%(t/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of a soap bubble film = 1025.3 angstrom\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9, Page 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration\n", + "D5 = 3.36e-003; # Diameter of Newton's 5th ring, m \n", + "D15 = 5.90e-003; # Diameter of Newton's 15th ring, m \n", + "m = 10; # Number of ring\n", + "R = 1; # Radius of the plano-convex lens, m\n", + "\n", + "#Calculations\n", + "lamda = (D15**2-D5**2)/(4*m*R);\n", + "\n", + "\n", + "print \"The wavelength of the light used = %4d angstrom\"%(lamda/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of the light used = 5880 angstrom\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10, Page 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "D10 = 0.005; # Diameter of Newton's 5th ring, m \n", + "n = 10; # Order of the ring\n", + "lamda = 6.0e-007; # Wavelength of the light used, m\n", + "\n", + "#Calculations&Results\n", + "R = (D10**2)/(4*n*lamda); # Radius of the curvature of the lens, m\n", + "print \"The radius of the curvature of the lens = %6.4f m\"%R\n", + "t = D10**2/(8*R); \n", + "print \"The thickness of the corresponding air film = %3.1e m\"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of the curvature of the lens = 1.0417 m\n", + "The thickness of the corresponding air film = 3.0e-06 m\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.11, Page 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu = 1.43; # Refractive index of the soap film\n", + "n = 0; # Order of fringes for smallest thickness\n", + "i = 30; # Angle of incidence, degrees\n", + "\n", + "#Calculations\n", + "# As sin(i)/sin(r) = mu, cos(r)\n", + "cosr = sqrt(1-(sin(i*pi/180)/mu)**2); # Cosine of angle r\n", + "lamda = 6.0e-007; # Wavelength of the light, m\n", + "t = (2*n+1)*lamda/(4*mu*cosr); # Thickness of the soap film, m\n", + "\n", + "#Result\n", + "print \"The thickness of the soap film = %4.2e m\"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of the soap film = 1.12e-07 m\n" + ] + } + ], + "prompt_number": 64 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12, Page 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lamda = 5.893e-007; # Wavelength of the sodium light, m\n", + "mu = 1.42; # Refractive index of the soap film\n", + "r = 0; # Angle of refraction, degrees\n", + "n = 0; # Order of diffraction for least thickness of dark film\n", + "\n", + "#Calculations&Result\n", + "t = (2*n+1)*lamda/(4*mu*cos(r)); # Least thickness of the film that will apear bright, m\n", + "print \"The least thickness of the film that will appear bright = %5.1f m\"%(t/1e-010)\n", + "n = 1; # Order of diffraction for least thickness of bright film\n", + "t = n*lamda/(2*mu*cos(r)); # Least thickness of the film that will apear dark, m \n", + "print \"The least thickness of the film that will appear dark = %6.2f m\"%(t/1e-010) #incorrect answer in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The least thickness of the film that will appear bright = 1037.5 m\n", + "The least thickness of the film that will appear dark = 2075.00 m\n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13, Page 302" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.893e-007; # Wavelength of the sodium light, m\n", + "\n", + "#Calculations\n", + "# As fringe width of the thin wedge-shaped air film is\n", + "# W = lambda/(2*t/20*W), solving for t\n", + "t = (10*lamda); # Thickness of the wire separating edges of two plane glass surfaces, m\n", + "\n", + "#Result\n", + "print \"The thickness of the wire = %5.3e m\"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of the wire = 5.893e-06 m\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.14, Page 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.9e-007; # Wavelength of the reflected light, m\n", + "n = 10; # Order of the ring\n", + "D10 = 0.005; # Diameter of the 10th ring,in m \n", + "\n", + "#Calculations&Result\n", + "R = (D10**2)/(4*n*lamda); # Radius of curvature of the lens, m\n", + "print \"The radius of curvature of the lens = %6.4f m\"%R\n", + "t = (D10**2)/(8*R); # Thickness of the corresponding air film, m\n", + "print \"The thickness of the corresponding air film = %4.2e m\"%t\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The radius of curvature of the lens = 1.0593 m\n", + "The thickness of the corresponding air film = 2.95e-06 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.16, Page 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lamda = 6.328e-007; # Wavelength of monochromatic light from He laser, m\n", + "n1 = 1; # First order \n", + "n2 = 2; # Second order\n", + "l = 6000; # Lines/cm of the diffraction grating\n", + "A= 1.66e-6;\n", + "\n", + "#Calculations&Result\n", + "theta = degrees(asin(n1*lamda/A));\n", + "print \"The first order maximum angle = %4.1f degrees\"%theta\n", + "theta = degrees(asin(n2*lamda/A));\n", + "print \"The second order maximum angle = %4.1f degrees\"%theta\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The first order maximum angle = 22.4 degrees\n", + "The second order maximum angle = 49.7 degrees\n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.17, Page 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "a = 1; # For simplicity assume slit width to be unity, unit\n", + "theta = 1; # For simplicity assume diffraction angle to be unity, unit\n", + "\n", + "#Calculations\n", + "# As a*sin(theta) = m*lambda, solving for lambdas\n", + "lambda1 = a*sin(theta); # First wavelength, angstrom\n", + "lambda2 = a*sin(theta)/2; # First wavelength, angstrom\n", + "\n", + "#Result\n", + "print \"lambda1 = %d*lambda2\"%(lambda1/lambda2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lambda1 = 2*lambda2\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.18, Page 305" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lamda = 5.5e-7; # Wavelength of light, m\n", + "a = 2.2e-6; # Width of the slit, m\n", + "l = 6000; # Lines /cm of the diffraction grating\n", + "# In a single slit diffraction pattern the directions of minimum intensity are given by a*sintheta = m*lambda where m = 1,2,3 \n", + "# For m = 1\n", + "\n", + "#Calculations&Results\n", + "m = 1; # First order\n", + "theta = degrees(asin((m*lamda)/a)); # Angular position of first minima on either side of the central maxima, degrees\n", + "print \"The angular position of first minima on either side of the central maxima = %.2f degrees\"%(theta)\n", + "\n", + "# For m = 2\n", + "m = 2; # Second order\n", + "theta = degrees(asin(m*lamda/a));\n", + "print \"The angular position of second minima on either side of the central maxima = %.2f degrees\"%(theta)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular position of first minima on either side of the central maxima = 14.48 degrees\n", + "The angular position of second minima on either side of the central maxima = 30.00 degrees\n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.19, Page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "D = 1.7; # Distance between the slit and the screen, m\n", + "W = 2.5e-003; # Given fringe width, m \n", + "a = 8e-005; # Width of the first slit, m\n", + "b = 4e-004; # Width of the second slit, m\n", + "n = b; # \n", + "p = [1, 2, 3, 4, 5, 6];\n", + "\n", + "#Calculations&Results\n", + "# In a double slit experiment Fraunhoffer diffraction pattern,the fringe width is given by W = lambda*D/n \n", + "lamda = b*W/D; # Wavelength of the light used, m\n", + "print \"The wavelength of light = %4d angstrom\"%(lamda/1e-010)\n", + "print \"The missing orders are:\\n\"\n", + "for i in range(1,6):\n", + " s = ((a+b)/a)*i;\n", + " print \"%d,\"%s,\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of light = 5882 angstrom\n", + "The missing orders are:\n", + "\n", + "6, 12, 18, 24, 30,\n" + ] + } + ], + "prompt_number": 94 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.20, Page 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "D = 2; # Distance of the screen from the slit, m\n", + "x = 1.6e-02; # Position of centre of the second dark band, m\n", + "m = 2; # Order of diffraction\n", + "a = 1.4e-04; # Width of the slit, m\n", + "\n", + "#Calculations\n", + "lamda = (a*x)/(m*D); # Wavelength of light, m\n", + "\n", + "#Result\n", + "print \"The wavelength of the light = %4d angstrom\"%((lamda/1e-010))\n", + "#rounding-off error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of the light = 5599 angstrom\n" + ] + } + ], + "prompt_number": 95 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.21, Page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lambda1 = 5890; # Wavelength of the line, angstrom\n", + "lambda2 = 5896; # Wavelength of the line, angstrom\n", + "\n", + "#Calculations\n", + "d_lambda = lambda2 - lambda1; # Wavelength difference, angstrom\n", + "n = 2; # Order of diffraction\n", + "N = lambda2/(n*d_lambda); # Minimum no. of lines in a grating\n", + "\n", + "#Result\n", + "print \"The minimum number of lines in the grating = %3d lines\"%N\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum number of lines in the grating = 491 lines\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.22, Page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lamda = 5.0e-07; # Wavelength of the radiation, m\n", + "a_plus_b = 2.54e-02/2620; # The grating element, m\n", + "theta_max = 90; # Maximum value of angle of diffraction, degrees\n", + "\n", + "#Calculations\n", + "n_max = a_plus_b/lamda*sin(theta_max*pi/180); # Maximum number of visible orders \n", + "\n", + "#Result\n", + "print \"The number of visible orders = %2d \"%n_max\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of visible orders = 19 \n" + ] + } + ], + "prompt_number": 96 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.23, Page 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lambda1 = 6000; # Wavelength of yellow line, angstrom\n", + "lambda2 = 4800; # Wavelength of blue line, angstrom\n", + "\n", + "#Calculations\n", + "#(a+b)sin(theta) = n*6000 ---1\n", + "#(a+b)sin(theta) = (n+1)*4800\n", + "#Comparing 1 and 2, we get the following,\n", + "n = 48./12\n", + "theta = 3./4; # Angle of diffraction, radian\n", + "a_plus_b = (n*lambda1)/theta\n", + "\n", + "#Results\n", + "print \"Grating element = %d A\"%a_plus_b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Grating element = 32000 A\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.26, Page 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import *\n", + "\n", + "#Variable declaration\n", + "n = 5; # Order for given wavelength\n", + "m = [4, 5, 6, 7, 8]; # Orders of spectral lines in the visible range\n", + "lambda1 = 6000; # Wavelength of the spectral line in visible range, angstrom\n", + "lambda2 = zeros(5);\n", + "\n", + "print \"The spectral lines in visible ranges are:\\n\"\n", + "for i in range(1,5):\n", + " l2 = (n*lambda1)/m[i];\n", + " lambda2[i] = l2; # Preserve the lambda value\n", + " print \"%4d angstrom\\n\"%(l2),\n", + "\n", + "print \"The other spectral lines in the visible range 4000A to 7000A are\"\n", + "for i in range(1,5):\n", + " if lambda2[i] < 7000 and lambda2[i] > 4000:\n", + " if lambda2[i] == 6000:\n", + " continue\n", + " #print \"%4dA\"%lambda2[i]\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spectral lines in visible ranges are:\n", + "\n", + "6000 angstrom\n", + "5000 angstrom\n", + "4285 angstrom\n", + "3750 angstrom\n", + "The other spectral lines in the visible range 4000A to 7000A are\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.27, Page 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "N = 4500; # Number of lines in grating\n", + "n = 2; # Order of diffraction\n", + "lambda1 = 5890; # Wavelength, angstrom\n", + "lambda2 = 5896; # Wavelength, angstrom\n", + "\n", + "#Calculations&Result\n", + "RP2 = n*N; # Resolving power of grating in the second order\n", + "lamda = (lambda1+lambda2)/2; # Mean wavelength of sodium light, angstrom\n", + "d_lambda = lambda2 - lambda1; # Wavelength difference, angstrom\n", + "RP = lamda/d_lambda; # Calculated resolving power of grating \n", + "if RP2 <> RP:\n", + " print(\"The D1 and D2 lines of Na light cannot be resolved in second order\");\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The D1 and D2 lines of Na light cannot be resolved in second order\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.28, Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.5e-07; # Wavelength of light used, m\n", + "f = 3.0; # Focal length of telescope objective, m \n", + "a = 0.01; # Diameter of the telescope objective, m\n", + "\n", + "#Calculations\n", + "# As x/f = 1.22*lambda/a, the Rayleigh criterian for resolution, solving for x\n", + "x = 1.22*f*lamda/a; # Distance between two stars just seen as separate, m\n", + "\n", + "\n", + "print \"The distance between two stars just seen as separate = %3.1e m \"%x\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between two stars just seen as separate = 2.0e-04 m \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.29, Page 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.461e-07; # Wavelength of light used, m\n", + "d = 4.0e-07; # Distance between the two luminous objects, m\n", + "\n", + "#Calculations\n", + "# As d = 1.22*lambda/(2*mu*sin(alpha)) = 1.22*lambda/(2*NA), solving for NA\n", + "NA = 1.22*lamda/(2*d); # Numerical aperature of the objective of microscope \n", + "\n", + "\n", + "print \"The numerical aperature of the objective of microscope = %5.3f \"%NA\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperature of the objective of microscope = 0.833 \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.30, Page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 6.0e-07; # Wavelength of light used, m\n", + "d_theta = 2.44e-06; # Angular separation between the two stars, radian\n", + "\n", + "#Calculations\n", + "a = 1.22*lamda/d_theta; # Aperature of the objective of a telescope from Rayleigh criterian, m\n", + "\n", + "\n", + "print \"The aperature of the objective of the telescope = %3.1f m \"%a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The aperature of the objective of the telescope = 0.3 m \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.31, Page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.5e-007; # Wavelength of light used, m\n", + "x = 1.5e-003; # Distance between the two pinholes, m\n", + "a = 4.0e-003; # Diameter of objective, m\n", + "\n", + "#Calculations\n", + "D = a*x/(1.22*lamda); # Minimum distance from the telescope at which the the pinhole can be resolved from Rayleigh criterian, m \n", + "\n", + "\n", + "print \"The minimum distance from the telescope at which the the pinhole can be resolved = %4.2f m \"%D\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum distance from the telescope at which the the pinhole can be resolved = 8.94 m \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.32, Page 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.461e-07; # Wavelength of light used, m\n", + "d = 5.55e-07; # Distance between the two luminous objects, m\n", + "\n", + "#Calculations\n", + "# As d = 1.22*lambda/(2*mu*sin(alpha)) = 1.22*lambda/(2*NA), solving for NA\n", + "NA = 1.22*lamda/(2*d); # Numerical aperature of the objective of microscope \n", + "\n", + "\n", + "print \"The numerical aperature of the objective of microscope = %4.2f \"%NA\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The numerical aperature of the objective of microscope = 0.60 \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.33, Page 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "i = 60; # Angle of incidence, degrees\n", + "mu = tan(i*pi/180); # Brewester's Law to calculate refractive index\n", + "A = 60*pi/180; # Angle of prism, degrees\n", + "\n", + "#Calculations\n", + "# As mu = sind((A+delta_m)/2)/sind(A/2), solving for delta_m\n", + "delta_m = 2*degrees(asin(mu*sin(A/2))) # Angle of minimum deviation for green light for its passage through a prism, degrees\n", + "\n", + "#Result\n", + "print \"The angle of minimum deviation for green light for its passage through a prism = %.f degrees\"%((delta_m-60))\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of minimum deviation for green light for its passage through a prism = 60 degrees\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.34, Page 313" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lamda = 5.89e-07; # Wavelength of light used, m\n", + "mu_O = 1.55; # Refractive index of ordinary light\n", + "mu_E = 1.54; # Refractive index of extraordinary light\n", + "\n", + "#Calculations\n", + "tQ = lamda/(4*(mu_O-mu_E)); # The thickness of the quarter wave plate, m\n", + "\n", + "\n", + "print \"The thickness of the quarter plate is = %6.4e m\"%tQ\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of the quarter plate is = 1.4725e-05 m\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.35, Page 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "theta = 9.9; # Optical rotation of solution, degrees\n", + "l = 20; # Length of the tube, cm\n", + "S = 66; # Specific rotation of pure sugar solution, degree per dm-(g/cc)\n", + "\n", + "#Calculations\n", + "# As the specific rotation, S = 10*theta/l*c, solving for c\n", + "c = 10*theta/(l*S); # Concentration of solution for pure sugar, g/cc\n", + "c_prime = 0.080; # Concentration of solution for impure sugar, g/cc\n", + "Percentage_purity = c*100/c_prime; # Percentage purity of sugar sample\n", + "\n", + "\n", + "print \"The percentage_purity of the sugar sample = %5.2f percent\"%Percentage_purity\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The percentage_purity of the sugar sample = 93.75 percent\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.36, Page 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "theta = 26.4; # Optical rotation of sugar solution, degrees\n", + "l = 20; # Length of the tube, cm\n", + "c = 0.20; # Concentration of the solution, g/cc\n", + "\n", + "#Calculations\n", + "S = 10*theta/(l*c); # The specific rotation of the sugar solution, degree per dm per (g/cc) \n", + "\n", + "\n", + "print \"The specific rotation of the sugar solution = %2d degrees\"%S\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific rotation of the sugar solution = 66 degrees\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.37, Page 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "# Function to convert degrees to deg-min\n", + "def deg_to_dms(deg):\n", + " d = int(deg)\n", + " md = abs(deg - d) * 60\n", + " md = round(md)\n", + " return [d, md]\n", + "\n", + "lamda = 7.62e-07; # Wavelength of the polarized light, m\n", + "mu_R = 1.53914; # Refractive index of quartz for right-handed circularly polarized light\n", + "mu_L = 1.53920; # Refractive index of quartz for left-handed circularly polarized light\n", + "t = 5.0e-004; # Thickness of the plate, m\n", + "\n", + "\n", + "theta = pi*t*(mu_L-mu_R)/lamda; # The angle of optical rotation, radian\n", + "d = deg_to_dms(theta*180/pi); # Call the conversion function\n", + "\n", + "\n", + "print \"The angle of rotation produced by its plate = \",d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angle of rotation produced by its plate = [7, 5.0]\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.38, Page 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "theta = 13.; # Optical rotation of the solution, degrees\n", + "l = 20.; # Length of the tube, cm\n", + "l_prime = 30.; # New length of the tube, cm\n", + "c = 1.; # For simplicity assume concentration of sugar solution to be unity, g/cc\n", + "\n", + "#Calculations\n", + "c_prime = c/3; # New concentration of sugar solution, g/cc\n", + "# As, S = 10*theta/(l*c) so 10*theta/(l*c) = 10*theta_prime/(l_prime*c_prime)\n", + "# Solving for theta_prime\n", + "theta_prime = theta/(l*c)*l_prime*c_prime; # The optical rotation produced by new length of sugar solution, degrees\n", + "\n", + "\n", + "print \"The optical rotation of %d cm length of sugar solution = %3.1f degrees\"%(l_prime, theta_prime)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The optical rotation of 30 cm length of sugar solution = 6.5 degrees\n" + ] + } + ], + "prompt_number": 49 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.39, Page 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "theta = 11.; # Optical rotation of sugar solution, degrees\n", + "l = 20; # Length of the tube, cm\n", + "S = 66; # Specific rotation of sugar solution, degrees\n", + "\n", + "#Calculations\n", + "c = theta*10/(l*S); # The concentration of sugar solution, g/cc\n", + "\n", + "\n", + "print \"The strength of the solution = %6.4f g/cc\"%c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The strength of the solution = 0.0833 g/cc\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.40, Page 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " #Variable declaration\n", + "theta = 20; # Optical rotation of sugar solution, degrees\n", + "theta_prime = 35.; # New optical rotation of sugar solution, degrees\n", + "c = 5; # Percentage concentration of the solution\n", + "c_prime = 10; # New percentage concentration of the solution\n", + "l = 1; # For simplicity assume length of the sugar solution to be unity\n", + "\n", + "#Calculations\n", + "l_prime = theta_prime*l*c/(c_prime*theta);\n", + "\n", + "\n", + "print \"The length of sugar solution for %d percent concentration and %d degrees optical rotation = %5.3f*l \"%(c_prime, theta_prime, l_prime)\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of sugar solution for 10 percent concentration and 35 degrees optical rotation = 0.875*l \n" + ] + } + ], + "prompt_number": 53 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_6.ipynb b/Applied_Physics_for_Engineers/Chapter_6.ipynb new file mode 100755 index 00000000..2e0b3f8c --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_6.ipynb @@ -0,0 +1,376 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: X-rays" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1, Page 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "i = 2e-003; # Current through X-ray tube, A\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "V = 12.4e+003; # Potential difference applied across X-ray tube, V \n", + "m0 = 9.1e-031; # Rest mass of the electron, Kg \n", + "\n", + "#Calculations&Results\n", + "n = i/e; # Number of electrons striking the target per second\n", + "print \"The number of electrons striking the target per sec = %4.2e electrons\"%n\n", + "v = sqrt(2*e*V/m0); # Velocity of the electrons, m/s\n", + "print \"The speed with which electrons strike the target = %4.2e m/s\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The number of electrons striking the target per sec = 1.25e+16 electrons\n", + "The speed with which electrons strike the target = 6.60e+07 m/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2, Page 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, C\n", + "V = 13.6e+003; # Potential difference applied across X-ray tube, V \n", + "m0 = 9.1e-031; # Rest mass of the electron, Kg \n", + "\n", + "#Calculations\n", + "v = sqrt(2*e*V/m0); # Velocity of the electron, m/s \n", + "\n", + "#Result\n", + "print \"The maximum speed with which the electrons strike the target = %4.2e m/s\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum speed with which the electrons strike the target = 6.92e+07 m/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3, Page 370" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "d = 2.82e-010; # Spacing of the rock-salt, m \n", + "n = 2; # Order of diffraction\n", + "\n", + "#Calculations\n", + "theta = pi/2; # Angle of diffraction, radian\n", + "# Braggs equation for X-rays of wavelength lambda is n*lambda = 2*d*sin(theta), solving for lambda\n", + "lamda = 2*d*sin(theta)/n; # Wavelength of X-ray using Bragg's law, m\n", + "\n", + "#Result\n", + "print \"The longest wavelength that can be analysed by a rock-salt crystal = %4.2f angstrom\"%(lamda/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The longest wavelength that can be analysed by a rock-salt crystal = 2.82 angstrom\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4, Page 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lamda = 3e-011; # Wavelength of the X-ray, m\n", + "d = 5e-011; # Lattice spacing, m \n", + "\n", + "#Calculations&Results\n", + "# Bragg's equation for X-rays of wavelength lambda is n*lambda = 2*d*sin(theta), solving for thetas\n", + "for n in range(2,4):\n", + " theta = degrees(asin((n*lamda)/(2*d))); \n", + " print \"For n = %d, theta = %.1f degrees\"%(n, theta)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For n = 2, theta = 36.9 degrees\n", + "For n = 3, theta = 64.2 degrees\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5, Page 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "lamda = 3.6e-011; # Wavelength of X-rays, m\n", + "n = 1; # Order of diffraction\n", + "theta = 4.8; # Angle of diffraction, degrees\n", + "\n", + "#Calculations\n", + "# Braggs equation for X-rays is n*lambda = 2*d*sin(theta), solving for d\n", + "d = n*lamda/(2*sin(theta*pi/180)); # Interplanar spacing, m\n", + "\n", + "#Result\n", + "print \"The interplanar separation of atomic planes in the crystal = %4.2f angstrom\"%(d/1e-010)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The interplanar separation of atomic planes in the crystal = 2.15 angstrom\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.6, Page 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "lambda1 = 0.71; # Wavelength of k alpha line in molybdenum, angstrom\n", + "Z1 = 42; # Atomic number of Mo\n", + "Z2 = 29; # Atomic number of Cu\n", + "\n", + "#Calculations\n", + "# Wavelength of characteristic X-ray for K-alpha spectral line is given by \n", + "# 1/lambda = 3/4*R*(Z-1)^2 then\n", + "lambda2 = lambda1*(Z1-1)**2/(Z2-1)**2; # The wavelength of K alpha radiation in copper, m\n", + "\n", + "#Result\n", + "print \"The wavelength of K-alpha radiation in copper = %4.2f angstrom\"%lambda2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of K-alpha radiation in copper = 1.52 angstrom\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7, Page 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "phi = pi/2; # Scattering angle, degrees\n", + "m0 = 9.1e-031; # Rest mass of an electron, kg\n", + "h = 6.62e-034; # Planck's constant, J-s\n", + "c = 3e+008; # Speed of light in vacuum, m/s \n", + "E = 8.16e-014; # Energy of gamma radiation, J\n", + "\n", + "#Calculations\n", + "lamda = h*c/(E*1e-010); # Wavelength of incident photon, angstrom \n", + "lambda_prime = lamda+h*(1-cos(phi*pi/180))/(m0*c*1e-010); # Wavelength of scattered photon, angstrom\n", + "\n", + "#Result\n", + "print \"The wavelength of radiation at 90 degrees = %6.4f angstrom\"%(lambda_prime+lamda)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of radiation at 90 degrees = 0.0487 angstrom\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8, Page 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "phi = 90; # Scattering angle, radian\n", + "m0 = 9.1e-031; # Rest mass of the electron, kg\n", + "h = 6.62e-034; # Planck's constant, J-s\n", + "c = 3e+008; # Speed of light in vacuum, m/s \n", + "lamda = 1.00 ; # Wavelength of incident photon,in angstrom\n", + "\n", + "#Calculations\n", + "del_lambda = (h*(1-round(cos(degrees(phi))))/(m0*c))/10**-10; # Compton shift, angstrom\n", + "\n", + "#Result\n", + "print \"The Compton shift = %.4f angstrom\"%del_lambda\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Compton shift = 0.0242 angstrom\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9, Page 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "phi = pi/2; # Scattering angle, radian\n", + "m0 = 9.1e-031; # Rest mass of the electron, kg\n", + "h = 6.62e-034; # Planck's constant, J-s\n", + "c = 3e+008; # Speed of light in vacuum, m/s \n", + "\n", + "#Calculations\n", + "# As Compton shift = del_lambda = lambda, so\n", + "lamda = h*(1-cos(phi))/(m0*c*1e-010); # Wavelength of incident photon, angstrom\n", + "\n", + "#Result\n", + "print \"The wavelength of incident radiation = %6.4f angstrom\"%lamda\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The wavelength of incident radiation = 0.0242 angstrom\n" + ] + } + ], + "prompt_number": 55 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_7.ipynb b/Applied_Physics_for_Engineers/Chapter_7.ipynb new file mode 100755 index 00000000..1573585e --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_7.ipynb @@ -0,0 +1,144 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Lasers and Holography" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1, Page 410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "e = 1.6e-019; # Charge on an electron, eV \n", + "h = 6.62e-034; # Planck's constant, J-s\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "n = 2.8e+019; # Number of photons in laser pulse\n", + "lamda = 7e-007; # Wavelength of the radiation emited by the laser, m\n", + "\n", + "#Calculations\n", + "E = (h*c)/(lamda*e); # Energy of the photon in the laser light, eV\n", + "del_E = E*n; # The energy of laser pulse having n photons, eV\n", + "\n", + "#Result\n", + "print \"The energy of the laser pulse = %4.2e eV\"%del_E\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The energy of the laser pulse = 4.97e+19 eV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2, Page 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3.0e8; #velocity of light, m/s\n", + "tc = 0.5e-9 #time duration of pulses(s)\n", + "lamda = 6.5e-7 #wavelength, m\n", + "\n", + "\n", + "#Calculations&Results\n", + "Lc = c*tc; # coherence length, m\n", + "print \"The coherence length is %.2f m\"%Lc\n", + "del_v = 1/tc\n", + "print \"Resultant bandwidth = %.e Hz\"%del_v\n", + "del_lamda = (lamda**2*del_v)/c\n", + "print \"Line width = %.2e m\"%(del_lamda)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The coherence length is 0.15 m\n", + "Resultant bandwidth = 2e+09 Hz\n", + "Line width = 2.82e-12 m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3, Page 411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "a = 4e-003; # Coherence width of laser source, m\n", + "lamda = 6e-007; # Wavelength of the pulse, m\n", + "D = 100; # Distance of the surface from laser source, m\n", + "\n", + "#Calculations&Results\n", + "A = 2*lamda/a; # Angular spread of laser beam, radian\n", + "print \"The angular spread = %1.0e radian\"%A\n", + "theta = A/2; # Semi angle, radian\n", + "A_s = pi*(D*theta)**2; # Areal spread of laser beam, Sq.m\n", + "print \"The areal spread = %1.0e Sq.m\"%A_s\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The angular spread = 3e-04 radian\n", + "The areal spread = 7e-04 Sq.m\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_8.ipynb b/Applied_Physics_for_Engineers/Chapter_8.ipynb new file mode 100755 index 00000000..45c3a63e --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_8.ipynb @@ -0,0 +1,324 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Ultrasonics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1, Page 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d = 8e-004; # Thickness of the piece of piezoelectric crystal, m\n", + "v = 5760; # Velocity of ultrasonic waves in the piece of piezoelectric crystal, m/s\n", + "\n", + "#Calculations\n", + "n = v/(2*d); # The frequency of the fundamental mode of ultrasonic wave, Hz\n", + "\n", + "#Result\n", + "print \"The frequency of the fundamental mode of ultrasonic wave = %3.1f MHz\"%(n/1e+006)\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of the fundamental mode of ultrasonic wave = 3.6 MHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2, Page 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "d = 2e-003; # Thickness of the piece of quarts crystal, m\n", + "rho = 2650; # Density of the crystal, kg/meter-cube\n", + "Y = 7.9e+010; # Value of Youngs Modulus, N/metre-square\n", + "\n", + "#Calculations\n", + "n = 1/(2*d)*sqrt(Y/rho); #The frequency of the fundamental mode of vibration, Hz\n", + "\n", + "#Result\n", + "print \"The frequency of the fundamental mode of vibration in quatrz crystal = %5.3f Hz\"%(n/1e+006)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The frequency of the fundamental mode of vibration in quatrz crystal = 1.365 Hz\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3, Page 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "v = 5e+003; # Velocity of ultrasonic beam in steel plate, m/s\n", + "n = 25e+003; # Difference between two neighbouring harmonic frequencies (Nm - Nm_minus1), Hz \n", + "\n", + "#Calculations\n", + "d = v/(2*n); # The thickness of steel plate, m\n", + "\n", + "#Result\n", + "print \"The thickness of steel plate = %3.1f m\"%d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The thickness of steel plate = 0.1 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4, Page 430" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "n = 1e+006; # Frequency of Ultrasonic waves, Hz \n", + "C = 2.5e-014; # Capcitance of capacitor, F\n", + "\n", + "#Calculations\n", + "# Frequency of elecric oscillations is given by n = 1/(2*%pi)*sqrt(1/(L*C)), solving for L\n", + "L = 1/(4*pi**2*n**2*C); # The inductance of an inductor to produce ultrasonic waves, henry\n", + "\n", + "#Result\n", + "print \"The inductance of an inductor to produce ultrasonic waves = %d henry\"%L\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The inductance of an inductor to produce ultrasonic waves = 1 henry\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5, Page 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "d = 50e-002; # Thickness of the metallic rod, m\n", + "t1 = 30e-006; # Arrival time for first pulse, s\n", + "t2 = 80e-006; # Arrival time for second pulse, s\n", + "\n", + "#Calculations&Results\n", + "v = 2*d/t2; # Velocity of ultrasonic waves, m/s\n", + "print \"The velocity of pulse inside the rod = %4.2e m/s\"%v\n", + "x = t1*v/2;\n", + "print \"The position of pulse inside the rod = %6.4f m\"%x\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of pulse inside the rod = 1.25e+04 m/s\n", + "The position of pulse inside the rod = 0.1875 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6, Page 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "I = 2.5e+004; # Sound intensity, W/meter-square\n", + "v = 1480; # Sound velocity, m/s\n", + "rho_w = 1000; # Density of water, kg/meter-cube\n", + "rho_c = 2650; # Density of crystal of transducer, kg/meter-cube\n", + "d = 0.001; # Thickness of the quartz, m\n", + "f = 20e+003; # Frequency of sound in water, Hz\n", + "\n", + "#Calculations&Results\n", + "# As sound intensity, I = p^2/(2*rho1*v), solving for p\n", + "p = sqrt(2*rho_w*v*I); # Pressure in the medium, N/metre-square\n", + "a = p/(d*rho_c); # Maximum acceleration of the quartz ultrasonic transducer, metre/second-square\n", + "print \"The maximum acceleration produced in quartz transducer = %4.2e metre/second-square\"%a\n", + "y = a/(2*pi*f)**2; # Maximum displacement of the quartz transducer, m\n", + "print \"The maximum displacement of quartz transducer = %3.1f micrometer\"%(y/1e-006)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The maximum acceleration produced in quartz transducer = 1.03e+05 metre/second-square\n", + "The maximum displacement of quartz transducer = 6.5 micrometer\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7, Page 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "L = 0.2; # Length of a magnetostrictive hydrophone, m\n", + "lamda = 2*L; # Wavelength of ultrasonic wave, m\n", + "v = 4900; # Velocity of ultrasonic beam in water, m/s\n", + "\n", + "#Calculations\n", + "f = v/lamda; # Fundamental frequency of ultrasonic, KHz\n", + "\n", + "#Result\n", + "print \"The fundamental frequency of a magnetostrictive hydrophone = %4.2f KHz\"%(f/1e+03)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fundamental frequency of a magnetostrictive hydrophone = 12.25 KHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8, Page 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "v = 3700; # Velocity of ultrasonic beam in copper, m/s\n", + "t = 1e-006; # Delay time for ultrasonic beam, s\n", + "\n", + "#Calculations\n", + "L = v*t; # # Length of a copper wire required for a delay, m\n", + "\n", + "#Result\n", + "print \"The length of a copper wire required for a delay = %6.4f m\"%L\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The length of a copper wire required for a delay = 0.0037 m\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/Chapter_9.ipynb b/Applied_Physics_for_Engineers/Chapter_9.ipynb new file mode 100755 index 00000000..579b6def --- /dev/null +++ b/Applied_Physics_for_Engineers/Chapter_9.ipynb @@ -0,0 +1,555 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Fibre Optics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.1, Page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu_1 = 1.55; # Refractive index of the core \n", + "mu_2 = 1.50; # Refractive indices of cladding \n", + "\n", + "#Calculations\n", + "NA = mu_1*sqrt(2*(mu_1-mu_2)/mu_1); \n", + "print \"The NA of the optical fibre = %5.3f\"%NA\n", + "theta_a = degrees(asin(NA)); # The acceptance angle of optical fibre, degrees\n", + "\n", + "#Result\n", + "print \"The acceptance angle of the optical fibre is = %.1f degrees\"%theta_a\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The NA of the optical fibre = 0.394\n", + "The acceptance angle of the optical fibre is = 23.2 degrees\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2, Page 463" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu_1 = 1.50; # Refractive index of the core \n", + "mu_2 = 1.45; # Refractive index cladding\n", + "\n", + "#Calculations&Results\n", + "NA = mu_1*sqrt(2*(mu_1-mu_2)/mu_1); # Numerical aperture of optical fibre\n", + "print \"The NA of the optical fibre = %5.3f\"%NA\n", + "theta_a = degrees(asin(NA)); # The acceptance angle of optical fibre, degrees\n", + "print \"The acceptance angle of the optical fibre = %5.2f degrees\"%theta_a\n", + "theta_c = degrees(asin(mu_2/mu_1)); # The critical angle of the optical fibre, degrees\n", + "print \"The acceptance angle of the optical fibre = %4.1f degrees\"%theta_c\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The NA of the optical fibre = 0.387\n", + "The acceptance angle of the optical fibre = 22.79 degrees\n", + "The acceptance angle of the optical fibre = 75.2 degrees\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3, Page 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu0 = 1; # Refactive index of fibre in air\n", + "mu2 = 1.59; # Refactive index of the cladding \n", + "NA = 0.2; # Numerial aperture of optical fibre\n", + "\n", + "#Calculations\n", + "mu1 = sqrt(NA**2+mu2**2); # Refractive index of core\n", + "mu0 = 1.33; # Refactive index of fibre in water\n", + "NA = sqrt(mu1**2-mu2**2)/mu0; # Numerial aperture of optical fibre in water\n", + "theta_a = degrees(asin(NA)); # Acceptance angle for the fibre in water\n", + "\n", + "#Result\n", + "print \"The acceptance angle for the optical fibre in water = %3.1f degrees\"%theta_a\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The acceptance angle for the optical fibre in water = 8.6 degrees\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4, Page 464" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu0 = 1; # Refractive index of air\n", + "mu1 = 1.50; # Refractive index of glass core`\n", + "delta = 0.005; # Fractional change in refractive index\n", + "\n", + "#Calculations&Results\n", + "mu2 = mu1*(1-delta); # Refractive index of cladding\n", + "print \"The refractive index of cladding =%6.4f\"%mu2\n", + "theta_c = degrees(asin(mu2/mu1)); # Critical angle, degrees\n", + "print \"The critical angle = %5.2f degrees\"%theta_c\n", + "theta_a = degrees(asin(sqrt(mu1**2-mu2**2)/mu0)); # Acceptance angle, degrees\n", + "print \"The value of acceptance angle is = %4.2f degrees\"%theta_a\n", + "NA = mu1*sqrt(2*delta); # Numerical aperture of optical fibre\n", + "print \"The NA of the optical fibre = %4.2f\"%NA #incorrect answer in the textbook\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The refractive index of cladding =1.4925\n", + "The critical angle = 84.27 degrees\n", + "The value of acceptance angle is = 8.62 degrees\n", + "The NA of the optical fibre = 0.15\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5, Page 465" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "NA = 0.22; # Numerical aperture of the optical fibre\n", + "delta = 0.012; # Fractional difference between the refractive index of core and cladding\n", + "\n", + "#Calculations\n", + "mu1 = NA/sqrt(2*delta); # The refractive index of core of optical fibre\n", + "print \"The refractive index of core = %4.2f\"%mu1\n", + "mu2 = mu1*(1-delta); # The refractive index of cladding of optical fibre\n", + "\n", + "#Result\n", + "print \"The refractive index of cladding = %4.2f\"%mu2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The refractive index of core = 1.42\n", + "The refractive index of cladding = 1.40\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6, Page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu1 = 1.466; # Refractive index of core\n", + "mu2 = 1.460; # Refractive index of cladding\n", + "v = 2.4; # Cut-off parameter of the optical fibre\n", + "lamda = 0.8e-006; # Operating wavelength, m\n", + "\n", + "#Calculations&Results\n", + "NA = sqrt(mu1**2-mu2**2);\n", + "print \"The NA of optical fibre = %4.2f\"%NA\n", + "# Asthe cut-off parameter v of the optical fibre, v = 2*%pi*a*sqrt(mu1^2-mu2^2)/lambda, solving for a\n", + "a = lamda*v/(2*pi*sqrt(mu1**2-mu2**2));\n", + "print \"The core radius of the optical fibre = %4.2f micrometer\"%(a/1e-006)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The NA of optical fibre = 0.13\n", + "The core radius of the optical fibre = 2.31 micrometer\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.7, Page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu1 = 1.54; # The refractive index of core\n", + "mu2 = 1.50; # The refractive index of cladding\n", + "lamda = 1.3e-006; # Operating wavelength of optical fibre, m\n", + "a = 25e-006; # Radius of fibre core, m\n", + "\n", + "#Calculations\n", + "v = 2*pi*a*sqrt(mu1**2-mu2**2)/lamda; # V-number of optical fibre \n", + "print \"The cut-off parameter of the optical fibre = %5.2f\"%v\n", + "n = v**2/2; # The number of modes supported by the fibre \n", + "\n", + "#Result\n", + "print \"The number of modes supported by the fibre = %3d\"%(ceil(n))\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut-off parameter of the optical fibre = 42.14\n", + "The number of modes supported by the fibre = 888\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.8, Page 466" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu1 = 1.54; # Refractive index of core\n", + "v = 2.405; # Cut-off parameter of optical fibre\n", + "lamda = 1.3e-006; # Operating wavelength of optical fibre, m\n", + "a = 1e-006; # Radius of the core,\n", + "\n", + "#Calculations\n", + "NA = v*lamda/(2*pi*a); # Numerical aperture of optical fibre\n", + "delta = 1./2*(NA/mu1)**2; # Fractional change in refractive index of core and cladding\n", + "print \"The fractional difference of refractive indices of core and cladding = %7.5e\"%delta\n", + "mu2 = mu1*(1-delta); # Maximum value of refractive index of cladding\n", + "print \"The maximum refractive index of cladding = %5.3f\"%mu2\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fractional difference of refractive indices of core and cladding = 5.22018e-02\n", + "The maximum refractive index of cladding = 1.460\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9, Page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu1 = 1.45; # Index of refraction of core\n", + "NA = 0.16; # Numerical aperture of step index fibre\n", + "a = 3e-006; # Radius of the core, m\n", + "lamda = 0.9e-006; # Operating wavelength of optical fibre, m\n", + "\n", + "#Calculations\n", + "v = 2*pi*a*NA/lamda; # The normalized frequency or v-number of optical fibre\n", + "\n", + "#Result\n", + "print \"The normalized frequency of the optical fibre = %5.2f\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The normalized frequency of the optical fibre = 3.35\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10, Page 467" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "mu1 = 1.52; # Refractive index of core\n", + "a = 14.5e-006; # Radius of the fibre core, m\n", + "delta = 0.0007; # Fractional index difference\n", + "lamda = 1.3e-006; # Operating wavelength of optical fibre, m\n", + "\n", + "#Calculations&Results\n", + "mu2 = mu1*(1-delta); # Refractive index of cladding\n", + "v = 2*pi*a*sqrt(mu1**2-mu2**2)/lamda; # Cut-off parameter v of the optical fibre\n", + "print \"The cut-off parameter of the optical fibre = %5.3f\"%v\n", + "#The is number of modes supported by the fibre given by,\n", + "n = v**2/2;\n", + "print \"The number of modes supported by the fibre = %d\"%(ceil(n))\n", + "#Incorrect answer in the textbook for mu2. Hence the difference in answers" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The cut-off parameter of the optical fibre = 3.985\n", + "The number of modes supported by the fibre = 8\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11, Page 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "alpha = 3.5; # Attenuation of the optical fibre, dB/km\n", + "Pi = 0.5; # Input power of optical fibre, mW\n", + "L = 4; # Distance through the optical wave transmits through the fibre, km\n", + "\n", + "#Calculations\n", + "# As alpha = 10/L*log10(Pi/Po), solving for Po\n", + "Po = Pi/exp(alpha*L*2.3026/10); # Output power of optical fibre, mW\n", + "\n", + "#Result\n", + "print \"The output power of optical fibre = %4.1f micro-watt\"%(Po/1e-003)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output power of optical fibre = 19.9 micro-watt\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.12, Page 468" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "Pi =1; # Input power of optical fibre, mW\n", + "Po = 0.85; # Outptu power of optical fibre, mW\n", + "L = 0.5; #The distance through the optical wave transmits through the fibre, km \n", + "\n", + "#Calculations\n", + "alpha = (10/L)*log10(Pi/Po); # The attenuation of power through the optical fibre\n", + "\n", + "#Result\n", + "print \"The attenuation of power through the optical fibre = %5.3f dB/km\"%alpha\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The attenuation of power through the optical fibre = 1.412 dB/km\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.13, Page 469" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "C = 0.8; # Connector loss per km, dB\n", + "F = 1.5; # Fibre loss per km, dB\n", + "alpha = C + F; # Attenuation of power the optical fibre, dB/km\n", + "Po = 0.3e-006; # Output power of optical fibre, W\n", + "L = 15; # The distance through the optical wave transmits through the fibre, km\n", + "\n", + "#Calculations\n", + "#As the attenuation, alpha = 10/L*log(Pi/Po), solving for Pi\n", + "Pi = Po*exp(2.3026*alpha*L/10); # Input power of optical fibre, mW\n", + "\n", + "#Result\n", + "print \"The minimum input power to optical fibre = %5.3f mW\"%(Pi/1e-003)\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum input power to optical fibre = 0.846 mW\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/README.txt b/Applied_Physics_for_Engineers/README.txt new file mode 100755 index 00000000..d8e7a8a6 --- /dev/null +++ b/Applied_Physics_for_Engineers/README.txt @@ -0,0 +1,10 @@ +Contributed By: Muktesh Chaudhary +Course: be +College/Institute/Organization: Anglo Eastern ship management india Pvt. Ltd +Department/Designation: Electrical & Electronics Officer +Book Title: Applied Physics for Engineers +Author: Neeraj Mehta +Publisher: Phi Learning Pvt. Ltd., New Delhi +Year of publication: 2011 +Isbn: 978-81-203-4242-2 +Edition: 1st
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/chapter_1.ipynb b/Applied_Physics_for_Engineers/chapter_1.ipynb new file mode 100755 index 00000000..659af082 --- /dev/null +++ b/Applied_Physics_for_Engineers/chapter_1.ipynb @@ -0,0 +1,558 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Relativistic Mechanics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "delta_x = 2.45e+03; # Space difference, m\n", + "delta_t = 5.35e-06; # Time difference, s\n", + "\n", + "#Calculations\n", + "v = 0.855*c; # Speed of frame S_prime, m/s\n", + "delta_x_prime = 1/sqrt(1-v**2/c**2)*(delta_x - v*(delta_t))*1e-03; # Distance between two flashes as measured in S_prime frame, km\n", + "delta_t_prime = 1/sqrt(1-v**2/c**2)*(delta_t - v/c**2*delta_x)*1e+006; # Time between two flashes as measured in S_prime\n", + "\n", + "#Results\n", + "print \"The distance between two flashes as measured in S_prime frame = %4.2f km\"%delta_x_prime\n", + "print \"The time between two flashes as measured in S_prime frame = %4.2f micro-second\"%delta_t_prime\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance between two flashes as measured in S_prime frame = 2.08 km\n", + "The time between two flashes as measured in S_prime frame = -3.15 micro-second\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4, Page 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "c = Symbol('c')\n", + "\n", + "#Variable declaration\n", + "c = 1; # Speed of light in vacuum, m/s\n", + "u_x_prime = c; # Velocity of photon as measured in S_prime frame, m/s\n", + "v = c; # Velocity of frame S_prime relative to S frame, m/s\n", + "\n", + "#Calculations\n", + "u_x = (u_x_prime + v)/(1+v*u_x_prime/c**2);\n", + "if u_x == 1: \n", + " ux = 'c';\n", + "else: \n", + " ux = string(u_x)+'c'; \n", + "\n", + "\n", + "#Result\n", + "print \"The speed of one photon as observed by the other is %c\"%ux\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of one photon as observed by the other is c\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6, Page 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "a = 1; # For simplicity assume length of semi minor axis to be unity, m\n", + "c = 3e+08; # Speed of light, m/s\n", + "\n", + "\n", + "#Calculations\n", + "#From equation 1-v^2/c^2=1/4, we derive the following expression\n", + "v = math.sqrt(3*c**2/4) # Velocity at which surface area of lamina reduces to half in S-frame, m/s\n", + "\n", + "\n", + "print \"The velocity at which surface area of lamina reduces to half in S-frame = %4.2e m/s\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity at which surface area of lamina reduces to half in S-frame = 2.60e+08 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7, Page 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "m0 = 1; # For simplicity assume the rest mass of stick to be unity, kg\n", + "m = 1.5*m0; # Mass of the moving stick, kg\n", + "L0 = 1; # Assume resting length of the stick to be unity, m\n", + "\n", + "#Calculations\n", + "# As m = m0/sqrt(1-v^2/c^2) = m0*gama, solving for gama\n", + "gama = m/m0; # Relativistic factor\n", + "L = L0/gama; # Contracted length of the metre stick, m\n", + "\n", + "#Result\n", + "print \"The contracted length of the metre stick = %4.2f m\"%L\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The contracted length of the metre stick = 0.67 m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8, Page 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "tau0 = 2e-008; # Mean lifetime of meson at rest, m/s\n", + "\n", + "#Calculations\n", + "v = 0.8*c; # Velocity of moving meason, m/s\n", + "tau = tau0/sqrt(1-v**2/c**2); # Mean lifetime of meson in motion, m/s\n", + "\n", + "#Result\n", + "print \"The mean lifetime of meson in motion = %4.2e s\"%tau\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean lifetime of meson in motion = 3.33e-08 s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9, Page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "delta_t0 = 59; # Reading of the moving clock for each hour, min\n", + "delta_t = 60; # Reading of the stationary clock for each hour, min\n", + "\n", + "#Calculations\n", + "# As from Time Dilation, delta_t = delta_t0/sqrt(1-v^2/c^2), solving for v\n", + "v = sqrt(((delta_t**2-delta_t0**2)*c**2)/delta_t**2)\n", + "\n", + "#Result\n", + "print \"The speed at which the moving clock ticks slow = %4.2e m/s\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed at which the moving clock ticks slow = 5.45e+07 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10, Page 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "tau0 = 2.5e-008; # Mean lifetime of meson at rest, m/s\n", + "\n", + "#Calculations\n", + "v = 0.8*c; # Velocity of moving meason, m/s\n", + "tau = tau0/sqrt(1-v**2/c**2); # Mean lifetime of meson in motion, m/s\n", + "N0 = 1; # Assume initial flux of meson beam to be unity, watt/Sq.m\n", + "N = N0*exp(-2); # Meson flux after time t, watt/Sq.m\n", + "# As N = N0*e^(-t/tau), which on comparing gives\n", + "t = 2*tau; # Time during which the meson beam flux reduces, s\n", + "d = 0.8*c*t; # The distance that the meson beam can travel before reduction in its flux, m\n", + "\n", + "#Result\n", + "print \"The distance that the meson beam can travel before reduction in its flux = %2d m\"%d\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The distance that the meson beam can travel before reduction in its flux = 20 m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11, Page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "E0 = 1; # Rest energy of particle, unit\n", + "\n", + "#Calculations\n", + "E = 3*E0; # Energy of relativistically moving particle, unit\n", + "# E = m*c^2 and E0 = m0*c^2\n", + "# With m = m0/sqrt(1-v^2/c^2), we have\n", + "v = c*sqrt(1-(E0/E)**2); # Velocity of the moving particle, m/s\n", + "\n", + "#Result\n", + "print \"The velocity of the moving particle = %4.2e m/s\"%v\n", + "#answer differs due to rounding-off errors" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the moving particle = 3.00e+08 m/s\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12, Page 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "m0 = 9.1e-031; # Rest mass of electron, kg\n", + "\n", + "#Calculations\n", + "m = 11*m0; # Mass of relativistically moving electron, kg\n", + "E_k = (m-m0)*c**2/(1.6e-019*1e+06); # Kinetic energy of moving electron, MeV\n", + "# As m = m0/sqrt(1-v^2/c^2), solving for v\n", + "v = c*sqrt(1-(m0/m)**2); # The velocity of the moving electron, m/s\n", + "p = m*v; # Momentum of moving electron, kg-m/s\n", + "\n", + "#Results\n", + "print \"The kinetic energy of moving electron = %4.2f MeV\"%E_k\n", + "print \"The momentum of moving electron = %4.2e kg-m/s\"%p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The kinetic energy of moving electron = 5.12 MeV\n", + "The momentum of moving electron = 2.99e-21 kg-m/s\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13, Page 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, m/s\n", + "E0 = 0.5; # Rest energy of the electron, MeV\n", + "\n", + "#Calculations\n", + "v1 = 0.6*c; # Initial velocity of the electron, m/s\n", + "v2 = 0.8*c; # Final velocity of the electron, m/s\n", + "W = (1/sqrt(1-v2**2/c**2)-1/sqrt(1-v1**2/c**2))*E0; # The amount of work to be done to increase the speed of the electron, MeV\n", + "\n", + "#Result\n", + "print \"The amount of work to be done to increase the speed of an electron = %4.2e J\"%(W*1e+06*1.6e-019)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of work to be done to increase the speed of an electron = 3.33e-14 J\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14, Page 33" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 1; # Assume speed of light in vacuum to be unity, unit\n", + "m0 = 1; # For simplicity assume rest mass of the particle to be unity, unit\n", + "\n", + "#Calculations\n", + "v = c/sqrt(2); # Given speed of the particle, m/s\n", + "gama = 1/sqrt(1-v**2/c**2); # Relativistic factor\n", + "m = gama*m0; # The relativistic mass of the particle, unit\n", + "p = m*v; # The relativistic momentum of the particle, unit\n", + "E = m*c**2; # The relativistic total eneryg of the particle, unit\n", + "E_k = (m-m0)*c**2; # The relativistic kinetic energy of the particle, unit\n", + "\n", + "#Results\n", + "print \"The relativistic mass of the particle = %5.3fm\"%m\n", + "print \"The relativistic momentum of the particle = %1.0gm0c\"%p\n", + "print \"The relativistic total energy of the particle = %5.3fm0c^2\"%E\n", + "print \"The relativistic kinetic energy of the particle = %5.3fm0c^2\"%E_k\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The relativistic mass of the particle = 1.414m\n", + "The relativistic momentum of the particle = 1m0c\n", + "The relativistic total energy of the particle = 1.414m0c^2\n", + "The relativistic kinetic energy of the particle = 0.414m0c^2\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15, Page 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, unit\n", + "m0 = 9.1e-031; # Rest mass of the electron, kg\n", + "m = 1.67e-027; # Rest mass of the proton, kg\n", + "\n", + "#Calculations\n", + "# As m = m0/sqrt(1-v^2/c^2), solving for v\n", + "v = c*sqrt(1-(m0/m)**2); # Velocity of the electron, m/s\n", + "\n", + "#Result\n", + "print \"The velocity of the electron to have its mass equal to mass of the proton = %5.3e m/s\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of the electron to have its mass equal to mass of the proton = 3.000e+08 m/s\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17, Page 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "#Variable declaration\n", + "c = 3e+008; # Speed of light in vacuum, unit\n", + "m0 = 9.1e-031; # Rest mass of the electron, kg\n", + "E_k = 0.1*1e+006*1.6e-019; # Kinetic energy of the electron, J\n", + "\n", + "#Calculations&Results\n", + "v = sqrt(2*E_k/m0); # Classical speed of the electron, m/s\n", + "print \"The classical speed of the electron = %5.3e m/s\"%v\n", + "# As E_k = (m-m0)*c^2 = (1/sqrt(1-v^2/c^2)-1)*m0*c^2, solving for v\n", + "v = c*sqrt(1-(m0*c**2/(E_k+m0*c**2))**2); # Relativistic speed of the electron, m/s\n", + "print \"The relativistic speed of the electron = %5.3e m/s\"%v\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The classical speed of the electron = 1.875e+08 m/s\n", + "The relativistic speed of the electron = 1.644e+08 m/s\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Physics_for_Engineers/screenshots/amp_field_vec.png b/Applied_Physics_for_Engineers/screenshots/amp_field_vec.png Binary files differnew file mode 100755 index 00000000..56c835da --- /dev/null +++ b/Applied_Physics_for_Engineers/screenshots/amp_field_vec.png diff --git a/Applied_Physics_for_Engineers/screenshots/photon_speed.png b/Applied_Physics_for_Engineers/screenshots/photon_speed.png Binary files differnew file mode 100755 index 00000000..eacb5e8d --- /dev/null +++ b/Applied_Physics_for_Engineers/screenshots/photon_speed.png diff --git a/Applied_Physics_for_Engineers/screenshots/prob_oxy_speed.png b/Applied_Physics_for_Engineers/screenshots/prob_oxy_speed.png Binary files differnew file mode 100755 index 00000000..e84c6aab --- /dev/null +++ b/Applied_Physics_for_Engineers/screenshots/prob_oxy_speed.png |