summaryrefslogtreecommitdiff
path: root/Elements_of_Thermodynamics_and_heat_transfer/Chapter_14_1.ipynb
blob: f953d99a09862711899636b0ace202792b6cbcdf (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
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
{
 "metadata": {
  "name": "",
  "signature": "sha256:6c33bc146fd289fab423bb4c093c8f33bd27dc001258cc7dbd47055d0bcb3468"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 14 - Psychrometrics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1 - Pg 257"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the partial pressures, dew temperature and density of air, water and specific humidity, Degree of saturation\n",
      "#Initialization of variables\n",
      "t1=80+460 #R\n",
      "ps=0.5069 #psia\n",
      "print '%s' %(\"from steam tables,\")\n",
      "vs=633.1 #ft^3/lbm\n",
      "phi=0.3\n",
      "R=85.6\n",
      "Ra=53.3\n",
      "p=14.696\n",
      "#calculations\n",
      "tdew=46. #F\n",
      "pw=phi*ps\n",
      "rhos=1/vs\n",
      "rhow=phi*rhos\n",
      "rhow2= pw*144/(R*t1)\n",
      "pa=p-pw\n",
      "rhoa= pa*144/(Ra*t1)\n",
      "w=rhow/rhoa\n",
      "mu=phi*(p-ps)/(p-pw)\n",
      "Ws=0.622*(ps/(p-ps))\n",
      "mu2=w/Ws\n",
      "#results\n",
      "print '%s' %(\"part a\")\n",
      "print '%s %.5f %s' %(\"partial pressure of water =\",pw,\"psia\")\n",
      "print '%s %d %s' %(\"\\n dew temperature =\",tdew,\"F\")\n",
      "print '%s' %(\"part b\")\n",
      "print '%s %.6f %s' %(\"density of water =\",rhow,\"lbm/ft^3\")\n",
      "print '%s %.6f %s' %(\"\\n in case 2, density of water =\",rhow2,\"lbm/ft^3\")\n",
      "print '%s %.6f %s' %(\"\\n density of air =\",rhoa,\"lbm/ft^3\")\n",
      "print '%s' %(\"part c\")\n",
      "print '%s %.4f %s' %(\"specific humidity  =\",w,\"lbm steam/lbm air\")\n",
      "print '%s' %(\"part d\")\n",
      "print '%s %.3f' %(\"In method 1, Degree of saturation = \",mu)\n",
      "print '%s %.3f' %(\"\\n In method 2, Degree of saturation = \",mu2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "from steam tables,\n",
        "part a\n",
        "partial pressure of water = 0.15207 psia\n",
        "\n",
        " dew temperature = 46 F\n",
        "part b\n",
        "density of water = 0.000474 lbm/ft^3\n",
        "\n",
        " in case 2, density of water = 0.000474 lbm/ft^3\n",
        "\n",
        " density of air = 0.072765 lbm/ft^3\n",
        "part c\n",
        "specific humidity  = 0.0065 lbm steam/lbm air\n",
        "part d\n",
        "In method 1, Degree of saturation =  0.293\n",
        "\n",
        " In method 2, Degree of saturation =  0.293\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2 - Pg 258"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the change in moisture content and change in moisture content\n",
      "#Initialization of variables\n",
      "p=14.696 #psia\n",
      "ps=0.0808  #psia\n",
      "ps2=0.5069 #psia\n",
      "phi2=0.5\n",
      "phi=0.6\n",
      "grain=7000.\n",
      "#calculations\n",
      "pw=phi*ps\n",
      "w1=0.622*pw/(p-pw)\n",
      "pw2=phi2*ps2\n",
      "w2=0.622*pw2/(p-pw2)\n",
      "dw=w2-w1\n",
      "dwg=dw*grain\n",
      "#results\n",
      "print '%s %.6f %s' %(\"change in moisture content =\",dw,\" lbm water/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n in grains, change =\",dwg,\"  grains water/lbm dry air\")\n",
      "print '%s' %(\"The answers are a bit different due to rounding off error in textbook\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "change in moisture content = 0.008857  lbm water/lbm dry air\n",
        "\n",
        " in grains, change = 62.00   grains water/lbm dry air\n",
        "The answers are a bit different due to rounding off error in textbook\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3 - Pg 264"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the humidity ratio and relative humidity\n",
      "#Initialization of variables\n",
      "t1=80. #F\n",
      "t2=60. #F\n",
      "p=14.696 #psia\n",
      "ps=0.507 #psia\n",
      "pss=0.256 #psia\n",
      "cp=0.24\n",
      "#calculations\n",
      "ws=0.622*pss/(p-pss)\n",
      "w=(cp*(t2-t1) + ws*1060)/(1060+ 0.45*(t1-t2))\n",
      "pw=w*p/(0.622+w)\n",
      "phi=pw/ps*100\n",
      "td=46. #F\n",
      "#results\n",
      "print '%s %.4f %s' %(\"\\n humidity ratio =\",w,\"lbm/lbm dry air\")\n",
      "print '%s %.1f %s' %(\"\\n relative humidity  =\",phi,\" percent\")\n",
      "print '%s %d %s' %(\"\\n Dew point =\",td,\"F\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        " humidity ratio = 0.0064 lbm/lbm dry air\n",
        "\n",
        " relative humidity  = 29.7  percent\n",
        "\n",
        " Dew point = 46 F\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4 - Pg 264"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the enthalpy and sigma function\n",
      "#Initialization of variables\n",
      "W=0.0065  #lbm/lbm of dry air\n",
      "t=80. #F\n",
      "td=60. #F\n",
      "#calculations\n",
      "H=0.24*t+W*(1060+0.45*t)\n",
      "sig=H-W*(td-32)\n",
      "Ws=0.0111\n",
      "H2=0.24*td+Ws*(1060+0.45*td)\n",
      "sig2=H2-Ws*(td-32)\n",
      "#results\n",
      "print '%s %.2f %s' %(\"In case 1, enthalpy =\",H,\" Btu/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n In case 1, sigma function =\",sig,\" Btu/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n In case 2, enthalpy =\",H2,\" Btu/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n In case 2, sigma function =\",sig2,\" Btu/lbm dry air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "In case 1, enthalpy = 26.32  Btu/lbm dry air\n",
        "\n",
        " In case 1, sigma function = 26.14  Btu/lbm dry air\n",
        "\n",
        " In case 2, enthalpy = 26.47  Btu/lbm dry air\n",
        "\n",
        " In case 2, sigma function = 26.15  Btu/lbm dry air\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5 - Pg 264"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Enthalpy and heat added\n",
      "#Initialization of variables\n",
      "t1=30. #F\n",
      "t2=60. #F\n",
      "t3=80. #F\n",
      "W1=0.00206\n",
      "W2=0.01090\n",
      "#calculations\n",
      "cm1=0.24+0.45*W1\n",
      "H1=cm1*t1+W1*1060\n",
      "cm2=0.24+0.45*W2\n",
      "H2=cm2*t3+W2*1060\n",
      "hf=t2-32\n",
      "dq=H2-H1-(W2-W1)*hf\n",
      "#results\n",
      "print '%s %.2f %s' %(\"In case 1, Enthalpy =\",H1,\" Btu/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n In case 2, Enthalpy =\",H2,\" Btu/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n Heat added =\",dq,\" Btu/lbm dry air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "In case 1, Enthalpy = 9.41  Btu/lbm dry air\n",
        "\n",
        " In case 2, Enthalpy = 31.15  Btu/lbm dry air\n",
        "\n",
        " Heat added = 21.49  Btu/lbm dry air\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6 - Pg 265"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the partial pressure and dew temperature, density of air, water and specific humidity\n",
      "#Initialization of variables\n",
      "pw=0.15#psia\n",
      "print '%s' %(\"using psychrometric charts,\")\n",
      "tdew=46 #F\n",
      "#calculations\n",
      "va=13.74 #ft^3/lbm dry air\n",
      "rhoa=1./va\n",
      "V=13.74\n",
      "mw=46/7000.\n",
      "rhow=mw/V\n",
      "w=0.00657\n",
      "#results\n",
      "print '%s' %(\"part a\")\n",
      "print '%s %.2f %s' %(\"partial pressure of water =\",pw,\" psia\")\n",
      "print '%s %d %s' %(\"\\n dew temperature =\",tdew,\"F\")\n",
      "print '%s' %(\"part b\")\n",
      "print '%s %.6f %s' %(\"density of water =\",rhow,\"lbm/ft^3\")\n",
      "print '%s %.4f %s' %(\"\\n density of air =\",rhoa,\"lbm/ft^3\")\n",
      "print '%s' %(\"part c\")\n",
      "print '%s %.5f %s' %(\"specific humidity  =\",w,\"lbm steam/lbm air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "using psychrometric charts,\n",
        "part a\n",
        "partial pressure of water = 0.15  psia\n",
        "\n",
        " dew temperature = 46 F\n",
        "part b\n",
        "density of water = 0.000478 lbm/ft^3\n",
        "\n",
        " density of air = 0.0728 lbm/ft^3\n",
        "part c\n",
        "specific humidity  = 0.00657 lbm steam/lbm air\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7 - Pg 266"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the Enthalpy change\n",
      "#Initialization of variables\n",
      "W1=0.00206 #lbm/lbm dry air\n",
      "W2=0.01090 #lbm/lbm dry air\n",
      "t=60 #F\n",
      "#calculations\n",
      "dw=W1-W2\n",
      "\n",
      "hs=144.4\n",
      "hs2=66.8-32\n",
      "w1=14.4 #Btu/lbm\n",
      "ws1=20 #Btu/lbm\n",
      "w2=76.3 #Btu/lbm\n",
      "ws2=98.5 #Btu/lbm\n",
      "dwh1=-(w1-ws1)/7000. *hs\n",
      "H1=9.3+dwh1\n",
      "dwh2=(w2-ws2)/7000. *hs2\n",
      "H2=31.3+dwh2\n",
      "dwc=dw*(t-32)\n",
      "dq=H2-H1+dwc\n",
      "#results\n",
      "print '%s %.2f %s' %(\"Enthalpy change =\",dq,\" Btu/lbm dry air\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Enthalpy change = 21.53  Btu/lbm dry air\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8 - Pg 267"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the humidity and Temperature\n",
      "#Initialization of variables\n",
      "print '%s' %(\"From psychrometric charts,\")\n",
      "va1=13 #ft^3/lbm dry air\n",
      "va2=13.88 #ft^3/lbm dry air\n",
      "flow=2000. #cfm\n",
      "#calculations\n",
      "ma1= flow/va1\n",
      "ma2=flow/va2\n",
      "t=62.5# F\n",
      "phi=0.83 #percent\n",
      "#results\n",
      "print '%s %.2f' %(\"humidity = \",phi)\n",
      "print '%s %.1f %s' %(\"\\n Temperature =\",t,\" F\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "From psychrometric charts,\n",
        "humidity =  0.83\n",
        "\n",
        " Temperature = 62.5  F\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9 - Pg 270"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the dry bulb temperature and percent humidity\n",
      "#Initialization of variables\n",
      "t=90 #F\n",
      "ts=67.2 #F\n",
      "phi=0.3\n",
      "per=0.8\n",
      "#calculations\n",
      "dep=t-ts\n",
      "dt=dep*per\n",
      "tf=t-dt\n",
      "print '%s' %(\"from psychrometric charts,\")\n",
      "phi2=0.8\n",
      "#results\n",
      "print '%s %.2f %s' %(\"Dry bulb temperature =\",tf,\" F\")\n",
      "print '%s %.2f' %(\"\\n percent humidity  = \",phi2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "from psychrometric charts,\n",
        "Dry bulb temperature = 71.76  F\n",
        "\n",
        " percent humidity  =  0.80\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10 - Pg 271"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the cooling range and Approach. Also calculate the amount of water cooled and percentage of water lost \n",
      "#Initialization of variables\n",
      "m=1. #lbm\n",
      "t1=100. #F\n",
      "t2=75. #F\n",
      "db=65. #F\n",
      "print '%s' %(\"From psychrometric charts,\")\n",
      "t11=82 #F\n",
      "phi1=0.4\n",
      "H1=30. #Btu/lbm dry air\n",
      "w1=65. #grains/lbm dry air\n",
      "w2=250. #grains/lbm dry air\n",
      "#calculations\n",
      "cr=t1-t2\n",
      "appr=t2-db\n",
      "dmf3=(w2-w1)*0.0001427\n",
      "hf3=68.\n",
      "hf4=43.\n",
      "H2=62.2\n",
      "H1=30.\n",
      "mf4= (H1-H2+ dmf3*hf3)/(hf4-hf3)\n",
      "per=dmf3/(dmf3+mf4)*100\n",
      "#results\n",
      "print '%s %d %s' %(\"cooling range =\",cr,\"F\")\n",
      "print '%s %d %s' %(\"\\n Approach =\",appr,\"F\")\n",
      "print '%s %.3f %s' %(\"\\n amount of water cooled per pound of dry air =\",mf4,\"lbm dry air/lbm dry air\")\n",
      "print '%s %.2f %s' %(\"\\n percentage of water lost by evaporation =\",per,\"percent\")\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "From psychrometric charts,\n",
        "cooling range = 25 F\n",
        "\n",
        " Approach = 10 F\n",
        "\n",
        " amount of water cooled per pound of dry air = 1.216 lbm dry air/lbm dry air\n",
        "\n",
        " percentage of water lost by evaporation = 2.12 percent\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}