summaryrefslogtreecommitdiff
path: root/Modern_Physics_by_B._L._Theraja/chapter16_1.ipynb
blob: 27b371a7e42be8497090dbdd22009c736027c997 (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
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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
{
 "metadata": {
  "name": "",
  "signature": "sha256:d47bf0be5cde96d0aef086befce8360c308553e75286c744d02ce7f3929fcd07"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "16: Particle Accelerators"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.1, Page number 305"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "fo=9*10**6;    #frequency(Hz)\n",
      "m=6.643*10**-27;    #mass(kg)\n",
      "e=1.6*10**-19;      #the charge on electron(C)\n",
      "\n",
      "#Calculation\n",
      "Q=2*e;           #electron charge(C)\n",
      "B=fo*2*math.pi*m/Q;      #magnetic flux density(Wb/m^2)\n",
      "\n",
      "#Result\n",
      "print \"magnetic flux density is\",round(B,2),\"Wb/m^2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnetic flux density is 1.17 Wb/m^2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.2, Page number 305"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "B=0.7;      #magnetic flux intensity(Wb/m^2)\n",
      "m=3.34*10**-27;     #mass(Kg)\n",
      "e=1.6*10**-19;      #the charge on electron(C)\n",
      "\n",
      "\n",
      "#Calculation\n",
      "Q=e;\n",
      "fo=B*Q/(2*math.pi*m*10**6);       #cyclotron frequency(MHz)  \n",
      "\n",
      "#Result\n",
      "print \"The cyclotron frequency is\",round(fo,1),\"MHz\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The cyclotron frequency is 5.3 MHz\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.3, Page number 306"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "B=0.75;      #magnetic flux intensity(Wb/m^2)\n",
      "m1=1.67*10**-27;    #mass(Kg)\n",
      "m2=3.31*10**-27;    #mass(Kg)\n",
      "e=1.6*10**-19;      #the charge on electron(C)\n",
      "Rm=2;        #radius(m)\n",
      "\n",
      "#Calculation\n",
      "Q=e;\n",
      "Emax_m1=3.12*10**12*B**2*Q**2*Rm**2/m1;       #Maximum energy for proton(MeV)\n",
      "Emax_m2=3.12*10**12*B**2*Q**2*Rm**2/m2;       #Maximum energy for deuteron(MeV) \n",
      "\n",
      "#Result\n",
      "print \"Maximum energy for proton is\",round(Emax_m1),\"MeV\"\n",
      "print \"Maximum energy for deuteron is\",int(Emax_m2),\"MeV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum energy for proton is 108.0 MeV\n",
        "Maximum energy for deuteron is 54 MeV\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.4, Page number 306"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "mo=9.1*10**-31;      #mass of electron(kg)\n",
      "m=1.67*10**-27;      #mass of proton(kg)\n",
      "c=3*10**8;           #speed of light(m/s)\n",
      "E=1;                 #given energy(MeV)\n",
      "\n",
      "#Calculation\n",
      "Eo=mo*c**2/(1.6*10**-13);         #rest energy for electron(MeV)\n",
      "mbymo_e=1+(E/Eo);                #Ratio for electron\n",
      "Eo=m*c**2/(1.6*10**-13);          #rest energy for proton(MeV)\n",
      "mbymo_p=1+(E/Eo);                #Ratio for proton\n",
      "\n",
      "#Result\n",
      "print \"Ratio for electron is\",round(mbymo_e,3)\n",
      "print \"Ratio for proton is\",round(mbymo_p,6)\n",
      "print \"answer in the book varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio for electron is 2.954\n",
        "Ratio for proton is 1.001065\n",
        "answer in the book varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.5, Page number 306"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "B=0.5;      #magnetic field(Wb/m^2)\n",
      "d=1.5;      #diameter(m)\n",
      "f=59;       #frequency(Hz)\n",
      "e=1.6*10**-19;        #the charge on electron(C)\n",
      "c=3*10**8;            #speed of light(m/s)\n",
      "\n",
      "#Calculation\n",
      "R=d/2;             #radius(m)\n",
      "N=c/(4*(2*math.pi*50)*R);       #number of revolutions\n",
      "E=B*e*R*c/(1.6*10**-13);        #final energy(MeV)\n",
      "AE=E/N*10**6;                 #average energy(eV)\n",
      "\n",
      "#Result\n",
      "print \"final energy is\",E,\"MeV\"\n",
      "print \"average energy is\",round(AE,1),\"eV\"\n",
      "print \"answer for average energy given in the book is wrong\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "final energy is 112.5 MeV\n",
        "average energy is 353.4 eV\n",
        "answer for average energy given in the book is wrong\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.6, Page number 307"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "E=0.51;      #kinetic energy(MeV)\n",
      "R=0.15;      #radius(m)\n",
      "e=1.6*10**-19;      #the charge on electron(C)\n",
      "mo=9.12*10**-31;    #mass of electron(kg)\n",
      "c=3*10**8;          #speed of light(m/s)\n",
      "\n",
      "#Calculation\n",
      "Eo=E;\n",
      "m=mo*(1+(E/Eo));       #mass(kg)\n",
      "b=math.sqrt(1-(mo/m)**2);\n",
      "v=b*c;            #velocity(m/s)\n",
      "B=mo*v/(e*R);     #flux density(Wb/m^2)   \n",
      "\n",
      "#Result\n",
      "print \"mass is\",round(m/1e-31,1),\"*10^-31 kg\"\n",
      "print \"velocity is\",round(v/1e+8,1),\"*10^8 m/s\"\n",
      "print \"flux density is\",round(B,5),\"Wb/m^2\"\n",
      "print \"answer for flux density in the book varies due to rounding off errors\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "mass is 18.2 *10^-31 kg\n",
        "velocity is 2.6 *10^8 m/s\n",
        "flux density is 0.00987 Wb/m^2\n",
        "answer for flux density in the book varies due to rounding off errors\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.7, Page number 308"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "E=4;       #applied voltage(MeV)\n",
      "m=3.334*10**-27;      #mass of deuteron(kg)\n",
      "R=0.75;               #radius(m)\n",
      "e=1.6*10**-19;        #the charge on electron(C)\n",
      "\n",
      "#Calculation\n",
      "E=4*10**6*e;\n",
      "fo=math.sqrt(E/(2*m))/(math.pi*R);     #frequnecy of generator(Hz)\n",
      "\n",
      "#Result\n",
      "print \"frequnecy of generator is\",round(fo/1e+6,3),\"*10^6 Hz\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "frequnecy of generator is 4.158 *10^6 Hz\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.8, Page number 308"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "roi=15;      #rate of increase(Wb/s)\n",
      "tr=10**6;    #total revolutions\n",
      "\n",
      "#Calculation\n",
      "IE=roi*10**-6;      #increased energy(MeV)\n",
      "FE=IE*tr;           #Final Energy(MeV) \n",
      "\n",
      "#Result\n",
      "print \"Final Energy is\",FE,\"MeV\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Final Energy is 15.0 MeV\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 16.9, Page number 308"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "R=0.1;       #radius(m)\n",
      "h=6.625*10**-34;        #Plank's constant\n",
      "c=3*10**8;              #speed of light(m/s)\n",
      "roi=15;                 #rate of increase(Wb/s)\n",
      "t=4*10**-4;             #period of accerleartion(s)\n",
      "e=1.6*10**-19;          #the charge on electron(C)\n",
      "\n",
      "#Calculation\n",
      "N=c*t/(2*math.pi*R);      #number of revolutions\n",
      "IE=roi;              #incresed energy(eV)\n",
      "ME=N*IE*10**-6;      #maximum energy(MeV)  \n",
      "ME1=ME*10**6*e;       #conversion in V\n",
      "p=ME1/c;\n",
      "gama=h/p;         #wavelength of gama rays(m)\n",
      "\n",
      "#Result\n",
      "print \"Maximum energy is\",round(ME,3),\"MeV\"\n",
      "print \"Corresponding wavelength of gama rays is\",round(gama/1e-13,3),\"*10^-13 m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum energy is 2.865 MeV\n",
        "Corresponding wavelength of gama rays is 4.336 *10^-13 m\n"
       ]
      }
     ],
     "prompt_number": 43
    }
   ],
   "metadata": {}
  }
 ]
}