summaryrefslogtreecommitdiff
path: root/Mechanical_Engineering_Thermodynamics_by_Mooney_D_A/Chapter_22.ipynb
blob: 4a1a7d0c5a10b3f5c25c4b905a801890bc1bd43f (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 22 - Combustion Processes :  First law analysis"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5 - Pg 419"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the heat transferred from the system\n",
      "#initialization of varaibles\n",
      "mO=1.33\n",
      "CO=0.155\n",
      "mC=3.67\n",
      "CC=0.165\n",
      "t2=1000. #F\n",
      "tb=68. #F\n",
      "t1=300. #F\n",
      "mC2=1.\n",
      "CC2=0.17\n",
      "mO2=4.\n",
      "CO2=0.155\n",
      "H=-14087 #B/lb\n",
      "#calculations\n",
      "dE2=mO*CO*(t2-tb) + mC*CC*(t2-tb)\n",
      "dE1=mO2*CO2*(tb-t1) + mC2*CC2*(tb-t1)\n",
      "Q=dE2+dE1+H\n",
      "#results\n",
      "print '%s %d %s' %(\"Heat transfer from the system =\",Q,\"Btu\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Heat transfer from the system = -13513 Btu\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6 - Pg 422"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the cp value of methane\n",
      "#initialization of varaibles\n",
      "H1=17889 #Cal/g\n",
      "H2=-94052 #Cal/g\n",
      "H3=2* -68317 #Cal/g\n",
      "#calculations\n",
      "x=H1+H2+H3\n",
      "#results\n",
      "print '%s %d %s' %(\"Constant pressure heating value of methane =\",x,\" cal/gm formula wt.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Constant pressure heating value of methane = -212797  cal/gm formula wt.\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7 - Pg 423"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the cv value of methane\n",
      "#initialization of varaibles\n",
      "HV=4344 #B/lb\n",
      "xC=56 #lb\n",
      "R=1.986\n",
      "T=530 #R\n",
      "MC=56 #g/mol\n",
      "#calculations\n",
      "HR=xC*HV\n",
      "Eb=-HR -R*T*(2-3)\n",
      "HV=-Eb/MC\n",
      "#results\n",
      "print '%s %d %s' %(\"COnstant volume heating value =\",HV,\"B/lb \")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "COnstant volume heating value = 4325 B/lb \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8 - Pg 426"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the products temperature\n",
      "#initialization of varaibles\n",
      "dH2=14087 #B/lb\n",
      "xc=3.67 #lb\n",
      "xN=8.78 #lb\n",
      "tb=100 #F\n",
      "#calculations\n",
      "dt2=dH2/(xc*0.196 + xN*0.248)\n",
      "t2=dt2+tb\n",
      "#results\n",
      "print '%s %d %s' %(\"products temperature =\",t2,\"F\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "products temperature = 4963 F\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9 - Pg 430"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the efficiency\n",
      "#initialization of varaibles\n",
      "Heat=14087 #Btu/lb\n",
      "x1=0.9 #lb\n",
      "x2=0.05 #lb\n",
      "x3=0.05 #lb\n",
      "Heat2=3952 #Btu/lb\n",
      "#calculations\n",
      "h1=x1*Heat\n",
      "h2=x2*Heat2\n",
      "e=(h1+h2)/Heat\n",
      "#results\n",
      "print '%s %.2f' %(\"Efficiency = \",e)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Efficiency =  0.91\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 10 - Pg 431"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the efficiency of the process\n",
      "#initialization of varaibles\n",
      "print '%s' %(\"From data and steam tables,\")\n",
      "Q=10240000. #B/hr\n",
      "w=700. #lb/hr\n",
      "h=19500. #B/lb\n",
      "#calculations\n",
      "HV=w*h\n",
      "e=Q/HV\n",
      "#results\n",
      "print '%s %.2f' %(\"Efficiency = \",e)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "From data and steam tables,\n",
        "Efficiency =  0.75\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}