summaryrefslogtreecommitdiff
path: root/Diffusion:_Mass_Transfer_In_Fluid_Systems_by_E._L._Cussler/ch18.ipynb
blob: a4f0a95da974a7a51d97fe7cded6d317e789d0a2 (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
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
{
 "metadata": {
  "name": "",
  "signature": "sha256:bb1bcb29710d28f6e0c4c2dd2fe5edd152549addef9d0c99827e326f19256990"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18 : Membranes"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.1.1 pg : 519"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\n",
      "#initialization of variables\n",
      "d = 240.*10**-4 \t# cm\n",
      "D = 2.1*10**-5 \t# cm**2/sec\n",
      "v = 10.      \t# cm/sec\n",
      "Nu = 0.01 \t# cm**2/sec\n",
      "E = 0.5\n",
      "ka1 = 0.09 \t# sec**-1\n",
      "\t\n",
      "#Calculations\n",
      "k = 0.8*(D/d)*((d*v/Nu)**0.47)*((Nu/D)**0.33)\n",
      "a = 4*(1-E)/d \t# cm**2/cm**3\n",
      "ka2 = k*a\n",
      "ratio = ka2/ka1\n",
      "\t\n",
      "#Results\n",
      "print \"The rapidness is roughly %d times that of sparger\"%(ratio)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The rapidness is roughly 22 times that of sparger\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.2.1 pg : 524"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#initialization of variables\n",
      "p1 = 10.**-10 \t# cm**3(stp)cm/cm**2-sec-cm-Hg\n",
      "c = 1./(22.4*10**3) \t# mol at stp /cc\n",
      "P = p1*c \t# for proper units\n",
      "R = 6240. \t# cmHg cm**3 \t#mol-K (gas consmath.tant)\n",
      "T = 298. \t# Kelvin\n",
      "\t\n",
      "#Calculations\n",
      "DH = P*R*T \t# Permeability in x*10**-9 cm**2/sec\n",
      "\t\n",
      "#Results\n",
      "print \"The permeability is %.1e cm**2/sec\"%(DH)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The permeability is 8.3e-09 cm**2/sec\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.2.2 pg : 525"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\n",
      "#initialization of variables\n",
      "P = 1.*10**-4 \t# membrane permeability in cm**2/sec\n",
      "l = 2.3*10**-4 \t# membrane thickness in cm\n",
      "d = 320.*10**-4 \t# fiber dia in cm\n",
      "E = 0.5 \t# void fraction\n",
      "c0 = 1. \t# initial concentration\n",
      "c = 0.1\t    # final concentration\n",
      "\t\n",
      "#Calculations\n",
      "a = 4*(1-E)/d \t# surface area per module volume in cm**2/cm**3\n",
      "t = (math.log(c0/c))*(l/P)/a \t# t = z/v in seconds , time gas spends in the module in sec\n",
      "\t\n",
      "#Results\n",
      "print \"The gas spends %.2f sec in the module\"%(t)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The gas spends 0.08 sec in the module\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.3.1 pg : 532"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\n",
      "#initialization of variables\n",
      "R = 0.082 \t# litre-atm/mol-K\n",
      "T = 283. \t# Kelvin\n",
      "V2 = 0.018 \t# litre/mol\n",
      "\n",
      "#For first solution contents are sucrose and water\n",
      "w1 = 0.01 \t# gm of sucrose\n",
      "MW1 = 342. \t# MW of sucrose\n",
      "w2 = 0.09 \t# gm of water\n",
      "MW2 = 18. \t# MW of water\n",
      "n1 = 1.  \t# no of particles sucrose divides into in water\n",
      "\t\n",
      "#Calculations\n",
      "x1juice = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))\t# Mole fracion of sucrose\n",
      "#For second solution , contents are NaCl and water\n",
      "w1 = 35. \t# gm of NaCl\n",
      "MW1 = 58.5 \t# MW of Nacl\n",
      "w2 = 100. \t# gm of water\n",
      "MW2 = 18. \t# MW of water\n",
      "n1 = 2. \t# no of particles sucrose divides into in water\n",
      "\t\n",
      "#Calculations\n",
      "x1brine = (n1*w1/MW1)/((n1*w1/MW1)+(w2/MW2))\t# Mole fracion of sucrose\n",
      "#Calculation of difference in Osmotic pressure\n",
      "DeltaPi = (R*T/V2)*math.log((1-x1juice)/(1-x1brine))\t# atm\n",
      "\t\n",
      "#Results\n",
      "print \"The osmotic pressure difference is %.f atm\"%(DeltaPi)\n",
      "\t#answer wrong in textbook\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The osmotic pressure difference is 244 atm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.3.2 pg : 533"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "import math \n",
      "\t\n",
      "#initialization of variables\n",
      "D1=0.0035\n",
      "l = 2.59 \t#cm\n",
      "t = 1.62  \t#hr\n",
      "C1 = 0.03 \t#mol/l\n",
      "T1 = 298. \t#K\n",
      "R = 0.0821 \t#arm/mol K\n",
      "D2 = 0.005\n",
      "t2 = 0.49 \t#hr\n",
      "Ps = 733.   \t#mm of Hg\n",
      "P = 760. \t#mm of Hg\n",
      "\t\n",
      "#Calculations\n",
      "Lps=D1*l/(t*3600) /(C1*R*T1)\n",
      "Lp=(D2*l/(t2*3600) + Lps*(C1*R*T1))/(Ps/P)\n",
      "Lp=2.4*10**-6\n",
      "sig=Lps/Lp\n",
      "sig2=0.95\n",
      "\t\n",
      "#Results\n",
      "print \"Transport coefficient for phase 1 = %.2f\"%(sig)\n",
      "print \" Transport coefficient for phase 2 = %.2f\"%(sig2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transport coefficient for phase 1 = 0.88\n",
        " Transport coefficient for phase 2 = 0.95\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.4.1 pg : 538"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\n",
      "#initialization of variables\n",
      "D1 = 3.0*10**-7 \t# cm**2/sec\n",
      "H1 = 0.18 \t# mol/cc-atm\n",
      "D2 = 1.4*10**-6 \t# cm**2/sec\n",
      "H2 = 2.2*10**-3 \t# mol/cc-atm\n",
      "H11 = 13. \t# atm-cc/mol\n",
      "H21 = 0.6 \t# atm-cc/mol\n",
      "\t\n",
      "#Calculations\n",
      "Beta = (D1*H1/(D2*H2))*(H11/H21)\t# Membrane selectivity\n",
      "\t\n",
      "#Results\n",
      "print \"The membrane selectivity is %.f\"%(Beta)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The membrane selectivity is 380\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.5.2 pg : 544"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Initialization of variables\n",
      "D = 2.*10**-5 \t# cm**2/sec\n",
      "l = 32.*10**-4 \t# cm\n",
      "c = 6.8*10**-6 \t# mol/cc\n",
      "C10 = 10.**-4 \t# mol/cc\n",
      "\n",
      "def Totalflux(H,K):\n",
      "    return (D*H*C10/l)+((D*H*K*c*C10)/(l*(1+(H*K*C10))))\n",
      "\n",
      "\n",
      "#For Lithium Chloride\n",
      "H1 = 4.5*10**-4 \t#Partition coefficient \n",
      "K1 = 2.6*10**5 \t# cc/mol association consmath.tant\n",
      "j1 = (Totalflux(H1,K1))        \t# TOtal flux in x*10**-10 mol/cm**2-sec\n",
      "print \"The total flux for Lithium Chloride is %.1e mol/cm**2-sec\"%(j1)\n",
      "\n",
      "#For Sodium Chloride\n",
      "H2 = 3.4*10**-4 \t#Partition coefficient \n",
      "K2 = 1.3*10**7 \t# cc/mol association consmath.tant\n",
      "j2 = (Totalflux(H2,K2)) \t# TOtal flux in x*10**-10 mol/cm**2-sec\n",
      "print \"The total flux for Sodium Chloride is %.2e  mol/cm**2-sec\"%(j2)\n",
      "\n",
      "#For potassium Chloride\n",
      "H3 = 3.8*10**-4 \t#Partition coefficient \n",
      "K3 = 4.7*10**9 \t# cc/mol association consmath.tant\n",
      "j3 = (Totalflux(H3,K3)) \t# TOtal flux in x*10**-10 mol/cm**2-sec\n",
      "print \"The total flux for Potassium Chloride is %.2e  mol/cm**2-sec\"%(j3)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total flux for Lithium Chloride is 7.7e-10 mol/cm**2-sec\n",
        "The total flux for Sodium Chloride is 1.32e-08  mol/cm**2-sec\n",
        "The total flux for Potassium Chloride is 4.25e-08  mol/cm**2-sec\n"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}