summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_P.K.Palanisamy/Chapter1.ipynb
blob: 3dd56e56b7cc725f4ebd24695a3ac126f43fd18c (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#1: Bonding in Solids"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 1.1, Page number 1.4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "net change in energy per mole is -296 kJ/mol\n",
      "answer varies due to rounding off errors\n",
      "since the net change in energy is negative, the A+B- molecule will be stable\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "e=1.602*10**-19;   #charge of electron(c)\n",
    "epsilon0=8.85*10**-12;    #permittivity(C/Nm)\n",
    "r=3*10**-10;     #seperation(m)\n",
    "N=6.022*10**20;\n",
    "Ea=502;     #ionisation energy of A(kJ/mol)\n",
    "Eb=-335;    #electron affinity for B(kJ/mol)\n",
    "\n",
    "#Calculation\n",
    "E=-e**2*N/(4*math.pi*epsilon0*r);    #electrostatic attraction(kJ/mol)\n",
    "nE=Ea+Eb+E;    #net change in energy per mole(kJ/mol)\n",
    "\n",
    "#Result\n",
    "print \"net change in energy per mole is\",int(nE),\"kJ/mol\"\n",
    "print \"answer varies due to rounding off errors\"\n",
    "print \"since the net change in energy is negative, the A+B- molecule will be stable\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 1.2, Page number 1.4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "energy required is 0.5 eV\n",
      "seperation is 2.88 nm\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "IPk=4.1;    #IP of K(eV)\n",
    "EACl=3.6;    #EA of Cl(eV)\n",
    "e=1.602*10**-19;   #charge of electron(c)\n",
    "onebyepsilon0=9*10**9;\n",
    "\n",
    "#Calculation\n",
    "deltaE=IPk-EACl;\n",
    "Ec=deltaE;      #energy required(eV)\n",
    "R=e*onebyepsilon0/deltaE;     #seperation(m)\n",
    "\n",
    "#Result\n",
    "print \"energy required is\",Ec,\"eV\"\n",
    "print \"seperation is\",round(R*10**9,2),\"nm\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 1.3, Page number 1.5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "bond energy is 4.61 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "e=1.602*10**-19;   #charge of electron(c)\n",
    "epsilon0=8.85*10**-12;    #permittivity(C/Nm)\n",
    "r0=236*10**-12;     #seperation(m)\n",
    "N=6.022*10**20;\n",
    "IP=5.14;     #ionisation energy of A(kJ/mol)\n",
    "EA=3.65;    #electron affinity for B(kJ/mol)\n",
    "\n",
    "#Calculation\n",
    "Ue=-e**2/(4*math.pi*epsilon0*r0*e);    #potential energy(eV)\n",
    "BE=-Ue-IP+EA;      #bond energy(eV)\n",
    "\n",
    "#Result\n",
    "print \"bond energy is\",round(BE,2),\"eV\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 1.4, Page number 1.18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cohesive energy is 7.965 eV\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "A=1.748;       #madelung constant\n",
    "n=9;     #born repulsive exponent\n",
    "e=1.602*10**-19;   #charge of electron(c)\n",
    "epsilon0=8.85*10**-12;    #permittivity(C/Nm)\n",
    "r0=0.281*10**-9;     #seperation(m)\n",
    "IE=5.14;     #ionisation energy of A(kJ/mol)\n",
    "EA=3.61;    #electron affinity for B(kJ/mol)\n",
    "\n",
    "#Calculation\n",
    "CE=A*e**2*(1-(1/n))/(4*math.pi*epsilon0*r0*e);      #cohesive energy(eV)\n",
    "\n",
    "#Result\n",
    "print \"cohesive energy is\",round(CE,3),\"eV\""
   ]
  }
 ],
 "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
}