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
|
{
"metadata": {
"name": "",
"signature": "sha256:c896c859a24a6b70446a5e83cded412ac42718005bc7d2e546816e8274c18e21"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 19 : The Phase Rule and Vapor Liquid Equilibria"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 19.1 Page No. 563\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"N1 = 1.;\n",
"P1 = 1. ;\t\t\t# Number of phases present\n",
"C1 = 1. ;\t\t\t#Number of components present\n",
"F1 = 2.-P1+C1 ;\t\t\t#Number of degree of freedom\n",
"print ' (a) Number of degree of freedom of pure benzene is %i.\\n Therefore %i additional \\\n",
"intensive variables must be specified to fix to fix the system.'%(F1,F1)\n",
"\n",
"\t\t\t# (b)\n",
"N2 = 1.;\n",
"P2 = 2. ;\t\t\t# Number of phases present\n",
"C2 = 1. ;\t\t\t#Number of components present\n",
"F2 = 2.-P2+C2 ;\t\t\t#Number of degree of freedom\n",
"print '(b) Number of degree of freedom of a mixture of ice and water only is %i.\\\n",
" \\nTherefore %i additional intensive variables must be specified to fix the system. '%(F2,F2)\n",
"\n",
"\t\t\t# (c)\n",
"N3 = 2.;\n",
"P3 = 2. ;\t\t\t# Number of phases present\n",
"C3 = 2. ;\t\t\t#Number of components present\n",
"F3 = 2.-P3+C3 ;\t\t\t#Number of degree of freedom\n",
"print '(c) Number of degree of freedom of a mixture of liquid benzene,benzene vapour and\\\n",
" helium gas is %i. \\nTherefore %i additional intensive variables must be specified to fix the system. '%(F3,F3)\n",
"\n",
"\t\t\t# (d)\n",
"N4 = 2.;\n",
"P4 = 2. ;\t\t\t# Number of phases present\n",
"C4 = 2. ;\t\t\t#Number of components present\n",
"F4 = 2.-P4+C4 ;\t\t\t#Number of degree of freedom\n",
"print '(d) Number of degree of freedom of a mixture of salt and water designed to achieve\\\n",
" a specific vapour pressure is %i. \\nTherefore %i additional intensive variables must be\\\n",
" specified to fix the system. '%(F4,F4)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" (a) Number of degree of freedom of pure benzene is 2.\n",
" Therefore 2 additional intensive variables must be specified to fix to fix the system.\n",
"(b) Number of degree of freedom of a mixture of ice and water only is 1. \n",
"Therefore 1 additional intensive variables must be specified to fix the system. \n",
"(c) Number of degree of freedom of a mixture of liquid benzene,benzene vapour and helium gas is 2. \n",
"Therefore 2 additional intensive variables must be specified to fix the system. \n",
"(d) Number of degree of freedom of a mixture of salt and water designed to achieve a specific vapour pressure is 2. \n",
"Therefore 2 additional intensive variables must be specified to fix the system. \n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 19.2 Page No.564\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"N1 = 5.;\n",
"P1 = 1.; \t\t\t# Number of phases present,here 1 gas \n",
"C1 = 3. ;\t\t\t#Number of independent components present,here 3 because 3 elements(C,O and H)\n",
"F1 = 2-P1+C1 ;\t\t\t#Number of degree of freedom\n",
"print ' (a) Number of degree of gas composed of CO,CO2,H2,H2O and CH4 is %i. \\n \\\n",
"Therefore %i additional intensive variables must be specified to fix the system. '%(F1,F1)\n",
"\n",
"# (b)\n",
"N2 = 4.;\n",
"P2 = 4. ;\t\t\t# Number of phases present,here 3 different solid phases and 1 gas phase\n",
"C2 = 3. ;\t\t\t#Number of components present, here 3 because 3 elements(Zn,O and C) ,you can also use method explained \n",
" #in Appendix L1\n",
"F2 = 2.-P2+C2 ;\t\t#Number of degree of freedom\n",
"print '(b) Number of degree of freedom of a mixture of ZnO(s), C(s) ,CO(g) and Zn(s) is %i. \\n \\\n",
"Therefore %i additional intensive variables must be specified to fix the system. '%(F2,F2)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" (a) Number of degree of gas composed of CO,CO2,H2,H2O and CH4 is 4. \n",
" Therefore 4 additional intensive variables must be specified to fix the system. \n",
"(b) Number of degree of freedom of a mixture of ZnO(s), C(s) ,CO(g) and Zn(s) is 1. \n",
" Therefore 1 additional intensive variables must be specified to fix the system. \n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 19.3 Page No :576"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from scipy.optimize import fsolve\n",
"import math\n",
"\n",
"# Variables\n",
"P_atm = 1. ;\t\t\t#[atm]\n",
"P = 760. ;\t\t\t#[mm of Hg]\n",
"x_1 = 4./100 ;\t\t\t# Mole fraction of hexane in liquid phase\n",
"# Constant A,B and C for Antoine eqn. of n_hexane \n",
"A1 = 15.8366;\n",
"B1 = 2697.55 ;\n",
"C1 = -48.784;\n",
"# Constant A,B and C for Antoine eqn. of n_octane\n",
"A2 = 15.9798;\n",
"B2 = 3127.60 ;\n",
"C2 = -63.633;\n",
"\n",
"# Calculations\n",
"# Solve for bubble point temperature by eqn. obtained by using Antoine equation\n",
"def f(T):\n",
" return math.exp(A1-(B1/(C1+T)))*x_1 + math.exp(A2-(B2/(C2+T)))*(1-x_1) - P\n",
"T = fsolve(f,390)[0] ;\t\t\t# Bubble point temperature \n",
"\n",
"print 'Bubble point temperature is %.1f K'%T\n",
"\n",
"# Composition of first vapour\n",
"# Get vapour pressure of hexane and octane from Perry, it is\n",
"vp_1 = 3114. ;\t\t\t# vapour pressure of hexane-[mm of Hg]\n",
"vp_2 = 661. ;\t\t\t# vapour pressure of octane-[mm of Hg]\n",
"y_1 = vp_1*x_1/P ;\t\t\t# Mole fraction of hexane in vapour phase\n",
"y_2 = 1- y_1 ;\t\t\t#Mole fraction of octane in vapour phase\n",
"\n",
"# Results\n",
"print ' Composition of first vapour. '\n",
"print 'Component Mole fraction. '\n",
"print 'n_hexane %.3f'%y_1\n",
"print ' n_octane %.3f'%y_2\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Bubble point temperature is 393.6 K\n",
" Composition of first vapour. \n",
"Component Mole fraction. \n",
"n_hexane 0.164\n",
" n_octane 0.836\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 19.4 Page no. 577"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"# Basis : 100 g solution\n",
"F = 100. ;\t\t\t# Amount of solution-[g]\n",
"P_atm = 1. ;\t\t\t#[atm]\n",
"P = 760. ;\t\t\t# Total pressure -[mm of Hg]\n",
"wf_hex = 68.6/100 ;\t\t\t#Weight fraction of hexane in mixture\n",
"wf_tol = 31.4/100 ;\t\t\t#Weight fraction of toluene in mixture\n",
"mw_hex = 86.17 ;\t\t\t# Mol.wt. of hexane-[g]\n",
"mw_tol = 92.13 ;\t\t\t# Mol.wt. of toluene-[g]\n",
"\n",
"# Calculations\n",
"mol_hex = wf_hex *F/mw_hex ;\t\t\t# moles of hexane-[g mol]\n",
"mol_tol = wf_tol*F/mw_tol ;\t\t\t # moles of toluene-[g mol]\n",
"mol_total = mol_hex + mol_tol ;\t\t\t# Total moles in mixture-[g mol]\n",
"molf_hex = mol_hex/mol_total ;\t\t\t# Mole fraction of hexane \n",
"molf_tol = mol_tol/mol_total ;\t\t\t# Mole fraction of toluene \n",
"# Get vapour pressure of hexane and toluene at 80 deg. C from Perry, it is\n",
"vp_hex = 1020. ;\t\t\t# vapour pressure of hexane-[mm of Hg]\n",
"vp_tol = 290. ;\t\t\t# vapour pressure of toluene-[mm of Hg]\n",
"K_hex = vp_hex/P ;\t\t\t# K-value of hexane\n",
"K_tol = vp_tol/P ;\t\t\t# K-value of toluene\n",
"rec_K_hex = 1/K_hex ;\t\t\t# Reciprocal of K-value of hexane\n",
"rec_K_tol = 1/K_tol ;\t\t\t# Reciprocal of K-value of toluene\n",
"\n",
"# Let L/F = x, then use eqn. 19.11 to find x(L/F) \n",
"def g(x):\n",
" return (molf_hex)/(1-x*(1-rec_K_hex)) + (molf_tol)/(1-x*(1-rec_K_tol))-1\n",
"\n",
"x = fsolve(g,1)[0] ;\t\t\t# L/F value\n",
"\n",
"# Results\n",
"print ' Fraction of liquid(L/F) that will remain at equilibrium after vaporization is %.3f. '%x\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Fraction of liquid(L/F) that will remain at equilibrium after vaporization is 0.744. \n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
" Example 19.5 Page no. 578\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"# Variables\n",
"Vo = 3.0 ;\t\t\t# Initial volume of the solution containing the culture and virus-[L]\n",
"Vp = 0.1 ;\t\t\t# Volume of the polymer solution added to the vessel -[L]\n",
"Kpc = 100. ;\t\t\t# Partition coefficient for virus(cp/cc) between two phases\n",
"\n",
"# Calculations\n",
"Vc = Vo ;\t\t\t# At equilibrium -[L]\n",
"cp_by_co = Vo/(Vp+(Vo/Kpc)) ;\t\t\t\n",
"Fr_rec = cp_by_co*(Vp/Vo) ;\t\t\n",
"\n",
"# Results\n",
"print ' Fraction of the initial virus in the culture phase that is recovered in the polymer phase is %.2f . '%Fr_rec\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Fraction of the initial virus in the culture phase that is recovered in the polymer phase is 0.77 . \n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "code",
"collapsed": true,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|