summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_P.K.Palanisamy/Chapter4.ipynb
blob: 2b7c926e793fbd801347f22199ffc807b401ee76 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#4: Defects in Crystals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.1, Page number 4.5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ratio of vacancies is 1.082 *10**5\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "Ev=1;\n",
    "k=1.38*10**-23;     #boltzmann constant(J/K)\n",
    "e=1.6*10**-19;      #charge(eV)\n",
    "\n",
    "#Calculation\n",
    "r=Ev/(2.303*1000*k/e);      \n",
    "n=10**r;                #ratio of n1000/n500\n",
    "\n",
    "#Result\n",
    "print \"ratio of vacancies is\",round(n/10**5,3),\"*10**5\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.2, Page number 4.5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of vacancies per atom at 350K is 0.5486 *10**-17\n",
      "number of vacancies per atom at 500K is 0.827 *10**-12\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "Ev=1.2;\n",
    "k=1.38*10**-23;     #boltzmann constant(J/K)\n",
    "e=1.6*10**-19;      #charge(eV)\n",
    "T1=350;    #temperature(K)\n",
    "T2=500;    #temperature(K)\n",
    "\n",
    "#Calculation\n",
    "x1=Ev/(2.303*k*T1/e);\n",
    "n1=1/(10**x1);     #number of vacancies per atom at 350K\n",
    "x2=Ev/(2.303*k*T2/e);\n",
    "n2=1/(10**x2);     #number of vacancies per atom at 500K\n",
    "\n",
    "#Result\n",
    "print \"number of vacancies per atom at 350K is\",round(n1*10**17,4),\"*10**-17\"\n",
    "print \"number of vacancies per atom at 500K is\",round(n2*10**12,3),\"*10**-12\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.3, Page number 4.7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "average energy required is 1.971 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "d=2.82*10**-10;    #distance(m)\n",
    "k=1.38*10**-23;     #boltzmann constant(J/K)\n",
    "e=1.6*10**-19;      #charge(eV)\n",
    "T=273+25;    #temperature(K)\n",
    "sd=5*10**11;    #schotky defects(per m**3)\n",
    "\n",
    "#Calculation\n",
    "V=(2*d)**3;    #volume of unit cell(m**3)\n",
    "N=4/V;    #density of ion pairs\n",
    "x=round(math.log10(N/sd),2);\n",
    "Es=2*(k/e)*T*2.303*x;       #average energy required(eV)\n",
    "\n",
    "#Result\n",
    "print \"average energy required is\",round(Es,3),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 4.4, Page number 4.8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ratio of Frenkel defects is 1.125 *10**-6\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "T1=273+25;      #temperature(K)\n",
    "T2=273+350;     #temperature(K)\n",
    "Ef=1.35;     #energy(eV)\n",
    "k=8.625*10**-5;\n",
    "\n",
    "#Calculation\n",
    "x=(Ef/k)*((1/(2*T1))-(1/(2*T2)))/2.303;\n",
    "r=1/(10**round(x,3));      #ratio of Frenkel defects\n",
    "\n",
    "#Result\n",
    "print \"ratio of Frenkel defects is\",round(r*10**6,3),\"*10**-6\""
   ]
  }
 ],
 "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
}