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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 1: General Introduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.10: Thermal_efficiency.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.10');\n",
"// Given values\n",
"m_dot = 3.045; // use of coal, [tonne/h]\n",
"c = 28; // calorific value of the coal, [MJ/kg]\n",
"P_out = 4.1; // output of turbine, [MW]\n",
"// solution\n",
"m_dot = m_dot*10^3/3600; // [kg/s]\n",
"P_in = m_dot*c; // power input by coal, [MW]\n",
"n = P_out/P_in; // thermal efficiency formula\n",
"mprintf('\n Thermal efficiency of the plant is = %f \n',n);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.11: Power_output.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.11');\n",
"// Given values\n",
"v = 50; // speed, [km/h]\n",
"F = 900; // Resistance to the motion of a car\n",
"// solution\n",
"v = v*10^3/3600; // [m/s]\n",
" Power = F*v; // Power formula, [W]\n",
"mprintf('\n The power output of the engine is = %f kW\n',Power*10^-3);\n",
" \n",
" // End\n",
" "
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.12: Power_output.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.12');\n",
"// Given values\n",
"V = 230; // volatage, [volts]\n",
"I = 60; // current, [amps]\n",
"n_gen = .95; // efficiency of generator\n",
"n_eng = .92; // efficiency of engine\n",
"// solution\n",
"P_gen = V*I; // Power delivered by generator, [W]\n",
"P_gen=P_gen*10^-3; // [kW]\n",
"P_in_eng=P_gen/n_gen;//Power input from engine,[kW]\n",
"P_out_eng=P_in_eng/n_eng;//Power output from engine,[kW]\n",
"mprintf('\n The power output from the engine is = %f kW\n',P_out_eng);\n",
"// End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.13: Current.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.13');\n",
"// Given values\n",
"V = 230; // Voltage, [volts]\n",
"W = 4; // Power of heater, [kW]\n",
"// solution\n",
"// using equation P=VI\n",
"I = W/V; // current, [K amps]\n",
"mprintf('\n The current taken by heater is = %f amps \n',I*10^3);\n",
"// End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.14: Mass_of_coal_burnt.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.14');\n",
"// Given values\n",
"P_out = 500; // output of power station, [MW]\n",
"c = 29.5; // calorific value of coal, [MJ/kg]\n",
"r=.28; \n",
"// solution\n",
"// since P represents only 28 percent of energy available from coal\n",
"P_coal = P_out/r; // [MW]\n",
" \n",
"m_coal = P_coal/c; // Mass of coal used, [kg/s]\n",
"m_coal = m_coal*3600; // [kg/h]\n",
"//After one hour\n",
"m_coal = m_coal*1*10^-3; // [tonne]\n",
"mprintf('\n Mass of coal burnt by the power station in 1 hour is = %f tonne \n',m_coal);\n",
"// End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.1: Work_done.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear ;\n",
"clc;\n",
"disp('Example 1.1');\n",
"// Given values\n",
"P = 700; //pressure,[kN/m^2]\n",
"V1 = .28; //initial volume,[m^3]\n",
"V2 = 1.68; //final volume,[m^3]\n",
"//solution\n",
"W = P*(V2-V1);// // Formula for work done at constant pressure is, [kJ]\n",
"mprintf('\n The Work done is = %f MJ\n',W*10^-3);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.2: Volume_of_the_gas.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.2');\n",
"//Given values\n",
"P1 = 138; // initial pressure,[kN/m^2]\n",
"V1 = .112; //initial volume,[m^3]\n",
"P2 = 690; // final pressure,[kN/m^2]\n",
"Gama=1.4; // heat capacity ratio\n",
"// solution\n",
"// since gas is following, PV^1.4=constant,hence\n",
"V2 =V1*(P1/P2)^(1/Gama); // final volume, [m^3] \n",
"mprintf('\n The new volume of the gas is = %f m^3\n',V2)\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.3: Work_done.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.3');\n",
"// Given values\n",
"P1 = 2070; // initial pressure, [kN/m^2]\n",
"V1 = .014; // initial volume, [m^3]\n",
"P2 = 207; // final pressure, [kN/m^2]\n",
"n=1.35; // polytropic index\n",
"// solution\n",
"// since gas is following PV^n=constant\n",
"// hence \n",
"V2 = V1*(P1/P2)^(1/n); // final volume, [m^3]\n",
"// calculation of workdone\n",
"W=(P1*V1-P2*V2)/(1.35-1); // using work done formula for polytropic process, [kJ]\n",
"mprintf('\n The Work done by gas during expansion is = %f kJ\n',W);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.4: Final_Pressure_and_work_done.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.4');\n",
"// Given values\n",
"P1 = 100; // initial pressure, [kN/m^2]\n",
"V1 = .056; // initial volume, [m^3]\n",
"V2 = .007; // final volume, [m^3]\n",
"// To know P2\n",
"// since process is hyperbolic so, PV=constant\n",
"// hence\n",
"P2 = P1*V1/V2; // final pressure, [kN/m^2]\n",
"mprintf('\n The final pressure is = %f kN/m^2\n',P2);\n",
"// calculation of workdone\n",
"W = P1*V1*log(V2/V1); // formula for work done in this process, [kJ]\n",
"mprintf('\n Work done on the gas is = %f kJ\n',W);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.5: Heat_transfer.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.5');\n",
"// Given values\n",
"m = 5; // mass, [kg]\n",
"t1 = 15; // inital temperature, [C]\n",
"t2 = 100; // final temperature, [C]\n",
"c = 450; // specific heat capacity, [J/kg K]\n",
"// solution\n",
"// using heat transfer equation,[1]\n",
"Q = m*c*(t2-t1); // [J]\n",
"mprintf('\n The heat required is = %f kJ\n',Q*10^-3);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.6: Heat_transfer.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.6');\n",
"// Given values\n",
"m_cop = 2; // mass of copper vessel, [kg]\n",
"m_wat = 6; // mass of water, [kg]\n",
"c_wat = 4.19; // specific heat capacity of water, [kJ/kg K]\n",
"t1 = 20; // initial temperature, [C]\n",
"t2 = 90; // final temperature, [C]\n",
"// From the table of average specific heat capacities\n",
"c_cop = .390; // specific heat capacity of copper,[kJ/kg k]\n",
"// solution\n",
"Q_cop = m_cop*c_cop*(t2-t1); // heat required by copper vessel, [kJ]\n",
"Q_wat = m_wat*c_wat*(t2-t1); // heat required by water, [kJ]\n",
"// since there is no heat loss,so total heat transfer is sum of both\n",
"Q_total = Q_cop+Q_wat ; // [kJ]\n",
"mprintf(' \n Required heat transfer to accomplish the change = %f kJ\n',Q_total);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.7: Temperature.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.7');\n",
"// Given values\n",
"m = 10; // mass of iron casting, [kg]\n",
"t1 = 200; // initial temperature, [C]\n",
"Q = -715.5; // [kJ], since heat is lost in this process\n",
"// From the table of average specific heat capacities\n",
"c = .50; // specific heat capacity of casting iron, [kJ/kg K]\n",
"// solution\n",
"// using heat equation\n",
"// Q = m*c*(t2-t1)\n",
"t2 = t1+Q/(m*c); // [C]\n",
"mprintf('\n The final temperature is t2 = %f C\n',t2);\n",
"// End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.8: Specific_heat_capacity.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.8');\n",
" \n",
"// Given values\n",
"m = 4; // mass of the liquid, [kg]\n",
"t1 = 15; // initial temperature, [C]\n",
"t2 = 100; // final temperature, [C]\n",
"Q = 714; // [kJ],required heat to accomplish this change\n",
"// solution\n",
"// using heat equation\n",
"// Q=m*c*(t2-t1)\n",
"// calculation of c\n",
"c=Q/(m*(t2-t1)); // heat capacity, [kJ/kg K] \n",
"mprintf('\n The specific heat capacity of the liquid is c = %f kJ/kg K\n',c);\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.9: Power_output_and_energy_rejected.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"disp('Example 1.9');\n",
"// Given values\n",
"m_dot = 20.4; // mass flowrate of petrol, [kg/h]\n",
"c = 43; // calorific value of petrol, [MJ/kg]\n",
"n = .2; // Thermal efficiency of engine\n",
"// solution\n",
"m_dot = 20.4/3600; // [kg/s]\n",
"c = 43*10^6; // [J/kg]\n",
"// power output\n",
"P_out = n*m_dot*c; // [W]\n",
"mprintf('\n The power output of the engine is = %f kJ\n',P_out*10^-3);\n",
" \n",
"// power rejected\n",
"P_rej = m_dot*c*(1-n); // [W]\n",
"P_rej = P_rej*60*10^-6; // [MJ/min]\n",
"mprintf('\n The energy rejected by the engine is = %f MJ/min \n',P_rej);\n",
"//End"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|