summaryrefslogtreecommitdiff
path: root/Basic_And_Applied_Thermodynamics_by_P._K._Nag/Chapter03.ipynb
blob: e3ca6603b318cc0cfa8adb8d1d034fb220c21177 (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
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 03:Work and Heat Transfer"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex3.1:pg-54"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Example 3.1\n",
      "\n",
      " The amount of work done upon the atmosphere by the balloon is  50.6625  kJ\n"
     ]
    }
   ],
   "source": [
    "dV = 0.5 # Change in volume in m**3\n",
    "\n",
    "P = 101.325e03 # Atmospheric pressure in N/m**2\n",
    "\n",
    "Wd = P*dV # Work done in J\n",
    "\n",
    "print \"\\n Example 3.1\"\n",
    "\n",
    "print \"\\n The amount of work done upon the atmosphere by the balloon is \",Wd/1e3,\" kJ\",\n",
    "\n",
    "#The answers vary due to round off error\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex3.2:pg-55"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Example 3.2\n",
      "\n",
      " The displacement work done by the air is  60.795  kJ\n"
     ]
    }
   ],
   "source": [
    "dV = 0.6 # Volumetric change in m**3\n",
    "\n",
    "P = 101.325e03 # Atmospheric pressure in N/m**2\n",
    "\n",
    "Wd = P*dV # Work done in J\n",
    "\n",
    "print \"\\n Example 3.2\"\n",
    "\n",
    "print \"\\n The displacement work done by the air is \",Wd/1e3 ,\" kJ\"\n",
    "\n",
    "#The answers vary due to round off error\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex3.3:pg-55"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Example 3.3\n",
      "\n",
      " The net work transfer for the system is  -57.19  kJ\n"
     ]
    }
   ],
   "source": [
    "# Given that\n",
    "\n",
    "T = 1.275 # Torque acting against the fluid in mN\n",
    "\n",
    "N = 10000 # Number of revolutions\n",
    "\n",
    "W1 = 2*math.pi*T*1e-3*N # Work done by stirring device upon the system\n",
    "\n",
    "P = 101.325e03 # Atmospheric pressure in kN/m**2\n",
    "\n",
    "d = 0.6 # Piston diameter in m\n",
    "\n",
    "A = (math.pi/4)*(d)**2 # Piston area in m\n",
    "\n",
    "L = 0.80 # Displacement of diameter in m\n",
    "\n",
    "W2 = (P*A*L)/1000 # Work done by the system on the surroundings i KJ\n",
    "\n",
    "W = -W1+W2 # net work transfer for the system\n",
    "print \"\\n Example 3.3\"\n",
    "print \"\\n The net work transfer for the system is \",round(W,2) ,\" kJ\"\n",
    "#The answers vary due to round off error\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex3.4:pg-56"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Example 3.4\n",
      "\n",
      " The rate of work transfer from gas to the piston is  24383.7855401  kW\n"
     ]
    }
   ],
   "source": [
    "# Given that\n",
    "\n",
    "ad = 5.5e-04 # Area of indicator diagram in m**2\n",
    "\n",
    "ld = 0.06 # Length of diagram in m\n",
    "\n",
    "k = 147 # Spring value in MPa/m\n",
    "\n",
    "w = 150 # Speed of engine in revolution per minute\n",
    "\n",
    "L = 1.2 # Stroke of piston in m\n",
    "\n",
    "d = 0.8 # Diameter of the cylinder in m\n",
    "\n",
    "A = (math.pi/4)*(0.8**2) # Area of cylinder\n",
    "\n",
    "Pm = (ad/ld)*k # Effective pressure in MPa\n",
    "\n",
    "W1 = Pm*L*A*w # Work done in 1 minute MJ\n",
    "\n",
    "W = (12*W1)/60 # The rate of work transfer gas to the piston in MJ/s\n",
    "\n",
    "\n",
    "\n",
    "print \"\\n Example 3.4\"\n",
    "\n",
    "print \"\\n The rate of work transfer from gas to the piston is \",W*1e3 ,\" kW\"\n",
    "\n",
    "#The answers vary due to round off error\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex3.5:pg-57"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Example 3.5\n",
      "\n",
      " Rating of furnace would be  2.17163371599  *1e3 kW\n",
      "\n",
      " Diameter of furnace is  1.0  m\n",
      "\n",
      " Length of furnace is  2.0  m\n"
     ]
    }
   ],
   "source": [
    "#Given that\n",
    "\n",
    "m = 5 # mass flow rate in tones/h\n",
    "\n",
    "Ti = 15 # Initial temperature in degree Celsius\n",
    "\n",
    "tp = 1535 # Phase change temperature in degree Celsius\n",
    "\n",
    "Tf = 1650 # Final temperature in degree Celsius\n",
    "\n",
    "Lh = 270 # Latent heat of iron in kJ/Kg\n",
    "\n",
    "ml = 29.93 # Specific heat of iron in liquid phase in kJ/Kg\n",
    "\n",
    "ma = 56 # Atomic weight of iron\n",
    "\n",
    "sh = 0.502 # Specific heat of iron in solid phase in kJ/Kg\n",
    "\n",
    "d = 6900 # Density of molten metal in kg/m**3\n",
    "\n",
    "n=0.7 # furnace efficiency\n",
    "\n",
    "l_d_ratio = 2 # length to diameter ratio\n",
    "\n",
    "print \"\\n Example 3.5\"\n",
    "\n",
    "h1 = sh*(tp-Ti) # Heat required to raise temperature\n",
    "\n",
    "h2 = Lh # Heat consumed in phase change\n",
    "\n",
    "h3 = ml*(Tf-tp)/ma # Heat consumed in raising temperature of molten mass\n",
    "\n",
    "h = h1+h2+h3 # Heat required per unit mass\n",
    "\n",
    "Hi = h*m*1e3 # Ideal heat requirement\n",
    "\n",
    "H = Hi/(n*3600) # Actual heat requirement\n",
    "\n",
    "V = (3*m)/d # Volume required in m**3\n",
    "\n",
    "d = (4*V/(math.pi*l_d_ratio))**(1/3) # Diameter of furnace \n",
    "\n",
    "l = d*l_d_ratio # Length of furnace\n",
    "\n",
    "print \"\\n Rating of furnace would be \",H/1e3 ,\" *1e3 kW\"\n",
    "\n",
    "print \"\\n Diameter of furnace is \",d ,\" m\"\n",
    "\n",
    "print \"\\n Length of furnace is \",l ,\" m\"\n",
    "\n",
    "#The answer provided in the textbook is wrong\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex3.6:pg-57"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Example 3.6\n",
      "\n",
      " Rate at which aluminium can be melted is  5.39  tonnes/h\n",
      "\n",
      " Mass of aluminium that can be held in furnace is  5.232 tonnes\n"
     ]
    }
   ],
   "source": [
    "# Given that\n",
    "\n",
    "SH = 0.9 # Specific heat of aluminium in solid state in kJ/kgK \n",
    "\n",
    "L = 390 # Latent heat in kJ/kg\n",
    "\n",
    "aw = 27 # Atomic weight\n",
    "\n",
    "D = 2400 # Density in molten state in kg/m**3\n",
    "\n",
    "Tf = 700 # Final temperature in degree Celsius\n",
    "\n",
    "Tm = 660 # Melting point of aluminium in degree Celsius\n",
    "\n",
    "Ti = 15 # Initial temperature in degree Celsius\n",
    "\n",
    "HR = SH*(Tm-Ti)+L+(29.93/27)*(Tf-Tm) # Heat requirement\n",
    "\n",
    "HS = HR/0.7  # Heat supplied\n",
    "\n",
    "RM = 2.17e3*3600/HS  # From the data of problem 3.7\n",
    "\n",
    "V = 2.18 # Volume in m**3\n",
    "\n",
    "M = V*D\n",
    "\n",
    "print \"\\n Example 3.6\"\n",
    "\n",
    "print \"\\n Rate at which aluminium can be melted is \",round(RM/1e3,2) ,\" tonnes/h\"\n",
    "\n",
    "print \"\\n Mass of aluminium that can be held in furnace is \",M/1e3 ,\"tonnes\"\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}