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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#Chapter 1(A):Bonding in Solids"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Example 1.1, Page number 1.14"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-2*a/r**3 + 90*b/r**11\n"
]
}
],
"source": [
"#importing modules\n",
"import math\n",
"from __future__ import division\n",
"from sympy import Symbol\n",
"from sympy import diff\n",
"import numpy as np\n",
"\n",
"#Variable declaration\n",
"n=1;\n",
"m=9;\n",
"a=Symbol('a')\n",
"b=Symbol('b')\n",
"r=Symbol('r')\n",
"\n",
"#Calculation\n",
"y=(-a/(r**n))+(b/(r**m));\n",
"y=diff(y,r);\n",
"y=diff(y,r);\n",
"\n",
"#Result\n",
"print y\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"###Example 1.1(Continued after differentiation)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"young's modulus is 157 GPa\n"
]
}
],
"source": [
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable declaration\n",
"a=7.68*10**-29; \n",
"r0=2.5*10**-10; #radius(m)\n",
"\n",
"#Calculation\n",
"b=a*(r0**8)/9;\n",
"y=((-2*a*r0**8)+(90*b))/r0**11; \n",
"E=y/r0; #young's modulus(Pa)\n",
"\n",
"#Result\n",
"print \"young's modulus is\",int(E/10**9),\"GPa\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Example 1.2, Page number 1.15"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Effective charge = 0.72 *10**-29 coulomb\n"
]
}
],
"source": [
"import math\n",
"\n",
"#variable declarations\n",
"d=((1.98)*10**-29)*1/3; #dipole moment\n",
"b=(0.92); #bond length\n",
"EC=d/(b*10**-10); #Effective charge\n",
"\n",
"#Result\n",
"print \"Effective charge =\",round((EC*10**19),2),\"*10**-29 coulomb\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Example 1.3, Page number 1.15"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Cohesive energy = 668.9 *10**3 kJ/kmol\n",
"#Answer varies due to rounding of numbers\n"
]
}
],
"source": [
"import math\n",
"from __future__ import division\n",
"\n",
"#variable declaration\n",
"A=1.748 #Madelung Constant \n",
"N=6.02*10**26 #Avagadro Number\n",
"e=1.6*10**-19\n",
"n=9.5\n",
"r=(0.324*10**-9)*10**3\n",
"E=8.85*10**-12\n",
"#Calculations\n",
"U=((N*A*(e)**2)/(4*math.pi*E*r))*(1-1/n) #Cohesive energy\n",
"\n",
"#Result\n",
"print \"Cohesive energy =\",round(U/10**3,1),\"*10**3 kJ/kmol\"\n",
"print \"#Answer varies due to rounding of numbers\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Example 1.4, Page number 1.15"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Coulomb energy = -2.88 eV\n",
"Energy required = -1.88 eV\n"
]
}
],
"source": [
"import math\n",
"from __future__ import division\n",
"#variable declaration\n",
"I=5; #Ionisation energy\n",
"A=4; #Electron Affinity\n",
"e=(1.6*10**-19)\n",
"E=8.85*10**-12 #epsilon constant\n",
"r=0.5*10**-19 #dist between A and B\n",
"\n",
"#Calculations\n",
"C=-(e**2/(4*math.pi*E*r*e))/10**10 #Coulomb energy\n",
"E_c=I-A+C #Energy required\n",
"\n",
"#Result\n",
"print \"Coulomb energy =\",round(C,2),\"eV\"\n",
"print \"Energy required =\",round(E_c,2),\"eV\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Example 1.5, Page number 1.16"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Energy required= 1.49 eV\n",
"Distance of separation = 9.66 Angstrom\n"
]
}
],
"source": [
"import math\n",
"from __future__ import division\n",
"\n",
"#variable declaration\n",
"I=5.14; #Ionization energy\n",
"A=3.65; #Electron Affinity\n",
"e=(1.6*10**-19);\n",
"E=8.85*10**-12; \n",
"#calculations\n",
"E_c=I-A #Energy required\n",
"r=e**2/(4*math.pi*E*E_c*e) #Distance of separation\n",
"\n",
"#Result\n",
"print \"Energy required=\",E_c,\"eV\"\n",
"print \"Distance of separation =\",round(r/10**-10,2),\"Angstrom\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##Example 1.6, Page number 1.16"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Energy required= 1.49 eV\n",
"Energy required = -6.1 eV\n",
"Bond Energy = 4.61 eV\n"
]
}
],
"source": [
"import math\n",
"from __future__ import division\n",
"\n",
"#variable declaration \n",
"I=5.14; #Ionization energy\n",
"A=3.65; #Electron Affinity\n",
"e=(1.6*10**-19);\n",
"E=8.85*10**-12; \n",
"r=236*10**-12;\n",
"\n",
"#Calculations\n",
"E_c=I-A #Energy required\n",
"C=-(e**2/(4*math.pi*E*r*e)) #Potentential energy in eV\n",
"BE=-(E_c+C) #Bond Energy\n",
"#Result\n",
"print \"Energy required=\",E_c,\"eV\"\n",
"print \"Energy required =\",round(C,1),\"eV\"\n",
"print \"Bond Energy =\",round(BE,2),\"eV\"\n",
"\n"
]
}
],
"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
}
|