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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 6: Electron Optics"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.1, Page 6.20"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import sqrt\n",
"\n",
"# Given \n",
"V = 500 # voltage across the electrode in eV\n",
"m = 9e-31 # mass of electron in kg\n",
"e = 1.6e-19 # charge on an electron in coulomb\n",
"\n",
"#Calculations\n",
"E = e * V\n",
"v = sqrt((2 * e * V) / m)\n",
"p = m * v\n",
"\n",
"#Result\n",
"print \"Energy gained by electron = %.e J\\nSpeed of electron = %.2e meter/sec\\nMomentum of electron = %.2e kg-meter/sec\"%(E,v,p)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Energy gained by electron = 8e-17 J\n",
"Speed of electron = 1.33e+07 meter/sec\n",
"Momentum of electron = 1.20e-23 kg-meter/sec\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.2, Page 6.20"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given \n",
"v = 2.5e6 # speed of electron in meter/sec\n",
"B = 2e-4 # magnetic field in tesla\n",
"r = 1.76e11 # ratio of charge on electron to the mass of electron in C/kg\n",
"\n",
"#Calculations\n",
"a = (B * r * v)\n",
"\n",
"#Result\n",
"print \"Momentum of acceleration = %.2e meter/square sec.\"%a"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Momentum of acceleration = 8.80e+13 meter/square sec.\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.4, Page 6.21"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"# Given that\n",
"v = 5.2e6 # speed of electron in meter/sec\n",
"B = 1.3e-4 # magnetic field in tesla\n",
"r = 1.76e11 # ratio of charge on electron to the mass of electron in C/kg\n",
"E = 3.2e-12 # energy of the electron beam in J\n",
"M = 9e-31 # mass of an electron in kg\n",
"\n",
"R = v / (r * B)\n",
"v_ = sqrt((2 * E) / M )\n",
"\n",
"print \"Radius of circle traced by the beam = %.1f cm. \\nSpeed of beam in second case = %.2e meter/sec\"%(R*100,v_)\n",
"print \"Speed of beam in second case is greater than speed of light so we cannot use above formula.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Radius of circle traced by the beam = 22.7 cm. \n",
"Speed of beam in second case = 2.67e+09 meter/sec\n",
"Speed of beam in second case is greater than speed of light so we cannot use above formula.\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.5, Page 6.22"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given \n",
"V = 2.500e3 # voltage across the electrode in V\n",
"E = 3.6e4 # strength of electric field in V/m\n",
"B = 1.2e-3 # magnetic field in tesla\n",
"\n",
"#Calculation\n",
"r = (E / B)**2 / (2 * V)#calculation for ratio of the charge on an electron to the mass of an electron\n",
"\n",
"#Result\n",
"print \"Ratio of the charge on an electron to the mass of an electron = %.1e C/kg.\"%r"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Ratio of the charge on an electron to the mass of an electron = 1.8e+11 C/kg.\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.6, Page 6.23"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import sqrt\n",
"\n",
"# Given \n",
"M = 9.1e-31 # mass of electron in kg\n",
"E = 1.6e-15 # energy of electron in J\n",
"B = 5e-5 # magnetic field in tesla\n",
"e = 1.6e-19 # charge on an electron in coulomb\n",
"\n",
"#Calculations\n",
"v = sqrt((2 * E) / M)\n",
"r = (M * v) / (e * B)\n",
"\n",
"#Result\n",
"print \"Larmoure radius = %.2f meter\"%r"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Larmoure radius = 6.75 meter\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.7, Page 6.23"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given \n",
"Mp = 1.67e-27 # mass of proton in kg\n",
"v = 3e5 # speed of proton in meter/sec\n",
"B = 5e-9 # magnetic field in tesla\n",
"e = 1.6e-19 # charge on a proton in coulomb\n",
"\n",
"#Calculation\n",
"r = (Mp * v) / (e * B)#calculation for Larmour radius\n",
"\n",
"#Result\n",
"print \"Larmour radius = %.2e meter\"%r"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Larmour radius = 6.26e+05 meter\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.8, Page 6.23"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from math import sqrt, pi\n",
"\n",
"# Given \n",
"M = 6.68e-27 # mass of helium ion in kg\n",
"E = 1.6e-16 # energy of helium ion in J\n",
"B = 5e-2 # magnetic field in tesla\n",
"e = 1.6e-19 # charge on helium ion in coulomb\n",
"\n",
"#calculations\n",
"v = sqrt((2 * E) / M)#calculation for velocity\n",
"r = (M * v) / (e * B)#calculation for Larmour radius\n",
"A = pi * r**2#calculation for area traced by the trajectory of helium ion\n",
"\n",
"#Result\n",
"print \"Area traced by the trajectory of helium ion = %.3f square meter\"%A"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Area traced by the trajectory of helium ion = 0.105 square meter\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.9, Page 6.23"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given \n",
"E = 100 # strength of electric field in V/m\n",
"B = 1e-3 # magnetic field in tesla\n",
"\n",
"#Calculation\n",
"v = E / B\n",
"\n",
"#Result\n",
"print \"The drift of the guiding center = %.e m/sec\"%v"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The drift of the guiding center = 1e+05 m/sec\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.10, Page 6.24"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given \n",
"v = 1e6 # velocity of ion beam in m/sec\n",
"B = 1 # magnetic field in tesla\n",
"\n",
"#Calculation\n",
"E = B * v\n",
"\n",
"#Result\n",
"print \"Internal electric field = %.e V/m\"%E"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Internal electric field = 1e+06 V/m\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 6.12, Page 6.24"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given \n",
"r = 1.1 # ratio of new number of turns to the initial number of turns\n",
"\n",
"#Calculation\n",
"r_ = (1 / r)**2\n",
"\n",
"#Result\n",
"print \"Ratio of the new focus length to the initial focus length = %.3f \"%r_"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Ratio of the new focus length to the initial focus length = 0.826 \n"
]
}
],
"prompt_number": 11
}
],
"metadata": {}
}
]
}
|