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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 06:Second Law of Thermodynamics"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.1:pg-138"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 6.1\n",
"\n",
" Least rate of heat rejection is 0 kW\n"
]
}
],
"source": [
"import math\n",
"T1 = 800 # Source temperature in degree Celsius\n",
"\n",
"T2 = 30 # Sink temperature in degree Celsius\n",
"\n",
"e_max = 1-((T2+273)/(T1+273)) # maximum possible efficiency \n",
"\n",
"Wnet = 1 # in kW\n",
"\n",
"Q1 = Wnet/e_max # Least rate of heat required in kJ/s\n",
"\n",
"Q2 = Q1-Wnet # Least rate of heat rejection kJ/s\n",
"\n",
"\n",
"\n",
"print \"\\n Example 6.1\"\n",
"\n",
"print \"\\n Least rate of heat rejection is \",Q2,\" kW\"\n",
"\n",
"#The answers vary due to round off error\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.2:pg-139"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 6.2\n",
"\n",
" Least Power necessary to pump the heat out is 0.31 kW\n"
]
}
],
"source": [
"import math\n",
"T1 = -15 # Source temperature in degree Celsius\n",
"\n",
"T2 = 30 # Sink temperature in degree Celsius\n",
"\n",
"Q2 = 1.75 # in kJ/sec\n",
"\n",
"print \"\\n Example 6.2\"\n",
"\n",
"W= Q2*((T2+273)-(T1+273))/(T1+273) # Least Power necessary to pump the heat out\n",
"\n",
"print \"\\n Least Power necessary to pump the heat out is \",round(W,2),\"kW\"\n",
" \n",
" #The answers vary due to round off error\n",
" \n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.3:pg-140"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 6.3\n",
"\n",
"\n",
" Part A:\n",
"\n",
" The heat transfer to refrigerant is 0.0 kJ\n",
"\n",
" The heat rejection to the 40 degree reservoir is 8200.0 kJ\n",
"\n",
"\n",
" Part B:\n",
"\n",
" The heat transfer to refrigerant is 1200.0 kJ\n",
"\n",
" The heat rejection to the 40 degree reservoir is 2344.0 kJ\n"
]
}
],
"source": [
"import math\n",
"#Given \n",
"\n",
"T1 = 600 # Source temperature of heat engine in degree Celsius\n",
"\n",
"T2 = 40 # Sink temperature of heat engine in degree Celsius \n",
"\n",
"T3 = -20 # Source temperature of refrigerator in degree Celsius\n",
"\n",
"Q1 = 2000 # Heat transfer to heat engine in kJ\n",
"\n",
"W = 360 # Net work output of plant in kJ\n",
"\n",
"# Part (a)\n",
"\n",
"e_max = 1.0-((T2+273)/(T1+273)) # maximum efficiency \n",
"\n",
"W1 = e_max*Q1 # maximum work output \n",
"\n",
"COP = (T3+273)/((T2-273)-(T3-273)) # coefficient of performance of refrigerator\n",
"\n",
"W2 = W1-W # work done to drive refrigerator \n",
"\n",
"Q4 = COP*W2 # Heat extracted by refrigerator\n",
"\n",
"Q3 = Q4+W2 # Heat rejected by refrigerator\n",
"\n",
"Q2 = Q1-W1 # Heat rejected by heat engine\n",
"\n",
"Qt = Q2+Q3 # combined heat rejection by heat engine and refrigerator \n",
"\n",
"print \"\\n Example 6.3\"\n",
"\n",
"print \"\\n\\n Part A:\"\n",
"\n",
"print \"\\n The heat transfer to refrigerant is \",round(Q2,3) ,\" kJ\"\n",
"\n",
"print \"\\n The heat rejection to the 40 degree reservoir is \",round(Qt,3) ,\" kJ\"\n",
"\n",
"\n",
"\n",
"# Part (b)\n",
"\n",
"print \"\\n\\n Part B:\"\n",
"\n",
"e_max_ = 0.4*e_max # maximum efficiency\n",
"\n",
"W1_ = e_max_*Q1 # maximum work output \n",
"\n",
"W2_ = W1_-W # work done to drive refrigerator \n",
"\n",
"COP_ = 0.4*COP # coefficient of performance of refrigerator\n",
"\n",
"Q4_ = COP_*W2_ # Heat extracted by refrigerator\n",
"\n",
"Q3_ = Q4_+W2_ # Heat rejected by refrigerator\n",
"\n",
"Q2_ = Q1-W1_ # Heat rejected by heat engine\n",
"\n",
"QT = Q2_+Q3_# combined heat rejection by heat engine and refrigerator \n",
"\n",
"print \"\\n The heat transfer to refrigerant is \",round(Q2_,3) ,\" kJ\"\n",
"\n",
"print \"\\n The heat rejection to the 40 degree reservoir is \",round(QT,3) ,\" kJ\"\n",
"\n",
"#The answers vary due to round off error\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.5:pg-142"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 6.5\n",
"\n",
" The multiplication factor is 6\n"
]
}
],
"source": [
"import math\n",
"T1 = 473 # Boiler temperature in K\n",
"\n",
"T2 = 293 # Home temperature in K\n",
"\n",
"T3 = 273 # Outside temperature in K\n",
"\n",
"print \"\\n Example 6.5\"\n",
"\n",
"MF = (T2*(T1-T3))/(T1*(T2-T3)) \n",
"\n",
"print \"\\n The multiplication factor is \",MF \n",
"\n",
"#The answers vary due to round off error\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.6:pg-144"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 6.6\n",
"\n",
" Minimum area required for the collector plate is 10.0 m**2\n"
]
}
],
"source": [
"import math\n",
"T1 = 90.0 # Operating temperature of power plant in degree Celsius \n",
"\n",
"T2 = 20.0 # Atmospheric temperature in degree Celsius\n",
"\n",
"W = 1.0 # Power production from power plant in kW\n",
"\n",
"E = 1880 # Capability of energy collection in kJ/m**2 h\n",
"\n",
"\n",
"\n",
"print \"\\n Example 6.6\"\n",
"\n",
"e_max = 1.0-((T2+273.0)/(T1+273.0)) # maximum efficiency\n",
"\n",
"Qmin = W/e_max # Minimum heat requirement per second\n",
"\n",
"Qmin_ = Qmin*3600.0 # Minimum heat requirement per hour\n",
"\n",
"Amin = Qmin_/E # Minimum area requirement\n",
"\n",
"print \"\\n Minimum area required for the collector plate is \",math. ceil(Amin) ,\" m**2\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.7:pg-144"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Example 6.7\n",
"\n",
" Area of the panel 0.167221895617 m**2\n"
]
}
],
"source": [
"import math\n",
"T1 = 1000 # Temperature of hot reservoir in K\n",
"\n",
"W = 1000 # Power requirement in kW\n",
"\n",
"K = 5.67e-08 # constant \n",
"\n",
"print \"\\n Example 6.7\"\n",
"\n",
"Amin = (256*W)/(27*K*T1**4) # minimum area required\n",
"\n",
"print \"\\n Area of the panel \",Amin ,\" m**2\"\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.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|