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
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 9: Propulsion"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.1"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Work per kilogram of steam for this isentropic process: 377.5 KJ/Kg-K\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.1\n",
"'''Steam enters a steam turbine at a pressure of 1 MPa, a temperature of 300\n",
"◦C, and avelocity of 50 m/s. The steam leaves the turbine at a pressure of 150 kPa and a velocity of\n",
"200 m/s. Determine the work per kilogram of steam flowing through the turbine, assuming\n",
"the process to be reversible and adiabatic.\n",
"Control volume: Turbine.\n",
"Sketch: Fig. 9.2.\n",
"Inlet state: Fixed (Fig. 9.2).\n",
"Exit state: P e , V e known.\n",
"Process: Steady state, reversible and adiabatic.\n",
"Model: Steam tables.'''\n",
"\n",
"#Variable Declaration: \n",
"hi = 3051.2 \t\t#initial specific heat of enthalpy of steam in kJ/kg\n",
"si = 7.1228 \t\t#initial specific entropy of steam in kJ/kg-K\n",
"Pe = 0.15 \t\t\t#final pressure in MPa\n",
"se = si \t\t\t#specific entropy in final state in kJ/kg-K\n",
"sf = 1.4335 \t\t#in kJ/kg-K\n",
"sfg = 5.7897 \t\t#in kJ/kg-K\n",
"vi = 50 \t\t\t#velocity with which steam enters turbine in m/s\n",
"ve = 200 \t\t\t#velocity with which steam leaves the turbine in m/s\n",
"hf = 467.1 \t\t\t#in kJ/kg\n",
"hfg = 2226.5 \t\t#in kJ/kg\n",
"\n",
"#Calculations:\n",
"xe = (se-sf)/sfg \t#quality of steam in final state\n",
"he = hf+xe*hfg \t\t#final specific heat of enthalpy of steam in kJ/kg\n",
"w = hi+vi**2/(2*1000)-he-ve**2/(2*1000) \t\t#work of steam for isentropic process in kJ/kg\n",
"\n",
"#Results\n",
"print \"Work per kilogram of steam for this isentropic process: \",round(w,1),\"KJ/Kg-K\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Exit velocity of the steam from the nozzle: 737.0 m/s\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.2\n",
"''' Consider the reversible adiabatic flow of steam through a nozzle. Steam enters the nozzle\n",
"at 1 MPa and 300◦C, with a velocity of 30 m/s. The pressure of the steam at the nozzle\n",
"exit is 0.3 MPa. Determine the exit velocity of the steam from the nozzle, assuming a\n",
"reversible, adiabatic, steady-state process.'''\n",
"\n",
"#Variable Declaration: \n",
"hi = 3051.2 \t\t#initial specific heat of enthalpy in kJ/kg\n",
"si = 7.1228 \t\t#initial specific entropy in kJ/kg-K\n",
"Pe = 0.3 \t\t\t#final pressure in MPa\n",
"he = 2780.2 \t\t#final specific heat of enthalpy in kJ/kg-K\n",
"Te = 159.1 \t\t\t#final temperature in celsius\n",
"vi = 30 \t\t\t#velocity with which steam enters the nozzle in m/s\n",
"\n",
"#Calculations:\n",
"se = si \t\t\t#final specific entropy \n",
"ve = ((2*(hi-he)+(vi**2/1000))*1000)**0.5 \t\t#final velocity of steam with which it exits in m/s\n",
"\n",
"#Results\n",
"print \"Exit velocity of the steam from the nozzle:\",round(ve),'m/s'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.4"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Specific work required: -271.0 KJ/Kg\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.4\n",
"''' An air compressor in a gas station (see Fig. 9.4) takes in a flow of ambient air at 100 kPa,\n",
"290 K and compresses it to 1000 kPa in a reversible adiabatic process. We want to know\n",
"the specific work required and the exit air temperature.'''\n",
"\n",
"#Variable Declaration: \n",
"Cp = 1.004 \t\t#specific heat of air at constant pressure in kJ/kg-K\n",
"Ti = 290 \t\t#initial temperature in kelvins\n",
"Pi = 100 \t\t#initial pressure in kPa\n",
"Pe = 1000 \t\t#final pressure in kPa\n",
"k = 1.4 \n",
"\n",
"#Calculations:\n",
"Te = Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n",
"we = Cp*(Ti-Te) \t\t#required specific work in kJ/kg\n",
"\n",
"#Results:\n",
"print \"Specific work required: \",round(we),'KJ/Kg'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.5"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Entropy generated in this process: 0.072 KW/K\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.5\n",
"''' A de-superheater works by injecting liquid water into a flow of superheated steam. With\n",
"2 kg/s at 300 kPa, 200◦C, steam flowing in, what mass flow rate of liquid water at 20◦C\n",
"should be added to generate saturated vapor at 300 kPa? We also want to know the rate of\n",
"entropy generation in the process.'''\n",
"\n",
"#Variable Declaration: \n",
"h1 = 2865.54 \t\t#specific heat of enthalpy at state 1 in kJ/kg\n",
"h2 = 83.94 \t\t\t#specific heat of enthalpy at state 2 in kJ/kg\n",
"h3 = 2725.3 \t\t#specific heat of enthalpy at state 3 in kJ?kg\n",
"s1 = 7.3115 \t\t#specific entropy at state 1 in kJ/kg-K\n",
"s2 = 0.2966 \t\t#specific entropy at state 2 in kJ/kg-K\n",
"s3 = 6.9918 \t\t#specific entropy at state 3in kJ/kg-K\n",
"m1 = 2 \t\t\t\t#mass flow rate at state 1 in kg/s\n",
"\n",
"#Calculations:\n",
"m2 = m1*(h1-h3)/(h3-h2)\t#mass flow rate at state 2 in kg/s\n",
"m3 = m1+m2 \t\t\t\t#mass flow rate at state 3 in kg/s\n",
"Sgen = m3*s3-m1*s1-m2*s2#entropy generation in the process\n",
"\n",
"#Results:\n",
"print \"Entropy generated in this process: \",round(Sgen,3),'KW/K'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.6"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Total amount of work required to fill the tank: -31.9 KJ\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"from math import log\n",
"#Example: 9.6\n",
"'''Assume an air tank has 40 L of 100 kPa air at ambient temperature 17◦C. The adiabatic\n",
"and reversible compressor is started so that it charges the tank up to a pressure of 1000\n",
"kPa and then it shuts off. We want to know how hot the air in the tank gets and the total\n",
"amount of work required to fill the tank.'''\n",
"\n",
"#Variable Declaration: \n",
"T1 = 17+273 \t\t#initial temperature of tank in Kelvins\n",
"sT1 = 6.83521 \t\t#specific entropy in kJ/kg-K\n",
"R = 0.287 \t\t\t#gas constant in kJ/kg-K\n",
"P1 = 100 \t\t\t#initial pressure in kPa\n",
"P2 = 1000 \t\t\t#final pressure in kPa\n",
"T2 = 555.7 \t\t\t#from interplotation \n",
"V1 = 0.04 \t\t\t#volume of tank in m**3\n",
"V2 = V1 \t\t\t#final volume is equal to initial volume\n",
"u1 = 207.19 \t\t#initial specific heat of enthalpy in kJ/kg\n",
"u2 = 401.49 \t\t#final specific heat of enthalpy in kJ/kg\n",
"hin = 290.43 \t\t#in kJ/kg\n",
"\n",
"#Calculations:\n",
"sT2 = sT1+R*log(P2/P1)\t#specific entropy at temperature T2 in kJ/kg-K\n",
"m1 = P1*V1/(R*T1) \t#initial mass of air in tank in kg\n",
"m2 = P2*V2/(R*T2) \t#final mass of air in tank in kg\n",
"Min = m2-m1 \t\t#in kg\n",
"W12 = Min*hin+m1*u1-m2*u2 \t\t#work required to fill the tank in kJ\n",
"\n",
"#Results:\n",
"print \"Total amount of work required to fill the tank: \",round(W12,1),'KJ'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.7"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Work required to pump water isentropically: 4.92 KJ/Kg\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.7\n",
"''' Calculate the work per kilogram to pump water isentropically from 100 kPa, 30◦C to 5 MPa.'''\n",
"\n",
"#Variable Declaration: \n",
"P1 = 100 \t\t\t#initial pressure in kPa\n",
"P2 = 5000 \t\t\t#final pressure in kPa\n",
"v = 0.001004 \t\t#specific volume in m**3/kg\n",
"\n",
"#Calculations:\n",
"w = v*(P2-P1) \t\t#work required to pump water isentropically\n",
"\n",
"#Results:\n",
"print \"Work required to pump water isentropically: \",round(w,2),'KJ/Kg'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.8"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ideal nozzle can generate upto Ve = 20.0 m/s in the exit flow.\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.8\n",
"'''Consider a nozzle used to spray liquid water. If the line pressure is 300 kPa and the water\n",
"temperature is 20◦C, how high a velocity can an ideal nozzle generate in the exit flow?'''\n",
"\n",
"#Variable Declaration: \n",
"vf = 0.001002 \t#in m**3/kg\n",
"Pi = 300 \t\t#Line pressure in kPa\n",
"Po = 100 \t\t#in kPa\n",
"\n",
"#Calculations:\n",
"v = vf\n",
"Ve = (2*v*(Pi-Po)*1000)**0.5 \t\t#velocity in the exit flow\n",
"\n",
"#Results:\n",
"print \"Ideal nozzle can generate upto Ve = \",round(Ve),'m/s in the exit flow.'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.9"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Rate of entropy generation for this process: 0.00166 KW/K\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.9\n",
"'''Saturated vapor R-410a enters the uninsulated compressor of a home central air-\n",
"conditioning system at 5◦C. The flow rate of refrigerant through the compressor is 0.08\n",
"kg/s, and the electrical power input is 3 kW. The exit state is 65◦C, 3000 kPa. Any heat transfer from the compressor is with the ambient at 30◦C. Determine the rate of entropy\n",
"generation for this process.\n",
"Control volume: Compressor out to ambient T 0 .\n",
"Inlet state: T i , x i known; state fixed.\n",
"Exit state: P e , T e known; state fixed.\n",
"Process: Steady-state, single fluid flow.\n",
"Model: R-410a tables, B.4.'''\n",
"#Variable Declaration: \n",
"hi = 280.6 \t\t\t\t#in kJ/kg\n",
"he = 307.8 \t\t\t\t#in kJ/kg\n",
"si = 1.0272 \t\t\t#in kJ/kg\n",
"se = 1.0140 \t\t\t#in kJ/kg\n",
"m = 0.08 \t\t\t\t#flow rate of refrigerant in kg/s\n",
"P = 3 \t\t\t\t\t#electrical power input in kW\n",
"To = 30 \t\t\t\t#in °C\n",
"\n",
"#Calculations:\n",
"Qcv = m*(he-hi)-P \t\t#in kW\n",
"Sgen = m*(se-si)-Qcv/(To+273.2)\t#Rate of entropy generation \n",
"\n",
"#Results:\n",
"print \"Rate of entropy generation for this process: \",round(Sgen,5),'KW/K'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.10"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Efficiency of the turbine: 80.9 %\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.10\n",
"''' A steam turbine receives steam at a pressure of 1 MPa and a temperature of 300\n",
"◦C. The steam leaves the turbine at a pressure of 15 kPa. The work output of the turbine is measured\n",
"and is found to be 600 kJ/kg of steam flowing through the turbine. Determine the efficiency\n",
"of the turbine.\n",
"Control volume: Turbine.\n",
"Inlet state: P i , T i known; state fixed.\n",
"Exit state: P e known.\n",
"Process: Steady state.\n",
"Model: Steam tables.'''\n",
"\n",
"#Variable Declaration: \n",
"hi = 3051.2 \t\t#initial specific heat of enthalpy in kJ/kg\n",
"si = 7.1228 \t\t#initial specific entropy in kJ/kg-K\n",
"sf = 0.7548 \t\t#in kJ/kg-K\n",
"sfg = 7.2536 \t\t#in kJ/kg-K\n",
"hf = 225.9 \t\t#in kJ/kg\n",
"hfg = 2373.1 \t\t#in kJ/kg\n",
"wa = 600 \t\t#actual work output of turbine in kJ/kg\n",
"\n",
"#Calculations:\n",
"ses = si \t\t#final specific entropy is same as the initial\n",
"xes = (si-sf)/sfg \t\t#quality of steam when it leaves the turbine\n",
"hes = hf+xes*hfg \t\t#final specific heat of enthalpy in kJ/kg\n",
"ws = hi-hes \t\t#work output of turbine calculated ideally in kJ/kg\n",
"nturbine = wa/ws \t\t#efiiciency of turbine \n",
"\n",
"#Results:\n",
"print \"Efficiency of the turbine: \",round(nturbine*100,1),'%'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.11"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Turbine inlet pressure: 2995.0 Kpa\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"from math import e\n",
"#Example: 9.11\n",
"''' Air enters a gas turbine at 1600 K and exits at 100 kPa, 830 K.The turbine efficiency is\n",
"estimated to be 85%. What is the turbine inlet pressure?\n",
"Control volume: Turbine.\n",
"Inlet state: T i known.\n",
"Exit state: P e , T e known; state fixed.\n",
"Process: Steady state.\n",
"Model: Air tables, Table A.7.'''\n",
"\n",
"#Variable Declaration: \n",
"hi = 1757.3 \t\t#initial specific heat of enthalpy of air in kJ/kg\n",
"si = 8.6905 \t\t#initial specifc entropy of airin kJ/kg-K\n",
"he = 855.3 \t\t\t#final specific heat of enthalpy of air in kJ/kg\n",
"n = 0.85 \t\t\t#efficiency of turbine \n",
"Tes = 683.7 \t\t#final temperature in kelvins from air tables\n",
"ses = 7.7148 \t\t#in kJ/kg-K\n",
"R = 0.287 \t\t\t#gas constant in kJ/kg-K\n",
"\n",
"#Calculations:\n",
"w = hi-he \t\t\t#actual work done by turbine in kJ/kg\n",
"ws = w/n \t\t\t#ideal work done by turbine in kJ/kg\n",
"hes = hi-ws \t\t#from first law of isentropic process\n",
"Pi = 100/e**((si-ses)/-R) #turbine inlet pressure in kPa\n",
"\n",
"#Results:\n",
"print \"Turbine inlet pressure: \",round(Pi),'Kpa'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 9.12"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Required work input: -53.0 KJ/Kg\n",
"Exit temperature: 352.6 K\n"
]
}
],
"source": [
"# -*- coding: utf8 -*-\n",
"from __future__ import division\n",
"#Example: 9.12\n",
"'''Air enters an automotive supercharger at 100 kPa, 300 K and is compressed to 150 kPa.\n",
"The efficiency is 70%. What is the required work input per kilogram of air? What is the\n",
"exit temperature?\n",
"Control volume: Supercharger (compressor).\n",
"Inlet state: P i , T i known; state fixed.\n",
"Exit state: P e known.\n",
"Process: Steady state.\n",
"Model: Ideal gas, 300 K specific heat, Table A.5.'''\n",
"\n",
"#Variable Declaration: \n",
"Pe = 150 \t\t#final pressure of air in kPa\n",
"Pi = 100 \t\t#initial presure of air in kPa\n",
"k = 1.4\n",
"Ti = 300 \t\t#initial temperature of air in kelvis\n",
"n = 0.7 \t\t#efficiency of automotive supercharger \n",
"\n",
"#Calculations:\n",
"Tes = Ti*(Pe/Pi)**((k-1)/k) \t\t#from second law\n",
"ws = 1.004*(Ti-Tes) \t\t#from first law of isentropic process\n",
"w = ws/n \t\t#real work input in kJ/kg\n",
"Te = Ti-w/1.004 \t\t#temperature at supercharger exit in K\n",
"\n",
"#Results:\n",
"print \"Required work input: \",round(w),'KJ/Kg'\n",
"print \"Exit temperature: \",round(Te,1),'K'"
]
}
],
"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
}
|