diff options
author | Trupti Kini | 2016-02-24 23:30:12 +0600 |
---|---|---|
committer | Trupti Kini | 2016-02-24 23:30:12 +0600 |
commit | e449000626ef04839b230d7090692293933dfd13 (patch) | |
tree | 767a5a5c66b212bea0d9310443b6b2e41b00c9cd | |
parent | 97ddee1e0833e054c5a082006b75553c066322c2 (diff) | |
download | Python-Textbook-Companions-e449000626ef04839b230d7090692293933dfd13.tar.gz Python-Textbook-Companions-e449000626ef04839b230d7090692293933dfd13.tar.bz2 Python-Textbook-Companions-e449000626ef04839b230d7090692293933dfd13.zip |
Added(A)/Deleted(D) following books
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter1_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter2_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter3_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter4_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter5_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter6_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter7_2.ipynb
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/ultrasonic.png
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/wave_mechanics_2.png
A Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/x-ray_diffraction.png
A "sample_notebooks/sai kiranmalepati/Untitled.ipynb"
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter1_2.ipynb | 2150 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter2_2.ipynb | 1050 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter3_2.ipynb | 685 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter4_2.ipynb | 440 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter5_2.ipynb | 129 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter6_2.ipynb | 873 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter7_2.ipynb | 503 | ||||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/ultrasonic.png | bin | 0 -> 196078 bytes | |||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/wave_mechanics_2.png | bin | 0 -> 193079 bytes | |||
-rw-r--r-- | Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/x-ray_diffraction.png | bin | 0 -> 190996 bytes | |||
-rw-r--r-- | sample_notebooks/sai kiranmalepati/Untitled.ipynb | 228 |
11 files changed, 6058 insertions, 0 deletions
diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter1_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter1_2.ipynb new file mode 100644 index 00000000..d574ec96 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter1_2.ipynb @@ -0,0 +1,2150 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:77926a328b2a3cbd7d962f407c81543826ca86a4cf2545ea94614bd858a6328b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter1:WAVE MECHANICS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "q=1.6*10**-19 #charge of electron in coulombs\n",
+ "#V energy of electron in eV\n",
+ "lamda=round(((h/sqrt(2*m*q))*10**10),2) \n",
+ "print\"de-Broglie wavelength for an electron of energy V ev is= %s/sqrt(V) Angstrom\"%lamda"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength for an electron of energy V ev is= 12.27/sqrt(V) Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg2:pg-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "q=1.6*10**-19 #charge of electron in coulombs\n",
+ "V=50. #potential difference in volts(given)\n",
+ "lamda=int(((h/sqrt(2*m*q))*10**10)*1e2)*1e-2/sqrt(V) #lamda=h/sqrt(2mE)=h/sqrt(2mqV)\n",
+ "print\"de-Broglie wavelength = \", round(lamda,4),\"Angstrom\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength = 1.7367 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg3:pg-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "q=1.6*10**-19 #charge of electron in coulombs\n",
+ "V=100. #potential difference in volts(given)\n",
+ "E=q*V\n",
+ "lamda=round(((h/sqrt(2*m*q))*10**10),2)/sqrt(V) #lamda=h/sqrt(2mE)=h/sqrt(2mqV)\n",
+ "print\"de-Broglie wavelength =\",round(lamda,3),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength = 1.227 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg4:pg-12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.6*10**-34 #planck constant in joule-sec\n",
+ "m=9.0*10**-31 #mass of electron in kg\n",
+ "KE=(15*10**3)*(1.6*10**-19) #Kinetic Energy of electron in joule\n",
+ "v=sqrt((2*KE)/m) #KE=1/2(mv**2) joule\n",
+ "p=m*v #momentum of electron in Kg-m/sec\n",
+ "lamda=h/p #de-broglie wavelength\n",
+ "print\"de-Broglie wavelength is=\",round(lamda*10**10,1),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength is= 0.1 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg5:pg-13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=1.67*10**-27 #mass of neutron in Kg\n",
+ "lamda=10**-10 #de-broglie wavelength in meter(given)\n",
+ "v=h/(m*lamda) #since lamda=h/mv \n",
+ "KE=(1./2)*m*v**2 #in joule\n",
+ "KE=KE/(1.6*10**-19) #in eV\n",
+ "print\"Velocity of neutron is= %.2e m/sec\"%v\n",
+ "print\"Kinetic Energy of Neutron is= \",round(KE,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of neutron is= 3.96e+03 m/sec\n",
+ "Kinetic Energy of Neutron is= 0.082 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg6:pg-13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.6*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "q=1.6*10**-19 #charge of electron in coulombs\n",
+ "E=(1.25*10**3)*(1.6*10**-19) #Kinetic energy in joule\n",
+ "lamda=h/sqrt(2*m*E)\n",
+ "print\"wavelength is =\",\"{:.2e}\".format(lamda),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength is = 3.46e-11 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg7:pg-13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "mo=1.67*10**-27 #mass of proton in Kg\n",
+ "v=2.0*10**8 #speed of proton in m/sec\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "p=(mo*v)/sqrt(1-(v/c)**2) #momentum of proton\n",
+ "lamda=h/p\n",
+ "print\"wavelength is =\",\"{:.2e}\".format(lamda*10**10),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength is = 1.48e-05 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg8:pg-14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "mp=1.67*10**-27 #mass of proton in Kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "v=c/20 #speed of proton in m/sec\n",
+ "lamda=h/(mp*v)\n",
+ "print\"de-Broglie wavelength =\",\"{:.3e}\".format(lamda),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength = 2.643e-14 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg9:pg-14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "lamda=2.0*10**-10#wavelength of electron and photon in meter\n",
+ "#(a) momenta\n",
+ "Pe=h/lamda #momentum of electron in Kg-m/s\n",
+ "Pp=h/lamda #momentum of photon in kg-m/s\n",
+ "print\"(a)Since wavelength of photon is same as that of an electron, therefore their moments is also same i.e \",Pe,\"Kg-m/s\"\n",
+ "\n",
+ "#(b) total energies\n",
+ "me=mo=m\n",
+ "KE=(Pe**2)/(2*me) #Kinetic energy of electron in joule\n",
+ "Re=mo*c**2 #rest energy of electron in joule\n",
+ "Re=Re/(1.6*10**-19) #in eV\n",
+ "Ee=Re/10**6 #total energy of electron in Mev(since K.E. of electron is negligible compared to its rest energy so total energy is equal to the rest energy) \n",
+ "Ep=Pp*c #total energy of photon in joule(since rest energy of photon is zero so its total energy is same as its K.E.) \n",
+ "Ep=(Ep/(1.6*10**-19))*10**-3 #in KeV\n",
+ "print\"(b)Total energy of electron is\",round(Ee,2),\"MeV\",\"\\n Total energy of photon is\",round(Ep,2),\"KeV\"\n",
+ "\n",
+ "#(c) ratio of kinetic energies\n",
+ "Ke=round((KE/(1.6*10**-19)),1)#Kinetic energy of electron in eV\n",
+ "Kp=round(Ep,2)*(10**3) #Kinetic energy of photon in eV\n",
+ "ratio=Ke/Kp\n",
+ "print\"(c)Ratio of kinetic energies=\",\"{:.2e}\".format(ratio)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)Since wavelength of photon is same as that of an electron, therefore their moments is also same i.e 3.31e-24 Kg-m/s\n",
+ "(b)Total energy of electron is 0.51 MeV \n",
+ " Total energy of photon is 6.21 KeV\n",
+ "(c)Ratio of kinetic energies= 6.05e-03\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg10:pg-15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=1.67*10**-27 #mass of neutron in Kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "E=28.8 #Kinetic energy of neutron in eV(given)\n",
+ "E=28.8*1.6*(10**-19)#in joule\n",
+ "Rn=m*c**2 #Rest mass energy of neutron in joule\n",
+ "Rn=(Rn/(1.6*10**-19))/10**6 #in MeV\n",
+ "#since Kinetic energy of neutron under consideration is very small compared to its rest mass energy,the relativistic consideration may be ignored. \n",
+ "lamda=h/sqrt(2*m*E)\n",
+ "print\"de-Broglie wavelength=\",round(lamda*10**10,5),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength= 0.05336 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg11:pg-15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=4*1.67*10**-27 #mass of alpha particle Kg=4*mass of proton\n",
+ "q=2*1.6*10**-19 #for alpha particle q=2*e coulomb\n",
+ "V=200 #potential difference in volts \n",
+ "lamda=h/sqrt(2*m*q*V)\n",
+ "print\"de-Broglie wavelength=\",round(lamda*10**10,5),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength= 0.00717 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg12:pg-15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "mo=m #for velocity much less than the velocity of light, m=mo\n",
+ "#(a)wavelength for a ball of mass 1.0Kg and v=1.0m/s\n",
+ "v=1.0 #speed of ball in m/sec\n",
+ "mass=1.0 #mass of ball in Kg\n",
+ "lamda=h/(mass*v)\n",
+ "print\"de-Broglie wavelength for a ball of mass 1.0Kg and v=1.0m/s =\",\"{:.2e}\".format(lamda*10**10),\"Angstrom\"\n",
+ "\n",
+ "#(b)wavelength for an electron of mass 9.1*10**-31 Kg and v=10**6 m/sec\n",
+ "v=10**6 #speed of electron in m/sec\n",
+ "lamda=h/(mo*v)\n",
+ "print\"de-Broglie wavelength for an electron of mass 9.1*10**-31Kg and v=10**6m/sec =\",round(lamda*10**10,2),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength for a ball of mass 1.0Kg and v=1.0m/s = 6.63e-24 Angstrom\n",
+ "de-Broglie wavelength for an electron of mass 9.1*10**-31Kg and v=10**6m/sec = 7.29 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg13:pg-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=1.67*10**-27 #mass of neutron in Kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "E=1. #Kinetic energy of neutron in eV\n",
+ "Rn=m*c**2 #rest mass energy of neutron in joule\n",
+ "Rn=(Rn/(1.6*10**-19))/10**6 #in MeV\n",
+ "#Kinetic energy of given neutron 1eV is very small as compared to its rest mass energy,therefore the relativistic consideration may be ignored \n",
+ "E=1*1.6*10**-19 #in joule\n",
+ "lamda=h/sqrt(2*m*E)\n",
+ "print\"de-Broglie wavelength=\",round(lamda*10**10,3),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength= 0.287 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg14:pg-16"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=1.675*10**-27 #mass of neutron in Kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "E=12.8 #energy of neutron in MeV\n",
+ "Rn=m*c**2 #rest mass energy of neutron in joule\n",
+ "Rn=(Rn/(1.6*10**-19))/10**6 # in MeV\n",
+ "#since the given energy 12.8MeV is very small as compared to the rest mass energy,therefore the relativistic consideration may be ignored \n",
+ "E=E*(10**6)*(1.6*10**-19) # in eV\n",
+ "lamda=h/sqrt(2*m*E)\n",
+ "print\"de-Broglie wavelength=\",\"{:.1e}\".format(lamda*10**10),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength= 8.0e-05 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg15:pg-17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.6*10**-34 #planck constant joule-sec\n",
+ "m=9.1*10**-31 #mass of electron kg\n",
+ "e=1.6*10**-19 #charge of electron in coulomb\n",
+ "lamda=0.40*10**-10#wavelength in meter\n",
+ "V=(h**2)/round(((lamda**2)*2*m*e),72)#lamda=h/sqrt(2mE)=h/sqrt(2meV)\n",
+ "print\"applied voltage=\",round(V,2),\"Volt\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "applied voltage= 934.76 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg17:pg-17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.6*10**-34 #planck constant in joule-sec\n",
+ "m=1.67*10**-27 #mass of neutron in Kg\n",
+ "K=8.6*10**-5 #Boltzmann constant in eV/degree\n",
+ "K=K*1.6*10**-19 #in J/K\n",
+ "T=27+273 #temperature in Kelvin\n",
+ "E=K*T #energy of particle\n",
+ "lamda=h/round(sqrt(2*m*E),26)\n",
+ "print\"wavelength=\",round(lamda*10**10,3),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength= 1.779 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg18:pg-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=4.65*10**-26 #mass of nitrogen atom in Kg\n",
+ "T=27+273 #Temperature in Kelvin\n",
+ "K=1.38*10**-23 #Boltzmann constant in J/K\n",
+ "E=(3./2)*K*T #for nitrogen atom E=(3/2)*K*T\n",
+ "lamda=h/sqrt(2*m*E) \n",
+ "print\"de-Broglie wavelength=\",round(lamda*10**10,4),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength= 0.2755 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg19:pg-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=6.7*10**-27 #mass of helium atom in Kg\n",
+ "K=1.38*10**-23 #Boltzmann constant in J/K\n",
+ "T=400 #Temperature in Kelvin\n",
+ "E=(3./2)*K*T #for helium atom E=(3/2)*K*T\n",
+ "lamda=h/sqrt(2*m*E)\n",
+ "print\"de-Broglie wavelength=\",round(lamda*10**10,3),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "de-Broglie wavelength= 0.628 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg20:pg-18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "E=100*1.6*10**-19 #kinetic energy of electron in joule\n",
+ "m=9.0*10**-31 #mass of electron in Kg\n",
+ "h=6.62*10**-34 #planck constant joule-sec\n",
+ "D=20 #distance of screen from foil in cm\n",
+ "diameter=2.44 #diameter of ring in cm\n",
+ "r=diameter/2 #radius of ring in cm\n",
+ "lamda=h/sqrt(2*m*E)\n",
+ "tan_theta=r/D\n",
+ "#for small value of theta tan(theta)=sin(theta)\n",
+ "#According to Bragg's law, 2d(sin(theta))=n*lamda\n",
+ "n=1\n",
+ "sin_theta=tan_theta\n",
+ "d=(n*lamda)/(2*sin_theta)\n",
+ "print\"spacing of the related lattice planes in the metal=\",round(d*10**10,2),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "spacing of the related lattice planes in the metal= 10.11 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg21:pg-19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "r=0.53*10**-10 #radius of first Bohr orbit in hydrogen atom in Meter\n",
+ "h=6.6*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in Kg\n",
+ "lamda=2*math.pi*r#since 2*pi*r=n*lamda where n=1 for the first Bohr orbit, So lamda=2*pi*r=h/(m*v)\n",
+ "v=h/(lamda*m)\n",
+ "print\"velocity of electron=\",\"{:.2e}\".format(v),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of electron= 2.18e+06 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg22:pg-19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "mo=9.1*10**-31 #rest mass of electron in Kg\n",
+ "lamda=5896*10**-10#wavelength in meter\n",
+ "#Since lamda=h/(mo*v) and Kinetic energy=(1/2)*mo*v**2 \n",
+ "#therefore on putting v=h/(mo*lamda) in equation of Kinetic energy\n",
+ "K=((h/lamda)**2)/(2*mo) #kinetic energy of electron in joule\n",
+ "K=K/(1.6*10**-19) #in eV\n",
+ "print\"Kinetic energy of electron=\",\"{:.2e}\".format(K),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy of electron= 4.34e-06 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg23:pg-20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "mo=1.67*10**-27 #rest mass of neutron in Kg\n",
+ "lamda=10**-10 #de-broglie wavelength in meter\n",
+ "v=h/(mo*lamda) #velocity of neutron in m/s (since lamda=h/(mo*v))\n",
+ "print\"velocity of neutron=\",\"{:.2e}\".format(v),\"m/s\"\n",
+ "K=(mo*v**2)/2 #kinetic energy of neutron in joule\n",
+ "K=K/(1.6*10**-19) #in eV\n",
+ "print\"kinetic energy of neutron=\",round(K,3),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of neutron= 3.97e+03 m/s\n",
+ "kinetic energy of neutron= 0.082 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg25:pg-21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "mo=9.1*10**-31 #rest mass of electron in Kg\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "K=1 #Kinetic energy in MeV\n",
+ "Re=(mo*c**2/(1.6*10**-19))/10**6 #rest mass energy of electron in Mev\n",
+ "lamda=h*c/sqrt(K*(K+(2*Re)))\n",
+ "print\"Wavelength is %.2e Angstrom\"%(lamda*1e10/(1.6e-19*1e6))\n",
+ "#answer is wrong in book because of calculation mistake"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength is 8.73e-03 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg26:pg-22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "mo=9.1*10**-31 #rest mass of electron in Kg(in book it is given wrong in question)\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "\n",
+ "#(a)wavelength associated with 1MeV electron\n",
+ "K=1 #kinetic energy of electron in MeV\n",
+ "Re=(mo*c**2/(1.6*10**-19))/10**6 #rest mass energy of electron in Mev\n",
+ "#since given K.E(1MeV)of electron is comparable with its rest mass energy \n",
+ "#therefore relativistic variation of mass with velocity is taken in to account\n",
+ "d=round(sqrt(K*(K+(2*Re))),2)*1.6*10**-13 #value of sqrt(K*(K+(2*mo*c**2))) in volt\n",
+ "lamda=h*c/d\n",
+ "print\"wavelength associated with 1MeV electron=\",\"{:.2e}\".format(lamda*10**10),\"Angstrom\"\n",
+ "\n",
+ "#(b)wavelength associated with 1MeV proton\n",
+ "K=1*1.6*10**-13 #kinetic energy of electron in volt\n",
+ "mo=1.67*10**-27 #rest mass of proton in Kg\n",
+ "Rp=(mo*c**2/(1.6*10**-19))/10**6 #rest mass energy of proton in Mev\n",
+ "#since given K.E(1MeV)of proton is much less than its rest mass energy \n",
+ "#therefore relativistic effect can be ignored\n",
+ "lamda=h/sqrt(2*mo*K)\n",
+ "print\"wavelength associated with 1MeV proton=\",\"{:.2e}\".format(lamda*10**10),\"Angstrom\"\n",
+ "\n",
+ "#(c)wavelength associated with 1MeV photon\n",
+ "#since rest mass of photon is zero so its rest mass energy is also zero\n",
+ "E=K #Energy of photon is entirely kinetic energy in volt\n",
+ "lamda=h*c/E\n",
+ "print\"wavelength associated with 1MeV photon=\",\"{:.2e}\".format(lamda*10**10),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength associated with 1MeV electron= 8.75e-03 Angstrom\n",
+ "wavelength associated with 1MeV proton= 2.87e-04 Angstrom\n",
+ "wavelength associated with 1MeV photon= 1.24e-02 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg27:pg-23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "V=54. #potential difference in volt\n",
+ "lamda=12.28/sqrt(V) #de-Broglie wavelength of electron\n",
+ "phi=50 #angle of scattering in degree\n",
+ "sin_phi=sin(math.radians(phi))\n",
+ "D=lamda/sin_phi #according to Bragg's law for normal incidence lamda=D*(sin phi),where D is the distance between two consecutive atoms in the surface layer \n",
+ "print\"Distance between two neighbouring atoms in the surface of Ni-crystal=\",round(D,2),\"Angstrom\"\n",
+ "theta=90-(phi/2) #glancing angle in degree\n",
+ "sin_theta=sin(math.radians(theta))\n",
+ "d=lamda/(2*sin_theta) \n",
+ "print\"Distance between successive Bragg's planes of Ni-crystal=\",round(d,2),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance between two neighbouring atoms in the surface of Ni-crystal= 2.18 Angstrom\n",
+ "Distance between successive Bragg's planes of Ni-crystal= 0.92 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg28:pg-24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "V=54. #potential difference in volt\n",
+ "lamda=12.28/sqrt(V) #de-Broglie wavelength of electron\n",
+ "D=2.15 #distance between successive atoms of crystal plane in angstrom\n",
+ "\n",
+ "#for first order diffraction\n",
+ "n=1 \n",
+ "phi=math.asin(n*lamda/D)#Bragg's equation, D*sin(phi)=n*lamda,where phi is angle of scattering \n",
+ "phi=math.degrees(phi)# in degree\n",
+ "#for second order diffraction\n",
+ "n=2\n",
+ "sin_phi_2=n*lamda/D\n",
+ "print\"since sin_phi_2=\",round(sin_phi_2,2),\">1 which is impossible because sin(phi) can never exceed 1.Hence second and third orders can't occur.\"\n",
+ "\n",
+ "#when V is increased from 54volt to 60 volt\n",
+ "V=60.\n",
+ "n=1\n",
+ "lamda=12.28/sqrt(V)#de-Broglie wavelength of electron\n",
+ "phi=math.asin(n*lamda/D)\n",
+ "phi=math.degrees(phi)\n",
+ "print\"When accelerating potential were changed from 54volt to 60volt, first order diffracted beams occur at=\",int(round(phi)),\"degree\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "since sin_phi_2= 1.55 >1 which is impossible because sin(phi) can never exceed 1.Hence second and third orders can't occur.\n",
+ "When accelerating potential were changed from 54volt to 60volt, first order diffracted beams occur at= 48 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg30:pg-28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "mo=9.1*10**-31 #rest mass of electron in kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "lamda=10**-12 #wavelength in meter\n",
+ "pc=(h*c/lamda)/(1.6*10**-19)\n",
+ "Eo=(mo*c**2)/(1.6*10**-19)#rest energy of electron in eV\n",
+ "E=sqrt((pc**2)+(Eo**2)) #total energy of electron eV\n",
+ "v=round(sqrt(1-(Eo/E)**2),3)\n",
+ "print\"Group velocity of the de-Broglie waves,Vg = v = %s*c\"%v\n",
+ "Vp=round((1/sqrt(1-(Eo/E)**2)),2) \n",
+ "print\"Phase velocity of the de-Broglie waves,Vp= %s*c\"%Vp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Group velocity of the de-Broglie waves,Vg = v = 0.925*c\n",
+ "Phase velocity of the de-Broglie waves,Vp= 1.08*c\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg31:pg-29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "mo=9.1*10**-31 #rest mass of electron in kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "lamda=2.0*10**-12 #wavelength in meter \n",
+ "pc=round((h*c/lamda)/(1.6*10**-16),2)#in KeV\n",
+ "Eo=int((mo*c**2)/(1.6*10**-16))#rest energy of electron in KeV\n",
+ "E=round(sqrt((pc**2)+(Eo**2)),2)#total energy of electron KeV\n",
+ "KE=E-Eo\n",
+ "print\"Kinetic energy of electron=\",KE,\"KeV\"\n",
+ "v=round(sqrt(1-(Eo/E)**2),4)\n",
+ "print\"Group velocity of the de-Broglie waves,Vg = v = %s*c\"%v\n",
+ "Vp=round((1/sqrt(1-(Eo/E)**2)),2)\n",
+ "print\"Phase velocity of the de-Broglie waves,Vp= %s*c\"%Vp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy of electron= 293.65 KeV\n",
+ "Group velocity of the de-Broglie waves,Vg = v = 0.7725*c\n",
+ "Phase velocity of the de-Broglie waves,Vp= 1.29*c\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg33:pg-39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_p>=h/delta_x\n",
+ "h=6.63*10**-34 #planck constant joule-sec\n",
+ "delta_x=0.2*10**-10 #uncertainty in position in meter\n",
+ "delta_p=h/(2*math.pi*delta_x) #uncertainty in momentum \n",
+ "print\"Uncertainty in momentum =\",\"{:.2e}\".format(delta_p),\"Kg-ms-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uncertainty in momentum = 5.28e-24 Kg-ms-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg34:pg-39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_x>=h/delta_p\n",
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "mo=9.0*10**-31 #rest mass of electron in kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "v=3.0*10**7 #velocity of electron in m/sec\n",
+ "delta_p=mo*v/sqrt(1-(v/c)**2)#maximum uncertainty in momentum\n",
+ "delta_x=h/(2*math.pi*delta_p)#smallest uncertainty in position \n",
+ "print\"Smallest possible uncertainty in position of an electron=\",round(delta_x*10**10,4),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Smallest possible uncertainty in position of an electron= 0.0388 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg35:pg-40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_p>=h/delta_x\n",
+ "h=1.05*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 # mass of electron in kg\n",
+ "delta_x=1.1*10**-8#uncertainty in position in meter\n",
+ "delta_p=h/delta_x #uncertainty in momentum\n",
+ "delta_v=delta_p/m #minimum uncertainty in velocity\n",
+ "print\"minimum uncertainty in velocity of an electron=\",\"{:.2e}\".format(delta_v),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainty in velocity of an electron= 1.05e+04 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg36:pg-40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_p>=h/delta_x\n",
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "delta_x=10*10**-10#uncertainty in position in meter\n",
+ "delta_p=h/(2*math.pi*delta_x)#uncertainty in momentum in Kg-m/s\n",
+ "delta_v=delta_p/m #uncertainty in velocity of an electron\n",
+ "print\"uncertainty in velocity of an electron=\",\"{:.2e}\".format(delta_v),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in velocity of an electron= 1.16e+05 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg37:pg-40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_x>=h/delta_p\n",
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "m=9.0*10**-31 #mass of electron in kg\n",
+ "v=1.05*10**4 #speed of electron in m/s\n",
+ "p=m*v #momentum of electron in Kg-m/s\n",
+ "delta_p=(0.01/100)*p#uncertainty in momentum(since uncertainty in value of p is 0.01% of its value)\n",
+ "delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron\n",
+ "print\"uncertainty in the position of electron=\",\"{:.3e}\".format(delta_x),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in the position of electron= 1.115e-04 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg38:pg-40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation (delta_x*delta_p)>=h or delta_x>=h/delta_p\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.0*10**-31 #mass of electron in kg\n",
+ "v=600 #speed of electron in m/s\n",
+ "delta_v=(.005/100)*v#uncertainty in velocity of an electron in m/s\n",
+ "delta_p=m*delta_v#uncertainty in momentum of an electron in Kg-m/s\n",
+ "#value of delta_p is wrong in book\n",
+ "delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron\n",
+ "print\"uncertainty in position of electron=\",round(delta_x,4),\"m\"#answer is wrong in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in position of electron= 0.0039 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg39:pg-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9*10**-31 #mass of electron in kg\n",
+ "v=6.6*10**4 #speed of electron in m/s\n",
+ "p=m*v #momentum of electron in Kg-m/s\n",
+ "delta_p=(0.01/100)*p#uncertainty in momentum(since uncertainty in value of p is 0.01% of its value)\n",
+ "delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron(From Heisenberg uncertainty relation)\n",
+ "print\"uncertainty in the position of electron=\",\"{:.2e}\".format(delta_x),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in the position of electron= 1.78e-05 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg40:pg-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "r=0.5*10**-10 #radius of hydrogen atom in meter\n",
+ "delta_x=r #uncertainty in position of electron meter\n",
+ "delta_Px=round(h/(2*math.pi*delta_x),25)#uncertainty in momentum of electron in Kg-m/s(From Heisenberg uncertainty relation)\n",
+ "p=delta_Px #momentum of electron(since magnitude of momentum can't be less than that of uncertainty)\n",
+ "KE=((p**2)/(2*m))/(1.6*10**-19)#Kinetic energy in eV\n",
+ "print\"Kinetic energy=\",round(KE,1),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Kinetic energy= 15.1 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg41:pg-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.0*10**-31 #mass of electron in kg\n",
+ "v=5.00*10**3 #speed of electron in m/s\n",
+ "p=m*v #momentum of electron in Kg-m/s\n",
+ "delta_p=(0.003/100)*p#uncertainty in momentum(since uncertainty in value of p is 0.003% of its value)\n",
+ "delta_x=h/(2*math.pi*delta_p)#uncertainty in position of electron(From Heisenberg uncertainty relation)\n",
+ "print\"uncertainty in the position of electron=\",\"{:.2e}\".format(delta_x),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in the position of electron= 7.82e-04 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg42:pg-41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "r=0.53*10**-10 #radius of hydrogen atom in meter\n",
+ "delta_x=r #uncertainty in position of electron in meter\n",
+ "delta_Px=h/(2*math.pi*delta_x)#uncertainty in momentum of electron in Kg-m/s(From Heisenberg uncertainty relation)\n",
+ "p=delta_Px #momentum of electron(since magnitude of momentum can't be less than that of uncertainty)\n",
+ "KE=((p**2)/(2*m))/(1.6*10**-19)#Kinetic energy in eV\n",
+ "print\"Minimum energy=\",round(KE,1),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum energy= 13.6 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg43:pg-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "dlamda=(10**-4)*(10**-10) #width of spectral line in meter\n",
+ "lamda=5000*10**-10 #wavelength of spectral line in meter\n",
+ "\n",
+ "#From Heisenberg uncertainty relation (delta_E*delta_t)>=h or delta_t>=h/(2*pi*delta_E)\n",
+ "#since E=h*c/lamda so delta_E=(h*c/lamda**2)*dlamda\n",
+ "#putting value of delta_E in Heisenberg uncertainty relation,delta_t=lamda**2/(2*pi*c*dlamda)\n",
+ "delta_t=(lamda**2)/(2*math.pi*c*dlamda)\n",
+ "print\"minimum time required=\",\"{:.3e}\".format(delta_t),\"sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum time required= 1.326e-08 sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg44:pg-42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.62*10**-34 #planck constant joule-sec\n",
+ "m=9.0*10**-31 #mass of electron kg\n",
+ "delta_x=.01*10**-2#uncertainty in position of a particle in meter\n",
+ "#(a)uncertainty in momentum of particle\n",
+ "delta_p=h/(2*math.pi*delta_x)#From Heisenberg uncertainty relation\n",
+ "print\"uncertainty in momentum of particle=\",\"{:.3e}\".format(delta_p),\"Kg-m/s\"\n",
+ "\n",
+ "#(b)uncertainty in velocity of electron\n",
+ "delta_x=5*10**-10 #uncertainty in position of a electron in meter\n",
+ "delta_p=h/(2*math.pi*delta_x)\n",
+ "delta_v=delta_p/m\n",
+ "print\"uncertainty in velocity of electron=\",\"{:.2e}\".format(delta_v),\"m/s\"\n",
+ "\n",
+ "#(c)uncertainty in velocity of alpha-particle\n",
+ "mp=1.67*10**-27 #mass of proton in Kg\n",
+ "m=4*mp #mass of alpha=particle in Kg\n",
+ "delta_x=5*10**-10 #uncertainty in position of alpha-particle in meter\n",
+ "delta_p=h/(2*math.pi*delta_x)\n",
+ "delta_v=delta_p/m\n",
+ "print\"uncertainty in velocity of alpha-particle=\",round(delta_v,2),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in momentum of particle= 1.054e-30 Kg-m/s\n",
+ "uncertainty in velocity of electron= 2.34e+05 m/s\n",
+ "uncertainty in velocity of alpha-particle= 31.55 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg45:pg-43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation for energy E and time t, (delta_E*delta_t)>=h\n",
+ "#Also E=h*v or delta_E=h*(delta_v)\n",
+ "#putting this value in uncertainty relation, delta_v>=1/(2*pi*delta_t)\n",
+ "delta_t=10**-8 #uncertainty in time in sec\n",
+ "delta_v=1/(2*math.pi*delta_t) \n",
+ "print\"minimum uncertainty in the frequency=\",\"{:.3e}\".format(delta_v),\"sec-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainty in the frequency= 1.592e+07 sec-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg46:pg-43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#From Heisenberg uncertainty relation for energy E and time t, (delta_E*delta_t)>=h\n",
+ "#Also E=h*v or delta_E=h*(delta_v)\n",
+ "#putting this value in uncertainty relation, delta_v>=1/(2*pi*delta_t)\n",
+ "delta_t=10**-8 #uncertainty in time in sec\n",
+ "delta_v=1/(2*math.pi*delta_t) \n",
+ "print\"minimum uncertainty in the frequency=\",\"{:.3e}\".format(delta_v),\"sec-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum uncertainty in the frequency= 1.592e+07 sec-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg47:pg-43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.62*10**-34 #planck constant joule-sec\n",
+ "m=9.0*10**-31 #mass of electron kg\n",
+ "delta_x=1*10**-10#uncertainty in position of a electron in meter\n",
+ "delta_p=h/(2*math.pi*delta_x)#uncertainty in momentum of electron in Kg-m/s(From Heisenberg uncertainty relation) \n",
+ "E=(1*10**3)*(1.6*10**-19)#energy in joule\n",
+ "p=sqrt(2*m*E) #momentum in Kg-m/s\n",
+ "percentage=(delta_p/p)*100\n",
+ "print\"Percentage of uncertainty in its momentum=\",round(percentage,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of uncertainty in its momentum= 6.2 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg48:pg-43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant joule-sec\n",
+ "delta_t=2.5*10**-20 #uncertainty in time in sec\n",
+ "delta_E=h/(2*math.pi*delta_t)#From Heisenberg uncertainty relation for energy E and time t\n",
+ "delta_E=delta_E/(1.6*10**-19)\n",
+ "print\"minimum error=\",round(delta_E/10**3,3),\"KeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "minimum error= 26.38 KeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg49:pg-44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=1.054*10**-34 #planck constant joule-sec\n",
+ "delta_t=10**-12 #uncertainty in time in sec\n",
+ "delta_E=h/(2*delta_t)#uncertainty in energy(From Heisenberg uncertainty relation)\n",
+ "delta_E=delta_E/(1.6*10**-19)\n",
+ "print\"uncertainty in energy of gamma-ray photon emitted=\",\"{:.1e}\".format(delta_E),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in energy of gamma-ray photon emitted= 3.3e-04 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg50:pg-44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant joule-sec\n",
+ "m=9.1*10**-31 #mass of electron kg\n",
+ "e=1.6*10**-19 #charge of electron in coulomb\n",
+ "V=1000. #potential difference in volt\n",
+ "delta_V=12 #in volt\n",
+ "#delta_P=m*e*delta_V/sqrt(2*m*e*V)\n",
+ "#From Heisenberg uncertainty relation delta_x*delta_p)>=h or delta_x>=h/delta_p\n",
+ "delta_x=((h*sqrt(2.0))/sqrt(m*e))*(sqrt(V)/delta_V)\n",
+ "print\"uncertainty in position of an electron=\",round(delta_x,11),\"m =\",round(delta_x*1e10,1),\"Angstrom\"\n",
+ "#answer in book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in position of an electron= 6.47e-09 m = 64.7 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg51:pg-44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#According to uncertainty principle (delta_x*delta_p)>=h ......eq.1\n",
+ "#momentum,p=h/lamda or p*lamda=h ........eq.2\n",
+ "#on differentiating eq.2 and solving we get delta_p=(h*delta_lamda)/lamda**2,put this value in eq.1\n",
+ "#we get (delta_x*delta_lamda)>=(lamda**2)/2*pi\n",
+ "lamda=10**-10 #wavelength in meter\n",
+ "delta_lamda=lamda*10**-6#since uncertainty in wavelength is given to be in ratio 1/10**6\n",
+ "delta_x=lamda/(2*math.pi*10**-6)#since (delta_x)=(lamda**2)/(2*pi*delta_lamda)\n",
+ "print\"uncertainty in position=\"\"{:.2e}\".format(delta_x),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "uncertainty in position=1.59e-05 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg52:pg-54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.11*10**-31 #mass of electron in kg\n",
+ "L=10**-10 #width of box in meter\n",
+ "n=1 #minimum energy of the particle is obtained for n=1\n",
+ "E=(n*h)**2/(8*m*L**2) #in joule\n",
+ "E=round(E,20)/(1.6*10**-19)#in eV\n",
+ "print\"energy of an electron=\",round(E,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "energy of an electron= 37.69 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg54:pg-54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "delta_x=5*10**-10 #uncertainty in position in meter\n",
+ "L=25*10**-10 #width of box in meter\n",
+ "x=L/2 #at the center of the box x=L/2\n",
+ "n=1 #since the particle is in the state of least energy so n=1\n",
+ "def si(x): #si(x) is the wave function of particle moving in an infinite potential well\n",
+ " return sqrt(2/L)*sin(n*math.pi*x/L)\n",
+ "p=(abs(si(x))**2)*delta_x\n",
+ "print\"probability =\",round(p,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "probability = 0.4\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg57:pg-56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in kg\n",
+ "L=2.5*10**-10 #width of box in meter\n",
+ "#first lowest permitted energy value\n",
+ "n=1\n",
+ "E=(n*h)**2/(8*m*L**2) #in joule\n",
+ "E=E/(1.6*10**-19) #in eV\n",
+ "print\"first lowest permitted energy value=\",round(E,2),\"eV\"\n",
+ "#second lowest permitted energy value\n",
+ "n=2\n",
+ "E=round(E,2)*n**2 #in eV\n",
+ "print\"second lowest permitted energy value=\",round(E,2),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "first lowest permitted energy value= 6.04 eV\n",
+ "second lowest permitted energy value= 24.16 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg58:pg-56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#five antinodes signify that particle is in 5th quantum state i.e n=5\n",
+ "E5=5**2 #energy of the 5th quantum state\n",
+ "E1=230*1.6*10**-19 #energy of the 1st quantum state in joule\n",
+ "E1=round(E1/E5,20)\n",
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "L=0.2*10**-9 #width of well in meter\n",
+ "#for n=1\n",
+ "m=h**2/(8*E1*L**2) #in Kg(since En=(n*h)**2/(8*m*L**2))\n",
+ "print\"mass of the particle=\",\"{:.2e}\".format(m),\"Kg\"\n",
+ "En=(1*10**3)*(1.6*10**-19)#in joule(given)\n",
+ "n=sqrt(En/E1)\n",
+ "print\"since n=\",round(n,2),\" is not an integer. Hence,En=1KeV is not permitted value of energy.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mass of the particle= 9.32e-31 Kg\n",
+ "since n= 10.43 is not an integer. Hence,En=1KeV is not permitted value of energy.\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg59:pg-57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from scipy import integrate\n",
+ "x1=0.35 #lower limit\n",
+ "x2=0.45 #upper limit\n",
+ "#Wn=a*x is wave function\n",
+ "p=integrate.quad(lambda x: x**2,x1,x2)\n",
+ "p=round(p[0],4)\n",
+ "print\"Probability= %s*a**2\"%p\n",
+ "X=integrate.quad(lambda x: x**3,0,1)\n",
+ "X=(X[0])\n",
+ "print\"Expectation value <x> of particle's position= %s*a**2\"%X"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Probability= 0.0161*a**2\n",
+ "Expectation value <x> of particle's position= 0.25*a**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg60:pg-58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "L = 1 # let unit length\n",
+ "x1=0.45*L #lower limit\n",
+ "x2=0.55*L #upper limit\n",
+ "n=1 #for ground state\n",
+ "p = (1/L)*((x2-(L/(2*math.pi*n) *math.sin(2*x2*math.pi*n/L)))- (x1-(L/(2*math.pi*n) *math.sin(2*x1*math.pi*n/L))))\n",
+ "p_per = p*100 # probability of finding particle in percentage\n",
+ "print(\"Probability of finding particle(ground state)=\"),round(p_per,1),\"%\"\n",
+ "n=2 #for first excited state\n",
+ "p = (1/L)*((x2-(L/(2*math.pi*n) *math.sin(2*x2*math.pi*n/L)))- (x1-(L/(2*math.pi*n) *math.sin(2*x1*math.pi*n/L))))\n",
+ "p_per = p*100 # probability of finding particle in percentage\n",
+ "print(\"Probability of finding particle(first excited state)=\"),round(p_per,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Probability of finding particle(ground state)= 19.8 %\n",
+ "Probability of finding particle(first excited state)= 0.65 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg61:pg-58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "L = 1e-8 # length of box in cm\n",
+ "h = 6.626e-34 # Plank constant in joule-sec\n",
+ "m = 9.1e-31 # mass of electron in Kg\n",
+ "\n",
+ "E1 = (h)**2/(8*m*(L*1e-2)**2) # Calculation of energy of ground state in Joule\n",
+ "E1_eV = round(E1/1.6e-19 )# Calculation of energy in eV\n",
+ "E2_eV =2**2*E1_eV # Calculation of energy of first excited state in eV\n",
+ "del_E = E2_eV - E1_eV # calculation of difference between first state and ground state\n",
+ "print(\"Energy difference between ground state and first excited state =\"),int(del_E),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy difference between ground state and first excited state = 114 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg62:pg-59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "a=1 #let\n",
+ "n=2 #for second energy state\n",
+ "x=a/2 #at the center of the box\n",
+ "W2=sqrt(2./a)*(sin((n*math.pi*x)/a))#wave function of particle in second energy state\n",
+ "print\"probability of finding particle in interval del_x, p=del_x*(W2)**2= \",int(W2)\n",
+ "#probability of finding particle in interval del_x is, p=del_x*(W2)**2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "probability of finding particle in interval del_x, p=del_x*(W2)**2= 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg63:pg-59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "L = 2. # length of box in Angstrom\n",
+ "x1=1.6000 #lower limit in Angstrom\n",
+ "x2=1.6001 #upper limit in Angstrom\n",
+ "n=1 #given\n",
+ "p = (1/L)*((x2-(L/(2*math.pi*n) *math.sin(2*x2*math.pi*n/L)))- (x1-(L/(2*math.pi*n) *math.sin(2*x1*math.pi*n/L))))\n",
+ "print\"Probability of finding particle=\",\"{:.2e}\".format(p)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Probability of finding particle= 3.45e-05\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg64:pg-60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "lamda=1.21*10**-10 #de-Broglie wavelength in meter\n",
+ "L=lamda/2 #length of a loop in meter\n",
+ "#since there are 7 loops between the walls of the box \n",
+ "a=7*L\n",
+ "print\"Distance between the walls=\", a,\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Distance between the walls= 4.235e-10 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg65:pg-60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "L = 10**-9 # width of potential well in meter\n",
+ "h = 6.63e-34 # Plank constant in joule-sec\n",
+ "m = 9.1e-31 # mass of electron in Kg\n",
+ "n1=1\n",
+ "n2=2\n",
+ "n3=3\n",
+ "lamda1 = 2*L/n1 # Calculation of wavelength\n",
+ "lamda2 = 2*L/n2 # Calculation of wavelength\n",
+ "lamda3 = 2*L/n3 # Calculation of wavelength\n",
+ "E=h**2/(8*m*L**2) # Calculation of energy in Joule\n",
+ "E=round(E/(1.6*10**-19),2) # Calculation of energy in eV\n",
+ "E1_eV = n1**2*E # Calculation of energy in eV\n",
+ "E2_eV = n2**2*E # Calculation of energy in eV\n",
+ "E3_eV = n3**2*E # Calculation of energy in eV\n",
+ "print\"For first energy state: wavelength in angstrom & Energy in eV=\",int(lamda1*10**10),\",\",round(E1_eV,2)\n",
+ "print\"For second energy state: wavelength in angstrom & Energy in eV=\",int(lamda2*10**10),\",\",round(E2_eV,2)\n",
+ "print\"For third energy state: wavelength in angstrom & Energy in eV=\",round(lamda3*10**10,1),\",\",round(E3_eV,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For first energy state: wavelength in angstrom & Energy in eV= 20 , 0.38\n",
+ "For second energy state: wavelength in angstrom & Energy in eV= 10 , 1.52\n",
+ "For third energy state: wavelength in angstrom & Energy in eV= 6.7 , 3.42\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg66:pg-60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "c=3*10**10 #speed of light in cm/sec\n",
+ "del_t=2*10**-7#uncertainty in time in sec\n",
+ "#x is the distance between source and reflecting object\n",
+ "del_x=(c/2)*del_t\n",
+ "print\"Uncertainty in distance=\",int(del_x),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uncertainty in distance= 3000 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter2_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter2_2.ipynb new file mode 100644 index 00000000..7e8438a5 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter2_2.ipynb @@ -0,0 +1,1050 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6f9fd448718bc5e88c3775b99e3a7cc7745b7bbf33f8a54ff8af4c9ae6e09d6e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2:X-RAY DIFFRACTION"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "V=25*10**3 #potential difference in Volt\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "e=1.6*10**-19 #charge of electron in coulomb\n",
+ "theta=radians(15.8) #glancing angle for NaCl crystal for CuKa line\n",
+ "d=2.82 #for NaCl\n",
+ "lamda=2*d*sin(theta) \n",
+ "print \"wavelength of CuKa line=\",round(lamda,4),\"Angstrom\"\n",
+ "lamda_min=(h*c/(e*V))*10**10\n",
+ "print \"wavelength of X-Ray photon at shortest limit=\",round(lamda_min,4),\"Angstrom\"\n",
+ "theta_1=degrees(math.asin(lamda_min/(2*d)))\n",
+ "print \"glancing angle for photons at the shortest wavelength limit=\",round(theta_1,2),\"degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of CuKa line= 1.5357 Angstrom\n",
+ "wavelength of X-Ray photon at shortest limit= 0.4972 Angstrom\n",
+ "glancing angle for photons at the shortest wavelength limit= 5.06 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg2:pg-70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "theta=radians(30) #glancing angle in radians\n",
+ "d=1.87 #spacing between lattice planes in angstrom\n",
+ "n=2 #for second order reflection\n",
+ "lamda=2*d*sin(theta)/n\n",
+ "print \"wavelength of X-Rays=\",lamda,\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of X-Rays= 0.935 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg3:pg-70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "lamda=0.36*10**-8 #wavelength in cm\n",
+ "theta=radians(4.8)#glancing angle in radians\n",
+ "n=1 #for first order diffraction\n",
+ "d=n*lamda/(2*sin(theta))\n",
+ "print \"interplanar separation of atomic planes in crystal=\",\"{:.2e}\".format(d),\"cm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "interplanar separation of atomic planes in crystal= 2.15e-08 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg4:pg-71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "lamda=2.6*10**-10 #wavelength in meter\n",
+ "theta=radians(20) #in radians\n",
+ "n=2 #for second order diffraction\n",
+ "d=n*lamda/(2*sin(theta))\n",
+ "print \"spacing constant of the crystal=\",round(d*10**10,2),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "spacing constant of the crystal= 7.6 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg5:pg-71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "d=2.82*10**-10 #spacing in meter\n",
+ "n=2 #for second order\n",
+ "sin_theta=1 #maximum value of sin(theta)\n",
+ "lamda_max=2*d*sin_theta/n\n",
+ "print \"longest wavelength=\",lamda_max*10**10,\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "longest wavelength= 2.82 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg6:pg-71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "lamda=0.842 #wavelength in angstrom\n",
+ "theta_1=8+(35./60) #1' = (1/60)\u00ba = 0.01666667\u00ba\n",
+ "theta_3=math.asin(round(3*sin(radians(theta_1)),2))\n",
+ "print \"glancing angle for 3rd order reflection=\",round(math.degrees(theta_3),1),\"degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "glancing angle for 3rd order reflection= 26.7 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg7:pg-71"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "lamda=0.97 #wavelength of first X-ray beam in angstrom\n",
+ "theta=radians(60) #angle of reflection in radians\n",
+ "n=3 #for third order reflection\n",
+ "d=n*lamda/(2*sin(theta))\n",
+ "n_1=1 #for first order reflection\n",
+ "theta_1=radians(30) #angle of reflection in radians\n",
+ "lamda_1=2*d*sin(theta_1)\n",
+ "print \"wavelength of the second X-ray beam=\",round(lamda_1,2),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength of the second X-ray beam= 1.68 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg8:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "lamda=0.30 #wavelength in angstrom\n",
+ "d=0.5 #lattice spacing in angstrom\n",
+ "n=2 #for second order diffraction\n",
+ "theta=math.asin(n*lamda/(2*d))\n",
+ "print \"For second order maxima, angle=\",round(math.degrees(theta),2),\"degree\"\n",
+ "n=3 #for third order diffraction\n",
+ "theta=math.asin(n*lamda/(2*d))\n",
+ "print \"For third order maxima, angle=\",round(math.degrees(theta),2),\"degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For second order maxima, angle= 36.87 degree\n",
+ "For third order maxima, angle= 64.16 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg9:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "d=2.82*10**-8 #lattice spacing in cm \n",
+ "c=3*10**10 #speed of light in cm/sec\n",
+ "e=1.6*10**-19 #charge on electron in coulomb\n",
+ "v=9045 #voltage in volt\n",
+ "theta=radians(14)#angle in radians\n",
+ "n=1 #first order\n",
+ "lamda=2*d*sin(theta)/n\n",
+ "h=(e*v*lamda/c)*10**7 #since 1 joule=10**7 erg\n",
+ "print \"h=\",\"{:.2e}\".format(h),\"erg-sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "h= 6.58e-27 erg-sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg10:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "do=2.82 #lattice spacing in angstrom\n",
+ "theta=radians(10) #angle in radians\n",
+ "lamda=2*do*round(sin(theta),4)\n",
+ "print \"wavelength=\",round(lamda,4),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength= 0.9791 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg11:pg-72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "d=0.4086*10**-10 #lattice spacing in meter\n",
+ "h=6.6*10**-34 #planck constant in joule-sec\n",
+ "m=9.1*10**-31 #mass of electron in Kg\n",
+ "n=1 #first order\n",
+ "theta=radians(65) #glancing angle in radians\n",
+ "lamda=2*d*sin(theta)/n\n",
+ "print \"wavelength=\",\"{:.3e}\".format(lamda),\"m\"\n",
+ "v=h/(m*lamda)\n",
+ "print \"velocity of electron=\",\"{:.3e}\".format(v),\"m/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "wavelength= 7.406e-11 m\n",
+ "velocity of electron= 9.793e+06 m/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg12:pg-73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "h=6.62*10**-34 #planck constant in joule-sec\n",
+ "e=1.6*10**-19 #charge on electron in coulomb\n",
+ "m=9*10**-31 #mass of electron in Kg\n",
+ "v=344 #voltage in volt\n",
+ "n=1 #first order\n",
+ "theta=radians(60)#glancing angle in radians\n",
+ "lamda=h/sqrt(2*m*e*v)\n",
+ "d=n*lamda/(2*sin(theta))\n",
+ "print \"spacing of the crystal=\",round(d*10**10,2),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "spacing of the crystal= 0.38 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg13:pg-73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#given that\n",
+ "lamda=1.32*10**-10 #wavelength in meter\n",
+ "theta_deg=9 #angle fraction in degree\n",
+ "theta_min=30 #angle fraction in minute\n",
+ "theta =theta_deg+(theta_min/60.) # Total angle\n",
+ "for n in range(1,5):\n",
+ " d = lamda/(n*2*math.sin(theta*math.pi/180)) # Inter layer spacing\n",
+ " print \"If order is %d then spacing is\"%(n),\"{:.2e}\".format(d),\"meter\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "If order is 1 then spacing is 4.00e-10 meter\n",
+ "If order is 2 then spacing is 2.00e-10 meter\n",
+ "If order is 3 then spacing is 1.33e-10 meter\n",
+ "If order is 4 then spacing is 1.00e-10 meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg14:pg-74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "# given that\n",
+ "theta1_deg = 5 # Absolut degree part of angle for first angle\n",
+ "theta1_min = 23# remainder minute part of angle for first angle\n",
+ "theta2_deg = 7 # Absolut degree part of angle for second angle\n",
+ "theta2_min = 37# remainder minute part of angle for second angle\n",
+ "theta3_deg = 9 # Absolut degree part of angle for third angle\n",
+ "theta3_min = 22# remainder minute part of angle for third angle\n",
+ "\n",
+ "val1 = math.sin((theta1_deg+ theta1_min/60.)*math.pi/180)# Sin value for first angle\n",
+ "val2 = math.sin((theta2_deg+ theta2_min/60.)*math.pi/180) #Sin value for second angle\n",
+ "val3 = math.sin((theta3_deg+ theta3_min/60.)*math.pi/180)#Sin value for third angle\n",
+ "ratio_21 = val2/val1\n",
+ "ratio_31 = val3/val1\n",
+ "print \"Interatomic layer separation ratios in crystal are as 1 : %f : %f\"%(ratio_21,ratio_31)\n",
+ "print \"Above relation shows that crystal has a simple cubic crystal structure.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Interatomic layer separation ratios in crystal are as 1 : 1.412775 : 1.734750\n",
+ "Above relation shows that crystal has a simple cubic crystal structure.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg15:pg-82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 #planck constant in joule-sec\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "mo=9.1*10**-31 #mass of electron in Kg\n",
+ "theta=radians(180)#scattering angle in radians\n",
+ "d_lamda=h*(1-math.cos(theta))/(mo*c)\n",
+ "print \"change in wavelength of photon=\",round(d_lamda*10**10,4),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in wavelength of photon= 0.0486 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg16:pg-82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#given that\n",
+ "E=100. # Energy of X ray beam in KeV\n",
+ "theta=30 # Scattering angle in degree\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # Speed of light in m/s\n",
+ "E_rest=(mo*c**2)/(1.6e-19*1e3) # Rest mass energy in KeV\n",
+ "k=(1/E)+ ((1-math.cos(radians(theta)))/(E_rest))\n",
+ "k=int(k*10000)*10**-4\n",
+ "del_e=E-1/k # Energy of recoiled electron\n",
+ "print \"Energy of recoiled electrons is \",round(del_e,2),\"KeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy of recoiled electrons is 1.96 KeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg17:pg-82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#given that\n",
+ "lamda=1 # wavelength in angstrom\n",
+ "h=6.63*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=90 # scattering angle in degree\n",
+ "d_lambda=h*(1-math.cos(radians(90)))/(mo*c) # calculation of compton shift \n",
+ "print \"compton shift is \",round(d_lambda*1e10,4),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "compton shift is 0.0243 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg18:pg-83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#given that\n",
+ "lamda=0.015 #wavelength in angstrom\n",
+ "h=6.63*10**-34 #Planks constant in joule-sec\n",
+ "mo=9.1*10**-31 #mass of electron in kg\n",
+ "c=3*10**8 #speed of light in m/sec\n",
+ "theta=60 #scattering angle in degree\n",
+ "d_lambda=h*(1-math.cos(theta*math.pi/180))*1e10/(mo*c) \n",
+ "lambda_n=lamda+d_lambda\n",
+ "print \"Wavelength of the scattered X-ray is \",round(lambda_n,3),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of the scattered X-ray is 0.027 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg19:pg-83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#given that\n",
+ "lamda=1 # wavelength in angstrom\n",
+ "h=6.63*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=90 # scattering angle in degree\n",
+ "d_lambda= h*(1-math.cos(radians(90)))*1e10/(mo*c) # calculation of wavelength shift in angstrom\n",
+ "lambda_n=lamda+d_lambda # Calculation of wavelength of scattered beam in angstrom\n",
+ "K_E=h*c*(lambda_n-lamda)*1e10/(1.6e-19*lambda_n*lamda)# Calculation of K.E of recoiled electron in eV\n",
+ "phi=math.atan(round((lamda/lambda_n),2))# calculation of Direction of the recoiled electron\n",
+ "print \"Wavelength of the scattered beam is \",round(lambda_n,4),\"Angstrom\"\n",
+ "print \"Kinetic Energy imparted to the recoiled electron is \",round(K_E),\"eV\"\n",
+ "print \"Direction of the recoiled electron is \",round(degrees(phi),1),\"degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of the scattered beam is 1.0243 Angstrom\n",
+ "Kinetic Energy imparted to the recoiled electron is 295.0 eV\n",
+ "Direction of the recoiled electron is 44.4 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg20:pg-84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "#given that\n",
+ "lamda=1 # wavelength in angstrom\n",
+ "h=6.63*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=90 # scattering angle in degree\n",
+ "d_lambda= h*(1-math.cos(radians(90)))*1e10/(mo*c) # calculation of compton shift in angstrom\n",
+ "lambda_n=lamda+d_lambda # Calculation of wavelength of scattered beam in angstrom\n",
+ "K_E=h*c*(lambda_n-lamda)*1e10/(1.6e-19*lambda_n*lamda)# Calculation of K.E of recoiled electron in eV\n",
+ "print \"Compton shift is \",round(d_lambda,4),\"Angstrom\"\n",
+ "print \"Kinetic Energy imparted to the recoiled electron is \",round(K_E),\"eV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Compton shift is 0.0243 Angstrom\n",
+ "Kinetic Energy imparted to the recoiled electron is 295.0 eV\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg21:pg-84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "E=0.88*10**6 #energy of gamma-rays in eV\n",
+ "theta=180 #scattering angle in degree for maximum energy of recoiled electron\n",
+ "lamda=h*c*10**10/(E*1.6*10**-19)\n",
+ "d_lamda_max=h*(1-math.cos(radians(theta)))*1e10/(mo*c)\n",
+ "lamda_n=lamda+d_lamda_max\n",
+ "K_E_max=h*c*d_lamda_max*1e10/(1.6e-19*lamda_n*lamda)\n",
+ "print \"Maximum energy of compton recoil electrons is \",round(K_E_max*10**-6,3),\"MeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum energy of compton recoil electrons is 0.682 MeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg22:pg-85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.62*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.0*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=90 # scattering angle in degree \n",
+ "lamda=h*(1-math.cos(radians(theta)))*1e10/(mo*c)\n",
+ "d_lamda=lamda # compton shift \n",
+ "E=h*c/(round(lamda,4)*1e-10)\n",
+ "print \"Wavelength of incident photon is \",round(lamda,4),\"Angstrom\"\n",
+ "print \"Energy of incident photon is \",\"{:.3e}\".format(E),\"joule\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of incident photon is 0.0245 Angstrom\n",
+ "Energy of incident photon is 8.106e-14 joule\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg23:pg-85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=90 # scattering angle in degree \n",
+ "d_lamda=h*(1-math.cos(radians(theta)))*1e10/(mo*c)\n",
+ "print \"Percentage change in energy when photon is:\"\n",
+ "#(a) for microwave photon\n",
+ "lamda=3*10**8 #wavelength of microwave photon in Angstrom\n",
+ "energy_change=d_lamda*100/(lamda+d_lamda)\n",
+ "print \"A microwave photon= \",\"{:.1e}\".format(energy_change),\"%\"\n",
+ "\n",
+ "#(b) for visible light photon\n",
+ "lamda=5000 #wavelength of visible light photon in Angstrom\n",
+ "energy_change=d_lamda*100/(lamda+d_lamda)\n",
+ "print \"A visible light photon= \",\"{:.2e}\".format(energy_change),\"%\"\n",
+ "\n",
+ "#(c) for X-ray photon\n",
+ "lamda=1 #wavelength of X-ray photon in Angstrom\n",
+ "energy_change=d_lamda*100/(lamda+d_lamda)\n",
+ "print \"An X-ray photon= \",round(energy_change,1),\"%\"\n",
+ "\n",
+ "#(d) for gamma-ray photon\n",
+ "lamda=0.0124 #wavelength of gamma-ray photon in Angstrom\n",
+ "energy_change=d_lamda*100/(lamda+d_lamda)\n",
+ "print \"A gamma-ray photon= \",int(energy_change),\"%\"\n",
+ "print \"Hence, the compton effect is dominant only in the gamma-ray region and shorter X-ray region.It is not observable in the visible region and microwave region\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage change in energy when photon is:\n",
+ "A microwave photon= 8.1e-09 %\n",
+ "A visible light photon= 4.86e-04 %\n",
+ "An X-ray photon= 2.4 %\n",
+ "A gamma-ray photon= 66 %\n",
+ "Hence, the compton effect is dominant only in the gamma-ray region and shorter X-ray region.It is not observable in the visible region and microwave region\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg24:pg-86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "lamda=2 # wavelength in angstrom\n",
+ "h=6.62*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=45 # scattering angle in degree\n",
+ "d_lamda=h*(1-math.cos(radians(theta)))*1e10/(mo*c) \n",
+ "lamda_n=lamda+d_lamda \n",
+ "f=d_lamda/lamda_n # Calculation of fraction of energy lost by photon \n",
+ "print \"Fraction of energy lost by photon is \",round(f,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fraction of energy lost by photon is 0.0035\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg25:pg-87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "C_W=0.0242 #compton wavelength of electron in Angstrom\n",
+ "theta=45 # scattering angle in degree\n",
+ "d_lamda=C_W*(1-math.cos(radians(theta)))\n",
+ "lamda= d_lamda\n",
+ "print \"Wavelength= \",round(lamda,3),\"Angstrom\"\n",
+ "#answer is incomplete in book as only wavelength is calculated and no region is specified\n",
+ "print \"Hence, such a photon lie in the Gamma-ray region of electromagnetic spectrum.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength= 0.007 Angstrom\n",
+ "Hence, such a photon lie in the Gamma-ray region of electromagnetic spectrum.\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg26:pg-87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.6*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "E=510*10**3 # energy of gamma-rays in eV\n",
+ "theta=90 # scattering angle in degree \n",
+ "lamda=h*c/(E*1.6*10**-19)\n",
+ "d_lamda=h*(1-math.cos(radians(theta)))/(mo*c)\n",
+ "lamda_n=lamda+d_lamda\n",
+ "Er=h*c*d_lamda/(lamda_n*lamda)\n",
+ "phi=math.atan(lamda/lamda_n)\n",
+ "print \"Wavelength of scattered radiation is \",\"{:.3e}\".format(lamda_n),\"meter\"\n",
+ "print \"Energy of recoil electron is \",\"{:.3e}\".format(Er),\"joule\"\n",
+ "print \"Direction of the recoil electron is \",round(degrees(phi),2),\"degree\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of scattered radiation is 4.844e-12 meter\n",
+ "Energy of recoil electron is 4.073e-14 joule\n",
+ "Direction of the recoil electron is 26.61 degree\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg27:pg-88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.63*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "E=510*10**3 # energy of gamma-rays in eV\n",
+ "theta=90 # scattering angle in degree \n",
+ "lamda=h*c/(E*1.6*10**-19)\n",
+ "d_lamda=h*(1-math.cos(radians(theta)))/(mo*c)\n",
+ "lamda_n=lamda+d_lamda\n",
+ "print \"Wavelength of scattered radiation is \",round(lamda_n*10**10,4),\"Angstrom\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of scattered radiation is 0.0487 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg28:pg-88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "h=6.62*10**-34 # Planck's constant in joule-sec\n",
+ "mo=9.1*10**-31 # mass of electron in kg\n",
+ "c=3*10**8 # speed of light in m/sec\n",
+ "theta=180 # scattering angle in degree for minimum energy of incident photon\n",
+ "lamda_max=h*(1-math.cos(radians(theta)))/(mo*c)\n",
+ "E_min=h*c/lamda_max\n",
+ "print \"Minimum energy of incident photon is \",int(round(E_min/(1.6*10**-16))),\"KeV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum energy of incident photon is 256 KeV\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter3_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter3_2.ipynb new file mode 100644 index 00000000..7ce71243 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter3_2.ipynb @@ -0,0 +1,685 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6d1073432a2c7812fd516805a657e8398a2d4eda1653330c30831b6e9858927d"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3:DIELECTRIC PROPERTIES OF MATERIALS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Eg=6.0 #dielectric constant of glass plate\n",
+ "dg=0.25 #thickness of glass plate in mm\n",
+ "Ep=3.0 #dielectric constant of plastic film\n",
+ "dp=0.1 #thickness of plastic film in mm\n",
+ "Eo=8.85e-12 #permittivity of free space in F/m \n",
+ "A=1 #let surface area be 1\n",
+ "Cg=Eg*Eo*A/dg\n",
+ "Cp=Ep*Eo*A/dp\n",
+ "ratio=Cg/Cp\n",
+ "print\"Cg = \",ratio,\"Cp\"\n",
+ "print\"Since Cp>Cg,the plastic film filled capacitor holds more charge than the glass plate filled capacitor\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cg = 0.8 Cp\n",
+ "Since Cp>Cg,the plastic film filled capacitor holds more charge than the glass plate filled capacitor\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg2:pg-120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Er=2.8 #dielectric constant of a dielectric material\n",
+ "D=3e-8 #magnitude of electric displacement vector in C/m**2\n",
+ "p=(Er-1)*D/Er\n",
+ "print\"Polarization is \",round(p,10),\"C/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Polarization is 1.93e-08 C/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg3:pg-120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "E=1000 #electric field in V/m\n",
+ "p=4.3e-8 #polarization in C/m**2\n",
+ "Eo=8.85e-12#permittivity of free space in F/m \n",
+ "Er=1+(p/(Eo*E))\n",
+ "print\"Relative permittivity of NaCl is \",round(Er,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative permittivity of NaCl is 5.86\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg4:pg-120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Er=1.000074 #dielectric constant of helium \n",
+ "Eo=8.85e-12 #permittivity of free space in F/m (in book F/m2 is printed which is wrong)\n",
+ "E=100 #electric field in V/m\n",
+ "Na=6e23 #Avogadro number\n",
+ "V=22.4 #volume occupied by 1gm atom of gas at NTP in litres\n",
+ "N=Na/(V*1e-3)\n",
+ "p=Eo*(Er-1)*E\n",
+ "P=p/N\n",
+ "print\"Induced dipole moment is \",round(P,42),\"Cm\"#answer in book is in different form as 24.42e-40 Cm"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Induced dipole moment is 2.445e-39 Cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg5:pg-121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Epsilon=1.46e-10 #permittivity of diamond in C**2/Nm**2\n",
+ "Eo=8.86e-12 #permittivity of free space in C**2/Nm**2\n",
+ "Er=Epsilon/Eo \n",
+ "X=Eo*(Er-1)\n",
+ "print\"Dielectric constant is \",round(Er,2)\n",
+ "print\"Electrical susceptibility is \",round(X,12),\"C**2/Nm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dielectric constant is 16.48\n",
+ "Electrical susceptibility is 1.37e-10 C**2/Nm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg6:pg-121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Xe=35.4e-12 #electrical susceptibility in C**2/Nm**2\n",
+ "Eo=8.85e-12 #permittivity of free space in C**2/Nm**2 \n",
+ "K=1+(Xe/Eo)\n",
+ "Epsilon=Eo*K\n",
+ "print\"Dielectric constant is \",int(K)\n",
+ "print\"Permittivity of the material is \",Epsilon,\"C**2/Nm**2\"\n",
+ "#answer in book is in different form as 44.25e-12 C**2/Nm**2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dielectric constant is 5\n",
+ "Permittivity of the material is 4.425e-11 C**2/Nm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg7:pg-121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Vo=60 #applied potential difference in volt\n",
+ "V=30 #reduced potential difference in volt\n",
+ "K=Vo/V\n",
+ "print\"Dielectric constant of the liquid is \",K"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dielectric constant of the liquid is 2\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg8:pg-121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Vo=100 #potential difference in volts\n",
+ "t=0.3 #thickness of insulator in cm\n",
+ "A=100 #area in cm**2\n",
+ "d=1 #separation between plates in cm\n",
+ "K=7 #dielectric constant \n",
+ "Eo=8.9e-12 #permittivity of free space in C**2/Nm**2\n",
+ "E_o=Vo/(d*1e-2)\n",
+ "E=E_o/K\n",
+ "D=K*Eo*E\n",
+ "p=(K-1)*Eo*E\n",
+ "print\"E = \",\"{:.2e}\".format(E),\"Volt/m\"\n",
+ "print\"D = \",D,\"C/m**2\"\n",
+ "print\"p = \",round(p,9),\"C/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E = 1.43e+03 Volt/m\n",
+ "D = 8.9e-08 C/m**2\n",
+ "p = 7.6e-08 C/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg9:pg-122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "E=6e4 #electric field in V/m\n",
+ "K=1.000134 #dielectric constant of neon\n",
+ "Eo=8.9e-12 #permittivity of free space in F/m\n",
+ "Na=6e23 #Avogadro number\n",
+ "V=22.4 #volume occupied by 1gm atom of gas at NTP in litres\n",
+ "p=Eo*(K-1)*E\n",
+ "N=Na/(V*1e-3)\n",
+ "P=p/N\n",
+ "alpha=P/(Eo*E)\n",
+ "print\"Induced dipole moment is\",round(P,38),\"Cm\"\n",
+ "print\"Atomic polarizability of neon is \",round(alpha,32),\"m**3\"\n",
+ "#answer in book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Induced dipole moment is 2.67e-36 Cm\n",
+ "Atomic polarizability of neon is 5e-30 m**3\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg11:pg-123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Er=1.0024 #dielectric constant of argon atom\n",
+ "N=2.7e25 #number of atoms per cubic meter\n",
+ "Eo=8.85e-12 #permittivity of free space in F/m\n",
+ "alpha_e=Eo*(Er-1)/N\n",
+ "print\"Electronic polarizability is \",round(alpha_e,41),\"Fm**2\"\n",
+ "#answer is wrong in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Electronic polarizability is 7.9e-40 Fm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg12:pg-123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "N=9.8e26 #number of atoms in volume of one cubic meter of hydrogen gas\n",
+ "Eo=8.85e-12 #permittivity of free space in F/m\n",
+ "ao=0.53e-10 #radius of hydrogen atom in meter\n",
+ "alpha=4*math.pi*Eo*ao**3\n",
+ "Er=1+(4*math.pi*N*ao**3)\n",
+ "print\"Polarizability is \",round(alpha,43),\"Fm**2\"\n",
+ "print\"Relative permittivity is \",round(Er,4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Polarizability is 1.66e-41 Fm**2\n",
+ "Relative permittivity is 1.0018\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg13:pg-124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "alpha_300=2.5e-39 # total polarizability in C**2m/N at 300 K\n",
+ "alpha_400=2.0e-39 # total polarizability in C**2m/N at 400 K\n",
+ "T1 =300 # temperature in Kelvin\n",
+ "T2 =400 # temperature in Kelvin\n",
+ "beta=(alpha_300-alpha_400)*(T1*T2/(T2-T1))\n",
+ "alpha_def_300=alpha_300 - beta/300\n",
+ "alpha_oriant_300=beta/300\n",
+ "alpha_oriant_400=beta/400\n",
+ "print\"Deformational Polarizability is \",alpha_def_300,\"C**2mN**-1\"\n",
+ "print\"Orientational Polarizability at %d K is \"%T1,alpha_oriant_300,\"C**2mN**-1\"\n",
+ "print\"Orientational Polarizability at %d K is \"%T2,alpha_oriant_400,\"C**2mN**-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Deformational Polarizability is 5e-40 C**2mN**-1\n",
+ "Orientational Polarizability at 300 K is 2e-39 C**2mN**-1\n",
+ "Orientational Polarizability at 400 K is 1.5e-39 C**2mN**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg14:pg-132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "m=32 # Atomic weight of sulphur\n",
+ "d=2.08 # Density in g/cm**3\n",
+ "alpha_e=3.28e-40 # Electronic polarizability in Fm**2\n",
+ "Na=6.023e23 # Avogadro Number\n",
+ "Eo=8.85e-12 # Permittivity of free space in F/m\n",
+ "N=Na*d*1e6/m \n",
+ "k=N*alpha_e/(3*Eo)\n",
+ "epsilon_r = (1+ k*2)/(1-k)# Calculation of relative permittivity\n",
+ "print\"Relative dielectric constant is \",round(epsilon_r,1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative dielectric constant is 3.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg15:pg-132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "n=1.5 # Refractive index\n",
+ "Er=5.6 # Static dielectric constant\n",
+ "per=(1-((n**2-1)/(n**2+2))*(Er+2)/(Er-1))*100 # Pecentage of ionic polarizability\n",
+ "print\"Percentage of ionic polarizability is \",round(per,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of ionic polarizability is 51.4 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg16:pg-133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "n=sqrt(2.69) # Refractive index\n",
+ "Er=4.94 # Static dielectric constant\n",
+ "k1=(Er-1)/(Er+2)\n",
+ "k2=(n**2-1)/(n**2+2)\n",
+ "ratio=1/round(((k1/k2)-1),3) \n",
+ "print\"Ratio of electronic to ionic polarizability is \",round(ratio,3)\n",
+ "#in book ai/ae is mentioned instead of ae/ai in final answer which is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ratio of electronic to ionic polarizability is 1.736\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg17:pg-133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Er=6.75 #dielectric constant of glass\n",
+ "n=1.5 #refractive index of glass\n",
+ "f=1e9 #frequency in Hz\n",
+ "per=(Er-n**2)*100/(Er-1)\n",
+ "print\"Percentage attributed to ionic polarizability is \",round(per,1),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage attributed to ionic polarizability is 78.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg18:pg-142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "t=5.5e-3 #thickness of quartz crystal plate in meter\n",
+ "p=2.65e3 #density of quartz crystal in Kg/m**3\n",
+ "Y=8e10 #Young's modulus of quartz in N/m**2 (value is wrong in question in book)\n",
+ "m=1 \n",
+ "f=m*sqrt(Y/p)/(2*t)\n",
+ "print\"Frequency is \",int(f*1e-3),\"KHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency is 499 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg19:pg-148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "Er=4.36 #real part of dielectric constant of bakelite\n",
+ "N=4e28 #number of atoms per cubic meter\n",
+ "tan_d=2.8e-2#loss tangent at 1 MHz freuqency\n",
+ "Eo=8.853e-12#permittivity of free space in F/m\n",
+ "alpha=(3*Eo/N)*(Er*(1-(1j*tan_d))-1)/(Er*(1-(1j*tan_d))+2)\n",
+ "x=round(alpha.real*1e40,1)\n",
+ "y=round(alpha.imag*1e40,2)\n",
+ "alpha=complex(x,y)\n",
+ "print\"Complex polarizability is \",alpha*1e-40,\"Fm**2\"\n",
+ "#in book answer is in different form and as (3.5-0.06i)*10**-40\n",
+ "#in book unit of answer is not mentioned"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Complex polarizability is (3.5e-40-6e-42j) Fm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg20:pg-149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "t=18e-6 # Relaxation time in second\n",
+ "Er_d=1 # let real part of dielectric constant be 1\n",
+ "Er_dd=1 # let imaginary part of dielectric constant be 1\n",
+ "f=1/(2*math.pi*t) # Calculation of frequency\n",
+ "delta=math.atan(Er_dd/Er_d)\n",
+ "phi=90-(delta*180/math.pi) # Calculation of phase difference\n",
+ "print\"Frequency is \",round(f/1e3,1),\"KHz\"\n",
+ "print\"Phase difference between current and voltage is %d degree\"%(phi)\n",
+ "print\"Current leads the voltage \"#this part is not mentioned in answer in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency is 8.8 KHz\n",
+ "Phase difference between current and voltage is 45 degree\n",
+ "Current leads the voltage \n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter4_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter4_2.ipynb new file mode 100644 index 00000000..0443e127 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter4_2.ipynb @@ -0,0 +1,440 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6ffebed5f6e8af47972c68c02b5c0d08a0cfa4d26af637f556f6c79bce1dec26"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter4:MAGNETIC PROPERTIES OF MATERIALS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "phi_B=2.4e-5 #magnetic flux in weber\n",
+ "A=0.2 #cross-sectional area in cm**2\n",
+ "H=1600 #magnetising field in A/m\n",
+ "mu_o=4*round(math.pi,2)*1e-7 #absolute permeability of air in N/A**2\n",
+ "B=phi_B/(A*1e-4)\n",
+ "mu=B/H\n",
+ "Xm=mu/mu_o-1\n",
+ "print\"Magnetic permeability of iron bar is \",\"{:.1e}\".format(mu),\"N/A**2\"\n",
+ "print\"Magnetic susceptibility of iron bar is \",round(Xm,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic permeability of iron bar is 7.5e-04 N/A**2\n",
+ "Magnetic susceptibility of iron bar is 596.13\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg2:pg-154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Xm=948e-11 #magnetic susceptibility of a medium\n",
+ "pi=1 #let\n",
+ "mu_o=4*pi*1e-7 #absolute permeability of air in H/m\n",
+ "mu_r=1+Xm\n",
+ "mu=int(mu_r)*mu_o\n",
+ "print\"Relative Permeability is =\",mu_r,\"=\",int(mu_r),\"or >\",int(mu_r)\n",
+ "print\" Relative permeability is slightly greater than one.\"\n",
+ "print\"Permeability is = %s*pi H/m\"%mu #answer in book is 4*(pi)*1e-7 H/m"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Relative Permeability is = 1.00000000948 = 1 or > 1\n",
+ " Relative permeability is slightly greater than one.\n",
+ "Permeability is = 4e-07*pi H/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg3:pg-154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "mu_r=1200 #relative permeability of iron rod\n",
+ "n=5 #number of turns per cm\n",
+ "i=0.5 #current in ampere\n",
+ "V=1e-3 #volume of iron rod in m**3\n",
+ "I=(mu_r-1)*(n*1e2)*i\n",
+ "M=I*V\n",
+ "print\"Magnetic moment is \",\"{:.0e}\".format(M),\"Am**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic moment is 3e+02 Am**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg4:pg-155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "mu_r=100 #relative permeability of iron rod\n",
+ "n=300 #number of turns per meter\n",
+ "i=0.5 #current in ampere\n",
+ "D=10 #diameter of iron rod in mm\n",
+ "r=D/2 #radius of iron rod in mm\n",
+ "l=2 #length of iron rod in meter\n",
+ "I=(mu_r-1)*n*i\n",
+ "V=round(math.pi,2)*(r*1e-3)**2*l\n",
+ "M=I*V\n",
+ "print\"Magnetic moment is \",round(M,3),\"Am**2\"\n",
+ "#answer in book is wrong as the value of l is taken wrong in calcultion. "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic moment is 2.331 Am**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg5:pg-163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "n=1e29 #number of atoms per unit volume in atoms/m**3\n",
+ "Pm=1.8e-23 #magnetic moment of one atom in A-m**2\n",
+ "K=1.38e-23 #Boltzmann's constant in J/K\n",
+ "T=300 #temperature in Kelvin\n",
+ "mu_o=4*round(math.pi,2)*10**-7 #absolute permeability of air in N/A**2\n",
+ "B=0.1 #magnetic flux density in weber/m**2\n",
+ "A=1 #cross-section area in cm**2\n",
+ "l=10 #length of iron bar in cm\n",
+ "Xm=mu_o*n*Pm**2/(3*K*T) #magnetic susceptibility of iron bar\n",
+ "P_m=Pm**2*B/(3*K*T) #mean dipole moment of an iron atom in A-m**2\n",
+ "V=(A*1e-4)*(l*1e-2) #volume of iron bar in m**3\n",
+ "n_o_a=V*n \n",
+ "dm=n_o_a*P_m #dipole moment of the iron bar \n",
+ "I=Pm*n \n",
+ "m=I*V\n",
+ "print\"Magnetic Susceptibility is \",\"{:.3e}\".format(Xm)\n",
+ "print\"Dipole moment is \",\"{:.3e}\".format(dm),\"Am**2\"\n",
+ "print\"Magnetisation is \",\"{:.1e}\".format(I),\"A/m\"\n",
+ "print\"Magnetic moment is \",int(m),\"Am**2\"#this answer is wrong in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnetic Susceptibility is 3.277e-03\n",
+ "Dipole moment is 2.609e-03 Am**2\n",
+ "Magnetisation is 1.8e+06 A/m\n",
+ "Magnetic moment is 18 Am**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg6:pg-169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "H=5e3 #Coercivity of bar magnet in ampere/m \n",
+ "l=10 #length of solenoid in cm\n",
+ "n=50 #number of turns in solenoid\n",
+ "i=H*(l*1e-2)/n\n",
+ "print\"Current is \",int(i),\"amp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current is 10 amp\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg8:pg-170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "a=250 #area of B-H loop in J/m**3\n",
+ "f=50 #frequency of a.c. in Hz\n",
+ "m=9.0 #mass of iron core in Kg\n",
+ "p=7500 #density of iron in Kg/m**3\n",
+ "V=m/p\n",
+ "n=50*60*60\n",
+ "E=n*V*a\n",
+ "print\"Hysteresis loss of energy E per hour is \",\"{:.1e}\".format(E),\"J\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hysteresis loss of energy E per hour is 5.4e+04 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg10:pg-170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "A=0.785e-4 #cross-sectional area of rowland ring in m**2\n",
+ "Ri=5.0 #inner radius in cm\n",
+ "Ro=6.0 #outer radius in cm\n",
+ "N=400 #number of turns of wire\n",
+ "Bo=2e-4 #magnetic flux density in weber/m**2\n",
+ "mu_o=4*math.pi*10**-7 #absolute permeability of air in N/A**2\n",
+ "Ns=50 #number of turns in secondary coil\n",
+ "R=8.0 #resistance in ohm\n",
+ "B1=800*Bo #magnetic flux density in weber/m**2\n",
+ "l=2*math.pi*(Ri+Ro)*1e-2/2\n",
+ "i=Bo*l/(mu_o*N)\n",
+ "q=Ns*B1*A/R\n",
+ "print\"Required Current is \",i,\"amp\"\n",
+ "print\"Charge passed is \",q,\"coulomb\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required Current is 0.1375 amp\n",
+ "Charge passed is 7.85e-05 coulomb\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg11:pg-171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "mu_r=400 #relative permeability of iron ring\n",
+ "r=0.1 #mean radius of iron ring in meter\n",
+ "A=5e-4 #cross-sectional area of iron ring in m**2\n",
+ "n=1000 #number of turns of wire\n",
+ "i=4 #current in ampere\n",
+ "mu_o=4*math.pi*10**-7 #absolute permeability of air in N/A**2\n",
+ "B=mu_o*mu_r*n*i/(2*math.pi*r)\n",
+ "phi=B*A \n",
+ "print\"Flux in the ring is \",\"{:.2e}\".format(phi),\"weber\"\n",
+ "n_o=500 #number of turns in secondary coil per meter\n",
+ "R=10 #resistance in ohm\n",
+ "q=2*n_o*A*B/R\n",
+ "print\"Electricity discharged through the secondary coil is \",q,\"coulomb\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flux in the ring is 1.60e-03 weber\n",
+ "Electricity discharged through the secondary coil is 0.16 coulomb\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg12:pg-171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "m=12 #weight of the iron core in Kg\n",
+ "p=7.5 #density of iron core in gm/cc\n",
+ "f=50 #frequency in cycles/sec\n",
+ "a=3000 #area of hysteresis loop in ergs/cm**3 (unit is misprinted in question in book)\n",
+ "V=(m*1e3)/p\n",
+ "n=f*60*60\n",
+ "E=n*V*a\n",
+ "print\"Hourly loss of energy is \",E,\"erg\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hourly loss of energy is 8.64e+11 erg\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg13:pg-172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "a=0.5 #area of B-H loop in cm**2\n",
+ "H=1e3 #value of 1 cm on X-axis in A/m\n",
+ "B=1 #value of 1 cm on Y-axis in Tesla\n",
+ "V=1e-3 #volume of specimen in m**3\n",
+ "n=50 #frequency of a.c. in Hz\n",
+ "area=a*H*B #area of B-H loop in J/m**3 (this is misprinted in solution in book)\n",
+ "p=n*V*area\n",
+ "print\"Hysteresis power loss is \",int(p),\"Watt\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hysteresis power loss is 25 Watt\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter5_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter5_2.ipynb new file mode 100644 index 00000000..b4149bf9 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter5_2.ipynb @@ -0,0 +1,129 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7491d2c4d618fe75425b86860df2262be87c0957f3295ffece8a7ad5bbdb50d2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter5:ULTRASONIC"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "v=5760 #velocity of propagation of ultrasonic sound wave along X-direction in m/s\n",
+ "t=1.0*10**-3 #thickness of a piezo-electric quartz plate in meter\n",
+ "lamda=2*t #wavelength in meter(since t=lamda/2 corresponding to fundamental frequency)\n",
+ "V=v/lamda #fundamental frequency of the crystal\n",
+ "print\"fundamental frequency of the crystal=\",V/10**6,\"MHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fundamental frequency of the crystal= 2.88 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg2:pg-177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Y=7.9*10**10 #Young's modulus in newton/m**2\n",
+ "p=2650 #density for Quartz in Kg/m**3\n",
+ "t=0.005 #thickness of a Quartz crystal in meter\n",
+ "v=sqrt(Y/p) #velocity for longitudinal vibrations in m/sec\n",
+ "lamda=2*t #wavelength in meter(since t=lamda/2 corresponding to fundamental frequency)\n",
+ "V=v/lamda #fundamental frequency of the crystal\n",
+ "print\"fundamental frequency of the crystal=\",int(round(V/10**3)),\"KHz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "fundamental frequency of the crystal= 546 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg3:pg-177"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "f=200.*10**3 #frequency of ultrasonic sound in Hz\n",
+ "S_a=340 #speed of sound in air in m/s\n",
+ "S_w=1486 #speed of sound in water in m/s\n",
+ "lamda_r=S_a/f#wavelength of reflected sound in metre\n",
+ "print\"Wavelength of reflected sound=\",\"{:.2e}\".format(lamda_r),\"m\"\n",
+ "lamda_t=S_w/f#wavelength of transmitted sound in metre\n",
+ "print\"Wavelength of transmitted sound=\",\"{:.2e}\".format(lamda_t),\"m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of reflected sound= 1.70e-03 m\n",
+ "Wavelength of transmitted sound= 7.43e-03 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter6_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter6_2.ipynb new file mode 100644 index 00000000..84cca408 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter6_2.ipynb @@ -0,0 +1,873 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:86e910aac8ad9805b33a815859e02f5b8809cbe0a64ebed562de56112cded8f8"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter6:ELECTROMAGNETICS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "r=1 #radius in meter\n",
+ "H=2 #magnitude of field vector in amp/meter\n",
+ "pi=1 #let\n",
+ "I=H*2*pi*r \n",
+ "print\"Current in the wire is %d*pi amp\"%I"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current in the wire is 4*pi amp\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg5:pg-212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "sigma=1e-4 #conductivity in siemen/m\n",
+ "Er=2.25 #relative permittivity \n",
+ "E0=1/(4*math.pi*9e9) #permittivity of free space\n",
+ "#E=5e-6*sin(9e9*t) is the electric field in the material volt/m (given)\n",
+ "#J= sigma*E = 1e-4*5e-6*sin(9e9*t)= 5e-10sin(9e9*t)is Conduction current density in A/m**2 \n",
+ "#d(E)/dt= 5e-6*9e9*cos(9e9*t)\n",
+ "#Jd=E0*Er*(d(E)/dt) is Displacement current density in A/m**2\n",
+ "print\"Conduction current density is %s*sin(9e9*t) A/m**2\"%(sigma*5e-6)\n",
+ "print\"Displacement current density is %s*cos(9e9*t) A/m**2\"%round((E0*Er*5e-6*9e9),9)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Conduction current density is 5e-10*sin(9e9*t) A/m**2\n",
+ "Displacement current density is 8.95e-07*cos(9e9*t) A/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg13:pg-236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "H0=1 #magnitude of field vector in amp/meter\n",
+ "mu_0=4*round(math.pi,2)*1e-7 #permeability of free space in H/m\n",
+ "e0=8.85e-12 #permittivity of free space in F/m\n",
+ "E0=H0*sqrt(mu_0/e0)\n",
+ "print\"Magnitude of electric field for plane wave in free space is \",round(E0,2),\"V/m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of electric field for plane wave in free space is 376.72 V/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg14:pg-236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "E0=1e2 #maximum electric field in plane electromagnetic wave in Newton/coul.\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "B0=E0/c \n",
+ "print\"Maximum magnetic field is \",round(B0,9),\"Tesla\"\n",
+ "print\"Maximum magnetic field will be in Z-direction.\"#this part is not printed in answer in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum magnetic field is 3.33e-07 Tesla\n",
+ "Maximum magnetic field will be in Z-direction.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg15:pg-236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "S=2*4.2e4/60 #energy flux per unit area per second at the earth surface\n",
+ "mu_0=4*round(math.pi,2)*1e-7 #permeability of free space in H/m\n",
+ "e0=8.85e-12 #permittivity of free space in F/m\n",
+ "EH=S\n",
+ "E_div_H=sqrt(mu_0/e0)\n",
+ "E=sqrt(E_div_H*EH)\n",
+ "H=EH/E\n",
+ "E0=round(E,1)*round(sqrt(2.),3)\n",
+ "H0=H*sqrt(2.)\n",
+ "print\"Amplitude of electric field is \",round(E0,1),\"V/m\"\n",
+ "print\"Amplitude of magnetic field is \",round(H0,3),\"A-turn m-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplitude of electric field is 1026.8 V/m\n",
+ "Amplitude of magnetic field is 2.726 A-turn m-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg16:pg-236"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "P0=1000 #power in watt\n",
+ "r=2 #distance in meter\n",
+ "Sav=P0/(4*round(math.pi,2)*r**2)\n",
+ "mu_0=4*round(math.pi,2)*1e-7 #permeability of free space in H/m\n",
+ "e0=8.85e-12 #permittivity of free space in F/m\n",
+ "EH=Sav\n",
+ "E_div_H=sqrt(mu_0/e0)\n",
+ "E=sqrt(E_div_H*EH)\n",
+ "H=EH/E\n",
+ "print\"Average value of electric field intensity is \",round(E,2),\"V/m\"\n",
+ "print\"Average value of magnetic field intensity is \",round(H,2),\"A-turn m-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average value of electric field intensity is 86.59 V/m\n",
+ "Average value of magnetic field intensity is 0.23 A-turn m-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg17:pg-237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "S=1.38 #energy flux in KW/m**2\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "mu_0=4*math.pi*1e-7 #permeability of free space in H/m\n",
+ "E0=sqrt(2*mu_0*c*S*1e3)\n",
+ "B0=E0/c\n",
+ "print\"Peak value of electric field is \",round(E0*1e-3,2),\"KV/m\"\n",
+ "print\"Peak value of magnetic field is \",round(B0,7),\"Wb/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Peak value of electric field is 1.02 KV/m\n",
+ "Peak value of magnetic field is 3.4e-06 Wb/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg18:pg-237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "E0=100 #in Newton/coul.\n",
+ "A=1e-3 #area in m**2\n",
+ "l=100 #length in cm\n",
+ "e0=8.85e-12 #permittivity of free space in F/m\n",
+ "V=A*l*1e-2\n",
+ "U=e0*E0**2*V/2\n",
+ "print\"Energy contained in cylinder is \",U,\"Joule\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy contained in cylinder is 4.425e-11 Joule\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg19:pg-238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "E0=0.05 #amplitude of electric field strength in V/m\n",
+ "v=6 #frequency in MHz\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "mu_0=4*math.pi*1e-7 #permeability of free space in H/m\n",
+ "e0=8.85e-12 #permittivity of free space in F/m\n",
+ "T=round(1/(v*1e6),9)\n",
+ "lamda=c/(v*1e6)\n",
+ "H0=E0/sqrt(mu_0/e0)\n",
+ "Sx_av=E0*round(H0,6)/2\n",
+ "print\"E=\",E0,\"*sin(\",\"{:.2e}\".format(2*math.pi/T),\"t -\",(2*round(math.pi,2)/lamda),\"x) V/m\"\n",
+ "print\"H=\",\"{:.2e}\".format(H0),\"*sin(\",\"{:.2e}\".format(2*math.pi/T),\"t -\",(2*round(math.pi,2)/lamda),\"x) A/m\" \n",
+ "print\"B=\",round(E0/c,12),\"*sin(\",\"{:.2e}\".format(2*math.pi/T),\"t -\",(2*round(math.pi,2)/lamda),\"x) Wb/m**2\" \n",
+ "print\"Average poynting vector S=\",Sx_av,\"Wb/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E= 0.05 *sin( 3.76e+07 t - 0.1256 x) V/m\n",
+ "H= "
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "1.33e-04 *sin( 3.76e+07 t - 0.1256 x) A/m\n",
+ "B= 1.67e-10 *sin( 3.76e+07 t - 0.1256 x) Wb/m**2\n",
+ "Average poynting vector S= 3.325e-06 Wb/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg20:pg-239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "lamda=7 #wavelength in mm\n",
+ "E0=42 #maximum magnitude of electric field in V/m\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "print\"E=\",E0,\"*sin(2*pi*(ct-x)/\",lamda,\") V/m\"\n",
+ "print\"B=\",E0/c,\"*sin(2*pi*(ct-x)/\",lamda,\") Wb/m**2 \\nThe magnetic field is along Z-axis.\"\n",
+ "#unit is not mentioned in answer in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E= 42 *sin(2*pi*(ct-x)/ 7 ) V/m\n",
+ "B= 1.4e-07 *sin(2*pi*(ct-x)/ 7 ) Wb/m**2 \n",
+ "The magnetic field is along Z-axis.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg21:pg-239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "er=81 #relative permittivity of distilled water\n",
+ "e0=1 #let, permittivity of free space\n",
+ "mu_0=1 #let, permeability of free space\n",
+ "e=e0*er\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "mu=mu_0#for distilled water\n",
+ "MU=sqrt((mu*e)/(mu_0*e0))\n",
+ "v=c/MU\n",
+ "print\"Refractive index is \",MU\n",
+ "print\"Velocity of light in distilled water is \",\"{:.2e}\".format(v),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Refractive index is 9.0"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Velocity of light in distilled water is 3.33e+07 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg23:pg-241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "E0=7.5 #electric field intensity in KV/m\n",
+ "w=2e9 #angular frequency in rad/sec\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "mu_0=4*round(math.pi,2)*1e-7 #permeability of free space in H/m\n",
+ "e0=8.85e-12 #permittivity of free space in F/m\n",
+ "f=w/(2*round(math.pi,2))\n",
+ "lamda=c/f\n",
+ "T=1/f\n",
+ "H0=E0*1e3/sqrt(mu_0/e0)\n",
+ "print\"Wavelength is \",lamda,\"m\"\n",
+ "print\"Frequency is \",round(f*1e-6,1),\"MHz\"\n",
+ "print\"Time period is \",T,\"sec\"\n",
+ "print\"Amplitude of magnetic field intensity is \",round(H0,2),\"A/m\"\n",
+ "print\"Therefore, Hz=\",round(H0,2),\"*cos( (%.e*t)-(beta*x)) A/m\"%w#unit is not printed in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength is 0.942 m\n",
+ "Frequency is 318.5 MHz\n",
+ "Time period is 3.14e-09 sec\n",
+ "Amplitude of magnetic field intensity is 19.91 A/m\n",
+ "Therefore, Hz= 19.91 *cos( (2e+09*t)-(beta*x)) A/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg24:pg-241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "mu_0=4*math.pi*1e-7 #permeability of free space in H/m\n",
+ "e0=8.854e-12 #permittivity of free space in F/m\n",
+ "#E=45*sin(6e8*pi*t-(2*pi*x))j+15*cos(6e8*pi*t-(2*pi*x))k volt/m (given equation) \n",
+ "#E=Ey*sin((w*t)-(beta*x))j + Ez*cos((w*t)-(beta*x))k (standard form)\n",
+ "#compairing given equation with above equation\n",
+ "pi=1 #let\n",
+ "beta=2*pi\n",
+ "w=6e8*pi\n",
+ "f=w/(2*pi)\n",
+ "n0=sqrt(mu_0/e0)\n",
+ "print\"Phase constant is %d*pi rad/s\"%beta\n",
+ "print\"Angular frequency is %.e*pi rad/s\"%w\n",
+ "print\"Frequency is %.e Hz\"%f\n",
+ "print\"Intrinsic impedance is %d Ohm\"%round(n0)\n",
+ "print\"Magnetic field is [0 %s*cos(6*pi*10**8*t-(2*pi*x)) %s*sin(6*pi*10**8*t-(2*pi*x))] A/m\"%(round(15/n0,4),round(45/n0,3)) #unit is not printed in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase constant is 2*pi rad/s\n",
+ "Angular frequency is 6e+08*pi rad/s\n",
+ "Frequency is 3e+08 Hz\n",
+ "Intrinsic impedance is 377 Ohm\n",
+ "Magnetic field is [0 0.0398*cos(6*pi*10**8*t-(2*pi*x)) 0.119*sin(6*pi*10**8*t-(2*pi*x))] A/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg25:pg-242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import symbols,diff,cos,sin\n",
+ "x,y,B,Y=symbols('x y B Y')\n",
+ "Hz=(6*x*cos(B))+(12*y*sin(Y))\n",
+ "a=diff(Hz,y)\n",
+ "b=diff(-Hz,x)\n",
+ "c=0\n",
+ "d=array([a,b,c])\n",
+ "print\"J =\", d"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "J = [12*sin(Y) -6*cos(B) 0]\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg26:pg-244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "A=1.3 #area in m**2\n",
+ "t=3 #time in hours\n",
+ "S=1.1 #intensity of sun rays in KW/m**2\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "p=A*(t*3600)*(S*1000)/c\n",
+ "print\"Momentum is %se-4 Kg-m/s\"%(p*10000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Momentum is 514.8e-4 Kg-m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg27:pg-245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "S=10 #energy flux in watt/m**2\n",
+ "A=1 #area in m**2\n",
+ "t=1 #time in hour\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "p=2*S*A*(t*3600)/c\n",
+ "F=2*S*A/c\n",
+ "print\"Momentum is %.1e Kg-m/s\"%p\n",
+ "print\"Force is %.2e N\"%F"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Momentum is 2.4e-04 Kg-m/s\n",
+ "Force is 6.67e-08 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg29:pg-251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "mu=4*math.pi*1e-7 #permeability in H/m\n",
+ "f=71.6 #frequency in MHz\n",
+ "sigma=3.54e7 #conductivity in siemens/m\n",
+ "d=1/sqrt(math.pi*f*1e6*mu*sigma)\n",
+ "print\"Depth of penetration is \",int(round(d*1e6)),\"micro meter\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth of penetration is 10 micro meter\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg30:pg-251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "f=3e6 #frequency in Hz\n",
+ "mu_r=1 \n",
+ "mu_0=4*round(math.pi,2)*1e-7 # in H/m\n",
+ "sigma=38e6 # in S/m\n",
+ "mu=mu_r*mu_0\n",
+ "d=1/sqrt(round(math.pi,2)*f*mu*sigma)\n",
+ "alpha=1/(d)\n",
+ "beta=alpha\n",
+ "magnitude=sqrt(alpha**2+beta**2)\n",
+ "angle=degrees(math.atan(beta/alpha))\n",
+ "v=2*round(math.pi,2)*f/round(beta)\n",
+ "print\"Skin depth is \",round(d*1e3,5),\"mm\"\n",
+ "print\"Propagation constant =[ %.4e , %s degree] m**-1\"%(magnitude,int(angle)) #in polar form\n",
+ "print\"Wave velocity is \",round(v,2),\"m/s\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Skin depth is 0.04716 mm\n",
+ "Propagation constant =[ 2.9987e+04 , 45 degree] m**-1\n",
+ "Wave velocity is 888.51 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg31:pg-252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "mu=4*math.pi*1e-7 # in H/m\n",
+ "e0=8.854e-12 # in F/m\n",
+ "e=70*e0\n",
+ "sigma=5\n",
+ "d=(2./sigma)*sqrt(e/mu)\n",
+ "alpha=1/round(d,4)\n",
+ "print\"skin depth is \",round(d,4),\"m\"\n",
+ "print\"Attenuation constant is \",round(alpha,2),\"Np/m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "skin depth is 0.0089 m\n",
+ "Attenuation constant is 112.36 Np/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg32:pg-253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "sigma=2e-3 #in S/m\n",
+ "e0=8.854e-12 #in F/m\n",
+ "e=80*e0\n",
+ "f=10 #in KHz\n",
+ "mu=4*math.pi*1e-7 #in H/m\n",
+ "ratio=sigma/(2*round(math.pi,2)*f*1e3*e)\n",
+ "\n",
+ "#since ratio= sigma/(w*e) = 44.96 >>1,therefore, medium is a good conductor.\n",
+ "#So calculations will be done considering medium as a good conductor.\n",
+ "\n",
+ "alpha=sqrt(2*math.pi*f*1e3*mu*sigma/2)\n",
+ "beta=int(alpha*1e5)*1e-5\n",
+ "magnitude=sqrt(alpha**2+beta**2)\n",
+ "angle=degrees(math.atan(beta/alpha))\n",
+ "ni=round(round(sqrt(2*math.pi*f*1e3*mu/sigma),2)/round(sqrt(2),2),3)*(1+1j)\n",
+ "lamda=2*round(math.pi,2)/beta\n",
+ "v=2*math.pi*f*1e3/beta\n",
+ "print\"Attenuation constant is %.2e neper/m\"%(int(alpha*1e5)*1e-5)\n",
+ "print\"Phase constant is %.2e rad/m\"%beta\n",
+ "print\"Propagation constant = [ %.3e , %.f degree] m**-1\"%(magnitude,angle)#in polar form(unit is not printed in book) \n",
+ "print\"Intrinsic impedance is \",ni,\"ohm\"\n",
+ "print\"Wavelength is %.2f m\"%lamda\n",
+ "print\"Velocity of wave is %.2e m/s\"%v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Attenuation constant is 8.88e-03 neper/m\n",
+ "Phase constant is 8.88e-03 rad/m\n",
+ "Propagation constant = [ 1.256e-02 , 45 degree] m**-1\n",
+ "Intrinsic impedance is (4.454+4.454j) ohm\n",
+ "Wavelength is 707.21 m\n",
+ "Velocity of wave is 7.08e+06 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg33:pg-254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "f=100 #in MHz\n",
+ "mu_r=1\n",
+ "mu_0=4*round(math.pi,2)*1e-7 #in H/m\n",
+ "mu=mu_0*mu_r\n",
+ "sigma=58e6 #in S/m\n",
+ "alpha=sqrt(round(math.pi,2)*f*1e6*mu*sigma)\n",
+ "alpha=int(alpha/10)*10\n",
+ "beta=alpha\n",
+ "magnitude=sqrt(alpha**2+beta**2)\n",
+ "angle=degrees(math.atan(beta/alpha))\n",
+ "sqrt_j=45\n",
+ "ni=sqrt(2*round(math.pi,2)*f*1e6*mu/sigma)\n",
+ "v=2*round(math.pi,2)*f*1e6/beta\n",
+ "print\"Attenuation constant is %.4e neper/m\"%(int(alpha*1e5)*1e-5)\n",
+ "print\"Phase constant is %.4e rad/m\"%beta\n",
+ "print\"Propagation constant = [ %.4e , %.f degree] m**-1\"%(magnitude,angle)#in polar form(unit is not printed in book) \n",
+ "print\"Intrinsic impedance = [ %.3e , %s degree ] ohm\"%(ni,sqrt_j)#in polar form(unit is not printed in book)\n",
+ "print\"Velocity of wave is %.3f Km/s\"%(v/1e3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Attenuation constant is 1.5124e+05 neper/m\n",
+ "Phase constant is 1.5124e+05 rad/m\n",
+ "Propagation constant = [ 2.1389e+05 , 45 degree] m**-1\n",
+ "Intrinsic impedance = [ 3.688e-03 , 45 degree ] ohm\n",
+ "Velocity of wave is 4.152 Km/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg34:pg-255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "mu=4*math.pi*1e-7 #in H/m\n",
+ "sigma=3.54e7 #in S/m\n",
+ "d=0.0664 #penetration depth in mm\n",
+ "f=1/(math.pi*mu*sigma*(d*1e-3)**2)\n",
+ "print\"Frequency is %.2f MHz\"%(f/1e6)\n",
+ "#answer is wrong in book because d=0.0644 is taken in calculation which is wrong(given d=0.0664 mm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency is 1.62 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter7_2.ipynb b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter7_2.ipynb new file mode 100644 index 00000000..a7dd25a1 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/chapter7_2.ipynb @@ -0,0 +1,503 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f33548221374c6e971e5c3a48338b6a55eced3cd1938792a2d5ebb13acf91806"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter7:SUPERCONDUCTIVITY"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg1:pg-272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Tc=3.7 #critical temperature in K\n",
+ "Hc_0=0.0306 #critical magnetic field in Tesla at 0K\n",
+ "T=2 #temperature in K\n",
+ "Hc=Hc_0*(1-(T/Tc)**2)\n",
+ "print\"Critical field at 2 K is \",round(Hc,4),\"Tesla\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical field at 2 K is 0.0217 Tesla\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg2:pg-272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Tc=7.2 #transition temperature in K\n",
+ "T=5 #temperature in K\n",
+ "Hc_T=3.3e4 #critical magnetic field at 5K in A/m\n",
+ "Hc_0=Hc_T/(1-(T/Tc)**2)\n",
+ "print\"Maximum value of H at 0 K is \",\"{:.2e}\".format(Hc_0),\"A/m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum value of H at 0 K is 6.37e+04 A/m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg3:pg-273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Tc=7.2 #critical temperature in K\n",
+ "Hc_0=1 #let,critical magnetic field at 0K\n",
+ "Hc_T=0.1*Hc_0 #critical magnetic field at T Kelvin\n",
+ "T=sqrt(1-Hc_T/Hc_0)*Tc\n",
+ "print\"Temperature is \",round(T,2),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature is 6.83 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg4:pg-273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "T=4.2 #temperature in K\n",
+ "Hc_0=0.0803 #critical magnetic field at 0K in Wb/m**2\n",
+ "Tc=7.2 #critical temperature for Pb in K\n",
+ "Hc_T=Hc_0*(1-(T/Tc)**2)\n",
+ "print\"Critical field at 4.2 K is \",round(Hc_T,5),\"Tesla\"#answer is wrong in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Critical field at 4.2 K is 0.05298 Tesla\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg5:pg-273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Hc_T=105e3 #critical magnetic field at T Kelvin in A/m\n",
+ "Hc_0=150e3 #critical magnetic field at 0K in A/m\n",
+ "Tc=9.2 #critical temperature in K\n",
+ "T=sqrt(1-Hc_T/Hc_0)*Tc\n",
+ "print\"Temperature is \",round(T,2),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature is 5.04 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg6:pg-274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Hc_T=1e5 #critical magnetic field at 8K in A/m\n",
+ "T=8 #temperature in K\n",
+ "Hc_0=2e5 #critical magnetic field at 0K in A/m\n",
+ "Tc=T/sqrt(1-Hc_T/Hc_0)\n",
+ "print\"Transition temperature is \",round(Tc,1),\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Transition temperature is 11.3 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg7:pg-274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Tc=7.26 #critical temperature in K\n",
+ "Hc_0=8e5 #critical magnetic field at 0K in A/m\n",
+ "Hc_T=4e4 #critical magnetic field at T kelvin in A/m\n",
+ "T=sqrt(1-Hc_T/Hc_0)*Tc\n",
+ "print\"T =\",round(T,2),\"K\",\"\\nThe temperature of the metal should be held below\",round(T,2),\"K\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T = 7.08 K \n",
+ "The temperature of the metal should be held below 7.08 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg8:pg-275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "T1=14 #temperature in K\n",
+ "T2=12 #temperature in K\n",
+ "T=4.2 #temperature in K\n",
+ "Hc_T1=0.176 #critical magnetic field at temperature T1\n",
+ "Hc_T2=0.528 #critical magnetic field at temperature T2\n",
+ "Tc=sqrt((Hc_T2*T1**2-Hc_T1*T2**2)/(Hc_T2-Hc_T1))\n",
+ "Tc=int(Tc*10)/10. #rounding off\n",
+ "Hc_0=Hc_T1/(1-(T1/Tc)**2)\n",
+ "Hc_T=Hc_0*(1-(T/Tc)**2)\n",
+ "print\"Transition temperature is \",Tc,\"K\"\n",
+ "print\"Critical field at 0 K is \",round(Hc_0,3),\"Tesla\"\n",
+ "print\"Critical field at 4.2 K is \",round(Hc_T,2),\"Tesla\"\n",
+ "#answers in book are wrong because value of T2 is taken as 13K in calculation which is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Transition temperature is 14.8 K\n",
+ "Critical field at 0 K is 1.673 Tesla\n",
+ "Critical field at 4.2 K is 1.54 Tesla\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg9:pg-275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "D=1.0 #diameter of Pb wire in mm\n",
+ "Bc=0.0548 #in Tesla\n",
+ "mu_0=4*math.pi*1e-7 #absolute permeability of air in N/A**2\n",
+ "Ic=math.pi*D*1e-3*Bc/mu_0\n",
+ "print\"Current is \",int(Ic),\"amp\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current is 137 amp\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg10:pg-276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Hc_0=6.5e3 #critical magnetic field at 0K in A/m\n",
+ "Tc=7.18 #critical temperature in K\n",
+ "Hc_T=4.5e3 #critical magnetic field at T Kelvin in A/m\n",
+ "T=sqrt(1-Hc_T/Hc_0)*Tc\n",
+ "print\"Temperature is \",round(T,2),\"K\"\n",
+ "D=2 #diameter of the lead wire in mm\n",
+ "r=D/2 \n",
+ "Ic=2*math.pi*r*1e-3*Hc_T\n",
+ "Jc=Ic/(math.pi*(r*1e-3)**2)\n",
+ "print\"Critical current density is \",\"{:.1e}\".format(Jc),\"A/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Temperature is 3.98 K\n",
+ "Critical current density is 9.0e+06 A/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg11:pg-281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "T=3.5 #temperature in K\n",
+ "lamda_T=750 #penetration depth of Hg at 3.5K in Angstrom\n",
+ "Tc=4.153 #critical temperature in K\n",
+ "lamda_0=lamda_T*sqrt(round(1-(T/Tc)**4,3))\n",
+ "print\"Penetration depth at 0 K is\",round(lamda_0,1),\"Angstrom\"#answer is wrong in book because of calculation mistake "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Penetration depth at 0 K is 528.2 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg12:pg-281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "m=9.1e-31 #mass of electron kg\n",
+ "mu_0=12.56e-7 #absolute permeability of air in N/A**2\n",
+ "e=1.6e-19 #charge of electron in coulomb\n",
+ "ns=1e28 #number of super electrons per meter cube\n",
+ "lamda_0=sqrt(m/(mu_0*ns*e**2))\n",
+ "lamda_0=round(lamda_0,9)*1e10\n",
+ "print\"Penetration depth at 0 K is \",int(lamda_0),\"Angstrom\"\n",
+ "Tc=3 #critical temperature in K\n",
+ "T=1. #temperature in K\n",
+ "lamda_T=lamda_0/sqrt(1-(T/Tc)**4)\n",
+ "print\"Penetration depth at 1 K is \",int(lamda_T),\"Angstrom\"\n",
+ "#in book lamda(at 3K) is printed,which is wrong. Correct notation is lamda(at 1K)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Penetration depth at 0 K is 530 Angstrom\n",
+ "Penetration depth at 1 K is 533 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg13:pg-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "Tc=9.25 #critical temperature in K\n",
+ "T=0 #temperature in K\n",
+ "Kb=1.38e-23 #Boltzmann's constant in J/K\n",
+ "Eg=3.53*Kb*Tc/(1.6e-19)\n",
+ "h=6.63e-34 #planck constant joule-sec\n",
+ "c=3e8 #speed of light in m/sec\n",
+ "print\"Energy gap Eg is \",round(Eg*1e3,2),\"meV\"\n",
+ "lamda_min=h*c/round(Eg*1.6e-19,23)\n",
+ "print\"Minimum photon wavelength is \",\"{:.2e}\".format(lamda_min),\"m\"\n",
+ "print\" This wavelength lie in the far-infrared region of electromagnetic radiations.\"\n",
+ "v=round(Eg*1.6e-19,23)/h\n",
+ "print\"Frequency needed is \",\"{:.2e}\".format(v),\"s**-1\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Energy gap Eg is 2.82 meV\n",
+ "Minimum photon wavelength is 4.42e-04 m\n",
+ " This wavelength lie in the far-infrared region of electromagnetic radiations.\n",
+ "Frequency needed is 6.79e+11 s**-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Eg14:pg-286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "M=200.59 #average atomic mass of Hg in amu\n",
+ "m=204 #mass of isotope in amu\n",
+ "T=4.153 #temperature in K\n",
+ "t=4.118 #temperature in K\n",
+ "dM=m-M\n",
+ "dTc=t-T\n",
+ "alpha=-(M*dTc/(dM*T))\n",
+ "print\"Isotope effect coefficient is \",round(alpha,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Isotope effect coefficient is 0.496\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/ultrasonic.png b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/ultrasonic.png Binary files differnew file mode 100644 index 00000000..93ec27e7 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/ultrasonic.png diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/wave_mechanics_2.png b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/wave_mechanics_2.png Binary files differnew file mode 100644 index 00000000..85a0e4e4 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/wave_mechanics_2.png diff --git a/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/x-ray_diffraction.png b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/x-ray_diffraction.png Binary files differnew file mode 100644 index 00000000..fded8bc3 --- /dev/null +++ b/Engineering_Physics_(Volume-2)_by_S.K._Gupta/screenshots/x-ray_diffraction.png diff --git a/sample_notebooks/sai kiranmalepati/Untitled.ipynb b/sample_notebooks/sai kiranmalepati/Untitled.ipynb new file mode 100644 index 00000000..9f9ee1a5 --- /dev/null +++ b/sample_notebooks/sai kiranmalepati/Untitled.ipynb @@ -0,0 +1,228 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 1: INTRODUCTION" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Section-1.22, Problem 1, pg24" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " the length of the chain is 20 meters\n", + " the error in the chain is 0.03\n", + " the measured length 327 meters\n", + " the ture length of the chain is 327.4905 meters\n" + ] + } + ], + "source": [ + "#Variable Declaration\n", + "L=20; # True length of the chain is defined as L\n", + "print(' the length of the chain is ',L,'meters'); # Print L\n", + "\n", + "E=0.03; #Error in chain\n", + "print(' the error in the chain is ',E); #Print E\n", + "\n", + "ML=327; #Measured length is defined as ML\n", + "print(' the measured length ',ML,'meters'); #print ML\n", + "\n", + "tlength=((L+E)/L)*ML; #True length of L calculated\n", + "print(' the ture length of the chain is ',tlength,'meters'); #Print true length.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "\n", + "## Section 1.22, Problem 6, pg 27." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " for n=1\n", + "the temperature correction is 0.00396 meters\n", + "the pull corretion is 0.002380952380952381 meters\n", + "the sag correction is -0.0026680499999999995 meters\n", + "the total correction is 0.0036729023809523816 meters\n", + "the true length is 780.0954954619046\n", + " for n=2\n", + "the temperature correction is 0.00396 meters\n", + "the pull corretion is 0.002380952380952381 meters\n", + "the sag correction is -0.0006670124999999999 meters\n", + "the total correction is 0.005673939880952382 meters\n", + "the true length is 780.1475224369049\n" + ] + } + ], + "source": [ + "#Variable declaration\n", + "L=30; #Length of tape\n", + "t0=20; #Temperature of tape\n", + "p0=10; #Pull under which tape is present\n", + "pm=15; #Measured line pull\n", + "tm=32; #Mean temperature.\n", + "a=0.03; #Cross-sectional area\n", + "al=11/(1000000); #Temperature correction co-efficient\n", + "E=2.1*(1000000); #E for steel\n", + "w=0.693; #Total weight\n", + "ml=780; #measured length\n", + "n=1; #n defined\n", + "print(' for n=1'); #print n value\n", + "ct=al*L*(tm-t0); #temperature correction calculated\n", + "print('the temperature correction is',ct,'meters'); #print temperature correction\n", + "\n", + "cp=(pm-p0)*L/(a*E); #pull correction calculated\n", + "print('the pull corretion is ',cp,' meters'); #print pull correction\n", + "\n", + "cs=-L*w*w/(24*pm*pm*n*n); #sag correction calculated\n", + "print('the sag correction is ',cs,'meters'); #print sag correction\n", + "\n", + "e=ct+cp+cs; #total correction calculated\n", + "print('the total correction is ',e,'meters'); #total correction printed\n", + "\n", + "l1=L+e; #correction in length =sum of correction and measured length \n", + "\n", + "truelength=(l1/L)*ml; #true length calculated\n", + "print('the true length is ',truelength); #true length printed\n", + "\n", + "n=2; #new n defined\n", + "\n", + "print(' for n=2'); #print n value\n", + "ct=al*L*(tm-t0); #temperature correction calculated\n", + "print('the temperature correction is',ct,'meters'); #print temperature correction\n", + "\n", + "\n", + "cp=(pm-p0)*L/(a*E); #pull correction calculated\n", + "print('the pull corretion is ',cp,' meters'); #print pull correction\n", + "\n", + "cs=-L*w*w/(24*pm*pm*n*n); #sag correction calculated\n", + "print('the sag correction is ',cs,'meters'); #print sag correction\n", + "\n", + "e=ct+cp+cs; #total correction calculated\n", + "print('the total correction is ',e,'meters'); #total correction printed\n", + "\n", + "l1=L+e; #correction in length =sum of correction and measured length \n", + "\n", + "truelength=(l1/L)*ml; #true length calculated\n", + "print('the true length is ',truelength); #true length printed\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Section-1.23, Problem 4, pg39" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " the value of ab is 28.590787835233098 meters\n", + " the value of b1c is 23.22557994840693 meters\n", + " the value of c1d is 20.582482037955145 meters\n", + " the value of d1e is 28.95316898172065 meters\n", + "the total distance is 101.35201880331583 meters\n" + ] + } + ], + "source": [ + "#Library imported\n", + "import math \n", + "\n", + "\n", + "ab=28.7*math.cos(5*(math.pi/180)); #AB calculated using trigonometry\n", + "b1c=23.4*math.cos(7*(math.pi/180)); #B'C calculated\n", + "c1d=20.9*math.cos(10*(math.pi/180)); # C'D calculated\n", + "d1e=29.6*math.cos(12*(math.pi/180)); # D'E calculated\n", + "print(' the value of ab is ',ab,'meters'); #AB printed\n", + "\n", + "print(' the value of b1c is ',b1c,'meters'); # B'C printed\n", + "\n", + "print(' the value of c1d is ',c1d,'meters'); # C'D printed\n", + "\n", + "print(' the value of d1e is ',d1e,'meters'); #D'E printed\n", + "\n", + "\n", + "total=ab+b1c+c1d+d1e; #total calculated\n", + "print('the total distance is ',total,'meters'); #total printed\n" + ] + } + ], + "metadata": { + "celltoolbar": "Raw Cell Format", + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.5.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |