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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3: Metallic Crystal Structure"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.1 Page No: 44"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determination of FCC Unit Cell Volume\n",
"\n",
"#Given\n",
"#For FCC a=2*R*math.sqrt(2)\n",
"from sympy import Symbol\n",
"\n",
"#Calculation \n",
"R=Symbol('R') \n",
"#Edge Length\n",
"a=2*R*round(math.sqrt(2),2)\n",
"#Volume determination\n",
"V=a**3\n",
"\n",
"#result\n",
"print\"Volume is\",V,\" m**3\"\n",
"print\"which is also equal to 16*sqrt(2)*R**3\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Volume is 22.425768*R**3 m**3\n",
"which is also equal to 16*sqrt(2)*R**3\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.2 Page No: 44"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Computation of the Atomic Packing Factor for FCC\n",
"\n",
"#Given\n",
"#for FCC no. of atoms are 4\n",
"n=4\n",
"#For FCC a=2*R*math.sqrt(2)\n",
"R=1 #say\n",
"\n",
"#Calculation\n",
"#Edge Length\n",
"a=2*R*math.sqrt(2)\n",
"#Volume determination of cube\n",
"Vc=a**3\n",
"#Volume of sphere\n",
"Vs=n*4*math.pi*R**3/3.0\n",
"#Atomic packing Fraction\n",
"APF=Vs/Vc\n",
"\n",
"#Result\n",
"print\"Atomic packing fraction is\",round(APF,2)\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Atomic packing fraction is 0.74\n"
]
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.3 Page No: 45"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Theoretical Density Computation for Copper\n",
"\n",
"#Given\n",
"R=1.28*10**-8 #Atomic radius in cm\n",
"A_Cu=63.5 #Atomic wt of copper\n",
"n=4 #For FCC\n",
"Na=6.023*10**23 #Avogadro no.\n",
"\n",
"#Calculation\n",
"a=2*R*math.sqrt(2)\n",
"Vc=a**3\n",
"den=n*A_Cu/(Vc*Na)\n",
"\n",
"#result\n",
"print\"Density is \",round(den,2),\"g/cm**3\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Density is 8.89 g/cm**3\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.6 Page No: 52"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determination of Directional Indices\n",
"\n",
"#Given\n",
"#Projection of given vector\n",
"a=1/2.0\n",
"b=1\n",
"c=0\n",
"\n",
"x=[2*a,2*b,2*c]\n",
"\n",
"#Result\n",
"print\"The intercept for the given plane is\",x\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The intercept for the given plane is [1.0, 2, 0]\n"
]
}
],
"prompt_number": 44
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.8 Page No: 55"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determination of Directional Indices for a Hexagonal Unit Cell\n",
"\n",
"#Given\n",
"#Projection in terms of unit cell parameter\n",
"du=1\n",
"dv=1\n",
"dw=1\n",
"\n",
"#Calculation\n",
"#For hexagonal system\n",
"u=(2*du-dv)/3.0\n",
"v=(2*dv-du)/3.0\n",
"t=-(u+v)\n",
"w=dw\n",
"\n",
"x=[3*u,3*v,3*t,3*w]\n",
"print\"The indices for the given directions are\",x\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The indices for the given directions are [1.0, 1.0, -2.0, 3]\n"
]
}
],
"prompt_number": 41
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.9 Page No: 56"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determination of Planar (Miller) Indices\n",
"\n",
"#Given\n",
"a=-1\n",
"b=1/2.0\n",
"\n",
"\n",
"#Calculation\n",
"#Reciprocal\n",
"l=0 #Reciprocal of infinity\n",
"m=1/a\n",
"n=1/b\n",
"x=[l,m,n]\n",
"\n",
"#Result\n",
"print\"The intercept for the given plane is\",x\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The intercept for the given plane is [0, -1, 2.0]\n"
]
}
],
"prompt_number": 37
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.11 Page No: 59"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determination of Miller\u2013Bravais Indices for a Plane Within a Hexagonal Unit Cell\n",
"\n",
"#Intersection in terms of lattics Parameters\n",
"h=1 #Reciprocal of intersection point\n",
"k=-1\n",
"l=1\n",
"i=-(h+k)\n",
"\n",
"#Calculation\n",
"x=[h,k,i,l]\n",
"\n",
"#Result\n",
"print\"The indices of plane are\",x\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The indices of plane are [1, -1, 0, 1]\n"
]
}
],
"prompt_number": 31
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 3.12 Page No: 70"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Interplanar Spacing\n",
"\n",
"#Given\n",
"a=0.2866 #Lattice parameter in nm\n",
"h=2\n",
"k=2\n",
"l=0\n",
"\n",
"#Calculation\n",
"import math\n",
"#(a)\n",
"d_hkl=a/(math.sqrt(h**2+k**2+l**2))\n",
"\n",
"#(b)Diffraction Angle Computations\n",
"lam=0.1790 #Wavelength in nm\n",
"n=1\n",
"theta=math.asin(n*lam/(2*d_hkl))\n",
"\n",
"#Result\n",
"print\"(a)Interplanar spacing is \",round(d_hkl,4),\"nm\"\n",
"print\"(b)Diffraction angle is \",round(2*theta*(180/math.pi),1),\"degree\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Interplanar spacing is 0.1013 nm\n",
"(b)Diffraction angle is 124.1 degree\n"
]
}
],
"prompt_number": 25
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|