summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Uma_Mukherji/Chapter8.ipynb
blob: d9dc420b6cf6eb67177c4aa0f0ac7f2bba60093c (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:e5ea4ff1709764161940877bdcbbb6d4676a6eced70f445ea6f3a31c76d16a31"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "8: X-rays"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.1, Page number 197"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "d=4.255;     #atomic spacing(angstrom)\n",
      "lamda=1.549;   #wavelength of K-copper line(angstrom) \n",
      "n=1;    #theta is smallest when n=1\n",
      "\n",
      "\n",
      "#Calculation\n",
      "theta=math.asin(lamda/(2*d));   #glancing angle(radian)\n",
      "theta=theta*(180/math.pi);      #glancing angle(degrees)\n",
      "#max value of sin(theta)=1 for highest order\n",
      "nmax=((2*d)/lamda);   #highest bragg's order\n",
      "\n",
      "\n",
      "#Result\n",
      "print \"smallest glancing angle is\",round(theta,4),\"degrees\"\n",
      "print \"maximum order of reflection is\",round(nmax,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "smallest glancing angle is 10.4875 degrees\n",
        "maximum order of reflection is 5.494\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.2, Page number 197"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "V=60*10**3;     #potential difference(volts)\n",
      "c=3*10**8;     #velocity of light(m/sec)\n",
      "e=1.6*10**-19;  #electron charge(coulomb)\n",
      "lamda=0.194*10**-10;  #minimum wavelength of x-rays(m)\n",
      "\n",
      "#Calculation\n",
      "h=(lamda*e*V)/c;    #planck's constant(Jsec)\n",
      "\n",
      "#Result\n",
      "print \"planck's constant is\",h,\"Jsec\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "planck's constant is 6.208e-34 Jsec\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.3, Page number 198"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "#for 110 plane\n",
      "h=1;\n",
      "k=1;\n",
      "l=0;\n",
      "a=3;   #lattice parameter(angstrom)\n",
      "n=1;\n",
      "theta=12.5;    #glancing angle(degrees)\n",
      "\n",
      "#Calculation\n",
      "theta1=theta*(math.pi/180);  #glancing angle(radian)\n",
      "d110=(a/math.sqrt((h**2)+(k**2)+(l**2)));   \n",
      "lamda=2*d110*math.sin(theta1)/n;   #wavelength of x-ray(angstrom)\n",
      "nmax=((2*d110)/lamda);    #highest order possible\n",
      "\n",
      "#Result\n",
      "print \"wavelength of x-ray beam is\",round(lamda,3),\"angstrom\"\n",
      "print \"highest bragg's order possible is\",int(nmax)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of x-ray beam is 0.918 angstrom\n",
        "highest bragg's order possible is 4\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.4, Page number 198"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "d=2.81*10**-10;     #interplanar spacing(m)\n",
      "theta=14;   #glancing angle(degrees) \n",
      "e=1.6*10**-19;   #electron charge(c)\n",
      "V=9100;    #voltage(V)\n",
      "n=1;\n",
      "c=3*10**8;   #velocity of light(m/sec)\n",
      "\n",
      "#Calculation\n",
      "theta=theta*(math.pi/180);  #glancing angle(radian)\n",
      "lamda=2*d*math.sin(theta)/n;   #minimum wavelength\n",
      "h=(lamda*e*V)/c;        #planck's constant(Jsec)\n",
      "\n",
      "#Result\n",
      "print \"planck's constant is\",round(h*10**34,4),\"*10**-34 Jsec\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "planck's constant is 6.5986 *10**-34 Jsec\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.5, Page number 198"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "thetaA=30;     #glancing angle for line A(degrees)\n",
      "lamdaB=0.97;    #wavelength of line B(angstrom)\n",
      "thetaB=60;     #glancing angle for line B(degrees)\n",
      "\n",
      "#Calculation\n",
      "#for line A-> 2*d*sin(thetaA)=lamdaA(n=1)\n",
      "thetaA=thetaA*(math.pi/180);  #glancing angle for line A(radian)\n",
      "#for line B-> 2*d*sin(thetaB)=3*lamdaB(n=3)\n",
      "thetaB=thetaB*(math.pi/180);  #glancing angle for line B(radian) \n",
      "d=(3*lamdaB)/(2*math.sin(thetaB));    #interplanar spacing(angstrom)\n",
      "lamdaA=2*d*math.sin(thetaA);   #wavelength of line A(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"wavelength of line A is\",round(lamdaA,2),\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of line A is 1.68 angstrom\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.6, Page number 199"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "a=3.615;    #lattice constant(angstrom)\n",
      "h=1;\n",
      "k=1;\n",
      "l=1;\n",
      "theta=21.7;   #glancing angle(degrees)\n",
      "\n",
      "#Calculation\n",
      "d111=a/math.sqrt(h**2+k**2+l**2);   #interplanar spacing(angstrom)\n",
      "theta=theta*(math.pi/180);   #glancing angle(radian)\n",
      "lamda=2*d111*math.sin(theta);   #wavelength of X-rays(angstrom)\n",
      "\n",
      "#Result\n",
      "print \"wavelength of X-rays is\",round(lamda,3),\"angstrom\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "wavelength of X-rays is 1.543 angstrom\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.7, Page number 199"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "V=50*10**3;   #voltage(V)\n",
      "n=4;    #FCC crystal\n",
      "m=74.6;  #molecular mass(kg)\n",
      "N=6.02*10**26;    #avagadro number(per kg mol)\n",
      "rho=1.99*10**3;   #density(kg/m**3) \n",
      "\n",
      "#Calculation\n",
      "lamda=(12400/V);   #short wavelength(angstrom)\n",
      "a=(((n*m)/(N*rho))**(1/3));   #lattice constant(m)\n",
      "#for kcl ionic crystal\n",
      "d=a/2;\n",
      "sintheta=lamda*10**-10/(2*d);   #value of sintheta\n",
      "theta=math.asin(sintheta);    #glancing angle(radian)\n",
      "theta=theta*(180/math.pi);      #glancing angle(degrees)\n",
      "\n",
      "#Result\n",
      "print \"short wavelength of spectrum from tube is\",lamda,\"angstrom\"\n",
      "print \"glancing angle for that wavelength is\",round(theta,4),\"degrees\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "short wavelength of spectrum from tube is 0.248 angstrom\n",
        "glancing angle for that wavelength is 2.2589 degrees\n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 8.8, Page number 199"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "theta1=5.4;    #glancing angle(degrees)\n",
      "theta2=7.6;    #glancing angle(degrees)\n",
      "theta3=9.4;    #glancing angle(degrees) \n",
      "\n",
      "#Calculation\n",
      "#from bragg's law 2*d*sin(theta)=n*lamda, n=1\n",
      "theta1=theta1*(math.pi/180);   #glancing angle(radian)\n",
      "theta2=theta2*(math.pi/180);   #glancing angle(radian)\n",
      "theta3=theta3*(math.pi/180);   #glancing angle(radian)\n",
      "d100=lamda/2*math.sin(theta1);  #interplanar spacing\n",
      "d110=lamda/2*math.sin(theta2);  #interplanar spacing\n",
      "d111=lamda/2*math.sin(theta3);  #interplanar spacing\n",
      "\n",
      "#Result\n",
      "print \"ratio of interplanar spacing (1/d100):(1/d110):(1/d111)=\",round(math.sin(theta1),4),\":\",round(math.sin(theta2),4),\":\",round(math.sin(theta3),4)\n",
      "print \"as ratio (1/d100):(1/d110):(1/d111)=1:sqrt(2):sqrt(3). this relation is valid for simple cubic systems. therefore, this is a simple cubic crystal\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio of interplanar spacing (1/d100):(1/d110):(1/d111)= 0.0941 : 0.1323 : 0.1633\n",
        "as ratio (1/d100):(1/d110):(1/d111)=1:sqrt(2):sqrt(3). this relation is valid for simple cubic systems. therefore, this is a simple cubic crystal\n"
       ]
      }
     ],
     "prompt_number": 34
    }
   ],
   "metadata": {}
  }
 ]
}