summaryrefslogtreecommitdiff
path: root/sample_notebooks/marupeddisameer chaitanya/Sample_(chapter_9).ipynb
blob: bff5435f0b1cbfcdf8654861f16c23d769fe0a55 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 9 : Theories of Mass Transfer"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9.1.1 pgno31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The film thickness is  cm 0.00765\n"
     ]
    }
   ],
   "source": [
    "#initialization of variables\n",
    "p1 = 10. # pressure in atm\n",
    "H = 600. # henrys constant in atm\n",
    "c1 = 0 # gmol/cc\n",
    "N1 = 2.3*10**-6 # mass flux in mol/cm**2-sec\n",
    "c = 1./18. #total Concentration in g-mol/cc\n",
    "D = 1.9*10**-5 # Diffusion co efficient in cm**2/sec\n",
    "#Calculations\n",
    "c1i = (p1/H)*c # Component concentration in gmol/cc\n",
    "k = N1/(c1i-c1)#Mass transfer co efficient in cm/sec\n",
    "l = D/k # Film thickness in cm\n",
    "#Results\n",
    "print\"The film thickness is  cm\",round(l,5)\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9.2.1 pgno:34"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The contact time  sec 3.9\n",
      "\n",
      "The surface resident time  sec 3.0\n"
     ]
    }
   ],
   "source": [
    "#initialization of variables\n",
    "D = 1.9*10**-5 #Diffusion co efficient in cm**2/sec\n",
    "k = 2.5*10**-3 # M.T.C in cm/sec\n",
    "from math import pi\n",
    "#Calculations\n",
    "Lbyvmax = 4*D/((k**2)*pi)#sec\n",
    "tou = D/k**2 # sec\n",
    "#Results\n",
    "print\"The contact time  sec\",round(Lbyvmax,1)\n",
    "print\"\\nThe surface resident time  sec\",round(tou,1)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9.3.1 pgno:35"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The apparent m.t.c for the first case is  cm/sec 0.000379885493042\n",
      "\n",
      "The apparent m.t.c for the second case is  cm/sec 0.000742723884992\n",
      "\n",
      "The apparent is proportional to the power of  of the velocity 0.61\n"
     ]
    }
   ],
   "source": [
    "#initialization of variables\n",
    "const = 0.5 # The part of flow in the system which bypasses the region where the mass transfer occurs\n",
    "v1 = 1. # cm/sec\n",
    "al = 10**3\n",
    "k = 10**-3 # cm/sec\n",
    "v2 = 3. # cm/sec\n",
    "from math import log\n",
    "from math import exp\n",
    "#Calculations\n",
    "C1byC10first = const + (1-const)*(exp(-k*al/v1))# c1/c10\n",
    "appk1 = (v1/al)*(log(1/C1byC10first))# Apparent m.t.c for first case in cm/sec\n",
    "C1byC10second = const + (1-const)*(exp(-((3)**0.5)*k*al/v2))#c1/c10 in second case\n",
    "appk2 = (v2/al)*log(1/C1byC10second)# apparent m.t.c for second case in cm/sec\n",
    "power = log(appk2/appk1)/log(v2/v1)\n",
    "#Results\n",
    "print\"The apparent m.t.c for the first case is  cm/sec\",appk1\n",
    "print\"\\nThe apparent m.t.c for the second case is  cm/sec\",appk2\n",
    "print\"\\nThe apparent is proportional to the power of  of the velocity\",round(power,2)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9.4.1 pgno:37"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The average mass transfer coefficient is  cm/sec 0.000431530124388\n"
     ]
    }
   ],
   "source": [
    "#initialization of variables\n",
    "D = 1*10**-5 #cm**2/sec\n",
    "d = 2.3 # cm\n",
    "L = 14 # cm\n",
    "v0 = 6.1 # cm/sec\n",
    "#gamma(4./3.)=0.8909512761;\n",
    "#calculations\n",
    "k = ((3**(1./3.))/(0.8909512761))*((D/d))*(((d**2)*v0/(D*L))**(1./3.))# cm/sec\n",
    "#Results\n",
    "print\"The average mass transfer coefficient is  cm/sec\",k\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9.4.2 pgno:40"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The distance at which turbulent flow starts is  cm 300.0\n",
      "\n",
      "The boundary layer for flow at this point is  cm 300.0\n",
      "\n",
      "The boundary layer for concentration at this point is  cm 300.0\n",
      "\n",
      "The local m.t.c at the leading edge and at the position of transistion is  x10**-5 cm/sec 0.589714620247\n"
     ]
    }
   ],
   "source": [
    "#initialization of variables\n",
    "tn = 300000 # turbulence number\n",
    "v0  = 10 # cm/sec\n",
    "p = 1 # g/cc\n",
    "mu = 0.01 # g/cm-sec\n",
    "delta = 2.5 #cm\n",
    "D = 1*10**-5 # cm**2/sec\n",
    "#Calculations\n",
    "x = tn*mu/(v0*p)# cm\n",
    "delta = ((280/13)**(1/2))*x*((mu/(x*v0*p))**(1/2))#cm\n",
    "deltac = ((D*p/mu)**(1/3))*delta#cm\n",
    "k = (0.323*(D/x)*((x*v0*p/mu)**0.5)*((mu/(p*D))**(1/3)))*10**5# x*10**-5 cm/sec\n",
    "#Results\n",
    "print\"The distance at which turbulent flow starts is  cm\",x\n",
    "print\"\\nThe boundary layer for flow at this point is  cm\",delta\n",
    "print\"\\nThe boundary layer for concentration at this point is  cm\",deltac\n",
    "print\"\\nThe local m.t.c at the leading edge and at the position of transistion is  x10**-5 cm/sec\",k\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}