summaryrefslogtreecommitdiff
path: root/Chemical_Reactor_Design_by_P_Harriott/6-Nonideal_Flow.ipynb
blob: 086ad45fdcf9a264ae9063e0c4e8ab1bac7289d7 (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
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 6: Nonideal Flow"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 6.1: Power_Consumption_at_300_rpm_speed_of_stirrer_and_blending_time.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n",
"//Chapter-6 Ex6.1 Pg No.236\n",
"//Title:Power Consumption at 300 rpm,speed of stirrer and blending time\n",
"//====================================================================================================================\n",
"clear\n",
"clc\n",
"// COMMON INPUT\n",
"D_a=0.1;\n",
"D_t=0.3;\n",
"H=0.3;\n",
"N_P=5.5;\n",
"rho=1000;\n",
"n=5;\n",
"S_f=6;//Scale up factor in diameter\n",
"P_by_V_limit=10;//Pressure per unit volume (HP/1000gal)\n",
"n1=5;\n",
"Da_by_Dt1=D_a/D_t;\n",
"Da_by_Dt2=0.5;\n",
"\n",
"//CALCULATION (Ex6.1.a)\n",
"P_unit_vol=(N_P*n^3*D_a^5)/(%pi*(1/4)*D_t^2*H);\n",
"P_thousand_gal=P_unit_vol*5.067;\n",
"t=(4/n)*(D_t/D_a)^2*(H/D_t);\n",
"P_unit_vol_new=S_f^2*P_thousand_gal;\n",
"\n",
"//CALCULATION (Ex6.1.b)\n",
"n_limit=(P_by_V_limit/P_unit_vol_new)^(1/3) *n1;//Pressure per unit vol propotional to n3\n",
"t_inc_factor=n1/n_limit;//t inversely propotional to n\n",
"rotational_speed=n_limit*60;//Speed in rpm\n",
"\n",
"//CALCULATION (Ex6.1.c)\n",
"n2=(Da_by_Dt1/Da_by_Dt2)^(5/3)*n_limit;\n",
"rotaional_speed=n2*60;\n",
"t1=4*(1/Da_by_Dt1)^2*(H/D_t)*(1/n_limit);\n",
"t2=4*(1/Da_by_Dt2)^2*(H/D_t)*(1/n2);\n",
"\n",
"//OUTPUT (Ex6.1.a)\n",
"mprintf('\n OUTPUT Ex6.1.a');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\n The Power consumption per unit volume at 300rpm = %.2f HP/1000 gal',P_thousand_gal);\n",
"mprintf('\n\ The Power consumption scaling up sixfold in diameter = %.0f HP/1000 gal',P_unit_vol_new); \n",
"\n",
"\n",
"//OUTPUT (Ex6.1.b)\n",
"mprintf('\n\n\n OUTPUT Ex6.1.b');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\n The speed of the stirrer  = %.2f sec-1 or %.0f rpm',n_limit,rotational_speed);\n",
"mprintf('\n Blending time increases by factor of %.2f ',t_inc_factor); \n",
"\n",
"//OUTPUT(Ex6.1.c)\n",
"mprintf('\n\n\n OUTPUT Ex6.1.c');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\n The new stirrer speed = %.2f sec-1 or %.0f rpm',n2,rotaional_speed); \n",
"mprintf('\n The new blending time  for Da/Dt ratio of 0.5 = %.1f sec',t2); \n",
"\n",
"//FILE OUTPUT\n",
"fid= mopen('.\Chapter6-Ex1-Output.txt','w');\n",
"mfprintf(fid,'\n OUTPUT Ex6.1.a');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\n The Power consumption per unit volume at 300rpm = %.2f HP/1000 gal',P_thousand_gal);\n",
"mfprintf(fid,'\n\ The Power consumption scaling up sixfold in diameter = %.0f HP/1000 gal',P_unit_vol_new);\n",
"mfprintf(fid,'\n\n\n OUTPUT Ex6.1.b');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\n The speed of the stirrer  = %.2f sec-1 or %.0f rpm',n_limit,rotational_speed);\n",
"mfprintf(fid,'\n Blending time increases by factor of %.2f ',t_inc_factor); \n",
"mfprintf(fid,'\n\n\n OUTPUT Ex6.1.c');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\n The new stirrer speed = %.2f sec-1 or %.0f rpm',n2,rotaional_speed); \n",
"mfprintf(fid,'\n The new blending time  for Da/Dt ratio of 0.5 = %.1f sec',t2);\n",
"mclose(fid);\n",
"//======================================================END OF PROGRAM=================================================\n",
"//Disclaimer: In Ex6.1.c there is an arithematic error in the value of D_a/D_t. The value of  D_a/D_t should be 11.4 instead of the value reported in the textbook for D_a/D_t=11.1."
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 6.2: Effect_of_diffusion_on_conversion_for_laminar_flow.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n",
"//Chapter-6 Ex6.2 Pg No. 239\n",
"//Title:Effect of diffusion on conversion for laminar flow \n",
"//============================================================================================================\n",
"clear\n",
"clc\n",
"//INPUT\n",
"D=1*10^(-2);//Diameter of pipeline (m)\n",
"R=D/2;//Radius (m)\n",
"D_m=10^(-4);//Diffusivity (m2/sec)\n",
"k=1;//Reaction rate constant (sec-1)\n",
"\n",
"\n",
"//CALCULATION\n",
"alpha=D_m/(k*(R^2));//Refer topic ('Diffusion in laminar flow reactors') Pg No.239\n",
"\n",
"\n",
"//OUTPUT\n",
"if (alpha<=0.01) \n",
"    then\n",
"    mprintf('\n The  effect of radial diffusion  on conversion can be neglected as alpha = %.0f',alpha )\n",
"else\n",
"    mprintf('\n The effect of radial diffusion makes conversion almost as same as plug flow as alpha = %.0f',alpha)\n",
"end\n",
"\n",
"//FILE OUTPUT\n",
"fid= mopen('.\Chapter6-Ex2-Output.txt','w');\n",
"if (alpha<=0.01) \n",
"    then\n",
"    mfprintf(fid,'\n The  effect of radial diffusion  on conversion can be neglected as alpha = %.0f',alpha )\n",
"else\n",
"    mfprintf(fid,'\n The effect of radial diffusion makes conversion almost as same as plug flow as alpha = %.0f',alpha)\n",
"end\n",
"mclose(fid);\n",
"//================================================END OF PROGRAM======================================================== "
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 6.3: Effect_of_Axial_dispersion_and_length_on_conversion.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"//Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n",
"//Chapter-6 Ex6.3 Pg No. 248\n",
"//Title:Effect of Axial dispersion and length on conversion\n",
"//====================================================================================================================\n",
"clear\n",
"clc\n",
"// COMMON INPUT\n",
"u=1;//Superficial velocity (cm/s)\n",
"D=2*10^(-5)//Molecular Diffusivity(cm2/s)\n",
"Re=30;//Reynolds No.\n",
"Pe_a=0.25;//Peclet No. corresponding Re No. from Fig 6.10\n",
"dp=3*(10^-1);//Particle Size (cm)\n",
"L=48;//Length of the bed (cm)\n",
"X_A=0.93;//Conversion\n",
"L_old=48;// Old bed length (cm)\n",
"L_new=L_old/2;//New bed length (cm)\n",
"\n",
"\n",
"\n",
"//CALCULATION (Ex6.3.a)\n",
"Pe_dash=Pe_a*L/dp;//Refer Pg.No.247\n",
"one_minus_X_A=(1-X_A);\n",
"k_rho_L_by_u1=2.65;//From Fig6.12 for given  Pe_dash\n",
"X_A1=1-exp(-k_rho_L_by_u1);\n",
"//To increase the conversion more catalyst is needed\n",
"k_rho_L_by_u2=2.85;//From Fig6.12\n",
"X_A2=1-exp(-k_rho_L_by_u2);\n",
"Percentage_excess_cat_a=((k_rho_L_by_u2-k_rho_L_by_u1)/k_rho_L_by_u1)*100;\n",
"\n",
"//CALCULATION(Ex6.3.b)\n",
"k_rho_L_by_u_new=k_rho_L_by_u1/2;\n",
"X_A_cal=(1-exp(-k_rho_L_by_u_new));//Calculated conversion\n",
"Pe_dash_new=Pe_dash/2;\n",
"k_rho_L_by_u_graph=1.3992;//Value obtained from Figure6.12 for the calculated conversion\n",
"Percentage_excess_cat_b=((k_rho_L_by_u_graph-k_rho_L_by_u_new)/k_rho_L_by_u_new)*100;\n",
"\n",
"//OUTPUT(Ex6.3.a)\n",
"mprintf('\n OUTPUT Ex6.3.a');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\n The effect of axial dispersion is significant and the percentage excess of catalyst = %.0f%%',Percentage_excess_cat_a );\n",
"\n",
"//OUTPUT (Ex6.3.b)\n",
"mprintf('\n\n\n OUTPUT Ex6.3.b');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\n The effect of axial dispersion is less on reducing the bed length \n The percentage excess of catalyst = %.0f%%',Percentage_excess_cat_b );\n",
"\n",
"//FILE OUTPUT\n",
"fid= mopen('.\Chapter6-Ex3-Output.txt','w');\n",
"mfprintf(fid,'\n OUTPUT Ex6.3.a');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\n The effect of axial dispersion is significant and the percentage excess of catalyst = %.0f%%',Percentage_excess_cat_a );\n",
"mfprintf(fid,'\n\n\n OUTPUT Ex6.3.b');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\n The effect of axial dispersion is less on reducing the bed length \n The percentage excess of catalyst = %.0f%%',Percentage_excess_cat_b );\n",
"mclose(fid);\n",
"//==============================================END OF PROGRAM=========================================================\n",
"\n",
"\n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 6.4: Conversion_in_packed_bed_for_same_superficial_velocity.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"// Harriot P., 2003, Chemical Reactor Design (I-Edition), Marcel Dekker, Inc., USA, pp 436.\n",
"//Chapter-6 Ex6.4 Pg No.251\n",
"//Title:Conversion in packed bed for same superficial velocity\n",
"//====================================================================================================================\n",
"clear\n",
"clc\n",
"//COMMON INPUT \n",
"L=2.5;//Lendth of bed(ft)\n",
"X_A=0.95;//Conversion\n",
"L_a=3;//Length of section a (ft)\n",
"L_b=2;//Length of section b (ft)\n",
"u_oa_by_u0=0.88;//Refer equation 3.64\n",
"u_ob_by_u0=1.12;\n",
"L=2.5;//(ft)\n",
"\n",
"\n",
"//CALCULATION (Ex6.4.a)\n",
"k_rho_L_by_u=log(1/(1-X_A));//First Order reactions\n",
"//For Section a\n",
"k_rho_L_by_u_a=k_rho_L_by_u*(L_a/L);\n",
"X_A_section_a=(1-exp(-k_rho_L_by_u_a));\n",
"//For Section b\n",
"k_rho_L_by_u_b=k_rho_L_by_u*(L_b/L);//Dimensionless Group based on ideal plug flow for first order reaction\n",
"X_A_section_b=(1-exp(-k_rho_L_by_u_b));\n",
"X_A_Ave=(X_A_section_b+X_A_section_a)/2;\n",
"Percent_X_A_Ave=X_A_Ave*100\n",
"\n",
"//CALCULATION (Ex6.4.b)\n",
"k_rho_L_by_u=log(1/(1-X_A));//First Order reaction\n",
"//For Section a\n",
"k_rho_L_by_u_a=k_rho_L_by_u*(L_a/L)*(1/u_oa_by_u0);\n",
"X_A_section_a=(1-exp(-k_rho_L_by_u_a));\n",
"delP_a_by_alpha_u0_pow=L_a*(u_oa_by_u0);//Refer equation 3.64\n",
"\n",
"//For Section b\n",
"k_rho_L_by_u_b=k_rho_L_by_u*(L_b/L)*(1/u_ob_by_u0);//Dimensionless Group based on ideal plug flow for first order reaction\n",
"delP_b_by_alpha_u0_pow=L_b*u_ob_by_u0;\n",
"X_A_section_b=(1-exp(-k_rho_L_by_u_b));\n",
"X_A_avg=(u_oa_by_u0*X_A_section_a+u_ob_by_u0*X_A_section_b)/2;\n",
"Percent_X_A_avg=X_A_avg*100;\n",
"\n",
"//OUTPUT(Ex6.4.a)\n",
"mprintf('\n OUTPUT Ex6.4.a');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\nThe average converion when each section has same superficial velocity:%0.1f%%',Percent_X_A_Ave );\n",
"\n",
"//OUTPUT(Ex6.4.b)\n",
"mprintf('\n\n\n OUTPUT Ex6.4.b');\n",
"mprintf('\n==========================================================');\n",
"mprintf('\nThe overall conversion for different velocities:%0.1f%% ',Percent_X_A_avg );\n",
"\n",
"//FILE OUTPUT\n",
"fid= mopen('.\Chapter6-Ex4-Output.txt','w');\n",
"mfprintf(fid,'\n OUTPUT Ex6.4.a');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\nThe average converion when each section has same superficial velocity:%0.1f%%',Percent_X_A_Ave );\n",
"mfprintf(fid,'\n\n\n OUTPUT Ex6.4.b');\n",
"mfprintf(fid,'\n==========================================================');\n",
"mfprintf(fid,'\nThe overall conversion for different velocities:%0.1f%% ',Percent_X_A_avg );\n",
"mclose(fid);\n",
"//=======================================================END OF PROGRAM================================================="
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}