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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 8 : Availability and Irreversibility"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.1 Page No : 185"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The available part of heat in kJ is 6784.0\n",
"The unavailable part of heat in kJ is : 9216.0\n"
]
}
],
"source": [
"\n",
"# Variables\n",
"Q = 16.;\t\t\t# in MJ\n",
"Q = Q * 10**3;\t\t\t# in kJ\n",
"T_H = 227.;\t\t\t# in °C\n",
"T_H = T_H + 273;\t\t\t# in K\n",
"T_L = 15.;\t\t\t# in °C\n",
"T_L = T_L + 273;\t\t\t# in K\n",
"\n",
"# Calculations and Results\n",
"del_S = Q/T_H;\t\t\t# in kJ/K\n",
"A = Q - (T_L * del_S);\t\t\t# in kJ\n",
"print \"The available part of heat in kJ is \",A\n",
"\n",
"U_P_ofHeat = T_L * del_S;\t\t\t# unavailable part of heat in kJ\n",
"print \"The unavailable part of heat in kJ is :\",U_P_ofHeat\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.2 Page No : 185"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Available work is in kJ 6000.0\n",
"Unavailable work is in kJ 6000.0\n"
]
}
],
"source": [
"\n",
"# Variables\n",
"Q = 12000.;\t\t\t# in kJ\n",
"T_H = 600.;\t\t\t# in K\n",
"T_L = 300.;\t\t\t# in K\n",
"\n",
"# Calculations and Results\n",
"dS = Q / T_H;\t\t\t#in kJ/K\n",
"A = Q - (T_L * dS);\t\t\t#available work in kJ\n",
"print \"Available work is in kJ\",A\n",
"\n",
"UA = T_L * dS;\t\t\t#unavailable work in kJ\n",
"print \"Unavailable work is in kJ\",UA\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.3 Page No : 185"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Available energy in MJ is : 190.0\n",
"Unavailable energy in MJ is : 110.0\n"
]
}
],
"source": [
"import math \n",
"\n",
"# Variables\n",
"m = 800.;\t\t\t# in kg\n",
"C_p = 0.5;\t\t\t# in kJ/kg K\n",
"T2 = 500.;\t\t\t# in K\n",
"T1 = 1250.;\t\t\t# in K\n",
"T_o = 300.;\t\t\t# in K\n",
"\n",
"# Calculations and Results\n",
"del_t = T1 - T2; \t\t\t# in K\n",
"Q = m * C_p * del_t; \t \t\t# in kJ\n",
"dS = abs(m * C_p * math.log(T2/T1));\t\t\t# in kJ/K\n",
"availableEnergy = Q - (T_o * dS);\t\t\t#in kJ\n",
"print \"Available energy in MJ is :\",round(availableEnergy*10**-3)\n",
"\n",
"unavailableEnergy = T_o * dS;\t\t\t# UA for unavailable energy in kJ\n",
"print \"Unavailable energy in MJ is :\",(round(unavailableEnergy*10**-3))\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.4 Page No : 197"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The availablibity per kg of steam entering in kcl/kg is : 255.56\n",
"The availablibity per kg of steam leaving in kcl/kg is : 75.50\n",
"reversible work per kg of steam in kcl/kg is : 180.0598\n"
]
}
],
"source": [
"\n",
"# Variables\n",
"h_i = 726.1;\n",
"h_o = 25.03;\n",
"T_o = 298;\t\t\t# in K\n",
"s_i = 1.582;\n",
"s_o = 0.087;\n",
"h2 = 669.;\n",
"s2 = 1.677;\n",
"\n",
"# Calculations and Results\n",
"h3 = 52.17 + (0.9 * 567.7);\n",
"s3 = 0.1748 + (0.9 * 1.7448);\n",
"sai_i = (h_i - h_o) - (T_o * (s_i - s_o));\t\t\t# in kcl/kg\n",
"print \"The availablibity per kg of steam entering in kcl/kg is : %.2f\"%sai_i\n",
"\n",
"sai_e = (0.25 * ((h2 - h_o) - (T_o * (s2 - s_o)))) + (0.75 * ((h3 - h_o) - (T_o * (s3 - s_o)))) ;\t\t\t# in kcl/kg\n",
"print \"The availablibity per kg of steam leaving in kcl/kg is : %.2f\"%sai_e\n",
"\n",
"w_rev = sai_i - sai_e;\t\t\t# in kcl/kg\n",
"print \"reversible work per kg of steam in kcl/kg is : %.4f\"%w_rev\n",
"\n",
"# Note: There is calculation error in evaluating the value of availability per kg of \n",
"# steam leaving in kcl/kg . so the answer in the book is wrong and coding is right.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.5 Page No : 198"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The irreversiblity in kcal/hr 43500566.0\n"
]
}
],
"source": [
"\n",
"# Variables\n",
"T_o = 298;\t\t\t# in K\n",
"m2 = 25000;\n",
"s2 = 16775;\n",
"m3 = 75000;\n",
"s3 = 17448;\n",
"m1 = 1000000;\n",
"s1 = 1582;\n",
"Q = -16;\t\t\t# in MJ\n",
"\n",
"# Calculations\n",
"Q = Q * 10**3;\t\t\t# in kJ\n",
"I = (T_o * ((m2 * s2) + (m3 * s3) - (m1 * s1))) - Q;\t\t\t# in cal/hr\n",
"I=I*10**-3;\t\t\t# in kcal/hr\n",
"\n",
"# Results\n",
"print \"The irreversiblity in kcal/hr\",I\n",
"\n",
"# Note: There is calculation error in evaluating the value of the irreversibility\n",
"# in kcal/hr. so the answer in the book is wrong and coding is right.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.6 Page No : 198"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The availablibity before adiabatic throttling in kcal/kg is : 267.49\n",
"The availablibity before adiabatic throttling in kcal/kg is : 245.61\n",
"Reversible work in kcal/kg is : 21.87\n",
"Irreversibility per kg of steam in kcal/kg is : 21.87\n"
]
}
],
"source": [
"\n",
"# Variables\n",
"h_i = 749.2;\n",
"h_o = 25.03;\n",
"T_o = 298;\t\t\t# in K\n",
"s_i = 1.6202;\n",
"s_o = 0.0877;\n",
"\n",
"# Calculations and Results\n",
"phi_i = (h_i - h_o)- (T_o * (s_i - s_o));\t\t\t# kcal/kg\n",
"print \"The availablibity before adiabatic throttling in kcal/kg is : %.2f\"%phi_i\n",
"\n",
"h_e = 749.2;\n",
"s_e = 1.6936;\n",
"phi_e = (h_e - h_o) - (T_o * (s_e - s_o));\t\t\t# in kcal/kg\n",
"print \"The availablibity before adiabatic throttling in kcal/kg is : %.2f\"%phi_e\n",
"\n",
"Wrev = phi_i - phi_e;\t\t\t# in kcal/kg\n",
"print \"Reversible work in kcal/kg is : %.2f\"%Wrev\n",
"\n",
"Wactual = 0;\n",
"i = Wrev-Wactual;\t\t\t# in kcal/kg\n",
"print \"Irreversibility per kg of steam in kcal/kg is : %.2f\"%i\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 8.7 Page No : 199"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Lost work in kcal/kg is 63.3567\n",
"Irreversebility per kg of air flow in kcal/kg is : 31.467\n"
]
}
],
"source": [
"import math \n",
"\n",
"# Variables\n",
"# del_W = T * ds - del_Q\n",
"T = 600;\t\t\t# in K\n",
"p_i = 7;\t\t\t#kgf/cm**2\n",
"p_e = 1.5;\t\t\t#kgf/cm**2\n",
"T_o = 298;\t\t\t# in K\n",
"\n",
"# Calculations and Results\n",
"R = 29.27/427;\n",
"del_W_lost = T * ( R *math.log(p_i/p_e));\t\t\t# in kcal/kg\n",
"print \"Lost work in kcal/kg is\",round(del_W_lost,4)\n",
"\n",
"i = T_o * (R * (math.log(p_i/p_e)));\t\t\t# in kcal/kg\n",
"print \"Irreversebility per kg of air flow in kcal/kg is : %.3f\"%i\n"
]
}
],
"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
}
|