summaryrefslogtreecommitdiff
path: root/Basic_Engineering_Thermodynamics_by_Rayner_Joel/Chapter16.ipynb
blob: 7490fa12882749977083d7379c588bacd706860c (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
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
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 16 - Internal combustion engines"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1: pg 553"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 16.1\n",
      " (a) The net power output is (kW) =  1014.0\n",
      " (b) The thermal efficiency of the plant is (percent) =  32.0\n",
      " (c) The work ratio is  =   0.446\n"
     ]
    }
   ],
   "source": [
    "#pg 553\n",
    "print('Example 16.1');\n",
    "\n",
    "# aim : To determine \n",
    "# (a) the net power output of the turbine plant if the turbine is coupled to the compresser\n",
    "# (b) the thermal efficiency of the plant\n",
    "# (c) the work ratio\n",
    "\n",
    "# Given values\n",
    "P1 = 100.;# inlet pressure of compressor, [kN/m^2]\n",
    "T1 = 273.+18;# inlet temperature, [K]\n",
    "P2 = 8*P1;# outlet pressure of compressor, [kN/m^2]\n",
    "n_com = .85;# isentropic efficiency of compressor\n",
    "T3 = 273.+1000;#inlet temperature of turbine, [K]\n",
    "P3 = P2;# inlet pressure of turbine, [kN/m^2]\n",
    "P4 = 100.;# outlet pressure of turbine, [kN/m^2]\n",
    "n_tur = .88;# isentropic efficiency of turbine\n",
    "m_dot = 4.5;# air mass flow rate, [kg/s]\n",
    "cp = 1.006;# [kJ/kg K]\n",
    "Gamma = 1.4;# heat capacity ratio\n",
    "\n",
    "# (a)\n",
    "# For the compressor\n",
    "T2_prime = T1*(P2/P1)**((Gamma-1)/Gamma);# [K]\n",
    "T2 = T1+(T2_prime-T1)/n_com;#  exit pressure of compressor, [K]\n",
    "\n",
    "# for turbine\n",
    "T4_prime = T3*(P4/P3)**((Gamma-1)/Gamma);# [K]\n",
    "T4 = T3-(T3-T4_prime)*n_tur;# exit temperature of turbine, [K]\n",
    "\n",
    "P_output = m_dot*cp*((T3-T4)-(T2-T1));# [kW]\n",
    "print ' (a) The net power output is (kW) = ',round(P_output)\n",
    "\n",
    "# (b)\n",
    "n_the = ((T3-T4)-(T2-T1))/(T3-T2)*100;# thermal efficiency\n",
    "print ' (b) The thermal efficiency of the plant is (percent) = ',round(n_the)\n",
    "\n",
    "# (c)\n",
    "P_pos = m_dot*cp*(T3-T4);# Positive cycle work, [kW]\n",
    "\n",
    "W_ratio = P_output/P_pos;# work ratio\n",
    "print ' (c) The work ratio is  =  ',round(W_ratio,3)\n",
    "\n",
    "#  End\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2: pg 554"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 16.2\n",
      " (a) The pressure ratio which give the maximum network output is  =  14.74\n",
      " (b) The maximum net specific work output is (kJ/kg) =  401.0\n",
      " (c) The thermal efficiency at maximum work output is (percent) =   54.0\n",
      " (d) The work ratio at maximum work output is  =  0.54\n",
      " (e) The carnot efficiency within the cycle temperature limits is (percent) =  79.0\n"
     ]
    }
   ],
   "source": [
    "#pg 554\n",
    "print('Example 16.2');\n",
    "\n",
    "# aim : To determine\n",
    "# (a) the pressure ratiowhich will give the maximum net work output\n",
    "# (b) the maximum net specific work output\n",
    "# (c) the thermal efficiency at maximum work output\n",
    "# (d) the work ratio at maximum work output\n",
    "# (e) the carnot efficiency within the cycle temperature limits\n",
    "from math import sqrt\n",
    "# Given values\n",
    "# taking the refrence as Fig.16.35\n",
    "T3 = 273.+1080;# [K]\n",
    "T1 = 273.+10;# [K]\n",
    "cp = 1.007;# [kJ/kg K]\n",
    "Gamma = 1.41;#  heat capacity ratio\n",
    "\n",
    "# (a)\n",
    "r_pmax = (T3/T1)**((Gamma)/(Gamma-1));# maximum pressure ratio\n",
    "# for maximum net work output\n",
    "r_p = sqrt(r_pmax);\n",
    "print ' (a) The pressure ratio which give the maximum network output is  = ',round(r_p,2)\n",
    "\n",
    "# (b)\n",
    "T2 = T1*(r_p)**((Gamma-1)/Gamma);# [K]\n",
    "# From equation [23]\n",
    "T4 = T2;\n",
    "W_max = cp*((T3-T4)-(T2-T1));# Maximum net specific work output, [kJ/kg]\n",
    "\n",
    "print ' (b) The maximum net specific work output is (kJ/kg) = ',round(W_max)\n",
    "\n",
    "# (c)\n",
    "W = cp*(T3-T2);\n",
    "n_the = W_max/W;# thermal efficiency\n",
    "print ' (c) The thermal efficiency at maximum work output is (percent) =  ',round(n_the*100)\n",
    "\n",
    "# (d)\n",
    "# From the equation [26]\n",
    "W_ratio = n_the;# Work ratio\n",
    "print ' (d) The work ratio at maximum work output is  = ',round(W_ratio,2)\n",
    "\n",
    "# (e)\n",
    "n_carnot = (T3-T1)/T3*100;# carnot efficiency\n",
    "print ' (e) The carnot efficiency within the cycle temperature limits is (percent) = ',round(n_carnot)\n",
    "\n",
    "# End\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3: pg 558"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 16.3\n",
      " (a) The net power output of the plant is (kW) =  562.0\n",
      " (b) The exhaust temperature from the heat exchanger is (C) =  333.0\n",
      " (c) The thermal efficiency of the plant is (percent) =  30.5\n",
      " (d) The thermal efficiency of the plant if there wereno heat exchanger is (percent) =  22.3\n",
      " (e) The work ratio is  =   0.38\n"
     ]
    }
   ],
   "source": [
    "#pg 558\n",
    "print('Example 16.3');\n",
    "\n",
    "# aim : To determine\n",
    "# (a) the net power output of the plant\n",
    "# (b) the exhaust temperature from the heat exchanger\n",
    "# (c) the thermal efficiency of the plant\n",
    "# (d) the thermal efficiency of the plant if there were no heat exchanger\n",
    "# (e) the work ratio\n",
    "\n",
    "# Given values\n",
    "T1 = 273.+15;# temperature, [K]\n",
    "P1 = 101.;# pressure, [kN/m^2]\n",
    "P2 = 6*P1; # [kN/m^2]\n",
    "eff = .65;# effectiveness of the heat exchanger, \n",
    "T3 = 273.+870;# temperature, [K]\n",
    "P4 = 101.;# [kN/m^2]\n",
    "n_com = .85;# efficiency of compressor, \n",
    "n_tur = .80;# efficiency of turbine\n",
    "m_dot = 4.;# mass flow rate, [kg/s]\n",
    "Gama = 1.4;# heat capacity ratio\n",
    "cp = 1.005;# [kJ/kg K]\n",
    "\n",
    "# solution\n",
    "# (a)\n",
    "# For compressor\n",
    "T2_prim = T1*(P2/P1)**((Gama-1)/Gama);# [K]\n",
    "\n",
    "# using n_com = (T2_prim-T1)/(T2-T1)')\n",
    "\n",
    "T2 = T1+(T2_prim-T1)/n_com\n",
    "# For turbine\n",
    "P3 = P2;\n",
    "T4_prim = T3*(P4/P3)**((Gama-1)/Gama);# [K]\n",
    "\n",
    "T4=T3-n_tur*(T3-T4_prim); #  [K]\n",
    "P_out = m_dot*cp*((T3-T4)-(T2-T1));#  net power output, [kW]\n",
    "print ' (a) The net power output of the plant is (kW) = ',round(P_out)\n",
    "\n",
    "# (b)\n",
    "mtd = T4-T2;# maximum temperature drop for heat transfer, [K]\n",
    "atd = eff*mtd;# actual temperature, [K]\n",
    "et = T4-atd;# Exhaust temperature from heat exchanger, [K]\n",
    "t6 = et-273;# [C]\n",
    "print ' (b) The exhaust temperature from the heat exchanger is (C) = ',round(t6)\n",
    "\n",
    "# (c)\n",
    "T5 = T2+atd;# [K]\n",
    "n_the = ((T3-T4)-(T2-T1))/(T3-T5)*100;# thermal effficiency \n",
    "print ' (c) The thermal efficiency of the plant is (percent) = ',round(n_the,1)\n",
    "\n",
    "# (d)\n",
    "# with no heat exchanger\n",
    "n_the = ((T3-T4)-(T2-T1))/(T3-T2)*100;# thermal efficiency without heat exchanger\n",
    "print ' (d) The thermal efficiency of the plant if there wereno heat exchanger is (percent) = ',round(n_the,1)\n",
    "\n",
    "# (e)\n",
    "P_pos = m_dot*cp*(T3-T4);# positive cycle work;# [kW]\n",
    "w_rat = P_out/P_pos;# work ratio\n",
    "print ' (e) The work ratio is  =  ',round(w_rat,2)\n",
    "\n",
    "#  End\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4: pg 562"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 16.4\n",
      " (a) The temperature as the air leaves the compressor turbine is (C) =  701.0\n",
      "      The pressure as the air leaves the compressor turbine is (kN/m^2) =  288.0\n",
      " (b) The power output from the free power turbine is (kW) =  1541.0\n",
      " (c) The thermal efficiency of the plant is (percent) =  32.0\n",
      " (d) The work ratio is  =  0.44\n",
      " (e) The carnot efficiency is (percent) =  77.0\n",
      "The answers are a bit different due to rounding off error in textbook\n"
     ]
    }
   ],
   "source": [
    "#pg 562\n",
    "print('Example 16.4');\n",
    "\n",
    "# aim : To determine\n",
    "# (a) the pressure and temperature as the air leaves the compressor turbine\n",
    "# (b) the power output from the free power turbine\n",
    "# (c) the thermal efficiency of the plant\n",
    "# (d) the work ratio\n",
    "# (e) the carnot efficiency within the cycle temperature limits\n",
    "\n",
    "# Given values\n",
    "T1 = 273.+19;# temperature, [K]\n",
    "P1 = 100.;# pressure, [kN/m^2]\n",
    "P2 = 8*P1; # [kN/m^2]\n",
    "P3 = P2;# [kN/m^2]\n",
    "T3 = 273.+980;# temperature, [K]\n",
    "n_com = .85;# efficiency of rotary compressor\n",
    "P5 = 100.;# [kN/m^2]\n",
    "n_cum = .88;# isentropic efficiency of combustion chamber compressor, \n",
    "n_tur = .86;# isentropic efficiency of turbine\n",
    "m_dot = 7.;# mass flow rate of air, [kg/s]\n",
    "Gama = 1.4;# heat capacity ratio\n",
    "cp = 1.006;# [kJ/kg K]\n",
    "\n",
    "# solution\n",
    "# (a)\n",
    "# For compressor\n",
    "T2_prim = T1*(P2/P1)**((Gama-1)/Gama);# [K]\n",
    "\n",
    "T2 = T1+(T2_prim-T1)/n_com;# temperature, [K]\n",
    "\n",
    "# for compressor turbine\n",
    "# T3-T4 = T2-T1,because compressor turbine power=compressor power so\n",
    "T4 = T3-(T2-T1);#turbine exit temperature, [K]\n",
    "T4_prim = T3-(T3-T4)/n_cum;# [K]\n",
    "\n",
    "# For turbine\n",
    "# T4_prim = T3*(P4/P3)^((Gama-1)/Gama)\n",
    "P4 = P3*(T4_prim/T3)**(Gama/(Gama-1));# exit air pressure of air, [kN/m^2]\n",
    "\n",
    "print ' (a) The temperature as the air leaves the compressor turbine is (C) = ',round(T4-273)\n",
    "print '      The pressure as the air leaves the compressor turbine is (kN/m^2) = ',round(P4)\n",
    "\n",
    "# (b)\n",
    "T5_prim = T4*(P5/P4)**((Gama-1)/Gama);# [K]\n",
    "\n",
    "\n",
    "T5 = T4-n_tur*(T4-T5_prim);# temperature, [K]\n",
    "\n",
    "PO = m_dot*cp*(T4-T5);# power output\n",
    "print ' (b) The power output from the free power turbine is (kW) = ',round(PO)\n",
    "\n",
    "# (c)\n",
    "\n",
    "n_the = (T4-T5)/(T3-T2)*100;# thermal effficiency \n",
    "print ' (c) The thermal efficiency of the plant is (percent) = ',round(n_the)\n",
    "\n",
    "# (d)\n",
    "\n",
    "WR = (T4-T5)/(T3-T5);# work ratio\n",
    "print ' (d) The work ratio is  = ',round(WR,2)\n",
    "\n",
    "# (e)\n",
    "CE = (T3-T1)/T3;# carnot efficiency\n",
    "print ' (e) The carnot efficiency is (percent) = ',round(CE*100)\n",
    "\n",
    "print 'The answers are a bit different due to rounding off error in textbook'\n",
    "#  End\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5: pg 564"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 16.5\n",
      " (a) The pressure of the air after compression is (bar) =  14100.0\n",
      "      The temperature of the air after compression is (C) =  469.6\n",
      " (b) The power developed by the gas turbine is (MW) =  51.66\n",
      " (c) The air pressure as it leaves the gas turbine is (bar) =  714.0\n",
      "Result in the book is not matching because they have taken pressure in mbar  but in in question it is given in bar\n"
     ]
    }
   ],
   "source": [
    "#pg 564\n",
    "print('Example 16.5');\n",
    "\n",
    "# aim : To determine\n",
    "# (a) the pressure and temperature of the air compression \n",
    "# (b) the power developed by the gas turbine\n",
    "# (c) the temperature and pressure of the airentering the exhaust jet as it leaves the gas turbine \n",
    "from math import log\n",
    "# Given values\n",
    "T1 = 273-22.4;# temperature, [K]\n",
    "P1 = 470.;# pressure, [bar]\n",
    "P2 = 30*P1; # [kN/m**2]\n",
    "P3 = P2;# [kN/m**2]\n",
    "T3 = 273.+960;# temperature, [K]\n",
    "r = 1.25;# ratio of turbine power to compressor power\n",
    "n_tur = .86;# isentropic efficiency of turbine\n",
    "m_dot = 80.;# mass flow rate of air, [kg/s]\n",
    "Gama = 1.41;# heat capacity ratio\n",
    "cp = 1.05;# [kJ/kg K]\n",
    "\n",
    "# solution\n",
    "# (a)\n",
    "# For compressor\n",
    "T2_prim = T1*(P2/P1)**((Gama-1)/Gama);# [K]\n",
    "# using n_tur=(T2_prim-T1)/(T2-T1)\n",
    "T2 = T1+(T2_prim-T1)/n_tur;# temperature, [K]\n",
    "\n",
    "print ' (a) The pressure of the air after compression is (bar) = ',P2\n",
    "\n",
    "print '      The temperature of the air after compression is (C) = ',round(T2-273,1)\n",
    "\n",
    "# (b)\n",
    "Td  = r*(T2-T1);# temperature drop in turbine, [K]\n",
    "PO = m_dot*cp*Td;# power output, [kW]\n",
    "print ' (b) The power developed by the gas turbine is (MW) = ',round(PO*10**-3,2)\n",
    "\n",
    "# (c)\n",
    "t3 = T3-273;# [C]\n",
    "t4 = t3-Td;# temeprerature of air leaving turbine,[K]\n",
    "Tdi = Td/n_tur;# isentropic temperature drop, [K]\n",
    "T4_prim = t3-Tdi+273;# temperature, [K]\n",
    "# using T4_prim=T3*(P4/P3)**((Gama-1)/Gama)\n",
    "P4 = P3*(T4_prim/T3)**(Gama/(Gama-1));# exit air pressure of air, [kN/m**2]\n",
    "\n",
    "print ' (c) The air pressure as it leaves the gas turbine is (bar) = ',round(P4,0)\n",
    "\n",
    "print 'Result in the book is not matching because they have taken pressure in mbar  but in in question it is given in bar'\n",
    "\n",
    "#   End\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 6: pg 566"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 16.6\n",
      " (a) The mass of fuel oil used by the gas is (tonne/h) =  35.9\n",
      " (b) The mass flow  rate of steam from the boiler is (tonne/h) =  252.4\n",
      " (c) The theoretical output from the steam turbine is (MW) =  40.06\n",
      " (d) The overall thermal efficiency is (percent) =  44.3\n"
     ]
    }
   ],
   "source": [
    "#pg 566\n",
    "print('Example 16.6');\n",
    "\n",
    "# aim : To determine\n",
    "# (a) the mass of fuel oil used by the gas turbine\n",
    "# (b) the mass flow of steam from the boiler \n",
    "# (c) the theoretical output from the steam turbine\n",
    "# (d) the overall theoretical thermal efficiency of the plant\n",
    "\n",
    "# given values\n",
    "Po = 150.;# generating plant output, [MW]\n",
    "n_the1 = .35;# thermal efficiency\n",
    "CV = 43.;# calorific value of fuel, [MJ]\n",
    "me = 400.;# flow rate of exhaust gas, [kg/s]\n",
    "T = 90.;# boiler exit temperature, [C]\n",
    "T1 = 550.;# exhaust gas temperature, [C]\n",
    "P2 = 10.;# steam generation pressure, [MN/m**2]\n",
    "T2 = 450.;# boiler exit temperature, [C]\n",
    "Tf = 140.;# feed water temperature, [C]\n",
    "n_tur = .86;# turbine efficiency\n",
    "P3 = .5;# exhaust temperature, [MN/m**2]\n",
    "n_boi = .92;# boiler thermal efficiency\n",
    "cp = 1.1;# heat capacity, [kJ/kg]\n",
    "\n",
    "\n",
    "#  solution\n",
    "# (a)\n",
    "ER = Po*3600/n_the1;# energy requirement from the fuel, [MJ/h]\n",
    "mf = ER/CV*10**-3;# fuel required, [tonne/h]\n",
    "print ' (a) The mass of fuel oil used by the gas is (tonne/h) = ',round(mf,1)\n",
    "\n",
    "# (b) \n",
    "\n",
    "ET = me*cp*(T1-T)*3600*n_boi;# energy transferred to steam,[kJ/h]\n",
    "# from steam table\n",
    "h1 = 3244;# specific enthalpy, [kJ/kg]\n",
    "hf = 588.5;# specific enthalpy, [kJ/kg]\n",
    "ERR = h1-hf;# energy required to raise steam, [kJ/kg]\n",
    "ms = ET/ERR*10**-3;# mass flow of steam, [tonne/h]\n",
    "print ' (b) The mass flow  rate of steam from the boiler is (tonne/h) = ',round(ms,1)\n",
    "\n",
    "# again from steam table\n",
    "s1 = 6.424;# specific entropy, [kJ/kg K]\n",
    "sf2 = 1.86;# specific entropy, [kJ/kg K\n",
    "sg2 = 6.819;# specific entropy, [kJ/kg K]\n",
    "\n",
    "hf2 = 640.1;# specific enthalpy,[kJ/kg]\n",
    "hg2 = 2747.5;# specific enthalpy, [kJ/kg]\n",
    "# for ths process s1=s2=sf2+x2*(sg2-sf2)\n",
    "s2 = s1;\n",
    "# hence\n",
    "x2 = (s2-sf2)/(sg2-sf2);# dryness fraction\n",
    "\n",
    "h2_prim = hf2+x2*(hg2-hf2);# specific enthalpy of steam, [kJ/kg]\n",
    "\n",
    "TO = n_tur*(h1-h2_prim);#theoretical steam turbine output, [kJ/kg]\n",
    "TOt = TO*ms/3600.;# total theoretical steam turbine output, [MW]\n",
    "\n",
    "print ' (c) The theoretical output from the steam turbine is (MW) = ',round(TOt,2)\n",
    "\n",
    "# (d)\n",
    "n_tho = (Po+TOt)*n_the1/Po;# overall theoretical thermal efficiency\n",
    "print ' (d) The overall thermal efficiency is (percent) = ',round(n_tho*100,1)\n",
    "\n",
    "#  End\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
}