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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4: Defects in Crystals"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"## Example number 4.1, Page number 97"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"fraction of vacancy sites at 1000 C is 8.4663 *10**-7\n",
"answer varies due to rounding off errors\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"T1=773; #temperature(K)\n",
"T2=1273; #temperature(K)\n",
"n=1*10**-10; #fraction of vacancy sites\n",
"\n",
"#Calculations\n",
"X=round(T1*math.log(n)/T2,3);\n",
"x=math.exp(X); #fraction of vacancy sites at 1000 C\n",
"\n",
"#Result\n",
"print \"fraction of vacancy sites at 1000 C is\",round(x*10**7,4),\"*10**-7\"\n",
"print \"answer varies due to rounding off errors\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 4.2, Page number 98"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"energy required is 1.971 eV\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"T=273+25; #temperature(K)\n",
"m=4; \n",
"n=5*10**11; #density(per m**3)\n",
"V=(2*2.82*10**-10)**3; #volume(m**3)\n",
"kB=8.625*10**-5;\n",
"\n",
"#Calculations\n",
"N=m/V;\n",
"Ep=2*kB*T*math.log(N/n);\n",
"\n",
"#Result\n",
"print \"energy required is\",round(Ep,3),\"eV\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example number 4.3, Page number 99"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ratio of frenkel defects is 2.802 *10**-3\n",
"answer in the book is wrong\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration \n",
"T1=273+20; #temperature(K)\n",
"T2=273+300; #temperature(K)\n",
"Ei=1.4; #energy(eV)\n",
"kB=8.625*10**-5;\n",
"\n",
"#Calculations\n",
"x=(1/(2*T1))-(1/(2*T2));\n",
"n=1/math.exp((Ei/(2.303*kB))*x); #ratio of frenkel defects\n",
"\n",
"#Result\n",
"print \"ratio of frenkel defects is\",round(n*10**3,3),\"*10**-3\"\n",
"print \"answer in the book is wrong\""
]
}
],
"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.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|