summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter8.ipynb
blob: 106ed7f968cfdab9307425335ea5ab6ee080c42f (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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
{

 "metadata": {

  "name": "",

  "signature": "sha256:2b8beebd2e19262e31711f6c9b2785f35ddc221da552f5b3fe2ed984a495062e"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter8:X-RAY"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.1:pg-240"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate value of planck's constant\n",

      "e=1.6*10**-19 #in C\n",

      "V=100*10**3 #voltage in KV\n",

      "c=3*10**8 #light speed in m/s\n",

      "lamdamin=12.35*10**-12 #wavelength in m\n",

      "h=e*V*lamdamin/c\n",

      "print \"the value of plancks constant is h=\",\"{:.2e}\".format(h),\"J-s\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the value of plancks constant is h= 6.59e-34 J-s\n"

       ]

      }

     ],

     "prompt_number": 1

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.2:pg-240"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate maximum frequency\n",

      "h=6.6*10**-34 #planck's constant in J-s\n",

      "c=3.0*10**8 #light speed in m/s\n",

      "Ve=50000 #accelerating potential in V\n",

      "lamdamin=h*c/Ve #wavelength in m\n",

      "numax=c/lamdamin\n",

      "print \"maximum frequency present in the radiation from an X-ray tube is numax=\",\"{:.2e}\".format(numax),\"Hz\"\n",

      "#answer is given in thec book is incorrect =1.2*10**19 Hz\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "maximum frequency present in the radiation from an X-ray tube is numax= 7.58e+37 Hz\n"

       ]

      }

     ],

     "prompt_number": 2

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.3:pg-240"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate number of electrons \n",

      "I=2*10**-3 #current in mA\n",

      "e=1.6*10**-19 \n",

      "n=I/e\n",

      "print \"number of electrons striking the target per second is n=\",n,\"unitless\"\n",

      "#to calculate speed\n",

      "m=9.1*10**-31 #mass of electron in kg\n",

      "V=12.4*10**3 #potential difference in V\n",

      "v=math.sqrt(2*V*e/m)\n",

      "print \"the speed with which electrons strike the target is v=\",\"{:.1e}\".format(v),\"m/s\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "number of electrons striking the target per second is n= 1.25e+16 unitless\n",

        "the speed with which electrons strike the target is v= 6.6e+07 m/s\n"

       ]

      }

     ],

     "prompt_number": 3

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.4:pg-240"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength\n",

      "n=2 #second order for longest wavelength\n",

      "d=2.82*10**-10 # spacing in angstrom\n",

      "sintheta=1 \n",

      "lamdamax=2*d*sintheta/n\n",

      "print \"the longest wavelength that can be analysed by a rock salt crystal is lamdamax=\",lamdamax,\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the longest wavelength that can be analysed by a rock salt crystal is lamdamax= 2.82e-10 m\n"

       ]

      }

     ],

     "prompt_number": 5

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.5:pg-241"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate spacing of the crystal\n",

      "h=6.62*10**-34 #planck's constant in J-s\n",

      "m=9.1*10**-31 #mass of electron in kg\n",

      "V=344 #voltage in V\n",

      "e=1.6*10**-19\n",

      "lamda=h/math.sqrt(2*m*e*V) #wavelength in m\n",

      "#according to Bragg's law\n",

      "n=1\n",

      "#formula is 2*d*sintheta=n*lamda\n",

      "d=n*lamda/(2*math.sin(math.pi/6))\n",

      "print \"the spacing of the crystal is d=\",round(d/1e-10,2),\"angstrom\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the spacing of the crystal is d= 0.66 angstrom\n"

       ]

      }

     ],

     "prompt_number": 5

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.6:pg-241"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength of Kalpha line for an atom\n",

      "R=1.1*10**5\n",

      "z=92\n",

      "#Ka line is emitted when electron jumps from l shell(n2=2) to k shell(n1=1)\n",

      "#formula is 1/alphaa=R*(z-b)*((1/n1**2)-(1/n2)**2)\n",

      "alphaa=4/(3*R*(z-1)**2)\n",

      "print \"wavelength of Kalpha line for an atom is alphaa=\",\"{:.3e}\".format(alphaa),\"cm\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of Kalpha line for an atom is alphaa= 1.464e-09 cm\n"

       ]

      }

     ],

     "prompt_number": 7

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.7:pg-241"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate thickness\n",

      "#mass absorption coefficient mum of an absorber is related with linear absorption coefficient mu and density of the material rho is given by\n",

      "#mu=rho*mum=2.7*0.6=1.62 cm**-1\n",

      "mu=1.62\n",

      "#if initial intensity Io of the X-ray beam is reduced to I in traversing a distance x in absorber I=Io*e**-mu*x\n",

      "#where I/Io=20\n",

      "#put above values in the  below equation , we get\n",

      "x=(2.3026*(math.log(20)/math.log(10)))/1.62\n",

      "print \"thickness is x=\",round(x,2),\"cm\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "thickness is x= 1.85 cm\n"

       ]

      }

     ],

     "prompt_number": 8

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.8:pg-242"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate atomic number of the element\n",

      "#equation for balmer series in hydrogen spectrum is 1/lamda=R*((1/2**2)-(1/n**2))\n",

      "#for series limit n=infinity ,R=4/lamdainfinity i.e. R=4/364.6nm\n",

      "#X-ray wavelength of K series is 1/lamda=R*(z-1)**2*((1/1**2)-(1/n**2))\n",

      "lamda=0.1*10**-9\n",

      "R=4/(364.6*10**-9)\n",

      "#for n=infinity ,minimum wavelength of k series is given by\n",

      "z=math.sqrt(1/(lamda*R))+1\n",

      "print \"atomic number is z=\",int(z),\"unitless\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "atomic number is z= 31 unitless\n"

       ]

      }

     ],

     "prompt_number": 9

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.9:pg-242"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength\n",

      "d=1.87*10**-10 #spacing in angstrom\n",

      "n=2 \n",

      "#formula is lamda=2*d*sintheta/n\n",

      "lamda=2*d*math.sin(math.pi/6)/n\n",

      "print \"the wavelength of X-rays is lamda=\",round(lamda/1e-10,3),\"angstrom\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "the wavelength of X-rays is lamda= 0.935 angstrom\n"

       ]

      }

     ],

     "prompt_number": 11

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.10:pg-242"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength of second X-ray beam\n",

      "#from bragg's law\n",

      "#lamda=(d*math.sin(math.pi/3))/n        eq(1)\n",

      "#it is given that,theta=60,n=3,lamda=1.97 angstrom\n",

      "#from eq(1) we get,2*d*sin60degree=3*0.97               eq(2)\n",

      "#let lamda' be the second X-ray beam \n",

      "#we get 2*d'*sin theta'=n'*lamda'                   eq(3)\n",

      "#from eq(2) and eq(3),we get\n",

      "lamda1=math.sin(math.pi/6)*3*0.97/math.sin(math.pi/3)   #where lamda1=lamda'\n",

      "print \"wavelength of X-ray is lamda1=\",round(lamda1,2),\"angstrom\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of X-ray is lamda1= 1.68 angstrom\n"

       ]

      }

     ],

     "prompt_number": 12

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.11:pg-243"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength\n",

      "d=2.82*10**-10 #spacing in m\n",

      "n=1 \n",

      "lamda=2*d*math.sin(10*math.pi/180)/n\n",

      "print \"wavelength of X-ray is lamda=\",round(lamda/1e-10,3),\"angstrom\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of X-ray is lamda= 0.979 angstrom\n"

       ]

      }

     ],

     "prompt_number": 13

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.12:pg-243"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#deduce possible spacing of the set of planes\n",

      "#for first order , 2*d*sintheta1=1*lamda...eq(1)\n",

      "#for second order ,2*d*sintheta2=2*lamda..eq(2)\n",

      "#for third order, 2*d*sintheta3=3*lamda......eq(3)\n",

      "#for fourth order, 2*d*sintheta4=4*lamda..............eq(4)\n",

      "#divide eq(2) by eq(1),we get sintheta2=2*sintheta1\n",

      "#similarly,sintheta3=3*sintheta1,sintheta4=4*sintheta1\n",

      "lamda=1.32*10**-10\n",

      "sintheta1=0.1650\n",

      "d1=lamda/(2*sintheta1)#for first order n=1,d1=d/n\n",

      "d2=lamda/(2*2*sintheta1)   #for second order n=2,d2=d/n\n",

      "d3=lamda/(2*3*sintheta1)       #for third order n=3,d3=d/n\n",

      "d4=lamda/(2*4*sintheta1)            #for fourth order n=4,d4=d/n\n",

      "print \"d1=\",d1,\"m\"\n",

      "print \"d2=\",d2,\"m\"\n",

      "print \"d3=\",round(d3,2),\"m\"\n",

      "print \"d4=\",d4,\"m\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "d1= 4e-10 m\n",

        "d2= 2e-10 m\n",

        "d3= 0.0 m\n",

        "d4= 1e-10 m\n"

       ]

      }

     ],

     "prompt_number": 14

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.13:pg-248"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate compton shift and wavelength\n",

      "h=6.63*10**-34 #planck's constant in J-s\n",

      "m0=9.11*10**-31 #mass of electron\n",

      "c=3*10**8 #light speed in m/s\n",

      "dellamda=h*(1-(1/math.sqrt(2)))/(m0*c)\n",

      "lamda0=2*10**-10\n",

      "lamda=dellamda+lamda0\n",

      "print \"compton shift is dellamda=\",round(dellamda/1e-10,4),\"angstrom\"\n",

      "print \"wavelength of the scattered X-rays is lamda=\",round(lamda/1e-10,4),\"angstrom\"\n",

      "#to calculate fraction of energy lost by the photon in the collision\n",

      "#energy lost =E0-E/E0=(hc/lamda0)-(hc/lamda)/(ha/lamda0)\n",

      "#we get,\n",

      "energylost=dellamda/lamda\n",

      "print \"energylost =\",round(energylost,5),\"unitless\" \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "compton shift is dellamda= 0.0071 angstrom\n",

        "wavelength of the scattered X-rays is lamda= 2.0071 angstrom\n",

        "energylost = 0.00354 unitless\n"

       ]

      }

     ],

     "prompt_number": 18

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.14:pg-249"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength and energy\n",

      "#formula is lamda'-lamda=h*(1-cos phi)/(m0*c),where phi=90 degree, lamda'=2lamda ---------------eq(1)\n",

      "#dellamda=2lamda-lamda=lamda ----------------------------eq(2)\n",

      "h=6.62*10**-34 #planck's constant\n",

      "c=3*10**8 #light speed in m.s\n",

      "m0=9*10**-31 #mass of electron in kg\n",

      "#from eq(1) and eq(2) ,we get\n",

      "lamda=h/(m0*c)\n",

      "print \"wavelength is lamda=\",round(lamda/1e-10,4),\"angstrom\"\n",

      "E=h*c/lamda\n",

      "print \"energy of the incident photon is E=\",E,\"J\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength is lamda= 0.0245 angstrom\n",

        "energy of the incident photon is E= 8.1e-14 J\n"

       ]

      }

     ],

     "prompt_number": 19

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.15:pg-249"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength of radiation and direction of emission\n",

      "h=6.6*10**-34           #planck's constant in J-s\n",

      "c=3*10**8                #speed of light in m/s\n",

      "energy=510*10**3                #energy of photon in eV\n",

      "lamda=h*c/(energy*1.6*10**-19)\n",

      "mo=9.1*10**-31             #mass of electron in Kg\n",

      "lamda1=lamda+h*(1-math.cos(math.pi/2))/(mo*c)\n",

      "print \"wavelength of radiation is lamda1=\",\"{:.2e}\".format(lamda1),\"m\"\n",

      "theta=math.degrees(math.atan(lamda*math.sin(math.pi/2)/(lamda1-lamda*math.cos(math.pi/2))))\n",

      "print\"direction of emission of electron is theta=\",round(theta,2),\"degree\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of radiation is lamda1= 4.84e-12 m\n",

        "direction of emission of electron is theta= 26.61 degree\n"

       ]

      }

     ],

     "prompt_number": 21

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex8.16:pg-249"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "#to calculate wavelength of two X-rays\n",

      "h=6.6*10**-34 #planck's constant in J-s\n",

      "c=3.0*10.0**8 #light speed in m/s\n",

      "mo=9.1*10**-31 #mass of electron in kg\n",

      "lamda=10.0*10**-12 #wavelength in pm\n",

      "lamda1=lamda+((h/(mo*c))*(1-(1/math.sqrt(2))))\n",

      "print \"wavelength of two X-rays is lamda1=\",round(lamda1*(1e12),1),\"picometer\"\n",

      "#to calculate maximum wavelength\n",

      "lamda2=lamda+((2*h)/(mo*c))\n",

      "print \"maximum wavelength present in the scattered X-rays is lamda2=\",round(lamda2*(1e12),2),\"picometer\"\n",

      "#to calculate maximum kinetic energy \n",

      "Kmax=(h*c)*((1/lamda)-(1/lamda2))/(1.6*10**-19)\n",

      "print \"maximum kinetic energy of the recoil electrons is Kmax=\",round(Kmax/1000.0,1),\"KeV\"\n",

      "\n",

      "# the answer is slightly different due to approximation\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "wavelength of two X-rays is lamda1= 10.7 picometer\n",

        "maximum wavelength present in the scattered X-rays is lamda2= 14.84 picometer\n",

        "maximum kinetic energy of the recoil electrons is Kmax= 40.3 KeV\n"

       ]

      }

     ],

     "prompt_number": 6

    }

   ],

   "metadata": {}

  }

 ]

}