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
473
474
475
476
477
478
|
{
"metadata": {
"name": "",
"signature": "sha256:83a0af04c694ab4b0ad1a0fe252ffa0bd8e87abc642c64323f0c2a0d18dd9f5d"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"CHAPTER13:Gas Mixtures"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.1:Pg-480"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques1\n",
"#Standard brayton cycle\n",
"\n",
"#1-Inlet for compressor\n",
"#2-Exit for compressor\n",
"#T-Temperature at a state\n",
"#P-Pressure at a state\n",
"T1=288.2;#K\n",
"P2=1000.0;#kPa\n",
"P1=100.0;#kPa\n",
"k=1.4;\n",
"T2=T1*(P2/P1)**(1.0-1/k);#K\n",
"Cp=1.004;#Specific heat at constant pressure in kJ/kg\n",
"wc=Cp*(T2-T1);#compressor work in kJ/kg;\n",
"print\" Temperature T2 =\",round(T2,2),\"K\"\n",
"print\" Compressor work =\",round(wc,1),\"kJ/kg\"\n",
"#3-Turbine Inlet\n",
"#4-Turbine Exit\n",
"P4=P1;\n",
"P3=P2;\n",
"T3=1373.2;#K\n",
"T4=T3*(P4/P3)**(1-1/k);#K\n",
"wt=Cp*(T3-T4);\n",
"wnet=wt-wc;\n",
"print\" Temperature T3 =\",round(T3,2),\" K\"\n",
"print\" Temperature T4 =\",round(T4),\"K\"\n",
"print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n",
"print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n",
"#2-Also high temperature heat exchanger Inlet\n",
"#3-(-do-) Exit\n",
"qh=Cp*(T3-T2);#Heat of source in kJ/kg\n",
"#4-high temp heat exchanger inlet\n",
"#1-(-do-) Exit\n",
"ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n",
"nth=wnet/qh;\n",
"print\" Thermal Efficiency of cycle =\",round(nth*100,2),\"%\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Temperature T2 = 556.43 K\n",
" Compressor work = 269.3 kJ/kg\n",
" Temperature T3 = 1373.2 K\n",
" Temperature T4 = 711.0 K\n",
" Turbine work = 664.6 kJ/kg\n",
" Net work = 395.3 kJ/kg\n",
" Thermal Efficiency of cycle = 48.21 %\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.2:Pg-481"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Calculation mistake in book\n",
"#ques2\n",
"#Standard brayton cycle\n",
"\n",
"#Calculation mistake in book\n",
"#1-Inlet for compressor\n",
"#2-Exit for compressor\n",
"#T-Temperature at a state\n",
"#P-Pressure at a state\n",
"T1=288.2;#K\n",
"P2=1000.0;#kPa\n",
"P1=100.0;#kPa\n",
"k=1.4;\n",
"T2s=T1*(P2/P1)**(1-1/k);#K\n",
"nc=.80;#Compressor Efficiency\n",
"T2=T1+(T2s-T1)/0.80;\n",
"Cp=1.004;#Specific heat at constant pressure in kJ/kg\n",
"wc=Cp*(T2-T1);#compressor work in kJ/kg\n",
"wc=round(wc)\n",
"print\" Temperature T2 =\",round(T2,2),\"K\"\n",
"print\" Compressor work =\",(wc),\"kJ/kg\"\n",
"#3-Turbine Inlet\n",
"#4-Turbine Exit\n",
"P4=P1;\n",
"P3=P2;\n",
"T3=1373.2;#K\n",
"T4s=T3*(P4/P3)**(1-1.0/k);#K\n",
"nt=0.85;#turbine Efficiency\n",
"T4=T3-(T3-T4s)*0.85;\n",
"wt=Cp*(T3-T4);\n",
"wnet=wt-wc;\n",
"print\" Temperature T3 =\",round(T3,1),\"K\"\n",
"print\" Temperature T4 =\",round(T4,1),\"K\"\n",
"print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n",
"print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n",
"#2-Also high temperature heat exchanger Inlet\n",
"#3-(-do-) Exit\n",
"qh=Cp*(T3-T2);#Heat of source in kJ/kg\n",
"#4-high temp heat exchanger inlet\n",
"#1-(-do-) Exit\n",
"ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n",
"nth=wnet/qh;\n",
"print\" Thermal Efficiency of cycle =\",round(nth*100),\"percent\"\n",
"#some answers are have acceptable difference beacause of approximization in book but here calculations are precise"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Temperature T2 = 623.48 K\n",
" Compressor work = 337.0 kJ/kg\n",
" Temperature T3 = 1373.2 K\n",
" Temperature T4 = 810.5 K\n",
" Turbine work = 564.91 kJ/kg\n",
" Net work = 227.91 kJ/kg\n",
" Thermal Efficiency of cycle = 30.0 percent\n"
]
}
],
"prompt_number": 22
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.3:Pg-486"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques3\n",
"#efficiency of the cycle\n",
"\n",
"wnet=395.2;#kJ/kg from example no 1\n",
"#Tx=T4\n",
"Tx=710.8;#K from example no 1\n",
"T3=1373.2;#K from example no 1\n",
"Cp=1.004;#specific heat in kJ/kg \n",
"qh=Cp*(T3-Tx);\n",
"nth=wnet/qh;\n",
"print\" Thermal efficiency =\",round(nth*100,1),\" percent\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Thermal efficiency = 59.4 percent\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.4:Pg-486"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques4\n",
"#Calculation of work in the given cycle\n",
"import math\n",
"R=0.287;#gas constant \n",
"T1=288.2;#compressor temperature K\n",
"T2=1373.2;#K turbine temperature K\n",
"#Pe/Pi=c=10, Pi/Pe=1/c from example 12.1\n",
"c=10.0;\n",
"wc=-R*T1*math.log(c);\n",
"print\" Isothermal work in compressor =\",round(wc,1),\"kJ/kg\"\n",
"wt=-R*T2*math.log(1/c);\n",
"print\" Isothermal work in turbine =\",round(wt,1),\"kJ/kg\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Isothermal work in compressor = -190.5 kJ/kg\n",
" Isothermal work in turbine = 907.5 kJ/kg\n"
]
}
],
"prompt_number": 26
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.5:Pg-491"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques5\n",
"#air standard cycle for jet repulsion\n",
"import math\n",
"#1-compressor inlet\n",
"#2-Compressor exit\n",
"#P-Pressure at given point\n",
"#T-Temperature at given point\n",
"P1=100;#kPa\n",
"P2=1000;#kPa\n",
"T1=288.2;#K\n",
"T2=556.8;#K\n",
"wc=269.5;#from ex 12.1 work done in compressor in kJ/kg\n",
"#2-Burner inlet\n",
"#3-Burner exit\n",
"P3=1000;#kPa\n",
"T3=1373.2;#K\n",
"#wc=wt\n",
"Cp=1.004;#specific enthalpy of heat at constant pressure in kJ/kg\n",
"k=1.4;\n",
"T4=T3-wc/Cp;\n",
"P4=P3*(T4/T3)**(1-1/k);\n",
"#from s4=s5 and h4=h5+v2/2 we get\n",
"T5=710.8#K, from second law\n",
"v=math.sqrt(2*Cp*1000*(T4-T5));#m/s\n",
"print\" Velocity of air leaving the nozel =\",round(v),\"m/s\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Velocity of air leaving the nozel = 889.0 m/s\n"
]
}
],
"prompt_number": 28
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.6:Pg-494"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques6\n",
"#air standard refrigeration cycle\n",
"\n",
"#1-compressor inlet\n",
"#2-compressor exit\n",
"P1=100;#kPa\n",
"P2=500;#kPa\n",
"k=1.4;\n",
"rp=P2/P1;\n",
"cop=(rp**(1-1/k)-1)**-1;\n",
"print\" Coefficient of performance =\",round(cop,2)\n",
"#3-Expander inlet\n",
"#4-Expander exit\n",
"P3=P2;\n",
"P4=P1;\n",
"T3=288.23;#K, given and fixed\n",
"T4=T3/(P3/P4)**(1-1/k);\n",
"T1=253.2;#K, given\n",
"Cp=1.004;#Specific heat at cons pressure in kJ/kg\n",
"ql=Cp*(T1-T4);#heat released in kJ/kg\n",
"P=1#power required in kW \n",
"ms=P/ql;#kg/s\n",
"print\" Rate at which the air enter the compressor =\",round(ms,3),\"kg/s\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Coefficient of performance = 1.71\n",
" Rate at which the air enter the compressor = 0.014 kg/s\n"
]
}
],
"prompt_number": 36
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.7:Pg-498"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques7\n",
"#the otto cycle\n",
"\n",
"#1-compressor inlet\n",
"#2-compressor exit\n",
"P1=100.0;#kPa\n",
"T1=288.2;#K\n",
"R=0.287;#gas constant\n",
"v1=R*T1/P1;#specific volume at inlet in m^3/kg\n",
"rv=10.0;#compression ratio given\n",
"k=1.4;#constant\n",
"T2=T1*rv**(k-1);#K\n",
"print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n",
"P2=P1*rv**k;#kPa\n",
"print\" Pressure at compressor exit, P2 =\",round(P2/1000,2),\"MPa\"\n",
"v2=v1/rv;#specific heat at exit in m^3/kg\n",
"#23-heat addition process\n",
"#q23=Cv*(T3-T2)=1800 kJ/kg given\n",
"q23=1800.0;#kJ/kg heat addition, given\n",
"Cv=0.717;#specific heat at constant volume in kJ/kg\n",
"T3=T2+q23/Cv;#K\n",
"print\" Initial Temperature during heat additon process, T3 =\",round(T3,2),\"K\"\n",
"P3=P2*(T3/T2);#kPa\n",
"print\" Initial pressure during heat addition process, P3 =\",round(P3/1000,3),\"MPa\"\n",
"r=10.0;#k=V4/V3=P3/P4\n",
"T4=T3*(1/r)**(k-1);\n",
"print\" Final temperature during heat addition process, T4 =\",round(T4,3),\"K\";\n",
"P4=P3/r**k;#kPa\n",
"print\" Final pressure during heat addition process, P4 =\",round(P4/1000,4),\"MPa\"\n",
"nth=1-1/r**(k-1);#thermal efficiency\n",
"print\" Thermal efficiency =\",round(nth*100,1),\" percent\"\n",
"q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n",
"wnet=q23+q41;\n",
"mep=wnet/(v1-v2);#effective mean pressure n kPa\n",
"print\" Mean effective pressure =\",round(mep,2),\"kPa\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Temperature at compressor exit, T2 = 723.9 K\n",
" Pressure at compressor exit, P2 = 2.51 MPa\n",
" Initial Temperature during heat additon process, T3 = 3234.39 K\n",
" Initial pressure during heat addition process, P3 = 11.223 MPa\n",
" Final temperature during heat addition process, T4 = 1287.632 K\n",
" Final pressure during heat addition process, P4 = 0.4468 MPa\n",
" Thermal efficiency = 60.2 percent\n",
" Mean effective pressure = 1455.37 kPa\n"
]
}
],
"prompt_number": 42
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex12.8:Pg-501"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#ques8\n",
"#the diesel cycle\n",
"\n",
"#1-compressor inlet\n",
"#2-compressor exit\n",
"P1=100;#kPa\n",
"T1=288.2;#K\n",
"R=0.287;#gas constant\n",
"v1=R*T1/P1;#specific volume at inlet in m^3/kg\n",
"rv=20;#compression ratio given\n",
"k=1.4;#constant\n",
"T2=T1*rv**(k-1);#K\n",
"print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n",
"P2=P1*rv**k;#kPa\n",
"print\" Pressure at compressor exit, P2 =\",round(P2/1000,3),\" MPa\"\n",
"v2=v1/rv;#specific heat at exit in m^3/kg\n",
"#23-heat addition process\n",
"#q23=Cv*(T3-T2)=1800 kJ/kg given\n",
"q23=1800;#kJ/kg heat addition, given\n",
"Cv=.717;\n",
"Cp=1.004;#specific heat at constant pressure in kJ/kg\n",
"T3=T2+q23/Cp;#K\n",
"print\" Initial Temperature during heat addition process, T3 =\",round(T3,2),\"K\"\n",
"r=T3/T2;#T3/T2=V3/V2=r\n",
"v3=r*v2;\n",
"T4=T3/(v1/v3)**(k-1);\n",
"print\" Final temperature during heat addition process, T4 =\",round(T4),\"K\"\n",
"q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n",
"wnet=q23+q41;\n",
"mep=wnet/(v1-v2);#effective mean pressure in kPa\n",
"qh=1800;#heat transfer in kJ/kg\n",
"nth=wnet/qh;#thermal efficiency\n",
"\n",
"print\" Thermal efficiency =\",round(nth*100,1),\"percent\"\n",
"print\" Mean effective pressure =\",round(mep,2),\"kPa\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" Temperature at compressor exit, T2 = 955.2 K\n",
" Pressure at compressor exit, P2 = 6.629 MPa\n",
" Initial Temperature during heat addition process, T3 = 2748.05 K\n",
" Final temperature during heat addition process, T4 = 1265.0 K\n",
" Thermal efficiency = 61.1 percent\n",
" Mean effective pressure = 1399.18 kPa\n"
]
}
],
"prompt_number": 47
}
],
"metadata": {}
}
]
}
|