summaryrefslogtreecommitdiff
path: root/Transport_Phenomena:_A_Unified_Approach/ch5.ipynb
blob: 0cf91dabac26118a8c87d55aaf34452a9af77867 (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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5 : Transport with a net convective flux"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 5.9 - Page No :166\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "# given\n",
      "v = 1.;  \t\t\t #[cm/sec] - volume velocity or bulk velocity\n",
      "vol = 1.;  \t\t\t #[cm**3] - volume\n",
      "na = 2.;  \t\t\t # moles of a\n",
      "nb = 3.;  \t\t\t # moles of b\n",
      "nc = 4.;  \t\t\t # moles of c\n",
      "mma = 2.;  \t\t\t #molecular weight of a\n",
      "mmb = 3.;  \t\t\t #molecular weight of b\n",
      "mmc = 4.;  \t\t\t #molecular weight of c\n",
      "ma = na*mma;  \t\t\t #[g] weight of a\n",
      "mb = nb*mmb;  \t\t\t #[g] weight of b\n",
      "mc = nc*mmc;  \t\t\t #[g] weight of c\n",
      "NabyA = 2.+2;  \t\t\t #[mol/cm**2*s] - molar flux  =  diffusing flux +convected flux\n",
      "NbbyA = -1.+3;  \t\t\t #[mol/cm**2*s] - molar flux  =  diffusing flux +convected flux\n",
      "NcbyA = 0.+4;  \t\t\t #[mol/cm**2*s] - molar flux  =  diffusing flux +convected flux\n",
      "NtbyA = NabyA+NbbyA+NcbyA;  \t\t\t #[mol/cm**2*s] - total molar flux\n",
      "\n",
      "# Calculations\n",
      "# on a mass basis,these corresponds to\n",
      "nabyA = 4.+4;  \t\t\t #[g/cm**2*s]; - mass flux  =  diffusing flux +convected flux\n",
      "nbbyA = -3.+9;  \t\t\t #[g/cm**2*s]; - mass flux  =  diffusing flux +convected flux\n",
      "ncbyA = 0.+16;  \t\t\t #[g/cm**2*s]; - mass flux  =  diffusing flux +convected flux\n",
      "ntbyA = nabyA+nbbyA+ncbyA;  \t\t\t #[g/cm**2*s] - total mass flux\n",
      "\n",
      "# concentrations are expressed in molar basis\n",
      "CA = na/vol;  \t\t\t #[mol/cm**3]\n",
      "CB = nb/vol;  \t\t\t #[mol/cm**3]\n",
      "CC = nc/vol;  \t\t\t #[mol/cm**3]\n",
      "CT = CA+CB+CC;  \t\t\t #[mol/cm**3] - total concentration\n",
      "\n",
      "# densities are on a mass basis\n",
      "pa = ma/vol;  \t\t\t #[g/cm**3]\n",
      "pb = mb/vol;  \t\t\t #[g/cm**3]\n",
      "pc = mc/vol;  \t\t\t #[g/cm**3]\n",
      "pt = pa+pb+pc;  \t\t\t #[g/cm**3]\n",
      "Ua = NabyA/CA;  \t\t\t #[cm/sec];\n",
      "Ub = NbbyA/CB;  \t\t\t #[cm/sec];\n",
      "Uc = NcbyA/CC;  \t\t\t #[cm/sec];\n",
      "# the same result will be obtained from dividing mass flux by density\n",
      "Uz = (pa*Ua+pb*Ub+pc*Uc)/(pa+pb+pc);\n",
      "\n",
      "# Results\n",
      "print \" Uz = %.3f cm/sec\"%(Uz);\n",
      "Uzstar = (NtbyA/CT);\n",
      "print \" Uz* = %.2f cm/sec\"%(Uzstar);\n",
      "print \" For this Example  both Uz and Uz* are slightly greater than the volume \\\n",
      " velocity of 1cm/sec, because there is a net molar and \\n mass diffusion in the positive direction.\"\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Uz = 1.034 cm/sec\n",
        " Uz* = 1.11 cm/sec\n",
        " For this Example  both Uz and Uz* are slightly greater than the volume  velocity of 1cm/sec, because there is a net molar and \n",
        " mass diffusion in the positive direction.\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 5.10 - Page No :171\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "# given (from Example  5.9)\n",
      "na = 2.;  \t\t\t # moles of a\n",
      "nb = 3.;  \t\t\t # moles of b\n",
      "nc = 4.;  \t\t\t # moles of c\n",
      "mma = 2.;  \t\t\t #molecular weight of a\n",
      "mmb = 3.;  \t\t\t #molecular weight of b\n",
      "mmc = 4.;  \t\t\t #molecular weight of c\n",
      "ma = na*mma;  \t\t\t #[g] weight of a\n",
      "mb = nb*mmb;  \t\t\t #[g] weight of b\n",
      "mc = nc*mmc;  \t\t\t #[g] weight of c\n",
      "NabyA = 2.+2;  \t\t\t #[mol/cm**2*s] - molar flux  =  diffumath.sing flux +convected flux\n",
      "NbbyA = -1.+3;  \t\t\t #[mol/cm**2*s] - molar flux  =  diffusing flux +convected flux\n",
      "NcbyA = 0.+4;  \t\t\t #[mol/cm**2*s] - molar flux  =  diffusing flux +convected flux\n",
      "NtbyA = NabyA+NbbyA+NcbyA;  \t\t\t #[mol/cm**2*s] - total molar flux\n",
      "vol= 1.\n",
      "# Calculations\n",
      "# on a mass basis,these corresponds to\n",
      "nabyA = 4+4;  \t\t\t #[g/cm**2*s]; - mass flux  =  diffusing flux +convected flux\n",
      "nbbyA = -3+9;  \t\t\t #[g/cm**2*s]; - mass flux  =  diffusing flux +convected flux\n",
      "ncbyA = 0+16;  \t\t\t #[g/cm**2*s]; - mass flux  =  diffusing flux +convected flux\n",
      "\n",
      "# concentrations are expressed in molar basis\n",
      "CA = na/vol;  \t\t\t #[mol/cm**3]\n",
      "CB = nb/vol;  \t\t\t #[mol/cm**3]\n",
      "CC = nc/vol;  \t\t\t #[mol/cm**3]\n",
      "CT = CA+CB+CC;  \t\t #[mol/cm**3] - total concentration\n",
      "\n",
      "# densities are on a mass basis\n",
      "pa = ma/vol;  \t\t\t #[g/cm**3]\n",
      "pb = mb/vol;  \t\t\t #[g/cm**3]\n",
      "pc = mc/vol;  \t\t\t #[g/cm**3]\n",
      "Ua = NabyA/CA;  \t\t\t #[cm/sec];\n",
      "Ub = NbbyA/CB;  \t\t\t #[cm/sec];\n",
      "Uc = NcbyA/CC;  \t\t\t #[cm/sec];\n",
      "U = (pa*Ua+pb*Ub+pc*Uc)/(pa+pb+pc);\n",
      "Ustar = (NtbyA/CT);\n",
      "\n",
      "# the fluxes relative to mass average velocities are found as follows\n",
      "JabyA = CA*(Ua-U);  \t\t\t #[mol/cm**2*sec]\n",
      "JbbyA = CB*(Ub-U);  \t\t\t #[mol/cm**2*sec]\n",
      "JcbyA = CC*(Uc-U);  \t\t\t #[mol/cm**2*sec]\n",
      "\n",
      "# Results\n",
      "print \" fluxes relative to mass average velocities are-\";\n",
      "print \" Ja/A = %.4f mol/cm**2*sec\"%(JabyA);\n",
      "print \" Jb/A = %.4f mol/cm**2*sec\"%(JbbyA);\n",
      "print \" Jc/A = %.4f mol/cm**2*sec\"%(JcbyA);\n",
      "jabyA = pa*(Ua-U);  \t\t\t #[g/cm**2*sec]\n",
      "jbbyA = pb*(Ub-U);  \t\t\t #[g/cm**2*sec]\n",
      "jcbyA = pc*(Uc-U);  \t\t\t #[g/cm**2*sec]\n",
      "print \" ja/A = %.4f g/cm**2*sec\"%(jabyA);\n",
      "print \" jb/A = %.4f g/cm**2*sec\"%(jbbyA);\n",
      "print \" jc/A = %.4f g/cm**2*sec\"%(jcbyA);\n",
      "\n",
      "# the fluxes relative to molar average velocity are found as follows\n",
      "JastarbyA = CA*(Ua-Ustar);  \t\t\t #[mol/cm**2*sec]\n",
      "JbstarbyA = CB*(Ub-Ustar);  \t\t\t #[mol/cm**2*sec]\n",
      "JcstarbyA = CC*(Uc-Ustar);  \t\t\t #[mol/cm**2*sec]\n",
      "print \" fluxes relative to molar average velocities are-\";\n",
      "print \" Ja*/A = %.4f mol/cm**2*sec\"%(JastarbyA);\n",
      "print \" Jb*/A = %.4f mol/cm**2*sec\"%(JbstarbyA);\n",
      "print \" Jc*/A = %.4f mol/cm**2*sec\"%(JcstarbyA);\n",
      "jastarbyA = pa*(Ua-Ustar);  \t\t\t #[g/cm**2*sec]\n",
      "jbstarbyA = pb*(Ub-Ustar);  \t\t\t #[g/cm**2*sec]\n",
      "jcstarbyA = pc*(Uc-Ustar);  \t\t\t #[g/cm**2*sec]\n",
      "print \" ja*/A = %.4f g/cm**2*sec\"%(jastarbyA);\n",
      "print \" jb*/A = %.4f g/cm**2*sec\"%(jbstarbyA);\n",
      "print \" jc*/A = %.4f g/cm**2*sec\"%(jcstarbyA);\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " fluxes relative to mass average velocities are-\n",
        " Ja/A = 1.9310 mol/cm**2*sec\n",
        " Jb/A = -1.1034 mol/cm**2*sec\n",
        " Jc/A = -0.1379 mol/cm**2*sec\n",
        " ja/A = 3.8621 g/cm**2*sec\n",
        " jb/A = -3.3103 g/cm**2*sec\n",
        " jc/A = -0.5517 g/cm**2*sec\n",
        " fluxes relative to molar average velocities are-\n",
        " Ja*/A = 1.7778 mol/cm**2*sec\n",
        " Jb*/A = -1.3333 mol/cm**2*sec\n",
        " Jc*/A = -0.4444 mol/cm**2*sec\n",
        " ja*/A = 3.5556 g/cm**2*sec\n",
        " jb*/A = -4.0000 g/cm**2*sec\n",
        " jc*/A = -1.7778 g/cm**2*sec\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 5.11 - Page No :176\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "\n",
      "import math\n",
      "# Variables\n",
      "# given\n",
      "T = 0+273.15;  \t\t\t #[K] - temperature in Kelvins\n",
      "pa2 = 1.5;  \t\t\t #[atm] - partial presuure of a at point2\n",
      "pa1 = 0.5;  \t\t\t #[atm] - partial pressure of a at point 1\n",
      "z2 = 20.;  \t\t\t #[cm] - position of point 2 from reference point\n",
      "z1 = 0.;  \t\t\t #[cm] - position of point1 from reference point\n",
      "p = 2.;  \t\t\t #[atm] - total pressure\n",
      "d = 1.;  \t\t\t #[cm] - diameter\n",
      "D = 0.275;  \t\t #[cm**2/sec] - diffusion coefficient\n",
      "A = (math.pi*((d)**2))/4.;\n",
      "R = 0.082057;  \t\t\t #[atm*m**3*kmol**-1*K**-1] - gas constant\n",
      "\n",
      "# Calculations\n",
      "# (a) using the formula Na/A = -(D/(R*T))*((pa2-pa1)/(z2-z1))\n",
      "Na = (-(D/(R*T))*((pa2-pa1)/(z2-z1)))*(A)/(10.**6);\n",
      "print \" Na = %.2e kmol/sec \\n The negative sign indicates diffusion from point 2 to point 1\"%(Na);\n",
      "pb2 = p-pa2;\n",
      "pb1 = p-pa1;\n",
      "\n",
      "# (b) using the formula Na/A = ((D*p)/(R*T*(z2-z1)))*ln(pb2/pb1)\n",
      "Na = (((D*p)/(R*T*(z2-z1)))*math.log(pb2/pb1))*(A)/(10**6);\n",
      "\n",
      "# Results\n",
      "print \" Na = %.2e kmol/sec\"%(Na);\n",
      "print \" The induced velocity increases the net transport of A by the ratio of 10.6*10**-10 \\\n",
      "to 4.82*10**-10 or 2.2 times.This increse is equivalent to 120 percent\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Na = -4.82e-10 kmol/sec \n",
        " The negative sign indicates diffusion from point 2 to point 1\n",
        " Na = -1.06e-09 kmol/sec\n",
        " The induced velocity increases the net transport of A by the ratio of 10.6*10**-10 to 4.82*10**-10 or 2.2 times.This increse is equivalent to 120 percent\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 5.12 - Page No :178\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "# given\n",
      "T = 0+273.15;  \t\t\t #[K] - temperature in Kelvins\n",
      "pa2 = 1.5;  \t\t\t #[atm] - partial presuure of a at point2\n",
      "pa1 = 0.5;  \t\t\t #[atm] - partial pressure of a at point 1\n",
      "z2 = 20.;  \t\t\t #[cm] - position of point 2 from reference point\n",
      "z1 = 0.;  \t\t\t #[cm] - position of point1 from reference point\n",
      "p = 2.;  \t\t\t #[atm] - total pressure\n",
      "d = 1.;  \t\t\t #[cm] - diameter\n",
      "D = 0.275;  \t\t\t #[cm**2/sec] - diffusion coefficient\n",
      "\n",
      "# Calculations\n",
      "A = (math.pi*((d)**2.))/4;\n",
      "R = 0.082057;  \t\t\t #[atm*m**3*kmol**-1*K**-1] - gas consmath.tant\n",
      "k = 0.75;\n",
      "\n",
      "# umath.sing the formula (Na/A) = -(D/(R*T*(z2-z1)))*ln((1-(pa2/p)*(1-k))/(1-(pa1/p)*(1-k)))\n",
      "NabyA = -(D/(R*T*(z2-z1)))*(2*0.7854)*math.log((1-(pa2/p)*(1-k))/(1-(pa1/p)*(1-k)))/(10**6);\n",
      "\n",
      "# Results\n",
      "print \" Na/A = %.2e kmol/sec\"%(NabyA);\n",
      "print \" Note that this answer is larger than the rate for equimolar counter diffusion \\\n",
      "but smaller tahn the rate for diffusion through a stagnant film. \\nSometimes the\\\n",
      " rate for diffusin through a stagnant film can be considered as an upper bound\\\n",
      " if k ties between zero and one\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Na/A = 1.38e-10 kmol/sec\n",
        " Note that this answer is larger than the rate for equimolar counter diffusion but smaller tahn the rate for diffusion through a stagnant film. \n",
        "Sometimes the rate for diffusin through a stagnant film can be considered as an upper bound if k ties between zero and one\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 5.13 - Page No :184\n"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Variables\n",
      "# given\n",
      "l = 4.;  \t\t\t         #[m] - length of the tube\n",
      "id_ = 1.6*10**-3;  \t\t\t #[m] - insid_e diameter\n",
      "Nkn = 10.;  \t\t    \t # - knudsen no.\n",
      "Ma = 92.;  \t\t\t         # - molecular weight of gas\n",
      "mu = 6.5*10**-4;  \t\t\t #[kg/m*sec] - vismath.cosity\n",
      "T = 300.;  \t    \t\t        #[K] - temperature\n",
      "R = 8314.;    \t    \t\t    #[kPa*m**3*kmol**-1*K**-1] - gas consmath.tant\n",
      "lambdaA = Nkn*id_;  \t\t\t #[m] mean free path\n",
      "\n",
      "# Calculations\n",
      "# for calculating pressure umath.sing the formula lamdaA = 32*(mu/p)*((R*T)/(2*pi*Ma))**(1/2)\n",
      "p = 32*(mu/lambdaA)*((R*T)/(2*math.pi*Ma))**(1/2.);\n",
      "patm = p/(1.01325*10**5);\n",
      "\n",
      "# Results\n",
      "print \" p = %.2f kg/m*sec**2 = %.2f Pa = %.2e atm\"%(p,p,patm);\n",
      "print \" The value of 10 for the knudsen number is on the border \\\n",
      " between Knudsen diffusion and transition flow\";\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " p = 85.39 kg/m*sec**2 = 85.39 Pa = 8.43e-04 atm\n",
        " The value of 10 for the knudsen number is on the border  between Knudsen diffusion and transition flow\n"
       ]
      }
     ],
     "prompt_number": 11
    }
   ],
   "metadata": {}
  }
 ]
}