summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Engineering_Heat_And_Mass_Transfer/ch13.ipynb
blob: bbf390261b4f8516ec0732adaa7b8c3460263054 (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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
{
 "metadata": {
  "name": "",
  "signature": "sha256:154cdfdbffe4cd226ec00ca571625579dcd760fa5b25d6fc7f505d761a2beb76"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 13 : Diffusion Mass Transfer"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.1  Page No : 544"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "ro2 = 0.21;\t\t\t#Ratio of O2 in the mixture  \n",
      "rn2 = 0.79;\t\t\t#Ratio of N2 in the mixture  \n",
      "T = (25+273);\t\t\t#Temperature of container in degree C\n",
      "p = 1;\t\t\t#Total pressure in atm\n",
      "\n",
      "# Calculations\n",
      "Co2 = (ro2*10**5)/(8314*T);\t\t\t#Molar concentration of O2 in K.mol/m**3\n",
      "Cn2 = (rn2*10**5)/(8314*T);\t\t\t#Molar concentration of N2 in K.mol/m**3\n",
      "po2 = (32*Co2);\t\t\t#Mass density in kg/m**3\n",
      "pn2 = (28*Cn2);\t\t\t#Mass density in kg/m**3\n",
      "p = (po2+pn2);\t\t\t#Overall mass density in kg/m**3\n",
      "mo2 = (po2/p);\t\t\t#Mass fraction of O2\n",
      "mn2 = (pn2/p);\t\t\t#Mass fraction of N2\n",
      "M = (ro2*32)+(rn2*28);\t\t\t#Average molecular weight \n",
      "\n",
      "# Results\n",
      "print 'Molar concentration of O2 is %3.4f K.mol/m**3  \\n \\\n",
      "Molar concentration of N2 is %3.3f K.mol/m**3  \\n \\\n",
      "Mass density of O2 is %3.3f kg/m**3  \\n \\\n",
      "Mass density of N2 is %3.3f kg/m**3  \\n \\\n",
      "Mole fraction of O2 is %3.2f  \\n \\\n",
      "Mole fraction of N2 is %3.2f  \\n \\\n",
      "Mass fraction of O2 is %3.3f  \\n \\\n",
      "Mass fraction of N2 is %3.3f  \\n \\\n",
      "Average molecular weight is %3.2f'%(Co2,Cn2,po2,pn2,ro2,rn2,mo2,mn2,M)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Molar concentration of O2 is 0.0085 K.mol/m**3  \n",
        " Molar concentration of N2 is 0.032 K.mol/m**3  \n",
        " Mass density of O2 is 0.271 kg/m**3  \n",
        " Mass density of N2 is 0.893 kg/m**3  \n",
        " Mole fraction of O2 is 0.21  \n",
        " Mole fraction of N2 is 0.79  \n",
        " Mass fraction of O2 is 0.233  \n",
        " Mass fraction of N2 is 0.767  \n",
        " Average molecular weight is 28.84\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.2  Page No : 545"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "yh2 = 0.4;\t\t\t#Mole fraction og H2\n",
      "yo2 = 0.6;\t\t\t#Mole fraction of O2\n",
      "vh2 = 1;\t\t\t#velocity of H2 in m/s\n",
      "vo2 = 0;\t\t\t#velocity of O2 in m/s\n",
      "\n",
      "# Calculations\n",
      "V = (yh2*vh2)+(yo2*vo2);\t\t#Molar average velocity in m/s\n",
      "M = (yh2*2)+(yo2*32);\t\t\t#Molecular weight of the mixture\n",
      "mh2 = (yh2*2)/M;\t    \t\t#Mass fraction of H2 \n",
      "mo2 = (yo2*32)/M;\t\t    \t#Mass fraction of O2\n",
      "v = (mh2*vh2)+(mo2*vo2);\t\t#Mass average velocity in m/s\n",
      "x1 = (mh2*vh2);\t\t\t        #Mass flux \n",
      "x2 = (mo2*vo2);\t\t\t        #Mass flux\n",
      "y1 = (v*vh2);\t\t    \t    #Molar flux\n",
      "y2 = (yo2*vo2);\t    \t\t    #Molar flux\n",
      "jh2 = (mh2*(vh2-v));\t\t\t#Mass diffusion flux\n",
      "jo2 = (mo2*(vo2-v));\t\t\t#Mass diffusion flux\n",
      "Jh2 = (yh2*(vh2-V));\t\t\t#Molar diffusion flux\n",
      "Jo2 = (yo2*(vo2-V));\t\t\t#Molar diffusion flux\n",
      "\n",
      "# Results\n",
      "print 'Molar average velocity is %3.1f m/s \\n \\\n",
      "Mass average velocity is %3.2f m/s  \\n \\\n",
      "Mass flux of H2 when it is stationary is %3.2fp kg/m2.s3 \\n \\\n",
      "Mass flux of O2 when it is stationary is %3.0f kg/m**2.s \\n \\\n",
      "Molar flux of H2 when it is stationary is %3.2fC k.mol/m**2.s \\n \\\n",
      "Molar flux of O2 when it is stationary is %3.0f k.mol/m**2.s \\n \\\n",
      "Mass diffusion flux of H2 across a surface moving with mass average velocity is %3.4fp kg/m**2.s \\n \\\n",
      "Mass diffusion flux of O2 across a surface moving with mass average velocity is %3.4fp kg/m**2.s  \\n \\\n",
      "Molar diffusion flux across a surface moving with molar average velociy for H2 is %3.2fC k.mol/m**2.s \\n \\\n",
      "Molar diffusion flux across a surface moving with molar average velociy for O2\\\n",
      " is %3.2fC k.mol/m**2.s'%(V,v,x1,x2,y1,y2,jh2,jo2,Jh2,Jo2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Molar average velocity is 0.4 m/s \n",
        " Mass average velocity is 0.04 m/s  \n",
        " Mass flux of H2 when it is stationary is 0.04p kg/m2.s3 \n",
        " Mass flux of O2 when it is stationary is   0 kg/m**2.s \n",
        " Molar flux of H2 when it is stationary is 0.04C k.mol/m**2.s \n",
        " Molar flux of O2 when it is stationary is   0 k.mol/m**2.s \n",
        " Mass diffusion flux of H2 across a surface moving with mass average velocity is 0.0384p kg/m**2.s \n",
        " Mass diffusion flux of O2 across a surface moving with mass average velocity is -0.0384p kg/m**2.s  \n",
        " Molar diffusion flux across a surface moving with molar average velociy for H2 is 0.24C k.mol/m**2.s \n",
        " Molar diffusion flux across a surface moving with molar average velociy for O2 is -0.24C k.mol/m**2.s\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.3  Page No : 557"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "t = 0.001;\t\t\t#Thickness of the membrane in m\n",
      "CA1 = 0.02;\t\t\t#Concentration of helium in the membrane at inner surface in k.mol/m**3\n",
      "CA2 = 0.005;\t\t\t#Concentration of helium in the membrane at outer surface in k.mol/m**3\n",
      "DAB = 10**-9;\t\t\t#Binary diffusion coefficient in m**2/s\n",
      "\n",
      "# Calculations\n",
      "NAx = ((DAB*(CA1-CA2))/t)/10**-9;\t\t\t#Diffusion flux of helium through the plastic in k.mol/sm**2 *10**-9\n",
      "\n",
      "# Results\n",
      "print 'Diffusion flux of helium through the plastic is %3.0f*10**-9 k.mol/sm**2'%(NAx)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Diffusion flux of helium through the plastic is  15*10**-9 k.mol/sm**2\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.4  Page No : 557"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "T = 273+25;\t\t\t#Temperature of Helium gas in K\n",
      "p = 4;\t\t\t#Pressure of helium gas in bar\n",
      "Di = 0.1;\t\t\t#Inner diamter of wall in m\n",
      "Do = 0.003;\t\t\t#Outer diamter of wall in m\n",
      "DAB = (0.4*10**-13);\t\t\t#Binary diffusion coefficient in m**2/s\n",
      "S = (0.45*10**-3);\t\t\t#S value for differentiation\n",
      "\n",
      "# Calculations\n",
      "A = (3.14*Di**2);\t\t\t#Area in m**2\n",
      "V = (3.14*Di**3)/6;\t\t\t#Volume in m**3\n",
      "R = 0.08316\t\t\t#Gas consmath.tant in m**3 bar/kmol.K\n",
      "d = ((-6*R*T*DAB*S*p)/(Do*Di))/10**-11;\t\t\t#Decrease of pressure with time in bar/s*10**-11\n",
      "\n",
      "# Results\n",
      "print 'Initial rate of leakage for the system is provided by the decrease of pressure \\\n",
      " with time which is %3.2f*10**-11 bar/s'%(d)\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Initial rate of leakage for the system is provided by the decrease of pressure  with time which is -3.57*10**-11 bar/s\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.5  Page No : 558"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "# Variables\n",
      "po2 = 2;\t\t\t#Pressure of O2 in bar\n",
      "Di = 0.025;\t\t\t#inside diamter of the pipe in m\n",
      "L = 0.0025;\t\t\t#Wall thickness in m\n",
      "a = (0.21*10**-2);\t\t\t#Diffusivity of O2 in m**2/s\n",
      "S = (3.12*10**-3);\t\t\t#Solubility of O2 in k.mol/m**3.bar\n",
      "DAB = (0.21*10**-9);\t\t\t#Binary diffusion coefficient in m**2/s\n",
      "\n",
      "# Calculations\n",
      "CAi = (S*po2);\t\t\t#Concentration of O2 on inside surface in kmol/m**3\n",
      "RmA = ((math.log((Di+(2*L))/Di))/(2*3.14*DAB));\t\t\t#Diffusion resismath.tance in sm**2\n",
      "Loss = (CAi/RmA)/10**-11;\t\t\t#Loss of O2 by diffusion per meter length of pipe *10**-11\n",
      "\n",
      "# Results\n",
      "print 'Loss of O2 by diffusion per meter length of pipe is %3.2f*10**-11 kmol/s'%(Loss)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss of O2 by diffusion per meter length of pipe is 4.51*10**-11 kmol/s\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.6  Page No : 560"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "p = 1;\t\t\t#Pressure of system in atm\n",
      "T = 25+273;\t\t\t#Temperature of system in K\n",
      "pco2 = (190./760);\t\t\t#Partial pressure of CO2 at one end in atm\n",
      "pco2o = (95./760);\t\t\t#Partial pressure of CO2 at other end in atm\n",
      "DAB = (0.16*10**-4);\t\t\t#Binary diffusion coefficient in m**2/s from Table 13.3\n",
      "R = 0.08205\t\t\t#Gas constant in m**3 atm/kmol.K\n",
      "\n",
      "# Calculations\n",
      "NAx = (DAB*(pco2-pco2o))/(R*T*p);\t\t\t#Equimolar counter diffusion in kmol/m**2s\n",
      "M = (NAx*3.14*(0.05**2/4)*3600);\t\t\t#Mass transfer rate in kmol/h\n",
      "MCO2 = (M*44)/10**-5;\t\t\t#Mass flow rate of CO2 in kg/h *10**-5\n",
      "Mair = (29*-M)/10**-5;\t\t\t#Mass flow rate of air in kg/h *10**-5\n",
      "\n",
      "# Results\n",
      "print 'Mass transfer rate of CO2 is %3.2f*10**-5 kg/h Mass transfer rate of air is %3.2f*10**-5 kg/h'%(MCO2,Mair)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mass transfer rate of CO2 is 2.54*10**-5 kg/h Mass transfer rate of air is -1.68*10**-5 kg/h\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.7  Page No : 563"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "T = 27+273;\t\t\t#Temperature of water in K\n",
      "D = 0.02;\t\t\t#Diameter of the tube in m\n",
      "L = 0.4;\t\t\t#Length of the tube in m\n",
      "DAB = (0.26*10**-4);\t\t\t#Diffusion coefficient in m**2/s\n",
      "\n",
      "# Calculations\n",
      "p = 1.0132;\t\t\t#Atmospheric pressure in bar\n",
      "pA1 = 0.03531;\t\t\t#Vapour pressure in bar\n",
      "m = ((p*10**5*3.14*(D/2)**2*18*DAB)/(8316*T*L))*(1000*3600)*math.log(p/(p-pA1));\t\t\t#Diffusion rate of water in gram per hour\n",
      "\n",
      "# Results\n",
      "print 'Diffusion rate of water is %3.4f gram per hour'%(m)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Diffusion rate of water is 0.0019 gram per hour\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.8  Page No : 564"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "# Variables\n",
      "T = 25+273;\t\t\t#Temperature of water in K\n",
      "D = 0.02;\t\t\t#Diameter of the tube in m\n",
      "L = 0.08;\t\t\t#Length of the tube in m\n",
      "m = (8.54*10**-4);\t\t\t#Diffusion coefficient in kg/h\n",
      "\n",
      "# Calculations\n",
      "p = 1.0132;\t\t\t#Atmospheric pressure in bar\n",
      "pA1 = 0.03165;\t\t\t#Vapour pressure in bar\n",
      "DAB = (((m/3600)*8316*T*L)/(p*10**5*3.14*(D/2)**2*18*math.log(p/(p-pA1))*10**2))/10**-4;\t\t\t#Diffusion coefficient of water in m**2/s *10**-4\n",
      "\n",
      "# Calculations\n",
      "print 'Diffusion coefficient of water is %3.3f*10**-4 m**2/s'%(DAB)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Diffusion coefficient of water is 0.259*10**-4 m**2/s\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.9  Page No : 569"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "CAs = 0.02;\t\t\t#Carbon mole fraction\n",
      "CAo = 0.004;\t\t#Content of steel\n",
      "CA = 0.012;\t\t\t#Percet of depth\n",
      "d = 0.001;\t\t\t#Depth in m\n",
      "H = (6*10**-10);\t#Diffusivity of carbon in m**2/s\n",
      "\n",
      "# Calculations\n",
      "X = (CA-CAs)/(CAo-CAs);\t\t\t#Calculation for erf function\n",
      "n = 0.48;           \t\t\t#erf(n) = 0.5; n = 0.48\n",
      "t = ((d/(n*2.))**2/(3600.*H))*3600;\t\t\t#Time required to elevate the carbon content of steel in s\n",
      "\n",
      "\n",
      "# Results\n",
      "print 'Time required to elevate the carbon content of steel is %3.2f s'%(t)\n",
      "\n",
      "\n",
      "# note : rounding error."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Time required to elevate the carbon content of steel is 1808.45 s\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}