summaryrefslogtreecommitdiff
path: root/Thermodynamics_An_Engineering_Approach/Chapter11.ipynb
blob: 460e3a178f418844e29f92fad1e22aa9bf2af617 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11: Refrigeration Cycles"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-1 ,Page No.613"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given values\n",
      "P1=0.14;#intial pressure in MPa\n",
      "P2=0.8;#final pressure in MPa\n",
      "m=0.05;#mass flow rate in kg/s\n",
      "\n",
      "#from refrigerant-134a tables\n",
      "h1=239.16;\n",
      "s1=0.94456;\n",
      "h2=275.39;\n",
      "h3=95.47;\n",
      "\n",
      "#calculation\n",
      "s2=s1;#isentropic process \n",
      "h4=h3;#throttling\n",
      "QL=(h1-h4)*m;\n",
      "Wm=m*(h2-h1);\n",
      "Qh=m*(h2-h3);\n",
      "COPR=QL/Wm;\n",
      "print'the rate of heat removal from the refrigerated space %f kW'%round(QL,2);\n",
      "print'the power input to the compressor %f kW'%round(Wm,2);\n",
      "print'the rate of heat rejection to the environment %f kW'%round(Qh);\n",
      "print'the COP of the refrigerator is %f'%round(COPR,2);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rate of heat removal from the refrigerated space 7.180000 kW\n",
        "the power input to the compressor 1.810000 kW\n",
        "the rate of heat rejection to the environment 9.000000 kW\n",
        "the COP of the refrigerator is 3.970000\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-2 ,Page No.615"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "m=0.05;#mass flow rate in kg/s\n",
      "P1=0.14;#inlet pressure in MPa\n",
      "T1=-10;#inlet temperature in C\n",
      "P2=0.8;#outlet pressure in MPa\n",
      "T2=50;#outlet temperature in C\n",
      "P3=0.72;#condensor pressure in MPa\n",
      "T3=26;#condensor temperature in C\n",
      "\n",
      "#from refrigerant tables\n",
      "h1=246.36;\n",
      "h2=286.69;\n",
      "h3=87.83;\n",
      "h2S=284.21;#at isentropic conditions\n",
      "\n",
      "#calculations\n",
      "h4=h3;#throttling\n",
      "QL=m*(h1-h4);\n",
      "Wm=m*(h2-h1);\n",
      "nC=(h2S-h1)/(h2-h1);\n",
      "COPR=QL/Wm;\n",
      "print'the rate of heat removal from the refrigerated space %f kW'%round(QL,2);\n",
      "print'the power input to the compressor %f kW'%round(Wm,2);\n",
      "print'the isentropic efficiency of the compressor is %f'%round(nC,3);\n",
      "print'the COP of the refrigerator is %f'%round(COPR,2);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the rate of heat removal from the refrigerated space 7.930000 kW\n",
        "the power input to the compressor 2.020000 kW\n",
        "the isentropic efficiency of the compressor is 0.939000\n",
        "the COP of the refrigerator is 3.930000\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-3 ,Page No.621"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "mA=0.05;#mass flow rate in kg/s\n",
      "P1=0.14;#inlet pressure in MPa\n",
      "P5=0.32;#pressure at heat exchanger in MPa\n",
      "P7=0.8;#oultet pressure in MPa\n",
      "\n",
      "#from tables\n",
      "h1=239.16;\n",
      "h2=255.93;\n",
      "h3=55.16;\n",
      "h5=251.88;\n",
      "h6=270.92;\n",
      "h7=95.47;\n",
      "\n",
      "#calculations\n",
      "h4=h3;#throttling\n",
      "h8=h7;#throttling\n",
      "# E out = E in\n",
      "# mA*h5 + mB*h3 = mA*h8 + mB*h2\n",
      "mB=mA*(h5-h8)/(h2-h3);\n",
      "QL=mB*(h1-h4);\n",
      "# W in = Wcomp I,in + Wcomp II,in\n",
      "Win=mA*(h6-h5)+mB*(h2-h1);\n",
      "COPR=QL/Win;\n",
      "print'the mass flow rate of the refrigerant through the lower cycle %f kg/s'%round(mB,4);\n",
      "print'the rate of heat removal from the refrigerated space %f kW'%round(QL,2);\n",
      "print'the power input to the compressor %f kW'%round(Win,2);\n",
      "print'the coefficient of performance of this cascade refrigerator is %f'%round(COPR,2);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the mass flow rate of the refrigerant through the lower cycle 0.039000 kg/s\n",
        "the rate of heat removal from the refrigerated space 7.170000 kW\n",
        "the power input to the compressor 1.610000 kW\n",
        "the coefficient of performance of this cascade refrigerator is 4.460000\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-4 ,Page No.624"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "P1=0.14;#inlet pressure in MPa\n",
      "P5=0.32;#throttled pressure in MPa\n",
      "P7=0.8;#oultet pressure in MPa\n",
      "\n",
      "#from tables\n",
      "h1=239.16;\n",
      "h2=255.93;\n",
      "h3=251.88;\n",
      "h5=95.47;\n",
      "h7=55.16;\n",
      "\n",
      "#from saturated liquid-vapour table\n",
      "#at P=0.32 MPa\n",
      "hf=55.16;\n",
      "hfg=196.71;\n",
      "\n",
      "#calculations\n",
      "h8=h7;#throttling\n",
      "h6=h5;#throttling\n",
      "#the quality at state 6\n",
      "x6=(h6-hf)/hfg;\n",
      "qL=(1-x6)*(h1-h8);\n",
      "# W in = Wcomp I,in + Wcomp II,in\n",
      "#enthalaoy at state 9\n",
      "# E out = E in\n",
      "h9=x6*h3+(1-x6)*h2;\n",
      "# s9 = s4 i.e isentropic process\n",
      "#at 0.8MPa and s4=0.9416 kJ/kg\n",
      "h4=274.48;\n",
      "Win=(1-x6)*(h2-h1)+(1)*(h4-h9);\n",
      "COPR=qL/Win;\n",
      "print'the fraction of the refrigerant that evaporates as it is throttled to the flash chamber is %f'%round(x6,4);\n",
      "print'the amount of heat removed from the refrigerated space %f kJ/kg'%round(qL,1);\n",
      "print'the compressor work per unit mass of refrigerant flowing through the condensor %f kJ/kg'%round(Win,2);\n",
      "print'the coefficient of performance is %f'%round(COPR,2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the fraction of the refrigerant that evaporates as it is throttled to the flash chamber is 0.204900\n",
        "the amount of heat removed from the refrigerated space 146.300000 kJ/kg\n",
        "the compressor work per unit mass of refrigerant flowing through the condensor 32.710000 kJ/kg\n",
        "the coefficient of performance is 4.470000\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-5 ,Page No.630"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "m=0.1;#mass flow rate in lbm/s\n",
      "T1=0+460;#refigerated space at temperature in R\n",
      "T3=80+460;#temperature of surrounding medium in R\n",
      "\n",
      "#from Table A\u201317E\n",
      "# at T1\n",
      "h1=109.90;\n",
      "Pr1=.7913;\n",
      "#pressure ratio at compressor is 4\n",
      "Pr2=4*Pr1;\n",
      "#at Pr2\n",
      "h2=163.5;\n",
      "T2=683;\n",
      "#at T3\n",
      "h3=129.06;\n",
      "Pr3=1.3860;\n",
      "#pressure ratio at compressor is 4\n",
      "Pr4=Pr3/4;\n",
      "#at Pr4\n",
      "h4=86.7;\n",
      "T4=363;\n",
      "\n",
      "#calculations\n",
      "qL=h1-h4;\n",
      "Wout=h3-h4;\n",
      "Win=h2-h1;\n",
      "COPR=qL/(Win-Wout);\n",
      "Qrefrig=m*qL;\n",
      "print'the minimum temperatures in the cycle %f F'%round(T4-460);\n",
      "print'the maximum temperatures in the cycle %f F'%round(T2-460);\n",
      "print'the coefficient of performance is %f'%round(COPR,2)\n",
      "print'the rate of refrigeration for a mass flow rate of 0.1 lbm/s. %f Btu/s'%round(Qrefrig,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the minimum temperatures in the cycle -97.000000 F\n",
        "the maximum temperatures in the cycle 223.000000 F\n",
        "the coefficient of performance is 2.060000\n",
        "the rate of refrigeration for a mass flow rate of 0.1 lbm/s. 2.320000 Btu/s\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11-6 ,Page No.636"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#given data\n",
      "COPR=0.1;#refrigerator COP\n",
      "T1=20;#intial temp in C\n",
      "T2=4;#final temp in C\n",
      "t=30*60;#total time required in sec\n",
      "V=0.350;#volumne of can in L\n",
      "\n",
      "#constants used\n",
      "p=1;#on kg/L\n",
      "c=4.18;#in kJ/kg-C from Table A-3\n",
      "\n",
      "#calculations\n",
      "m=p*V;\n",
      "Qcooling=m*c*(T1-T2)/t*1000;#converted in W by multiplying by 1000\n",
      "Win=Qcooling/COPR;\n",
      "print'the average electric power consumed by the thermoelectric refrigerator %i W'%round(Win)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the average electric power consumed by the thermoelectric refrigerator 130 W\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}