summaryrefslogtreecommitdiff
path: root/sample_notebooks/AjaySatish/Sample_H.S._Fogler.ipynb
blob: 51134ef970c991c0de0c9329036b0644a8bceca4 (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
{
 "metadata": {
  "celltoolbar": "Raw Cell Format",
  "name": "",
  "signature": "sha256:ef32575f9668e7c75384fec9d19e3d17f6260e600de2d26c9157520e2a39253b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "ELEMENTS OF CHEMICAL ENGINEERING BY H.S. FOGLER"
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER NUMBER 1 : MOLE BALANCES"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE NUMBER 1.3"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "k = 0.23; #min**-1\n",
      "v0 = 10;#dm**3/min\n",
      "#CA = 0.1*CA0;\n",
      "V = (v0/k)*math.log(1/0.1);\n",
      "print \"V =\",round(V,4),\"dm**3\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V = 100.1124 dm**3\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "CHAPTER NUMBER 2 : CONVERSION AND REACTOR SIZING"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE NUMBER 2.1"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "  \n",
      "import math\n",
      " \n",
      "P0 = 10; #atm\n",
      "yA0 = 0.5;\n",
      "T0 = 422.2;#K\n",
      "R = 0.082;# dm**3.atm/mol.K\n",
      "v0 = 6;#dm**3/s\n",
      "CA0=(yA0*P0)/(R*T0);\n",
      "FA0 = CA0*v0;\n",
      "print \"CA0 =\",round(CA0,4),\"mol/dm**3\"\n",
      "print \"FA0 =\",round(FA0,4),\"mol/s\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "CA0 = 0.1444 mol/dm**3\n",
        "FA0 = 0.8665 mol/s\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE NUMBER 2.2"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "P0 = 10; #atm\n",
      "yA0 = 0.5;\n",
      "T0 = 422.2;#K\n",
      "R = 0.082;# dm**3.atm/mol.K\n",
      "v0 = 6;#dm**3/s\n",
      "X = 0.8;\n",
      "rA = -1/800;#1/-rA = 800#dm**3.s/mol\n",
      "CA0=(yA0*P0)/(R*T0);\n",
      "FA0 = CA0*v0;\n",
      "V = FA0*X*(1/-rA)\n",
      "print \"FA0 =\",round(FA0,4),\"mol/s\"\n",
      "print \"V =\",round(V,4),\"dm**3\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "FA0 = 0.8665 mol/s\n",
        "V = 0.6932 dm**3\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE NUMBER 2.3"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      " \n",
      "P0 = 10; #atm\n",
      "yA0 = 0.5;\n",
      "T0 = 422.2;#K\n",
      "R = 0.082;# dm**3.atm/mol.K\n",
      "v0 = 6;#dm**3/s\n",
      "X = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8];\n",
      "p = [189,192,200,222,250,303,400,556,800];#1/-rA = 800#dm**3.s/mols\n",
      "CA0=(yA0*P0)/(R*T0);\n",
      "FA0 = CA0*v0;\n",
      "#V = FA0*X*(1/-rA)\n",
      "\n",
      "V = FA0*np.interp(0.42,X,p)\n",
      "print \"FA0 =\",FA0,\"mol/s\"\n",
      "print \"V =\",V,\"dm**3\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "FA0 = 0.866541114487 mol/s\n",
        "V = 225.820614435 dm**3\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE NUMBER 2.4"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "FA0 = 5; # mol/s\n",
      "rAat=-0.0025;\n",
      "X = [0,0.1,0.2,0.3,0.4,0.5,0.6];\n",
      "p = [189,192,200,222,250,303,400];#1/-rA = 800#dm**3.s/mols\n",
      "\n",
      "VCSTR = FA0*X[6]*(1/-rAat);\n",
      "VPFR = FA0*np.interp(0.00017,X,p)\n",
      "print \"VCSTR =\",VCSTR,\"dm**3\"\n",
      "print \"VPFR =\",VPFR,\"dm**3\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "VCSTR = 1200.0 dm**3\n",
        "VPFR = 945.0255 dm**3\n"
       ]
      }
     ],
     "prompt_number": 37
    }
   ],
   "metadata": {}
  }
 ]
}