summaryrefslogtreecommitdiff
path: root/A_Textbook_Of_Engineering_Physics/Chapter4_1.ipynb
blob: 024db2ff5de9382efff744cf0a26ae657e1b527b (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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
{
 "metadata": {
  "name": "",
  "signature": "sha256:5cdc0313c39e461d83bef4f404708f38e979d4c9312a95284be2bd9b855678fb"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter4-Electron Ballistics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg44"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "##Example 4.1\n",
      "##Calculation of acceleration,time taken,distance covered and kinetic energy of an accelerating proton\n",
      "\n",
      "##given values\n",
      "m=1.67  *10**-27;##mass of proton in kg\n",
      "q=1.602 *10**-19;##charge of proton in Coulomb\n",
      "v1=0;##initial velocity in m/s\n",
      "v2=2.5*10**6;##final velocity in m/s\n",
      "E=500.;##electric field strength in V/m\n",
      "##calculation\n",
      "a=E*q/m;##acceleration\n",
      "print'%s %.1f %s'%('acceleration of proton in (m/s^2) is:',a,'');\n",
      "t=v2/a;##time\n",
      "print'%s %.5f %s'%('time(in s) taken by proton to reach the final velocity is:',t,'');\n",
      "x=a*t**2./2.;##distance\n",
      "print'%s %.1f %s'%('distance (in m)covered by proton in this time is:',x,'');\n",
      "KE=E*q*x;##kinetic energy\n",
      "print'%s %.3e %s'%('kinetic energy(in J) at the time is:',KE,'');\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "acceleration of proton in (m/s^2) is: 47964071856.3 \n",
        "time(in s) taken by proton to reach the final velocity is: 0.00005 \n",
        "distance (in m)covered by proton in this time is: 65.2 \n",
        "kinetic energy(in J) at the time is: 5.219e-15 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg49"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 4.2\n",
      "##electrostatic deflection\n",
      "##given values\n",
      "pi=3.141\n",
      "V1=2000.;##in volts,potential difference through which electron beam is accelerated\n",
      "l=.04;##length of rectangular plates\n",
      "d=.015;##distance between plates\n",
      "V=50.;##potential difference between plates\n",
      "##calculations\n",
      "alpha=math.atan(l*V/(2.*d*V1))*(180./pi);##in degrees\n",
      "print'%s  %.1f %s'%('angle of deflection of electron beam is:',alpha,'')\n",
      "v=5.93*(10**5)*math.sqrt(V1);##horizontal velocity in m/s\n",
      "t=l/v;##in s\n",
      "print'%s %.3e %s'%('transit time through electric field is:',t,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "angle of deflection of electron beam is:  1.9 \n",
        "transit time through electric field is: 1.508e-09 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg50"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 4.3\n",
      "##electron projected at an angle into a uniform electric field\n",
      "##given values\n",
      "v1=4.5*10**5;##initial speed in m/s\n",
      "alpha=37*math.pi/180.;##angle of projection in degrees\n",
      "E=200.;##electric field intensity in N/C\n",
      "e=1.6*10**-19;##in C\n",
      "m=9.1*10**-31;##in kg\n",
      "a=e*E/m;##acceleration in m/s**2\n",
      "t=2*v1*math.sin(alpha)/a;##time in s\n",
      "print'%s %.2e %s'%('time taken by electron to return to its initial level is:',t,'')\n",
      "H=(v1**2.*math.sin(alpha)*math.sin(alpha))/(2.*a);##height in m\n",
      "print'%s %.4f %s'%('maximum height reached by electron is:',H,'')\n",
      "s=(v1**2.)*(2.*math.sin(alpha)*math.cos(alpha))/(2.*a);##print'%s %.1f %s'%lacement in m\n",
      "print'%s %.4f %s'%('horizontal displacement(in m)when it reaches maximum height is:',s,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "time taken by electron to return to its initial level is: 1.54e-08 \n",
        "maximum height reached by electron is: 0.0010 \n",
        "horizontal displacement(in m)when it reaches maximum height is: 0.0028 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg53"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 4.4\n",
      "##motion of an electron in a uniform magnetic field\n",
      "##given values\n",
      "V=200.;##potential difference through which electron is accelerated in volts\n",
      "B=0.01;##magnetic field in wb/m**2\n",
      "e=1.6*10**-19;##in C\n",
      "m=9.1*10**-31;##in kg\n",
      "v=math.sqrt(2.*e*V/m);##electron velocity in m/s\n",
      "print'%s %.1f %s'%('electron velocity is:',v,'')\n",
      "r=m*v/(e*B);##in m\n",
      "print'%s %.4f %s'%('radius of path (in m)is:',r,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electron velocity is: 8386278.7 \n",
        "radius of path (in m)is: 0.0048 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 4.5\n",
      "##motion of an electron in a uniform magnetic field acting at an angle\n",
      "##given values\n",
      "v=3*10**7;##electron speed\n",
      "B=.23;##magnetic field in wb/m**2\n",
      "q=45*math.pi/180;##in degrees,angle in which electron enter field\n",
      "e=1.6*10**-19;##in C\n",
      "m=9.1*10**-31;##in kg\n",
      "R=m*v*math.sin(q)/(e*B);##in m\n",
      "print'%s %.5f %s'%('radius of helical path is:',R,'')\n",
      "p=2*math.pi*m*v*math.cos(q)/(e*B);##in m\n",
      "print'%s %.4f %s'%('pitch of helical path(in m) is:',p,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "radius of helical path is: 0.00052 \n",
        "pitch of helical path(in m) is: 0.0033 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 4.6\n",
      "##Magnetostatic deflection\n",
      "##given values\n",
      "D=.03;##deflection in m\n",
      "m=9.1*10**-31;##in kg\n",
      "e=1.6*10**-19;##in C\n",
      "L=.15;##distance between CRT and anode in m\n",
      "l=L/2.;\n",
      "V=2000.;##in voltsin wb/\n",
      "B=D*math.sqrt(2.*m*V)/(L*l*math.sqrt(e));##in wb/m**2\n",
      "print'%s %.4f %s'%('transverse magnetic field acting (in wb/m^2)is:',B,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "transverse magnetic field acting (in wb/m^2)is: 0.0004 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg57"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 4.7\n",
      "##electric and magnetic fields in crossed configuration\n",
      "##given values\n",
      "B=2*10**-3;##magnetic field in wb/m**2\n",
      "E=3.4*10**4;##electric field in V/m\n",
      "m=9.1*10**-31;##in kg\n",
      "e=1.6*10**-19;##in C\n",
      "v=E/B;##in m/s\n",
      "print'%s %.1f %s'%('electron speed is:',v,'')\n",
      "R=m*v/(e*B);##in m\n",
      "print'%s %.3f %s'%('radius of circular path (in m) when electric field is switched off',R,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electron speed is: 17000000.0 \n",
        "radius of circular path (in m) when electric field is switched off 0.048 \n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}