summaryrefslogtreecommitdiff
path: root/Materials_Science_and_Engineering/Chapter5.ipynb
blob: 446f509f6f40b8556d913f167c69b4cf490efc56 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 05 : The structure of Solids"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1, Page No 86"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "\n",
      "n_c = 1.0/8 \t# sharing of corner atom in a unit cell\n",
      "N_c = 8.0 \t\t# Number of corner atoms in unit cell\n",
      "n_b = 1.0 \t\t# sharing of body centered atom in a unit cell\n",
      "N_b = 4.0 \t\t# Number of body centered atoms in unit cell\n",
      "n_f = 0.5\t\t# sharing of face centered atom in a unit cell\n",
      "N_f = 6.0\t\t# Number of face centered atoms in unit cell\n",
      "a = 1.0\t\t\t # let lattice parameter\n",
      "m = 12.0 \t\t# mass of carbon\n",
      "\n",
      "#Calculations\n",
      "N = n_c*N_c+n_b*N_b+n_f*N_f # effective number of atoms\n",
      "r = a*math.sqrt(3.0)/8\n",
      "p_e = N*4/3*math.pi*r**3/a**3 \t\t# packing efficiency\n",
      "print(\"Packing efficiency of diamond is %.2f\" %p_e)\n",
      "a = 3.57 # lattice parameter in angstrom\n",
      "d = m*1.66e-27*N/(a*1e-10)**3\n",
      "\n",
      "#Results\n",
      "print(\"Density of diamond is %d Kg/m^3\" %d)\t\t\t# numerical answer in book is 3500\n",
      "print(\"Density of diamond is %.1f g/cm^3\" %(d/1000))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Packing efficiency of diamond is 0.34\n",
        "Density of diamond is 3502 Kg/m^3\n",
        "Density of diamond is 3.5 g/cm^3\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.3, Page No 92"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "a = 1.0 # let\n",
      "PR = a\n",
      "\n",
      "#Calculations\n",
      "RT = a/math.sqrt(3)\n",
      "PT = math.sqrt(PR**2-RT**2)\n",
      "c_a = 2*PT/PR\n",
      "\n",
      "#Results\n",
      "# Calculations are made on the crystal structure drawn in book\n",
      "print(\"c/a ratio for an ideally close packed HCP crystal is %0.3f \" %c_a)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "c/a ratio for an ideally close packed HCP crystal is 1.633 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.4, Page No 94"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "r = 1.0 \t\t# let\n",
      "a = 3.0/4.0\n",
      "\n",
      "#Calculations\n",
      "pt = 2*math.sqrt(2/3)*r\n",
      "s = a*pt-r \t\t\t# size of sphere\n",
      "\n",
      "#Results\n",
      "print(\"Size of largest sphere that can fit into a tetrahedral void is %.3f r\" %s)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Size of largest sphere that can fit into a tetrahedral void is -1.000 r\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.5 Page No 99"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "theta = 60.0\t # angle in degree\n",
      "\n",
      "#Calculations\n",
      "r_c_a = (2.0/3*2*math.sin(theta*math.pi/180))-1 # ratio calculation\n",
      "\n",
      "#Results\n",
      "print(\"Critical radius ratio for triangular coordination is %0.3f \" %r_c_a)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Critical radius ratio for triangular coordination is 0.155 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.6, Page No 101"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "r_mg = 0.78 \t# radius of magnesium cation in angstrom\n",
      "r_o = 1.32 \t\t# radius of oxygen anion in angstrom\n",
      "n = 4.0  \t    # effective number of unit cell\n",
      "m_o = 16.0\t    # mass of oxygen\n",
      "m_mg = 24.3 \t# mass of magnesium\n",
      "\n",
      "#Calculations\n",
      "a = 2*(r_mg+r_o)\t\t\t\t\t\t\t# lattice parameter\n",
      "d = (m_o+m_mg)*1.66e-27*n/(a*1e-10)**3\t\t# density \n",
      "\n",
      "#Results\n",
      "print(\"Density of MgO is %d Kg/m^3\" %d) \t# answer is 3610 kg/m^3\n",
      "print(\"Density of MgO is %0.2f g/cm^3\" %(d/1000))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Density of MgO is 3611 Kg/m^3\n",
        "Density of MgO is 3.61 g/cm^3\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}