summaryrefslogtreecommitdiff
path: root/Turbomachines_by_A._V._Arasu/Ch6.ipynb
blob: 44de04719d94b931d47e3c9a31969badb9133661 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:aae7358a1641809b7b2e92e647a38df4d3df23fcb8fc4fc8de6985e2dc22bd13"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 - Radial Flow Gas and Steam Turbines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.1 Page 266"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import atan, pi, tan, degrees, cos\n",
      "#input data\n",
      "P00=3#The pressure at which air is received in bar\n",
      "T00=373#The temperature at which air is received in K\n",
      "rt=0.5#The rotor tip diameter of turbine in m\n",
      "rh=0.3#The rotor exit diameter of the turbine in m\n",
      "b=0.03#The rotor blade width at entry in m\n",
      "b11=60#The air angle at rotor entry in degree\n",
      "a11=25#The air angle at nozzle exit in degree\n",
      "Ps=2#The stage pressure ratio\n",
      "nn=0.97#The nozzle efficiency\n",
      "N=7200#The speed of the turbine rotation in rpm\n",
      "R=287#The universal gas constant in J/kg.K\n",
      "Cp=1005#The specific heat of air at constant pressure in J/kg.K\n",
      "r=1.4#The ratio of specific heats of air\n",
      "\n",
      "#calculations\n",
      "U1=(3.14*rt*N)/60#Peripheral velocity of impeller at inlet in m/s\n",
      "Cr=U1/(1/tan(pi/180*a11)-1/tan(pi/180*b11))#The radial velocity at inlet in m/s\n",
      "ps1=Cr/U1#Flow coefficient \n",
      "sl=1+(ps1*1/tan(pi/180*b11))#Loading coefficient\n",
      "DR=((1-(ps1*1/tan(pi/180*b11)))/2)#Degree of reaction\n",
      "nts=((sl*U1**2)/(Cp*T00*(1-((1/Ps)**((r-1)/r)))))#Stage efficiency of the turbine\n",
      "C2=Cr#Absolute velocity at the exit in m/s\n",
      "U2=(3.1415*rh*N)/60#Peripheral velocity of impeller at exit in m/s\n",
      "b22=degrees(atan(C2/U2))#The air angle at rotor exit in degree\n",
      "dT=DR*U1*Cr*1/tan(pi/180*a11)/Cp#Total actual change in temperature in a stage turbine in K\n",
      "dT0=(U1*Cr*1/tan(pi/180*a11))/Cp#The total change in temperature in turbine in K\n",
      "T02=T00-dT0#The exit absolute temperature in K\n",
      "T2=T02-((C2**2)/(2*Cp))#The actual exit temperature in K\n",
      "T1=dT+T2#The actual inlet temperature in K\n",
      "Cx1=Cr*1/tan(pi/180*a11)#Inlet absolute velocity of air in tangential direction in m/s\n",
      "C1=Cx1/cos(pi/180*a11)#Absolute velocity at the inlet in m/s\n",
      "dT1=(C1**2/2)/(Cp*nn)#The absolute change in temperature at the first stage in K\n",
      "dP1=(1-(dT1/T00))**(r/(r-1))#The absolute pressure ratio in first stage \n",
      "P1=dP1*P00#The inlet pressure in bar\n",
      "d1=(P1*10**5)/(R*T1)#The inlet density in kg/m**3\n",
      "A1=3.1415*rt*b#The inlet area of the turbine in m**2\n",
      "m=d1*A1*Cr#The mass flow rate of air at inlet in kg/s\n",
      "P2=P00/Ps#The exit pressure in bar\n",
      "d2=(P2*10**5)/(R*T2)#The exit density of air in kg/m**3\n",
      "bh=(m/(d2*3.1415*rh*Cr))#Rotor width at the exit in m\n",
      "W=m*U1*Cx1*10**-3#The power developed by the turbine in kW\n",
      "\n",
      "#output\n",
      "print '(a)\\n    (1)The flow coefficient is %3.3f\\n    (2)The loading coefficient is %3.3f\\n(b)\\n    (1)The degree of reaction is %0.2f %% \\n    (2)The stage efficiency of the turbine is %0.2f %% \\n(c)\\n    (1)The air angle at the rotor exit is %3.2f degree\\n    (2)The width at the rotor exit is %0.2f cm\\n(d)\\n    (1)The mass flow rate is %3.2f kg/s\\n    (2)The power developed is %3.2f kW'%(ps1,sl,DR*100,nts*100,b22,bh*100,m,W)\n",
      "# answer in the textbook is not correct."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        "    (1)The flow coefficient is 0.638\n",
        "    (2)The loading coefficient is 1.368\n",
        "(b)\n",
        "    (1)The degree of reaction is 31.58 % \n",
        "    (2)The stage efficiency of the turbine is 72.12 % \n",
        "(c)\n",
        "    (1)The air angle at the rotor exit is 46.75 degree\n",
        "    (2)The width at the rotor exit is 6.31 cm\n",
        "(d)\n",
        "    (1)The mass flow rate is 11.78 kg/s\n",
        "    (2)The power developed is 572.01 kW\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.2 Page 270"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sin\n",
      "#input data\n",
      "P0=4#Overall stage pressure ratio \n",
      "T00=557#Temperature at entry in K\n",
      "P3=1#Diffuser exit pressure in bar\n",
      "m=6.5#Mass flow rate of air in kg/s\n",
      "ps1=0.3#Flow coefficient \n",
      "N=18000#Speed of the turbine in rpm\n",
      "Dt=0.42#Rotor tip diameter in m\n",
      "D2m=0.21#Mean diameter at rotor exit in m\n",
      "R=287#The universal gas constant in J/kg.K\n",
      "Cp=1.005#The specific heat of air at constant pressure in kJ/kg.K\n",
      "r=1.4#The ratio of specific heats of air\n",
      "\n",
      "#calculations\n",
      "U1=(3.1415*Dt*N)/60#Peripheral velocity of impeller at inlet in m/s\n",
      "Cr1=ps1*U1#The radial velocity at inlet in m/s\n",
      "a11=degrees(atan(Cr1/U1))#The nozzle exit air angle in degree\n",
      "W=m*U1**2*10**-3#Power developed by turbine in kW\n",
      "dT=(1/P0)**((r-1)/r)#The total isentropic temperature ratio in entire process \n",
      "T3s=dT*T00#The final isentropic temperature at exit in K\n",
      "dh2=W/m#The absolute enthalpy change in the first two stages in kJ/kg\n",
      "ns=dh2/(Cp*(T00-T3s))#The stage efficiency of the turbine\n",
      "T02=T00-(W/(m*Cp))#The absolute temperature at the entry of second stage in K\n",
      "T03=T02#The absolute temperature at exit of second stage in K\n",
      "dH=Cp*(T02-T3s)#The total enthalpy loss in kJ/kg\n",
      "dHn=dH/2#The enthalpy loss in the nozzle in kJ/kg\n",
      "C1=Cr1/sin(pi/180*a11)#Absolute velocity at the inlet in m/s\n",
      "dH0=((C1**2)/(2000*Cp))+(dHn)#The isentropic absolute enthalpy loss in nozzle in kJ/kg\n",
      "dT0=dH0/Cp#The isentropic absolute temperature loss in nozzle in K\n",
      "T1s=T00-dT0#The isentropic temperature at the entry in K\n",
      "P1=P0*(T1s/T00)**(r/(r-1))#The pressure at the entry of turbine in bar\n",
      "T1=T00-((C1**2)/(2000*Cp))#The temperature at the entry of turbine in K\n",
      "d1=(P1*10**5)/(R*T1)#The density of the air at inlet in kg/m**3\n",
      "b1=m/(d1*Cr1*3.141*Dt)#The width of the rotor at inlet in m\n",
      "C2=Cr1#The avsolute velocity at the second stage entry in m/s\n",
      "T2=T02-((C2**2)/(2000*Cp))#The temperature at the second stage entry in K\n",
      "P23=(T2/T03)**(r/(r-1))#The pressure ratio at the second stage\n",
      "P2=P23*P3#The pressure at the second stage in bar\n",
      "d2=(P2*10**5)/(R*T2)#The density of the air at second stage in kg/m**3\n",
      "C2=Cr1#The absolute velocity at the second stage in m/s\n",
      "A2=m/(d2*C2)#The area of cross section at the second stage in m**2\n",
      "h2=(A2/(3.14*D2m))#The rotor blade height at the exit in m\n",
      "M1=C1/(r*R*T1)**(1/2)#The mach number at the nozzle\n",
      "U2=(3.14*D2m*N)/60#The Peripheral velocity of impeller at exit in m/s\n",
      "M2r=(((C2**2)+(U2**2))**(1/2))/(r*R*T2)**(1/2)#The mach number at the rotor exit \n",
      "Ln=(dHn*10**3)/((C1**2)/2)#The nozzle loss coefficient\n",
      "Lr=(dHn*10**3)/(((((C2**2)+(U2**2))**(1/2))**2)/2)#The rotor loss coefficient\n",
      "\n",
      "#output\n",
      "print '(a)The nozzle exit air angle is %3.2f degree\\n(b)The power developed is %3.1f kW\\n(c)The stage efficiency is %0.2f %%\\n(d)The rotor width at the entry is %0.2f cm\\n(e)The rotor blade height at the exit is %0.2f cm\\n(f)\\n    (1)The mach number at the nozzle exit is %3.4f\\n    (2)The mach number at the rotor exit is %3.2f\\n(g)\\n    (1)The nozzle loss coefficient is %3.4f\\n    (2)The rotor loss coefficient is %3.3f'%(a11,W,ns*100,b1*100,h2*100,M1,M2r,Ln,Lr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The nozzle exit air angle is 16.70 degree\n",
        "(b)The power developed is 1018.4 kW\n",
        "(c)The stage efficiency is 85.58 %\n",
        "(d)The rotor width at the entry is 2.76 cm\n",
        "(e)The rotor blade height at the exit is 9.99 cm\n",
        "(f)\n",
        "    (1)The mach number at the nozzle exit is 0.9489\n",
        "    (2)The mach number at the rotor exit is 0.58\n",
        "(g)\n",
        "    (1)The nozzle loss coefficient is 0.1546\n",
        "    (2)The rotor loss coefficient is 0.496\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.3 Page 274"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import acos\n",
      "#input data\n",
      "ntt=0.9#Total-to-total efficiency\n",
      "P00=300#The pressure at entry to the nozzle in kPa\n",
      "T00=1150#The temperature at entry to the nozzle in K\n",
      "T1=1013#The static temperature at the outlet of the nozzle in K\n",
      "P03=100#The pressure at the outlet of the diffuser in kPa\n",
      "R=284.5#The universal gas constant in J/kg.K\n",
      "Cp=1.147#The specific heat of air at constant pressure in kJ/kg.K\n",
      "r=1.33#The ratio of specific heats of given gas\n",
      "\n",
      "#calculations\n",
      "U1=(ntt*Cp*1000*T00*(1-((P03/P00)**((r-1)/r))))**(1/2)#The impeller tip speed in m/s\n",
      "T01=T00#The absolute temperature at the entry in K\n",
      "C1=(2000*Cp*(T01-T1))**(1/2)#The absolute velocity at the inletof turbine in m/s\n",
      "a11=acos(pi/180*U1/C1)#The flow angle at the nozzle oulet in degree\n",
      "M1=C1/(r*R*T1)**(1/2)#The mach number at the nozzle outlet \n",
      "\n",
      "#output\n",
      "print '(a)The impeller tip speed is %3.1f m/s\\n(b)The flow angle at the nozzle oulet is %3.2f degrees\\n(c)The mach number at the nozzle outlet is %3.2f'%(U1,a11,M1)\n",
      "# answer in the textbook is not correct fot part(b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The impeller tip speed is 532.2 m/s\n",
        "(b)The flow angle at the nozzle oulet is 1.55 degrees\n",
        "(c)The mach number at the nozzle outlet is 0.91\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.4 Page 275"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#input data\n",
      "D1=0.09#Rotor inlet tip diameter in m\n",
      "D2t=0.062#Rotor outlet tip diameter in m\n",
      "D2h=0.025#Rotor outlet hub diameter in m\n",
      "N=30000#Blade speed in rpm\n",
      "d2=1.8#Density of exhaust gases at impeller exit in kg/m**3\n",
      "C2s=0.447#Ratio of absolute velocity and isentropic velocity at exit\n",
      "U1Cs=0.707#Ratio of impeller tip velocity and isentropic velocity\n",
      "\n",
      "#calculations\n",
      "U1=(3.1415*D1*N)/60#The impeller tip speed in m/s\n",
      "Cs=U1/U1Cs#Isentropic velocity in m/s\n",
      "C2=C2s*Cs#Absolute velocity at the exit in m/s\n",
      "A2=(3.141/4)*((D2t**2)-(D2h**2))#Area at the exit in m**2\n",
      "Q2=A2*C2#Volume flow rate at the impeller exit in m**3/s\n",
      "M=d2*Q2#Mass flow rate in kg/s\n",
      "W=M*U1**2#Power developed in W\n",
      "\n",
      "#output\n",
      "print '(a)Volume flow rate at the impeller exit is %3.3f m**3/s\\n(b)Power developed is %0.3f kW'%(Q2,W/1000)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Volume flow rate at the impeller exit is 0.226 m**3/s\n",
        "(b)Power developed is 8.127 kW\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.5 Page 276"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#input data\n",
      "P00=3.5#Total-to-static pressure ratio\n",
      "P2=1#Exit pressure in bar\n",
      "T00=923#Inlet total temperature in K\n",
      "U1Cs=0.66#Blade to isentropic speed ratio\n",
      "D=0.45#Rotor diameter ratio\n",
      "N=16000#Speed from nozzle in rpm\n",
      "a11=20#Nozzle exit angle in degree\n",
      "nn=0.95#Nozzle efficiency\n",
      "b1=0.05#Rotor width at inlet in m\n",
      "R=287#The universal gas constant in J/kg.K\n",
      "Cp=1005#The specific heat of air at constant pressure in J/kg.K\n",
      "r=1.4#The ratio of specific heats of air\n",
      "\n",
      "\n",
      "#Calculations\n",
      "T2s=T00*(1/P00)**((r-1)/r)#Isentropic temperature at the exit in K\n",
      "Cs=(2*Cp*(T00-T2s))**(1/2)#The isentropic velocity in m/s\n",
      "U1=U1Cs*Cs#The impeller tip speed in m/s\n",
      "D1=(U1*60)/(3.14*N)#Rotor inlet diameter in m\n",
      "D2=D*D1#Rotor outlet diameter in m\n",
      "Cr2=U1*tan(pi/180*a11)#The relative velocity at the exit in m/s\n",
      "U2=(3.1415*D2*N)/60#Peripheral velocity of impeller at exit in m/s\n",
      "b22=degrees(atan(Cr2/U2))#The air angle at rotor exit in degree\n",
      "T02=T00-((U1**2)/(Cp))#The absolute temperature at the exit in K\n",
      "T2=T02-((Cr2**2)/(2*Cp))#The temperature at the exit of turbine in K\n",
      "T1=T2+((U1**2)/(2*Cp))#The temperature at the entry of turbine in K\n",
      "T1s=T00-((T00-T1)/nn)#Isentropic temperature at the entry in K\n",
      "P1=P00*(T1s/T00)**(r/(r-1))#The pressure at the entry stage in bar\n",
      "d1=(P1*10**5)/(R*T1)#The density of the air  at the inlet in kg/m**3\n",
      "A1=3.1415*D1*b1#The area at the inlet in m**2\n",
      "Cr1=Cr2#The relative velocity at the entry in m/s\n",
      "m=d1*A1*Cr1#The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 in kg/s\n",
      "W=(m*U1**2)*10**-6#Power developed in MW\n",
      "d2=(P2*10**5)/(R*T2)#The density of the air at the exit in kg/m**3\n",
      "b2=m/(d2*3.141*D2*Cr2)#Rotor width at the exit in m\n",
      "D2h=D2-b2#Hub diameter at the exit in m\n",
      "D2t=D2+b2#Tip diameter at the exit in m\n",
      "nts=(W*10**6)/(m*Cp*(T00-T2s))#Total-to-static efficiency\n",
      "C1=U1/cos(pi/180*a11)#Absolute velocity at the entry in m/s\n",
      "Ln=(Cp*(T1-T1s))/((C1**2)/2)#Nozzle enthalpy loss coefficient\n",
      "W2=((U2**2)+(Cr2**2))**(1/2)#Resultant relative velocity at the exit in m/s\n",
      "T2s=T1*(P2/P1)**((r-1)/r)#Isentropic temperature at the exit in K\n",
      "Lr=(Cp*(T2-T2s))/((W2**2)/2)#Rotor enthalpy loss coefficient\n",
      "\n",
      "#output\n",
      "print '(a)\\n    (1)Rotor inlet diameter is %3.2f m\\n    (2)Rotor outlet diameter is %3.3f m\\n(b)The air angle at rotor exit is %3.2f degree\\n(c)The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 is %3.2f kg/s\\n(d)Power developed is %3.3f MW\\n(e)\\n    (1)Hub diameter at the exit is %3.4f m\\n    (2)Tip diameter at the exit is %3.4f m\\n(f)Total-to-static efficiency is %3.4f\\n(g)Nozzle enthalpy loss coefficient is %3.4f\\n(h)Rotor enthalpy loss coefficient is %3.4f'%(D1,D2,b22,m,W,D2h,D2t,nts,Ln,Lr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        "    (1)Rotor inlet diameter is 0.59 m\n",
        "    (2)Rotor outlet diameter is 0.265 m\n",
        "(b)The air angle at rotor exit is 38.95 degree\n",
        "(c)The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 is 14.21 kg/s\n",
        "(d)Power developed is 3.456 MW\n",
        "(e)\n",
        "    (1)Hub diameter at the exit is 0.0834 m\n",
        "    (2)Tip diameter at the exit is 0.4466 m\n",
        "(f)Total-to-static efficiency is 0.8712\n",
        "(g)Nozzle enthalpy loss coefficient is 0.0526\n",
        "(h)Rotor enthalpy loss coefficient is 0.3396\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.6 Page 280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#input data\n",
      "P00=700#Total-to-static pressure ratio\n",
      "T00=1145#Inlet total temperature in K\n",
      "P1=527#The pressure at the entry stage in bar\n",
      "T1=1029#The temperature at the entry of turbine in K\n",
      "P2=385#The pressure at the second stage in bar\n",
      "T2=915#The temperature at the second stage entry in K\n",
      "T02=925#The absolute temperature at the exit in K\n",
      "D2mD1=0.49#The ratio of rotor exit mean diameter to rotor inlet diameter\n",
      "N=24000#Blade speed in rpm\n",
      "R1=8.314#The gas constant of given gas in kJ/kg.K\n",
      "r=1.67#The ratio of specific heats of the gas\n",
      "m=39.94#Molecular weight of a gas \n",
      "\n",
      "#calculations\n",
      "R=R1/m#The universal gas constant in kJ/kg.K\n",
      "Cp=(r*R)/(r-1)#The specific heat of air at constant pressure in kJ/kg.K\n",
      "T2ss=T00*(P2/P00)**((r-1)/r)#Isentropic stage temperature at the exit in K\n",
      "nts=(T00-T02)/(T00-T2ss)#Total-to-static efficiency of the turbine\n",
      "U1=(Cp*1000*(T00-T02))**(1/2)#The impeller tip speed in m/s\n",
      "D1=(U1*60)/(3.1415*N)#Rotor inlet diameter in m\n",
      "D2m=D1*D2mD1#Rotor exit mean diameter in m\n",
      "C1=(2*Cp*(T00-T1))**(1/2)#Absolute velocity at the entry in m/s\n",
      "T1s=T00*(P1/P00)**((r-1)/r)#Isentropic temperature at the entry in K\n",
      "Ln=(Cp*(T1-T1s))/((C1**2)/2)#Nozzle enthalpy loss coefficient\n",
      "C2=(2*Cp*1000*(T02-T2))**(1/2)#The temperature at the exit of turbine in K\n",
      "U2=(3.14*D2m*N)/(60)#Peripheral velocity of impeller at exit in m/s\n",
      "W2=((C2**2)+(U2**2))**(1/2)#Resultant relative velocity at the exit in m/s\n",
      "T2s=T1*(P2/P1)**((r-1)/r)#stage temperature at the exit in K\n",
      "Lr=(Cp*1000*(T2-T2s))/((W2**2)/2)#Rotor enthalpy loss coefficient\n",
      "ntt=1/((1/nts)-((C2**2)/(2*U1**2)))#Total-to-total efficiency\n",
      "\n",
      "#output\n",
      "print '(a)Total-to-static efficiency of the turbine is %0.1f %%\\n(b)\\n    (1)Rotor inlet diameter is %3.3f m\\n    (2)Rotor exit mean diameter is %3.3f m\\n(c)\\n    (1)Nozzle enthalpy loss coefficient is %3.4f\\n    (2)Rotor enthalpy loss coefficient is %3.4f\\n(d)Total-to-total efficiency is %0.2f %%'%(nts*100,D1,D2m,Ln,Lr,ntt*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Total-to-static efficiency of the turbine is 90.1 %\n",
        "(b)\n",
        "    (1)Rotor inlet diameter is 0.269 m\n",
        "    (2)Rotor exit mean diameter is 0.132 m\n",
        "(c)\n",
        "    (1)Nozzle enthalpy loss coefficient is 0.0625\n",
        "    (2)Rotor enthalpy loss coefficient is 0.2138\n",
        "(d)Total-to-total efficiency is 93.95 %\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}