summaryrefslogtreecommitdiff
path: root/Basic_Engineering_Thermodynamics_by_R_Joel/14-Air_and_gas_compressors.ipynb
blob: 0282db33b4e2c7ea4b073a38a4033f91421ed4b9 (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
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 14: Air and gas compressors"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.1: EX14_1.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.1');\n",
"\n",
"// aim : To determine \n",
"// (a) the free air delivered\n",
"// (b) the volumetric efficiency\n",
"// (c) the air delivery temperature\n",
"// (d) the cycle power\n",
"// (e) the isothermal efficiency\n",
"\n",
"// given values\n",
"d = 200*10^-3;// bore, [m]\n",
"L = 300*10^-3;// stroke, [m]\n",
"N = 500;// speed, [rev/min]\n",
"n = 1.3;// polytropic index\n",
"P1 = 97;// intake pressure, [kN/m^2]\n",
"T1 = 273+20;// intake temperature, [K]\n",
"P3 = 550;// compression pressure, [kN/m^2]\n",
"\n",
"// solution\n",
"// (a)\n",
"P4 = P1;\n",
"P2 = P3;\n",
"Pf = 101.325;// free air pressure, [kN/m^2]\n",
"Tf = 273+15;// free air temperature, [K]\n",
"SV = %pi/4*d^2*L;// swept volume, [m^3]\n",
"V3 = .05*SV;// [m^3]\n",
"V1 = SV+V3;// [m^3]\n",
"V4 = V3*(P3/P4)^(1/n);// [m^3]\n",
"ESV = (V1-V4)*N;// effective swept volume/min, [m^3]\n",
"// using PV/T=constant\n",
"Vf = P1*ESV*Tf/(Pf*T1);// free air delivered, [m^3/min]\n",
"mprintf('\n (a) The free air delivered is  =  %f  m^3/min\n',Vf);\n",
"\n",
"// (b)\n",
"VE = Vf/(N*(V1-V3));// volumetric efficiency\n",
"mprintf('\n (b) The volumetric efficiency is  =  %f  percent\n',VE*100);\n",
"\n",
"// (c)\n",
"T2 = T1*(P2/P1)^((n-1)/n);//  free air temperature, [K]\n",
"mprintf('\n (c) The air delivery temperature is  =  %f  C\n',T2-273);\n",
"\n",
"//  (d)\n",
"CP = n/(n-1)*P1*(V1-V4)*((P2/P1)^((n-1)/n)-1)*N/60;// cycle power, [kW]\n",
" mprintf('\n (d) The cycle power is  =  %f  kW\n',CP);\n",
"\n",
"// (e)\n",
"// neglecting clearence\n",
"W = n/(n-1)*P1*V1*((P2/P1)^((n-1)/n)-1)\n",
"Wi = P1*V1*log(P2/P1);// isothermal efficiency\n",
"IE = Wi/W;// isothermal efficiency\n",
"mprintf('\n (e) The isothermal efficiency neglecting clearence  is  =  %f percent\n',IE*100);\n",
"\n",
"// End"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.2: intermediate_pressure_volume_and_cycle_power.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.2');\n",
"\n",
"// aim : To determine \n",
"// (a) the intermediate pressure\n",
"// (b) the total volume of each cylinder\n",
"// (c) the cycle power\n",
"\n",
"// given values\n",
"v1 = .2;// air intake, [m^3/s]\n",
"P1 = .1;// intake pressure, [MN/m^2]\n",
"T1 = 273+16;// intake temperature, [K]\n",
"P3 = .7;// final pressure, [MN/m^2]\n",
"n = 1.25;// compression index\n",
"N = 10;// speed, [rev/s]\n",
"\n",
"// solution\n",
"// (a)\n",
"P2 = sqrt(P1*P3);// intermediate pressure, [MN/m^2]\n",
"mprintf('\n (a) The intermediate pressure is  =  %f  MN/m^2\n',P2);\n",
"\n",
"// (b)\n",
"V1  = v1/N;// total volume,[m^3]\n",
"// since intercooling is perfect so 2 lie on the isothermal through1, P1*V1=P2*V2\n",
"V2 = P1*V1/P2;// volume, [m^3]\n",
"mprintf('\n (b) The total volume of the HP cylinder is  =  %f  litres\n',V2*10^3);\n",
"\n",
" // (c)\n",
" CP = 2*n/(n-1)*P1*v1*((P2/P1)^((n-1)/n)-1);// cycle power, [MW]\n",
"  mprintf('\n (c) The cycle power is  =  %f  MW\n',CP*10^3);\n",
" \n",
" // there is calculation mistake in the book so answer is not matching\n",
" \n",
" //  End"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.3: intermediate_pressures_effective_swept_volume_temperature_and_work_done.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.3');\n",
"\n",
"// aim : To determine \n",
"// (a) the intermediate pressures\n",
"// (b) the effective swept volume of the LP cylinder\n",
"// (c) the temperature and the volume of air delivered per stroke at 15 bar\n",
"// (d) the work done per kilogram of air\n",
"\n",
"// given values\n",
"d = 450*10^-3;//  bore , [m]\n",
"L = 300*10^-3;//  stroke, [m]\n",
"cl = .05;//  clearence\n",
"P1 = 1; // intake pressure, [bar]\n",
"T1 = 273+18;// intake temperature, [K]\n",
"P4 = 15;// final delivery pressure, [bar]\n",
"n = 1.3;//  compression and expansion index\n",
"R = .29;// gas constant, [kJ/kg K]\n",
"\n",
"// solution\n",
"// (a)\n",
"k=(P4/P1)^(1/3); \n",
"// hence\n",
"P2 = k*P1;//  intermediare pressure, [bar]\n",
"P3 = k*P2;//  intermediate pressure, [bar]\n",
"\n",
"mprintf('\n (a) The intermediate pressure is P2 =  %f  bar\n',P2);\n",
"mprintf('\n     The intermediate pressure is  P3=  %f  bar\n',P3);\n",
"\n",
"// (b)\n",
"SV = %pi*d^2/4*L;//  swept volume of LP cylinder, [m^3]\n",
"// hence\n",
"V7 = cl*SV;// volume, [m^3]\n",
"V1 = SV+V7;// volume, [m^3]\n",
"// also\n",
"P7 = P2;\n",
"P8 = P1;\n",
"V8 = V7*(P7/P8)^(1/n);//  volume, [m^3]\n",
"ESV = V1-V8;// effective swept volume of LP cylinder, [m^3]\n",
"\n",
"mprintf('\n (b) The effective swept volume of the LP cylinder is  =  %f litres\n',ESV*10^3);\n",
"\n",
"// (c)\n",
"T9 = T1;\n",
"P9 = P3;\n",
"T4 = T9*(P4/P9)^((n-1)/n);// delivery temperature, [K]\n",
"// now using P4*(V4-V5)/T4=P1*(V1-V8)/T1\n",
"V4_minus_V5 = P1*T4*(V1-V8)/(P4*T1);// delivery volume, [m^3]\n",
" \n",
"mprintf('\n (c) The delivery temperature is =  %f  C\n',T4-273);\n",
"mprintf('\n      The delivery volume is =  %f  litres\n',V4_minus_V5*10^3);\n",
"\n",
"//  (d)\n",
"\n",
"W = 3*n*R*T1*((P2/P1)^((n-1)/n)-1)/(n-1);//  work done/kg ,[kJ]\n",
"mprintf('\n (d) The work done per kilogram of air is =  %f  kJ\n',W);\n",
" \n",
"// End"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.4: pressure_temperature_and_energy.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.4');\n",
"\n",
"// aim : To determine \n",
"// (a) the final pressure and temperature\n",
"// (b) the energy required to drive the compressor\n",
"\n",
"// given values\n",
"rv = 5;// pressure compression ratio\n",
"m_dot = 10;// air flow rate, [kg/s]\n",
"P1 = 100;// initial pressure, [kN/m^2]\n",
"T1 = 273+20;// initial temperature, [K]\n",
"n_com = .85;// isentropic efficiency of compressor\n",
"Gama = 1.4;// heat capacity ratio\n",
"cp = 1.005;// specific heat capacity, [kJ/kg K]\n",
"\n",
"// solution\n",
"// (a)\n",
"T2_prim = T1*(rv)^((Gama-1)/Gama);// temperature after compression, [K]\n",
"// using isentropic efficiency=(T2_prim-T1)/(T2-T1)\n",
"T2 = T1+(T2_prim-T1)/n_com;//  final temperature, [K]\n",
"P2 = rv*P1;// final pressure, [kN/m^2]\n",
"mprintf('\n (a) The final temperature is  =  %f  C\n',T2-273);\n",
"mprintf('\n (b) The final pressure is  =  %f  kN/m^2\n',P2);\n",
"\n",
"// (b)\n",
"E = m_dot*cp*(T1-T2);// energy required, [kW]\n",
"mprintf('\n (b) The energy required to drive the compressor is  =  %f  kW',E);\n",
"if(E<0)\n",
"    disp('The negative sign indicates energy input');\n",
"else\n",
"    disp('The positive sign indicates energy output');\n",
"end\n",
"\n",
" //  End\n",
"\n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.5: power_developed.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.5');\n",
"\n",
"// aim : To determine \n",
"//  the power absorbed in driving the compressor\n",
"\n",
"// given values\n",
"FC = .68;// fuel consumption rate, [kg/min]\n",
"P1 = 93;// initial pressure, [kN/m^2]\n",
"P2 = 200;// final pressure, [kN/m^2]\n",
"T1 = 273+15;// initial temperature, [K]\n",
"d = 1.3;// density of mixture, [kg/m^3]\n",
"n_com = .82;// isentropic efficiency of compressor\n",
"Gama = 1.38;// heat capacity ratio\n",
"\n",
"// solution\n",
"R = P1/(d*T1);// gas constant, [kJ/kg K]\n",
"// for mixture\n",
"cp = Gama*R/(Gama-1);// heat capacity, [kJ/kg K]\n",
"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// temperature after compression, [K]\n",
"// using isentropic efficiency=(T2_prim-T1)/(T2-T1)\n",
"T2 = T1+(T2_prim-T1)/n_com;//  final temperature, [K]\n",
"m_dot = FC*15/60;// given condition, [kg/s]\n",
"P = m_dot*cp*(T2-T1);// power absorbed by compressor, [kW]\n",
"mprintf('\n The power absorbed by compressor is  =  %f kW\n',P);\n",
"\n",
"// End"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.6: power.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.6');\n",
"\n",
"// aim : To determine \n",
"//  the power required to drive the blower\n",
"\n",
"// given values\n",
"m_dot = 1;// air capacity, [kg/s]\n",
"rp = 2;// pressure ratio\n",
"P1 = 1*10^5;// intake pressure, [N/m^2]\n",
"T1 = 273+70;// intake temperature, [K]\n",
"R = .29;// gas constant, [kJ/kg k]\n",
"\n",
"// solution\n",
"V1_dot = m_dot*R*T1/P1*10^3;// [m^3/s]\n",
"P2 = rp*P1;// final pressure, [n/m^2]\n",
"P = V1_dot*(P2-P1);// power required, [W]\n",
"mprintf('\n The power required to drive the blower is  =  %f kW\n',P*10^-3);\n",
"\n",
"// End"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.7: power.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.7');\n",
"\n",
"// aim : To determine \n",
"//  the power required to drive the vane pump\n",
"\n",
"// given values\n",
"m_dot = 1;// air capacity, [kg/s]\n",
"rp = 2;// pressure ratio\n",
"P1 = 1*10^5;// intake pressure, [N/m^2]\n",
"T1 = 273+70;// intake temperature, [K]\n",
"Gama = 1.4;// heat capacity ratio\n",
"rv = .7;// volume ratio\n",
"\n",
"// solution\n",
"V1 = .995;// intake pressure(as given previous question),[m^3/s] \n",
"// using P1*V1^Gama=P2*V2^Gama, so\n",
"P2 = P1*(1/rv)^Gama;// pressure, [N/m^2]\n",
"V2 = rv*V1;// volume,[m^3/s]\n",
"P3 = rp*P1;// final pressure, [N/m^2]\n",
"P = Gama/(Gama-1)*P1*V1*((P2/P1)^((Gama-1)/Gama)-1)+V2*(P3-P2);// power required,[W]\n",
"mprintf('\n The power required to drive the vane pump is  =  %f  kW\n',P*10^-3);\n",
"\n",
"//  End"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 14.8: power_temperature_and_pressure.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp(' Example 14.8');\n",
"\n",
"// aim : To determine \n",
"//  the total temperature and pressure of the mixture\n",
"\n",
"// given values\n",
"rp = 2.5;// static pressure ratio\n",
"FC = .04;// fuel consumption rate, [kg/min]\n",
"P1 = 60;// inilet pressure, [kN/m^2]\n",
"T1 = 273+5;// inilet temperature, [K]\n",
"n_com = .84;// isentropic efficiency of compressor\n",
"Gama = 1.39;// heat capacity ratio\n",
"C2 = 120;//exit velocity from compressor, [m/s]\n",
"rm = 13;// air-fuel ratio\n",
"cp = 1.005;// heat capacity ratio\n",
"\n",
"// solution\n",
"P2 = rp*P1;// given condition, [kN/m^2]\n",
"T2_prim = T1*(P2/P1)^((Gama-1)/Gama);// temperature after compression, [K]\n",
"// using isentropic efficiency=(T2_prim-T1)/(T2-T1)\n",
"T2 = T1+(T2_prim-T1)/n_com;//  final temperature, [K]\n",
"m_dot = FC*(rm+1);// mass of air-fuel mixture, [kg/s]\n",
"P = m_dot*cp*(T2-T1);// power to drive compressor, [kW]\n",
"mprintf('\n The power required to drive compressor is  =  %f  kW\n',P);\n",
"\n",
"Tt2 = T2+C2^2/(2*cp*10^3);// total temperature,[K]\n",
"Pt2 = P2*(Tt2/T2)^(Gama/(Gama-1));// total pressure, [kN/m^2]\n",
"mprintf('\n The temperature in the engine is  =  %f  C\n',Tt2-273);\n",
"mprintf('\n The pressure in the engine cylinder is  =  %f  kN/m^2\n',Pt2);\n",
"\n",
"//  There is calculation mistake in the book\n",
"\n",
"\n",
"//  End"
   ]
   }
],
"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
}