summaryrefslogtreecommitdiff
path: root/Material_Science_In_Engineering_by_Dr._K._M._Gupta/ch4.ipynb
blob: ebcb7af1f9fa4c1507f9a49cdad4de56cfe68402 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 4 : Crystallography"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 4.3 page no : 82"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "r_na = 0.98;\t\t\t#ionic radius of sodium in angstorm\n",
      "r_cl = 1.81;\t\t\t#ionic radius of chlorine in angstorm\n",
      "n = 4.;     \t\t\t#in fcc there are 4 Na and 4 Cl ions\n",
      "\n",
      "# Calculations\n",
      "a = ((2*r_na)+(2*r_cl));\t\t\t#latice constant\n",
      "apf = ((n*(4./3)*3.14*r_na**3)+(n*(4./3)*3.14*r_cl**3))/a**3;\n",
      "\n",
      "# Results\n",
      "print \"Lattice consmath.tant  =  \",a\n",
      "print \"atomic packing fraction of NaCl having FCC structure  =  %.2f\"%apf\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Lattice consmath.tant  =   5.58\n",
        "atomic packing fraction of NaCl having FCC structure  =  0.66\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 4.4 pageno : 83"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "r = 1.278;\t\t\t#radius of copper in angstorm\n",
      "\n",
      "#copper has FCC structure\n",
      "a = round(4*r/math.sqrt(2),2);\t\t\t#in angstorm\n",
      "a1 = a*10**-8;\t\t\t        #in cm\n",
      "aw = 63.54;         \t\t\t#atomic weight of copper\n",
      "ne = 4.;\t\t\t            #fcc\n",
      "na = 6.023*10**23;\t\t\t    #Avagadro's no.\n",
      "p = aw*ne/(na*a1**3);\t\t\t#in g/cm**3\n",
      "\n",
      "# Results\n",
      "print \"a (in Angstorm)  =  %.2f A\"%a\n",
      "print \"Density of Copper (in gm/cm**3) : %.2f\"%p\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a (in Angstorm)  =  3.61 A\n",
        "Density of Copper (in gm/cm**3) : 8.97\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 4.5 pageno : 84"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "w_na = 23.;    \t\t\t#atomic weight of Na\n",
      "w_cl = 35.5;\t\t\t#atomic weight of Cl\n",
      "w = w_na+w_cl;\t\t\t#effective no.of atoms in FCC structure\n",
      "n = 4.;     \t\t\t#FCC\n",
      "\n",
      "# Calculations\n",
      "na = 6.023*10**23;\t\t\t#Avagadrro's no.\n",
      "w_4 = w*n/na;\t\t\t#weight of 4 molecules in gm\n",
      "p = 2.18;\t\t\t#density in gm/cm**3\n",
      "a3 = (w*n)/(na*p)\n",
      "a = a3**(1./3)\n",
      "#a = (w_4/p)**(1/3);\t\t\t#in cm\n",
      "a1 = a*10**8;\t\t\t#in angstorm\n",
      "d = a1/2;\n",
      "\n",
      "# Results\n",
      "print \"unit cell dimension (in angstorm)  =  %.2f A\"%a1\n",
      "print \"Distance between two adjacent atoms (in Angstorm)  =  %.2f A\"%d\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "unit cell dimension (in angstorm)  =  5.63 A\n",
        "Distance between two adjacent atoms (in Angstorm)  =  2.81 A\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 4.6 pageno : 84"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "n = 2.;          \t\t\t#BCC    \n",
      "p = 7.86;\t    \t\t    #density in gm/cm**3\n",
      "aw = 55.85;\t\t        \t#atomic weight of iron\n",
      "\n",
      "# Calculations\n",
      "na = 6.023*10**23;\t\t            \t#Avagadrro's no.\n",
      "a = ((aw*n)/(na*p))**(1./3);\t\t\t#in cm\n",
      "a1 = a*10**8;\t                \t\t#in angstorm\n",
      "r = math.sqrt(3)*a1/4;\n",
      "\n",
      "# Results\n",
      "print \"unit cell dimension of iron (in angstorm)  =  %.2f A\"%a1\n",
      "print \"atomic radius  =  %.3f A\"%r\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "unit cell dimension of iron (in angstorm)  =  2.87 A\n",
        "atomic radius  =  1.242 A\n"
       ]
      }
     ],
     "prompt_number": 15
    }
   ],
   "metadata": {}
  }
 ]
}