summaryrefslogtreecommitdiff
path: root/ENGINEERING_PHYSICS_by_M.ARUMUGAM/Chapter08.ipynb
blob: 09325a4bccad56ffc638965d5565fb00919513f3 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#8:Defects In Solids "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 8.1, Page number 8.16"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "at 0K, The number of vacancies per kilomole of copper is 0\n",
      "at 300K, The number of vacancies per kilomole of copper is 7.577 *10**5\n",
      "at 900K, The numb ber of vacancies per kilomole of copper is 6.502 *10**19\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "N=6.023*10**26\n",
    "deltaHv=120\n",
    "B=1.38*10**-23\n",
    "k=6.023*10**23\n",
    "\n",
    "#Calculations\n",
    "n0=0                                          # 0 in denominator\n",
    "n300=N*math.exp(-deltaHv*10**3/(k*B*300))     #The number of vacancies per kilomole of copper\n",
    "n900=N*math.exp(-(deltaHv*10**3)/(k*B*900))\n",
    "\n",
    "#Results\n",
    "print\"at 0K, The number of vacancies per kilomole of copper is\",n0\n",
    "print\"at 300K, The number of vacancies per kilomole of copper is\",round(n300/10**5,3),\"*10**5\"\n",
    "print\"at 900K, The numb ber of vacancies per kilomole of copper is\",round(n900/10**19,3),\"*10**19\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 8.2, Page number 8.17"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fraction of vacancies at 1000 degrees C = 8.5 *10**-7\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "from sympy import Symbol\n",
    "\n",
    "#Variable declaration\n",
    "F_500=1*10**-10\n",
    "delta_Hv=Symbol('delta_Hv')\n",
    "k=Symbol('k')\n",
    "T1=500+273\n",
    "T2=1000+273\n",
    "\n",
    "\n",
    "#Calculations\n",
    "lnx=math.log(F_500)*T1/T2;\n",
    "x=math.exp(round(lnx,2))\n",
    "\n",
    "print\"Fraction of vacancies at 1000 degrees C =\",round(x*10**7,1),\"*10**-7\" "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 8.3, Page number 8.17"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Volume of unit cell of NaCl = 1.794 *10**-28 m**3\n",
      "Total number of ion pairs 'N' =' 2.23 *10**28\n",
      "The concentration of Schottky defects per m**3 at 300K = 6.42 *10**11\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "a=(2*2.82*10**-10)\n",
    "delta_Hs=1.971*1.6*10**-19\n",
    "k=1.38*10**-23\n",
    "T=300\n",
    "\n",
    "#Calculations\n",
    "V=a**3                           #Volume of unit cell of NaCl\n",
    "N=4/V                            #Total number of ion pairs\n",
    "n=N*math.e**-(delta_Hs/(2*k*T))  \n",
    "\n",
    "#Result\n",
    "print\"Volume of unit cell of NaCl =\",round(V*10**28,3),\"*10**-28 m**3\"\n",
    "print\"Total number of ion pairs 'N' ='\",round(N/10**28,2),\"*10**28\"\n",
    "print\"The concentration of Schottky defects per m**3 at 300K =\",round(n/10**11,2),\"*10**11\"\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 8.4, Page number 8.18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The number that must be created on heating from 0 to 500K is n= 9.22 *10**12 per cm**3\n",
      "As one step is 2 Angstorms, 5*10**7 vacancies are required for 1cm\n",
      "The amount of climb down by the dislocation is 0.369 cm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "N=6.023*10**23\n",
    "delta_Hv=1.6*10**-19\n",
    "k=1.38*10**-23\n",
    "T=500\n",
    "mv=5.55;     #molar volume\n",
    "x=2*10**-8;     #numbber of cm in 1 angstrom\n",
    "\n",
    "#Calculations\n",
    "n=N*math.exp(-delta_Hv/(k*T))/mv\n",
    "a=round(n/(5*10**7*10**6),4)*x;\n",
    "\n",
    "#Result\n",
    "print\"The number that must be created on heating from 0 to 500K is n=\",round(n/10**12,2),\"*10**12 per cm**3\" #into cm**3\n",
    "print\"As one step is 2 Angstorms, 5*10**7 vacancies are required for 1cm\"\n",
    "print\"The amount of climb down by the dislocation is\",a*10**8,\"cm\""
   ]
  }
 ],
 "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
}