summaryrefslogtreecommitdiff
path: root/sample_notebooks/makarala shamukha venkatasahithi/Chapter_5_Imperfection_in_Solids_1.ipynb
blob: 0e2a1db41dcf6ed8910d68314337da40e9ffca26 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 5 Imperfection in Solids"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_1 pgno:56"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 5.1\n",
      "\n",
      "\n",
      " Equilibrium number of vacancies/m**3 is  for 1273K 2.18444488963e+25\n"
     ]
    }
   ],
   "source": [
    "# given that\n",
    "Na=6.023*10**23 #Avogadro No.\n",
    "rho=8.4e6 #Density of Copper in g/m**3\n",
    "A=63.5 #Atomic weight of Copper\n",
    "Qv=0.9 #Activation energy in eV\n",
    "k=8.62*10**-5 #Boltzmann Constant in eV/K\n",
    "T=1000+273#Temperature in K\n",
    "from math import exp\n",
    "print\"Example 5.1\\n\"\n",
    "N=Na*rho/A #No. of atomic site per cubic meter\n",
    "Nv=N*exp(-Qv/(k*T))\n",
    "print\"\\n Equilibrium number of vacancies/m**3 is  for 1273K\",Nv\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_3 pgno:57"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Example 5.3\n",
      "\n",
      "\n",
      " Atomic  of Al is 98.7039833218\n",
      "\n",
      " Atomic  of Cu is 1.29601667817\n"
     ]
    }
   ],
   "source": [
    "# given that\n",
    "C_Al=97. #Aluminium wt%\n",
    "C_Cu=3. #Copper wt%\n",
    "A_Al=26.98 #Atomic wt of Aluminium\n",
    "A_Cu=63.55 #Atomic wt of Copper\n",
    "\n",
    "print\" Example 5.3\\n\"\n",
    "CAl=C_Al*A_Cu*100/((C_Al*A_Cu)+(C_Cu*A_Al))\n",
    "CCu=C_Cu*A_Al*100/((C_Cu*A_Al)+(C_Al*A_Cu))\n",
    "print\"\\n Atomic  of Al is\",CAl\n",
    "print\"\\n Atomic  of Cu is\",CCu\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_4 pgno:58"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 5.4\n",
      "\n",
      "\n",
      " Number of Schottky defects are  defects/m**3. 5.31422380078e+19\n"
     ]
    }
   ],
   "source": [
    "# given that\n",
    "Na=6.023*10**23 #Avogadro No.\n",
    "rho=1.955 #Density of KCl in g/cm**3\n",
    "A_k= 39.10 #Atomic weight of potassium in g/mol\n",
    "A_cl= 35.45 #Atomic weight of Chlorine in g/mol\n",
    "Qs=2.6 #Activation energy in eV\n",
    "k=8.62*10**-5 #Boltzmann Constant in eV/K\n",
    "T=500+273 #Temperature in K\n",
    "from math import exp\n",
    "\n",
    "print\"Example 5.4\\n\"\n",
    "A = A_k+A_cl # Molar mass of KCl in gram\n",
    "N=Na*rho*1e6/A #No. of atomic site per cubic meter\n",
    "Ns=N*exp(-Qs/(2*k*T))\n",
    "print\"\\n Number of Schottky defects are  defects/m**3.\",Ns\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5_6 pgno:58"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 5.6\n",
      "\n",
      "\n",
      " Part A\n",
      "\n",
      " Grain size number is \n",
      "6.49185309633\n",
      "\n",
      " Part B\n",
      "\n",
      " At magnification of 85x\n",
      "\n",
      " Number of grains per inch square are\n",
      "62.2837370242\n"
     ]
    }
   ],
   "source": [
    "# given that \n",
    "N=45. #Number of grains per square inch\n",
    "M=85. # magnification\n",
    "from math import log\n",
    "print\"Example 5.6\\n\"\n",
    "print\"\\n Part A\"\n",
    "n=(log(N)/log(2))+1 #calculation for grain size no.  N=2**(n-1)\n",
    "print\"\\n Grain size number is \\n\",n\n",
    "print\"\\n Part B\"\n",
    "Nm=(100/M)**2*2**(n-1)\n",
    "print\"\\n At magnification of 85x\\n\"\n",
    "print\" Number of grains per inch square are\\n\",Nm\n",
    "# answer in book is 62.6. It is because of rounding off at intermediate stages\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}