summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Bhattacharya_Bhaskaran/Chapter4.ipynb
blob: 79f4bf10e6d354c5c8c8f473db4b18f99e250028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
{
 "metadata": {
  "name": "Chapter4"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Quantum Physics"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.1, Page number 117"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the energy and momentum of photon\n\n#importing modules\nimport math\n\n#Variable declaration\nc = 3*10**8;       #velocity of light(m/sec)\nh = 6.62*10**-34;     #planck's constant\nlamda = 1.2;          #wavelength of photon(Angstrom)\ne = 1.6*10**-19;      #conversion factor from J to eV\n\n#Calculation\nlamda = lamda*10**-10;       #wavelength of photon(m)\nE = (h*c)/(lamda*e);         #energy of photon(eV)\nE=math.ceil(E*10)/10;   #rounding off to 1 decimal\np = h/lamda;            #momentum of photon(kg m/s)\n\n#Result\nprint \"energy of the photon is\",E,\"eV\"\nprint \"momentum of the photon is\",p,\"kg m/s\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "energy of the photon is 10343.8 eV\nmomentum of the photon is 5.51666666667e-24 kg m/s\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.2, Page number 117"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the number of photons emitted \n\n#importing modules\nimport math\n\n#Variable declaration\nh = 6.625*10**-34;     #planck's constant\nnew = 900;             #frequency(kHz)\nE1 = 10;               #power radiated(kW)\n\n#Calculation\nE1 = E1*10**3;         #power radiated(W)\nnew = new*10**3;       #frequency(Hz)\nE = h*new;         #energy of photon(J)\nN = E1/E;          #number of photons emitted \n\n#Result\nprint \"number of photons emitted per second is\",N",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "number of photons emitted per second is 1.67714884696e+31\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.3, Page number 118"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the number of photons emitted \n\n#importing modules\nimport math\n\n#Variable declaration\nc = 3*10**8;       #velocity of light(m/sec)\nh = 6.63*10**-34;     #planck's constant\nlamda = 5893;         #wavelength of photon(Angstrom)\nE1 = 100;             #power of lamp(W) \n\n#Calculation\nlamda = lamda*10**-10;       #wavelength of photon(m)\nE = h*c/lamda;         #energy of photon(J)\nN = E1/E;          #number of photons emitted \n\n#Result\nprint \"number of photons emitted per second is\",N\nprint \"answer given in the book is wrong\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "number of photons emitted per second is 2.96279537456e+20\nanswer given in the book is wrong\n"
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.4, Page number 118"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the wavelength of scattered radiation\n\n#importing modules\nimport math\n\n#Variable declaration\nc = 3*10**8;       #velocity of light(m/sec)\nh = 6.6*10**-34;     #planck's constant\nm0 = 9.1*10**-31;        #mass of photon(kg)\ntheta = 30;              #viewing angle(degrees)\nlamda = 2.8*10**-10;         #wavelength of photon(m)\n\n#Calculation\nx = math.pi/180;       #conversion factor from degrees to radians\ntheta = theta*x;       #viewing angle(radian) \nlamda_dash = (2*h*(math.sin(theta/2))**2/(m0*c))+lamda;        #wavelength of scattered radiation(m)\nlamda_dash = lamda_dash*10**10;           #wavelength of scattered radiation(Angstrom)\nlamda_dash=math.ceil(lamda_dash*10**5)/10**5;   #rounding off to 5 decimals\n\n#Result\nprint \"wavelength of scattered radiation is\",lamda_dash,\"Angstrom\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "wavelength of scattered radiation is 2.80324 Angstrom\n"
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.5, Page number 119"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the deBroglie wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh = 6.6*10**-34;     #planck's constant\nm = 0.040;        #mass of bullet(kg)\nv = 1;            #speed of bullet(km/s)\n\n#Calculation\nv = v*10**3;      #speed of bullet(m/s)\np = m*v;          #momemtun of bullet(kg m/s)\nlamda = h/p;      #deBroglie wavelength(m)\nlamda = lamda*10**10;     #deBroglie wavelength(Angstrom)\n\n#Result\nprint \"deBroglie wavelength is\",lamda,\"Angstrom\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "deBroglie wavelength is 1.65e-25 Angstrom\n"
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.6, Page number 119"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the energy of particle\n\n#importing modules\nimport math\n\n#Variable declaration\nn = 1;               #lowest energy state\na = 0.1;             #width of box(nm)\nh = 6.625*10**-34;     #planck's constant\ne = 1.602*10**-19;       #conversion factor from J to eV\nm = 9.11*10**-31;        #mass of particle(kg)\n\n#Calculation\na = a*10**-9;        #width of box(m)\nE = (n**2)*(h**2)/(8*m*(a**2));      #energy of particle(J)\nE_eV = E/e;             #energy of particle(eV)\nE_eV=math.ceil(E_eV*10)/10;   #rounding off to 1 decimal\n\n#Result\nprint \"energy of particle is\",E,\"J or\",E_eV,\"eV\" ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "energy of particle is 6.02231407794e-18 J or 37.6 eV\n"
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.7, Page number 120"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the minimum energy of an electron\n\n#importing modules\nimport math\n\n#Variable declaration\nn = 1;               #lowest energy state\na = 4;             #width of well(nm)\nh = 6.625*10**-34;     #planck's constant\ne = 1.6025*10**-19;       #conversion factor from J to eV\nm = 9.11*10**-31;        #mass of electron(kg)\n\n#Calculation\na = a*10**-9;        #width of box(m)\nE = (n**2)*(h**2)/(8*m*(a**2));      #energy of particle(J)\nE_eV = E/e;             #energy of particle(eV)\nE_eV=math.ceil(E_eV*10**4)/10**4;   #rounding off to 4 decimals\n\n#Result\nprint \"minimum energy of electron is\",E,\"J or\",E_eV,\"eV\" ",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "minimum energy of electron is 3.76394629871e-21 J or 0.0235 eV\n"
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.8, Page number 120"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the energy required to excite the electron\n\n#importing modules\nimport math\n\n#Variable declaration\nn1 = 1;               #lowest energy state\nn2 = 6;               #for 6th excited state\na = 0.1;             #width of box(nm)\nh = 6.625*10**-34;     #planck's constant\ne = 1.602*10**-19;       #conversion factor from J to eV\nm = 9.11*10**-31;        #mass of electron(kg)\n\n#Calculation\na = a*10**-9;        #width of box(m)\nE1 = (n1**2)*(h**2)/(8*m*(a**2));      #energy of electron in ground state(J)\nE6 = (n2**2)*(h**2)/(8*m*(a**2));      #energy of electron in excited state(J)\nE = E6-E1;                          #energy required to excite the electron(J)\nE_eV = E/e;             #energy required to excite the electron(eV)\nE_eV=math.ceil(E_eV*10)/10;   #rounding off to 1 decimal\n\n#Result\nprint \"energy required to excite the electron is\",E,\"J or\",E_eV,\"eV\" \nprint \"answer for energy in eV given in the book is wrong\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "energy required to excite the electron is 2.10780992728e-16 J or 1315.8 eV\nanswer for energy in eV given in the book is wrong\n"
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 4.9, Page number 121"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the change in wavelength\n\n#importing modules\nimport math\n\n#Variable declaration\nh = 6.625*10**-34;     #planck's constant\nc = 3*10**8;       #velocity of light(m/sec)\nm0 = 9.11*10**-31;        #rest mass of electron(kg)\nphi = 90;              #angle of scattering(degrees)\nx = math.pi/180;       #conversion factor from degrees to radians\n\n#Calculation\nphi = phi*x;           ##angle of scattering(radian)\ndelta_lamda = h*(1-math.cos(phi))/(m0*c);         #change in wavelength(m)\n\n#Result\nprint \"change in wavelength of X-ray photon is\",delta_lamda,\"m\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "change in wavelength of X-ray photon is 2.42407610684e-12 m\n"
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "",
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}