summaryrefslogtreecommitdiff
path: root/Chemistry/Chapter_18.ipynb
blob: aabe2f15a1163966be027f7720dade0028d97ad1 (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
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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18:Entropy, Free Energy,and Equilibrium"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:18.2,Page no:809"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "#(a)\n",
      "SCaO=39.8 #standard entropy of CaO, J/K mol\n",
      "SCO2=213.6 #standard entropy of CO2, J/K mol\n",
      "SCaCO3=92.9 #standard entropy of CaCO3, J/K mol\n",
      "#(b)\n",
      "SNH3=193 #standard entropy of NH3, J/K mol\n",
      "SN2=192 #standard entropy of N2, J/K mol\n",
      "SH2=131 #standard entropy of H2, J/K mol\n",
      "#(c)\n",
      "SHCl=187 #standard entropy of HCl, J/K mol\n",
      "SH2=131 #standard entropy of H2, J/K mol\n",
      "SCl2=223 #standard entropy of Cl2, J/K mol\n",
      "\n",
      "#Calculation\n",
      "#(a)\n",
      "deltaSrxn1=SCaO+SCO2-SCaCO3 #standard entropy change of the reaction, J/K mol\n",
      "#(b)\n",
      "deltaSrxn2=2*SNH3-(SN2+3*SH2) #standard entropy change of the reaction, J/K mol\n",
      "#(c)\n",
      "deltaSrxn3=2*SHCl-SH2-SCl2 #standard entropy change of the reaction, J/K mol\n",
      "\n",
      "#Result\n",
      "print\"(a) the standard entropy of reaction is :\",deltaSrxn1,\"J/K mol\"\n",
      "print\"(b) the standard entropy of reaction is :\",deltaSrxn2,\"J/K mol\"\n",
      "print\"(c) the standard entropy of reaction is :\",deltaSrxn3,\"J/K mol\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) the standard entropy of reaction is : 160.5 J/K mol\n",
        "(b) the standard entropy of reaction is : -199 J/K mol\n",
        "(c) the standard entropy of reaction is : 20 J/K mol\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:18.4,Page no:817"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "#(a)\n",
      "GCO2=-394.4 #free energy of formation of CO2, kJ/mol\n",
      "GH2O=-237.2 #free energy of formation of H2O, kJ/mol\n",
      "GCH4=-50.8 #free energy of formation of CH4, kJ/mol\n",
      "GO2=0 #free energy of formation of O2, kJ/mol\n",
      "#(b)\n",
      "GMg=0 #free energy of formation of Mg, kJ/mol\n",
      "GMgO=-569.6 #free energy of formation of MgO, kJ/mol\n",
      "GO2=0 #free energy of formation of O2, kJ/mol\n",
      "\n",
      "#Calculation\n",
      "deltaGrxn1=(GCO2+GH2O*2)-(GCH4+2*GO2) #standard free energy change of the reaction, kJ/mol\n",
      "deltaGrxn=(GO2+GMg*2)-(2*GMgO) #standard free energy change of the reaction, kJ/mol\n",
      "\n",
      "#Result\n",
      "print\"(a) The standard free energy change of reaction is :\",deltaGrxn1,\"kJ/mol\"\n",
      "print\"(b) The standard free energy change of reaction is :\",round(deltaGrxn),\"kJ/mol\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) The standard free energy change of reaction is : -818.0 kJ/mol\n",
        "(b) The standard free energy change of reaction is : 1139.0 kJ/mol\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:18.5,Page no:820"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "#for fusion\n",
      "T1=5.5+273 #temperature of fusion, K\n",
      "deltaH1=10.9*1000 #change in enthalpy, J/mol\n",
      "#for vaporisation\n",
      "T2=80.1+273 #temperature of vaporisation, K\n",
      "deltaH2=31*1000 #change in enthalpy, J/mol\n",
      "\n",
      "#Calculation\n",
      "deltaSf=deltaH1/T1 #since in fusion deltaG=0, J/ K mol\n",
      "deltaSv=deltaH2/T2 #since in vaporisation deltaG=0, J/ K mol\n",
      "\n",
      "#Result\n",
      "print\"The entropy change for fusion is\",round(deltaSf,1),\"J/K.mol\" \n",
      "print\"The entropy change for condensation is : \",round(deltaSv,1),\"J/K mol\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The entropy change for fusion is 39.1 J/K.mol\n",
        "The entropy change for condensation is :  87.8 J/K mol\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:18.6,Page no:823"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "T=298 #temperature, K\n",
      "R=8.314 #gas constant, J/K mol\n",
      "GH2=0 #free energy of formation of H2, kJ/mol\n",
      "GH2O=-237.2 #free energy of formation of H2O, kJ/mol\n",
      "GO2=0 #free energy of formation of O2, kJ/mol\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "deltaG=1000*(2*GH2+GO2-2*GH2O) #free energy of rxn, J/mol\n",
      "Kp=math.exp(-deltaG/(R*T)) #equilibrium constant for rxn\n",
      "\n",
      "#Result\n",
      "print\"deltaG_rxn=\",deltaG/1000,\"kJ/mol\"\n",
      "print\"The equilibrium constant for the given reaction is :%.e\"%Kp"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "deltaG_rxn= 474.4 kJ/mol\n",
        "The equilibrium constant for the given reaction is :7e-84\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:18.7,Page no:824"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T=298 #temperature, K\n",
      "R=8.314 #gas constant, J/K mol\n",
      "Ksp=1.6*10**-10 #solubility constant\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "deltaG=-R*T*math.log(Ksp) #here solubility product is equal to equilibrium constant\n",
      "\n",
      "#Result\n",
      "print\"The free energy for the given reaction is :\",round(deltaG*10**-3),\"kJ/mol\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The free energy for the given reaction is : 56.0 kJ/mol\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:18.8,Page no:825"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T=298 #temperature, K\n",
      "R=8.314 #gas constant, J/K mol\n",
      "deltaG0=5.4*10**3 #standard free energy, kJ/mol\n",
      "pNO2=0.122 #pressure of NO2, atm\n",
      "pN2O4=0.453 #pressure of N2O4, atm\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "deltaG=deltaG0+R*T*math.log(pNO2**2/pN2O4) #here solubility product is equal to equilibrium constant\n",
      "\n",
      "#Result\n",
      "if(deltaG<0):#equilibrium determination\n",
      "    d=\"net reaction proceeds from left to right to reach equilibrium\" \n",
      "else:\n",
      "    d=\"net reaction proceeds from right to left to reach equilibrium\" \n",
      "print\"The free energy for the given reaction is :\",round(deltaG*10**-3,2),\"kJ/mol and\",d\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The free energy for the given reaction is : -3.06 kJ/mol and net reaction proceeds from left to right to reach equilibrium\n"
       ]
      }
     ],
     "prompt_number": 27
    }
   ],
   "metadata": {}
  }
 ]
}