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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 10 : Pumps compressors and turbines"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.1 page no : 362"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The efficiency of the pump is 0.729167\n"
]
}
],
"source": [
"#Calculate the efficiency of a pump\n",
"\n",
"# variables\n",
"Q=50. #gal/min\n",
"P1=30. #psia 0r lbf/in**2\n",
"P2=100. #psia 0r lbf/in**2\n",
"dP=P2-P1 #psia 0r lbf/in**2\n",
"power=2.8 #hp\n",
"\n",
"# calculation\n",
"#1 ft = 12 in\n",
"#1 hp.min = 33000 lbf.ft\n",
"#1 gal = 231 in**3\n",
"eta=(Q*dP/power)*(1/33000.0)*231*(1/12.0) #dimentionless\n",
"\n",
"# result\n",
"print \"The efficiency of the pump is %f\"%eta"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.2 page no : 366"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"the maximum elevation above the lowest water level in sump at which pump inlet can be placed is 19.770533 ft\n"
]
}
],
"source": [
"#Calculate the maximum elevation above the lowest water level in sump at which pump inlet can be placed\n",
"\n",
"# variables\n",
"P1=3.72 #psia 0r lbf/in**2\n",
"P2=14.5 #psia 0r lbf/in**2\n",
"dP=P2-P1 #psia 0r lbf/in**2\n",
"rho=61.3 #lbm/ft**3\n",
"g=32.2 #ft/s**2\n",
"\n",
"# calculation\n",
"#1 ft = 12 in\n",
"#1 lbf.s**2 = 32.2 lbm.ft\n",
"h_loss=4 #ft\n",
"v=10 #ft/s\n",
"h_max=(dP/rho/g)*144*32.2-(v**2/2.0/g)-h_loss #ft\n",
"\n",
"# result\n",
"print \"the maximum elevation above the lowest water level in sump at which pump inlet can be placed is %f ft\"%h_max"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.3 page no : 370"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The work required per pound mole for a 100 percent efficient isothermal compressor is 2415.724914 Btu/lbmol\n",
"\n",
"The work required per pound mole for a 100 percent efficient adiabatic compressor is 3417.499724 Btu/lbmol\n",
"\n"
]
}
],
"source": [
"#Calculate the work requird per pound mole for a 100% efficient isothermal and adiabatic compressor\n",
"import math\n",
"\n",
"# variables\n",
"R=1.987 #Btu/lbmol/R (universal gas constant)\n",
"T=528. #R (Rankine temperature scale)\n",
"ratio_P=10. #dimentionless\n",
"\n",
"# calculations and results\n",
"#for isothermal compressor\n",
"W1=R*T*math.log(ratio_P) #Btu/lbmol\n",
"print \"The work required per pound mole for a 100 percent efficient isothermal compressor is %f \"%W1,\"Btu/lbmol\\n\"\n",
"\n",
"#for adiabatic compressor\n",
"gama=1.4#dimentionless\n",
"W2=(gama/(gama-1))*R*T*(ratio_P**((gama-1)/gama)-1)#Btu/lbmol\n",
"print \"The work required per pound mole for a 100 percent efficient adiabatic compressor is %f \"%W2,\"Btu/lbmol\\n\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.4 page no : 370"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The work required per pound mole for a 100 percent efficient adiabatic compressor is 2861.592127 Btu/lbmol\n"
]
}
],
"source": [
"#Calculate the work requird per pound mole for a 100% efficient 2 stage adiabatic compressor\n",
"\n",
"# variables\n",
"R=1.987 #Btu/lbmol/R (universal gas constant)\n",
"T=528.0 #R (Rankine temperature scale)\n",
"ratio_P1=3 #dimentionless\n",
"ratio_P2=10/3.0 #dimentionless\n",
"gama=1.4 #dimentionless\n",
"\n",
"# calculation\n",
"W=(gama/(gama-1))*R*T*((ratio_P1**((gama-1)/gama)-1)+(ratio_P2**((gama-1)/gama)-1)) #Btu/lbmol\n",
"\n",
"# result\n",
"print \"The work required per pound mole for a 100 percent efficient adiabatic compressor is %f \"%W,\n",
"print \"Btu/lbmol\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.5 page no : 373"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The pump head is 112.471747 ft\n"
]
}
],
"source": [
"#Calculate the pump head\n",
"import math\n",
"\n",
"# variables\n",
"N=1750. #rev/min\n",
"#1 min 60 sec\n",
"omega=2*(math.pi)*N/60 #radians/sec\n",
"Q=100. #gal/min\n",
"#1 gallon = 231 in**3\n",
"#1 ft =12 in\n",
"#1 min = 60 sec\n",
"d_inlet = 2.067 #ft\n",
"\n",
"# calculations\n",
"A_inlet=(math.pi)/4.*(d_inlet**2) #ft**2\n",
"V1=(Q/A_inlet)*231/60.0/12.0 #ft/s\n",
"d_outlet = 1.61 #ft\n",
"A_outlet=(math.pi)/4*(d_outlet**2) #ft**2\n",
"V2=(Q/A_outlet)*231/60.0/12.0 #ft/s\n",
"g=32.2 #ft/s**2\n",
"d_inner=0.086 #ft\n",
"d_outer=0.336 #ft\n",
"h=(omega)**2/g*((d_outer**2)-(d_inner)**2)+(V2**2-V1**2)/2./g #ft\n",
"\n",
"#result\n",
"print \"The pump head is %f ft\"%h"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.6 page no : 378"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The pump head is 2.734925 ft\n"
]
}
],
"source": [
"#Calculate the pump head\n",
"\n",
"# variables\n",
"rho=62.3 #lbm/ft**3\n",
"g=32.2 #ft/s**2\n",
"v=18.46 #ft/s\n",
"\n",
"# calculation\n",
"#1 lbf/s**2 = 32.2 lbm.ft\n",
"h=1/(rho*g) * (v**2/2)*32.2 #ft\n",
"\n",
"# result\n",
"print \"The pump head is %f ft\"%h"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.7 page no : 381"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"the estimated pressure rise in the first stage of mutisatge centrifugal compressor is 8.865562 psia\n"
]
}
],
"source": [
"#Calculate the estimated pressure rise in the first stage of mutisatge centrifugal compressor\n",
"\n",
"# variables\n",
"rho=0.075 #lbm/ft**3\n",
"omega=1047. #rad/sec\n",
"d=2. #ft\n",
"\n",
"# calculation\n",
"dP=(1/2.0)*(rho)*(omega*d/2.0)**2/32.2/144.0 #psia\n",
"#1 lbf.s**2 = 32.2 lbm into feed\n",
"#1 ft = 144 in**2\n",
"\n",
"# result\n",
"print \"the estimated pressure rise in the first stage of mutisatge centrifugal compressor is %f psia\"%dP"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Example 10.8 page no : 383"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The efficiency of the compressor is 0.749243\n",
"dT_real = 190 K\n",
"dT_isentropic = 142 K\n"
]
}
],
"source": [
"#Calculate the efficiency of a compressor and the change respective change in temperature\n",
"\n",
"# variables\n",
"m=100.0 #Kg/hr\n",
"M=29. #gm/mol\n",
"gama=1.4 #dimentionless\n",
"R=8.314 #J/mol/K\n",
"T=293.15 #K\n",
"ratio_P=4. #dimentionless\n",
"\n",
"# calculations\n",
"Po=(m/M)*R*T*(gama/(gama-1))*((ratio_P)**((gama-1)/gama)-1)/3600.0 #kW\n",
"P_real=5.3 #kW\n",
"eta=Po/P_real #dimentionless\n",
"\n",
"# result\n",
"print \"The efficiency of the compressor is %f\"%eta\n",
"Cp=29.1 #J/mol/K\n",
"dT_real=P_real*(M/m)*3600/Cp #K\n",
"print \"dT_real = %d K\"%dT_real\n",
"dT_isentropic=Po*(M/m)*3600/Cp #K\n",
"print \"dT_isentropic = %d K\"%dT_isentropic"
]
}
],
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|