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
323
324
325
326
327
328
329
330
331
|
{
"metadata": {
"name": "",
"signature": "sha256:ea5fa2ce45062851dc4892fcc5b621c33d72fa0443d476b1ef4133dade9e39b0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 11 : Properties of a Component in a Mixture"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 11.1 Page Number : 385"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"import math\n",
"\n",
"# Variables\n",
"Vol_total = 3;\t\t\t#[m**(3)] - Total volume of solution\n",
"x_ethanol = 0.6;\t\t\t#Mole fraction of ethanol\n",
"x_water = 0.4;\t\t\t#Mole fraction of water\n",
"\n",
"# Calculations\n",
"#The partial molar volumes of the components in the mixture are\n",
"V_ethanol_bar = 57.5*10**(-6);\t\t\t#[m**(3)/mol]\n",
"V_water_bar = 16*10**(-6);\t\t\t#[m**(3)/mol]\n",
"\n",
"#The molar volumes of the pure components are\n",
"V_ethanol = 57.9*10**(-6);\t\t\t#[m**(3)/mol]\n",
"V_water = 18*10**(-6);\t\t\t#[m**(3)/mol]\n",
"\n",
"#The molar volume of the solution is\n",
"V_sol = x_ethanol*V_ethanol_bar + x_water*V_water_bar;\t\t\t#[m**(3)/mol]\n",
"#Total number of moles can be calculated as \n",
"n_total = Vol_total/V_sol;\t\t\t#[mol]\n",
"\n",
"#Moles of the components are\n",
"n_ethanol = n_total*x_ethanol;\t\t\t#[mol]\n",
"n_water = n_total*x_water;\t\t\t#[mol]\n",
"\n",
"#Finally the volume of the pure components required can be calculated as\n",
"Vol_ethanol = V_ethanol*n_ethanol;\n",
"Vol_water = V_water*n_water;\n",
"\n",
"# Results\n",
"print \"Required volume of ethanol is %f cubic metre\"%(Vol_ethanol);\n",
"print \"Required volume of water is %f cubic metre\"%(Vol_water);\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Required volume of ethanol is 2.548166 cubic metre\n",
"Required volume of water is 0.528117 cubic metre\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 11.2 Page Number : 385"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"# Variables\n",
"T = 25+273.15;\t\t\t#[K] - Temperature\n",
"P = 1;\t\t\t#[atm]\n",
"#Component 1 = water\n",
"#component 2 = methanol\n",
"a = -3.2;\t\t\t#[cm**(3)/mol] - A constant\n",
"V2 = 40.7;\t\t\t#[cm**(3)/mol] - Molar volume of pure component 2 (methanol)\n",
"#V1_bar = 18.1 + a*x_2**(2)\n",
"\n",
"# Calculations and Results\n",
"#From Gibbs-Duhem equation at constant temperature and pressure we have\n",
"#x_1*dV1_bar + x_2*dV2_bar = 0\n",
"#dV2_bar = -(x_1/x_2)*dV1_bar = -(x_1/x_2)*a*2*x_2*dx_2 = -2*a*x_1*dx_2 = 2*a*x_1*dx_1\n",
"\n",
"#At x_1 = 0: x_2 = 1 and thus V2_bar = V2\n",
"#Integrating the above equation from x_1 = 0 to x_1 in the RHS, and from V2_bar = V2 to V2 in the LHS, we get\n",
"#V2_bar = V2 + a*x_1**(2) - Molar volume of component 2(methanol) in the mixture \n",
"\n",
"print \"The expression for the partial molar volume of methanol2 isV2_bar = V2 + a*x_1**2 [cm**3/mol]\";\n",
"\n",
"#At infinite dilution, x_2 approach 0 and thus x_1 approach 1, therefore\n",
"x_1 = 1;\t\t\t# Mole fraction of component 1(water) at infinite dilution\n",
"V2_bar_infinite = V2 + a*(x_1**(2));\t\t\t#[cm**(3)/mol]\n",
"\n",
"print \"The partial molar volume of methanol at infinite dilution is %f cm**3/mol\"%(V2_bar_infinite);\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The expression for the partial molar volume of methanol2 isV2_bar = V2 + a*x_1**2 [cm**3/mol]\n",
"The partial molar volume of methanol at infinite dilution is 37.500000 cm**3/mol\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 11.4 Page Number : 387"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"# Variables\n",
"#H = a*x_1 + b*x_2 +c*x_1*x_2\n",
"\n",
"#The values of the constants are\n",
"a = 15000;\t\t\t#[J/mol]\n",
"b = 20000;\t\t\t#[J/mol]\n",
"c = -2000;\t\t\t#[J/mol]\n",
"\n",
"# Calculations and Results\n",
"#(1)\n",
"#Enthalpy of pure component 1 = H1 is obtained at x_2 = 0, thus \n",
"x_2 = 0;\n",
"x_1 = 1;\n",
"H1 = a*x_1 + b*x_2 +c*x_1*x_2;\t\t\t#[J/mol]\n",
"print \"a).The enthalpy of pure component 1 is %f J/mol\"%(H1);\n",
"\n",
"#Similarly for component 2,\n",
"#Enthalpy of pure component 2 = H2 is obtained at x_1 = 0, thus \n",
"x_1_prime = 0;\n",
"x_2_prime = 1;\n",
"H2 = a*x_1_prime + b*x_2_prime +c*x_1_prime*x_2_prime;\t\t\t#[J/mol]\n",
"print \" The enthalpy of pure component 2 is %f J/mol\"%(H2);\n",
"\n",
"#(b)\n",
"#This part involves proving a relation in which no mathematics and no calculations are involved.\n",
"#For prove refer to this example 11.4 on page number 387 of the book.\n",
"\n",
"#(c)\n",
"#From part (b), we have the relation\n",
"#H1_bar = a + c*(x_2**(2))\n",
"#H2_bar = b + c*(x_1**(2))\n",
"\n",
"#For enthalpy of component 1 at infinite dilution, x_1 approach 0 and thus x_2 approach 1, therefore\n",
"x_1_c = 0;\n",
"x_2_c = 1;\n",
"H1_infinite = a + c*(x_2_c**(2));\t\t\t#[cm**(3)/mol]\n",
"print \"C).The enthalpy of componenet 1 at infinite dilution at x_1 = 0) is %f J/mol\"%(H1_infinite);\n",
"\n",
"#At x_1 = 0.2\n",
"x_1_c1 = 0.2;\n",
"x_2_c1 = 0.8;\n",
"H1_bar_c1 = a + c*(x_2_c1**(2));\t\t\t#[J/mol]\n",
"print \" The enthalpy of componenet 1 at at x_1 = 0.2) is %f J/mol\"%(H1_bar_c1);\n",
"\n",
"#At x_1 = 0.8\n",
"x_1_c2 = 0.8;\n",
"x_2_c2 = 0.2;\n",
"H1_bar_c2 = a + c*(x_2_c2**(2));\t\t\t#[J/mol]\n",
"print \" The enthalpy of componenet 1 at at x_1 = 0.8) is %f J/mol\"%(H1_bar_c2);\n",
"\n",
"#As x_1 increases, 'H1_bar' approaches the value of 'H1' \n",
"\n",
"#(d)\n",
"#This part involves proving a relation in which no mathematics and no calculations are involved.\n",
"#For prove refer to this example 11.4 on page number 387 of the book.\n",
"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"a).The enthalpy of pure component 1 is 15000.000000 J/mol\n",
" The enthalpy of pure component 2 is 20000.000000 J/mol\n",
"C).The enthalpy of componenet 1 at infinite dilution at x_1 = 0) is 13000.000000 J/mol\n",
" The enthalpy of componenet 1 at at x_1 = 0.2) is 13720.000000 J/mol\n",
" The enthalpy of componenet 1 at at x_1 = 0.8) is 14920.000000 J/mol\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 11.9 Page Number : 395"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"# Variables\n",
"n = 1*10**(3);\t\t\t#[mol] - No of moles\n",
"P = 0.1;\t\t\t#[MPa] - Pressure of the surrounding\n",
"T = 300;\t\t\t#[K] - Temperature of the surrounding\n",
"x_1 = 0.79;\t\t\t#Mole fraction of N2 in the air\n",
"x_2 = 0.21;\t\t\t#Mole fraction of O2 in the air\n",
"R=8.314;\t\t\t#[J/mol*K]\n",
"\n",
"# Calculations\n",
"#Change in availability when x_1 moles of component 1 goes from pure state to that in the mixture is\n",
"#x_1*(si_1 - si_2) = x_1*[H1 - H1_bar - T_0*(S1 - S1_bar)]\n",
"#Similarly change in availability of x_2 moles of component 2 is\n",
"#x_2*(si_1 - si_2) = x_2*[H2 - H2_bar - T_0*(S2 - S2_bar)]\n",
"\n",
"#and thus total availability change when 1 mol of mixture is formed from x_1 mol of component 1 and x_2 mol of component 2 is equal to reversible work\n",
"#W_rev = x_1*[H1 - H1_bar - T_0*(S1 - S1_bar)] + x_2*[H2 - H2_bar - T_0*(S2 - S2_bar)]\n",
"#W_rev = -[x_1*(H1_bar - H1) + x_2*(H2_bar - H2)] + T_0*[x_1*(S1_bar - S1) + x_2*(S2_bar - S2)]\n",
"#W_rev = -[delta_H_mix] +T_0*[delta_S_mix]\n",
"\n",
"#If T = T_0 that is,temperature of mixing is same as that of surroundings, W_rev = -delta_G_mix.\n",
"#W_rev = -delta_G_mix = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2))\n",
"W_rev = R*T*(x_1*math.log(x_1) + x_2*math.log(x_2));\t\t\t#[J/mol]\n",
"\n",
"#Therefore total work transfer is given by\n",
"W_min = (n*W_rev)/1000;\t\t\t#[kJ]\n",
"\n",
"# Results\n",
"print \"The minimum work required is %f kJ\"%(W_min);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The minimum work required is -1281.910728 kJ\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 11.10 Page Number : 400"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"# Variables\n",
"x_A = 0.20;\t\t\t# Mole fraction of A\n",
"x_B = 0.35;\t\t\t# Mole fraction of B\n",
"x_C = 0.45;\t\t\t# Mole fraction of C\n",
"\n",
"phi_A = 0.7;\t\t\t# Fugacity coefficient of A\n",
"phi_B = 0.6;\t\t\t# Fugacity coefficient of B\n",
"phi_C = 0.9;\t\t\t# Fugacity coefficient of C\n",
"\n",
"P = 6.08;\t\t\t#[MPa] - Pressure\n",
"T = 384;\t\t\t#[K] - Temperature\n",
"\n",
"# Calculations\n",
"#We know that\n",
"#math.log(phi) = x_1*math.log(phi_) + x_2*math.log(phi_2) + x_3*math.log(phi_3)\n",
"math.log_phi = x_A*math.log(phi_A) + x_B*math.log(phi_B) + x_C*math.log(phi_C);\t\t\t# Fugacity coefficient\n",
"phi = math.exp(math.log_phi);\n",
"\n",
"#Thus fugacity is given by,\n",
"f_mixture = phi*P;\t\t\t#[MPa]\n",
"\n",
"# Results\n",
"print \"The fugacity of the mixture is %f MPa\"%(f_mixture);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The fugacity of the mixture is 4.515286 MPa\n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|