summaryrefslogtreecommitdiff
path: root/Elementary_heat_Power/Chapter3.ipynb
blob: cc59281401035acc8eb3437c902354e2b45055f7 (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
{
 "metadata": {
  "name": "EHP-3"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Internal Combustion Engines"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.1 , Page 131"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nre=6.0\nk=1.4\n\n#calculations\nnt=1-1/re**(k-1)\nntt=nt*100  #efficiency\n\n#results\nprint \"Thermal efficiency in percent\",round(ntt,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Thermal efficiency in percent 51.164\n"
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.2,Page 132"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nd=3.25 #in\nstroke=4.0 #in\nv=6.0 #cu in\n\n#calculations\nDp=d**2 *pi*stroke/4\nr=(Dp+v)/v #compression ratio\n\n#results\nprint \"Compression ratio \",round(r,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Compression ratio  6.531\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.3,Page 133"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nper=20.0\nDp=100.0\n\n#calculations\nr=Dp/per +1\n\n#results\nprint \"Compression ratio \",round(r,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Compression ratio  6.0\n"
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.4,Page 136"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nr=16.0\nrc=4.0\nk=1.4\n\n#calculations\netat=1-1/r**(k-1) *((rc**k -1)/(k*(rc-1)))\neta=etat*100; #efficiency\n\n#results\nprint \"Thermal efficiency in percent\",round(eta,3)\nprint \"The answer is a bit different due to rounding off error in the textbook\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Thermal efficiency in percent 53.154\nThe answer is a bit different due to rounding off error in the textbook\n"
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.5,Page 142"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nF=200 #lb\narea=1.65 #sq. in\nlength=3.5 #in\n\n#calculations\nord=area/length\nmep=ord*F\n\n#results\nprint \"MEP of an engine in psi\",round(mep,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "MEP of an engine in psi 94.286\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.6,Page 143"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nPi=90 #psi\nL=5.0/12.0 #ft\nr=5.0 #in\nx=1.5 #ft\nrpm=1500.0 #rpm\n\n#calculations\nA=pi*x*x\nN=rpm*4/2\nIhp=Pi*L*A*N/33000.0\n\n#results\nprint \"IHP of cylinder \",round(Ihp,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "IHP of cylinder  24.097\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.7,Page 144"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nr=4.0 #ft\nn=300.0 #rpm\nF=60.0 #lb\n\n#calculations\nBhp=2*pi*r*F*n/33000\n\n#results\nprint \"Bhp of the engine \",round(Bhp,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Bhp of the engine  13.709\n"
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.8,Page 147"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nC=1.0/4000.0\nF=125.0 #lb\nn=3500 #rpm\n\n#calculations\nBhp=F*n*C\n\n#results\nprint \"Bhp of the engine \",round(Bhp,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Bhp of the engine  109.375\n"
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.9,Page 151"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nr=1.75 #ft\nF1=72.0 #lb\nF2=24.0 #lb\nn=500.0 #rpm\nm=1.8 #lb\nmi=15.0 #min\nQh=20000.0 #Btu/lb\n\n#calculations\nBhp=2*pi*r*F1*n/33000.0\nFhp=2*pi*r*F2*n/33000.0\nIhp=Bhp+Fhp\nFc=m*60/mi\nBsfc=Fc/Bhp\nIsfc=Fc/Ihp\netam=Bhp/Ihp *100\netabt=Bhp*2545/(Fc*Qh)\netait=Ihp*2545/(Fc*Qh)\n\n#results\nprint \"Thermal efficiency in percent\",round(etam,3)\nprint \" Brake thermal effficiency in percent\",round(etabt*100,3)\nprint \" Indicated thermal effficiency in percent\",round(etait*100,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Thermal efficiency in percent 75.0\n Brake thermal effficiency in percent 21.2\n Indicated thermal effficiency in percent 28.266\n"
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.10,Page 191"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nbore=3.0 #in\nstroke=4.0 #in\nrpm=3000.0 #rpm\nair=110.0 #cu ft per min\n\n#calculations\npdv=bore*bore*pi*stroke*2*bore/4\npde=pdv*rpm /2\nreq=air*1728\neff=req/pde *100; #efficiency\n\n#results\nprint \"Volumetric efficiency in percent\",round(eff,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Volumetric efficiency in percent 74.697\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 3.11, Page 244"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nx1=11.5 # CO2\nx2=4.1  #CO\nx3=0.4  #O2\nx4=2.3 # H2\nx5=0.2 #CH4\nx6=81.5 #N2\nyc=0.842 #lb of C \nyh=0.158 #lb of H2\nbasis=1\nbhp=100\nburn=8.9 #gal/hr\nsg=0.731\nQh=20750.0 #Btu/lbm\nrate=66.0 #gpm\nex=1100.0 #F\nair=70.0 #F\ncp=0.254\nh2=4330.0 #btu/lb\nh4=62000.0 #btu/lb \nh5=23700.0 #btu/lb\n\n#calculations\nc1=x1*44 #mass CO2\nc2=x2*28 #mass CO\nc3=x3*32 #mass O2\nc4=x4*2 #mass H2\nc5=x5*16 #mass CH4\nc6=x6*28 #mass N2\nsumm=c1+c2+c3+c4+c5+c6\ncarbon=x1*12 + x2*12+x5*12\nhydrogen=x4*2+x5*4\nlbdrygas=summ/carbon *yc\nlbfuel=carbon/yc\nlbH=lbfuel*yh\nlbH2=lbH-hydrogen\nlb3=lbH2*9\nlbwater=lb3/lbfuel\nlbair=lbdrygas+lbwater-basis\nbsfc=burn*sg*8.33/bhp\nfuelmin=bsfc*bhp/60\nenergy=2545/bsfc\nper1=energy/Qh #energy supplied\nEc=rate*8.33*10\nEclb=Ec/fuelmin\nper2=Eclb/Qh #energy absorbed\ndryloss=(ex-air)*cp*lbdrygas\nper3=dryloss/Qh #energy lost\nhv2=h2*c2/lbfuel\nhv4=h4*c4/lbfuel\nhv5=h5*c5/lbfuel\nhv=hv2+hv4+hv5\nper4=hv/Qh #energy supplied\neh2=lbwater*(1066+0.5*ex-air)\nper5=eh2/Qh #energy supplied\nrad=1017 \nper6=rad/Qh; #energy supplied\n\n#results\nprint \"Air supplied per lb of fuel in lb air per lb fuel\",round(lbair,3)\nprint \"Percentage of energy supplied utilized in Btu in percent\",round(per1*100,3)\nprint  \"Percentage of energy absorbed by coolant in percent\",round(per2*100,3)\nprint \"Energy lost in sensible heat in percent\",round(per3*100,3)\nprint \"Energy supplied in combustiles in exhaust in percent\",round(per4*100,3)\nprint \"Energy supplied in water formed by combustion in percent\",round(per5*100,3)\nprint \"Energy supplied unaccounted for in percent\",round(per6*100,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Air supplied per lb of fuel in lb air per lb fuel 13.189\nPercentage of energy supplied utilized in Btu in percent 22.632\nPercentage of energy absorbed by coolant in percent 29.334\nEnergy lost in sensible heat in percent 16.369\nEnergy supplied in combustiles in exhaust in percent 18.366\nEnergy supplied in water formed by combustion in percent 8.987\nEnergy supplied unaccounted for in percent 4.901\n"
      }
     ],
     "prompt_number": 27
    }
   ],
   "metadata": {}
  }
 ]
}