summaryrefslogtreecommitdiff
path: root/Thermodynamics_by_F_P_Durham/chapter10.ipynb
blob: c9d863daa796b63c33d44e945a77081909aa5754 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:290fc441b8b16bf79982880c80bb6a81fed30d12de1c6a3c7f5a66a567e435bd"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10: Refrigeration"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.1, page no. 193"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialization\n",
      "capacity = 5.0                 #tons\n",
      "hp = 10.0                       #hp\n",
      "\n",
      "#calculation\n",
      "beta = (778*3.33*capacity)/(hp*550)\n",
      "\n",
      "#result\n",
      "print \"Coefficient of performance  = \", round(beta, 2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coefficient of performance  =  2.36\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.2, page no. 197"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialization\n",
      "P1 = 30.0                   #lb/in^2\n",
      "P2 = 200.0                  #lb/in^2\n",
      "capacity = 3.0              #tons\n",
      "\n",
      "#calculation\n",
      "#From the pressure enthalpy chart\n",
      "Tt1 =  -1                   #F\n",
      "st1 = 1.34\n",
      "ht1 = 612.0\n",
      "ht2 = 733.0\n",
      "ht3 = 141.0\n",
      "ht4 = 141.0\n",
      "WbyJ = ht2-ht1\n",
      "Q = ht1-ht3\n",
      "beta = Q/WbyJ\n",
      "Qdot = capacity*3.33\n",
      "wdot = Qdot/Q\n",
      "Power = wdot*778*WbyJ\n",
      "Power = Power/550.0\n",
      "\n",
      "#result\n",
      "print \"Coefficient of performance  =  \", round(beta, 2)\n",
      "print \"Evarator temperature  =  %d F\" %Tt1\n",
      "print \"Power required  =  %.2f hp\" %Power\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coefficient of performance  =   3.89\n",
        "Evarator temperature  =  -1 F\n",
        "Power required  =  3.63 hp\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10.3, page no. 200"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#initialization\n",
      "P1 = 14.0                   #lb/in^2\n",
      "P2 = 60.0                   #lb/in^2\n",
      "Tt1 = 80+460.0              #R\n",
      "Tt4 = -20+460.0             #R\n",
      "m = 30.0                    #lbm/sec\n",
      "cp = 0.24\n",
      "\n",
      "#calculation\n",
      "Tt2 = round(Tt1*(P2/P1)**(0.286))\n",
      "Tt3 = round(Tt4*(P2/P1)**(0.286))\n",
      "WbyJ1 = cp*(Tt2-Tt1)\n",
      "WbyJ2 = cp*(Tt3-Tt4)\n",
      "Q = cp*(Tt1-Tt4)\n",
      "beta = Q/(WbyJ1-WbyJ2)\n",
      "Power = (m*778)*(WbyJ1-WbyJ2)\n",
      "Wdot = Power/550.0\n",
      "\n",
      "#result\n",
      "print \"Coefficient of performance  =  %.3f\" %beta\n",
      "print \"Net power  =  %d hp\" %Wdot\n",
      "\n",
      "#difference in answer due to rounding of in Python"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Coefficient of performance  =  1.923\n",
        "Net power  =  529 hp\n"
       ]
      }
     ],
     "prompt_number": 24
    }
   ],
   "metadata": {}
  }
 ]
}