summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Bhattacharya_Bhaskaran/Chapter5.ipynb
blob: 57b4a5f82345680c601a58012ee60885c6f70930 (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
{
 "metadata": {
  "name": "Chapter5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Crystal Physics"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.1, Page number 149"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the Miller indices\n\n#Calculation\n#The plane has intercepts a,2b,3c along 3 crystal axes\n#lattice points are r = pa+qb+sc\n#therefore p = 1 q = 2 s = 3\n#miller indices are [1/p,1/q,1/s]\n\n#Result\nprint \"lattice points are p = 1 q = 2 s = 3\"\nprint \"miller indices are [1/p,1/q,1/s] or [1,1/2,1/3] or [6,3,2]\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "lattice points are p = 1 q = 2 s = 3\nmiller indices are [1/p,1/q,1/s] or [1,1/2,1/3] or [6,3,2]\n"
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.2, Page number 150"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the density of Si\n\n#importing modules\nimport math\n\n#Variable declaration\nn = 8;          #number of atoms per cell\na = 5.43*10**-8;       #lattice constant(cm)\nw = 28.1;              #atomic weight(gm)\nN = 6.02*10**23;       #avagadro number\n\n#Calculation\nac = n/(a**3);         #atomic concentration(atoms/cm**3)\nd = ac*w/N;            #density of Si(g/cm**3)\nd=math.ceil(d*10**3)/10**3;   #rounding off to 3 decimals\n\n#Result\nprint \"density of Si is\",d,\"g/cm**3\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "density of Si is 2.333 g/cm**3\n"
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.3, Page number 151"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the surface density of atoms\n\n#importing modules\nimport math\nfrom __future__ import division\n\n#Variable declaration\na = 5;       #lattice constant(Angstrom)\n\n#Calculation\na = a*10**-10;         #lattice constant(m)\n#to calculate the planar concentration, only equilateral triangular region is considered of length a*math.sqrt(2) and height a*math.sqrt(3/2)\nl = a*math.sqrt(2);           #length of face diagonal(m)\nh = a*math.sqrt(3/2);         #height of triangle(m)\nA = l*h/2;                    #area of shaded portion(m**2)\n#every atom at the corner contributes 1/6 to this area.\nn111 = (3/6)*(1/A);           #planar concentration(atoms/m**2)\n\n#Result\nprint \"surface density of atoms is\",n111,\"atoms/m**2\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "surface density of atoms is 2.30940107676e+18 atoms/m**2\n"
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.4, Page number 152"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the spacing of planes\n\n#importing modules\nimport math\n\n#Variable declaration\na = 4.049;       #lattice constant(Angstrom)\nh = 2;\nk = 2;\nl = 0;           #miller indices of(2 2 0)\n\n#Calculation\nd = a/math.sqrt(h**2+k**2+l**2);        #spacing of planes(Angstrom)\nd=math.ceil(d*10**3)/10**3;   #rounding off to 3 decimals\n\n#Result\nprint \"spacing of planes is\",d,\"Angstrom\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "spacing of planes is 1.432 Angstrom\n"
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.5, Page number 152"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the size of unit cell\n\n#importing modules\nimport math\n\n#Variable declaration\nd110 = 2.03;       #distance between planes(Angstrom)\nh = 1;\nk = 1;\nl = 0;           #miller indices of(1 1 0)\n\n#Calculation\na = d110*math.sqrt(h**2+k**2+l**2);        #size of unit cell(Angstrom)\na=math.ceil(a*10**3)/10**3;   #rounding off to 3 decimals\n\n#Result\nprint \"size of unit cell is\",a,\"Angstrom\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "size of unit cell is 2.871 Angstrom\n"
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.6, Page number 152"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the spacing of planes\n\n#importing modules\nimport math\n\n#Variable declaration\na = 5.64;       #lattice constant(Angstrom)\nh1 = 1;\nk1 = 0;\nl1 = 0;           #miller indices of(1 0 0)\nh2 = 1;\nk2 = 1;\nl2 = 0;           #miller indices of(1 1 0)\nh3 = 1;\nk3 = 1;\nl3 = 1;           #miller indices of(1 1 1)\n\n#Calculation\nd100 = a/math.sqrt(h1**2+k1**2+l1**2);        #spacing of planes[100](Angstrom)\nd110 = a/math.sqrt(h2**2+k2**2+l2**2);        #spacing of planes[110](Angstrom)\nd111 = a/math.sqrt(h3**2+k3**2+l3**2);        #spacing of planes[111](Angstrom)\nd111=math.ceil(d111*10**2)/10**2;   #rounding off to 2 decimals\n\n#Result\nprint \"spacing of plane [100] is\",d100,\"Angstrom\"\nprint \"spacing of plane [110] is\",round(d110),\"Angstrom\"\nprint \"spacing of plane [111] is\",d111,\"Angstrom\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "spacing of plane [100] is 5.64 Angstrom\nspacing of plane [110] is 4.0 Angstrom\nspacing of plane [111] is 3.26 Angstrom\n"
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example number 5.7, Page number 153"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#To calculate the volume of unit cell\n\n#importing modules\nimport math\n\n#Variable declaration\nr = 1.605;         #radius of atom(Angstrom)\n\n\n#Calculation\nr = r*10**-10;      #radius of atom(m)\na = 2*r;        #size of unit cell(m)\nc = a*math.sqrt(8/3);\nV = 3*math.sqrt(3)*a**2*c/2;       #volume of unit cell(m**3)\n\n#Result\nprint \"volume of unit cell is\",V,\"m**3\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "volume of unit cell is 1.40330266432e-28 m**3\n"
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "",
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}