In [1]:

```
from __future__ import division
from math import atan, pi, tan, degrees, cos
#input data
P00=3#The pressure at which air is received in bar
T00=373#The temperature at which air is received in K
rt=0.5#The rotor tip diameter of turbine in m
rh=0.3#The rotor exit diameter of the turbine in m
b=0.03#The rotor blade width at entry in m
b11=60#The air angle at rotor entry in degree
a11=25#The air angle at nozzle exit in degree
Ps=2#The stage pressure ratio
nn=0.97#The nozzle efficiency
N=7200#The speed of the turbine rotation in rpm
R=287#The universal gas constant in J/kg.K
Cp=1005#The specific heat of air at constant pressure in J/kg.K
r=1.4#The ratio of specific heats of air
#calculations
U1=(3.14*rt*N)/60#Peripheral velocity of impeller at inlet in m/s
Cr=U1/(1/tan(pi/180*a11)-1/tan(pi/180*b11))#The radial velocity at inlet in m/s
ps1=Cr/U1#Flow coefficient
sl=1+(ps1*1/tan(pi/180*b11))#Loading coefficient
DR=((1-(ps1*1/tan(pi/180*b11)))/2)#Degree of reaction
nts=((sl*U1**2)/(Cp*T00*(1-((1/Ps)**((r-1)/r)))))#Stage efficiency of the turbine
C2=Cr#Absolute velocity at the exit in m/s
U2=(3.1415*rh*N)/60#Peripheral velocity of impeller at exit in m/s
b22=degrees(atan(C2/U2))#The air angle at rotor exit in degree
dT=DR*U1*Cr*1/tan(pi/180*a11)/Cp#Total actual change in temperature in a stage turbine in K
dT0=(U1*Cr*1/tan(pi/180*a11))/Cp#The total change in temperature in turbine in K
T02=T00-dT0#The exit absolute temperature in K
T2=T02-((C2**2)/(2*Cp))#The actual exit temperature in K
T1=dT+T2#The actual inlet temperature in K
Cx1=Cr*1/tan(pi/180*a11)#Inlet absolute velocity of air in tangential direction in m/s
C1=Cx1/cos(pi/180*a11)#Absolute velocity at the inlet in m/s
dT1=(C1**2/2)/(Cp*nn)#The absolute change in temperature at the first stage in K
dP1=(1-(dT1/T00))**(r/(r-1))#The absolute pressure ratio in first stage
P1=dP1*P00#The inlet pressure in bar
d1=(P1*10**5)/(R*T1)#The inlet density in kg/m**3
A1=3.1415*rt*b#The inlet area of the turbine in m**2
m=d1*A1*Cr#The mass flow rate of air at inlet in kg/s
P2=P00/Ps#The exit pressure in bar
d2=(P2*10**5)/(R*T2)#The exit density of air in kg/m**3
bh=(m/(d2*3.1415*rh*Cr))#Rotor width at the exit in m
W=m*U1*Cx1*10**-3#The power developed by the turbine in kW
#output
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)
# answer in the textbook is not correct.
```

In [2]:

```
from math import sin
#input data
P0=4#Overall stage pressure ratio
T00=557#Temperature at entry in K
P3=1#Diffuser exit pressure in bar
m=6.5#Mass flow rate of air in kg/s
ps1=0.3#Flow coefficient
N=18000#Speed of the turbine in rpm
Dt=0.42#Rotor tip diameter in m
D2m=0.21#Mean diameter at rotor exit in m
R=287#The universal gas constant in J/kg.K
Cp=1.005#The specific heat of air at constant pressure in kJ/kg.K
r=1.4#The ratio of specific heats of air
#calculations
U1=(3.1415*Dt*N)/60#Peripheral velocity of impeller at inlet in m/s
Cr1=ps1*U1#The radial velocity at inlet in m/s
a11=degrees(atan(Cr1/U1))#The nozzle exit air angle in degree
W=m*U1**2*10**-3#Power developed by turbine in kW
dT=(1/P0)**((r-1)/r)#The total isentropic temperature ratio in entire process
T3s=dT*T00#The final isentropic temperature at exit in K
dh2=W/m#The absolute enthalpy change in the first two stages in kJ/kg
ns=dh2/(Cp*(T00-T3s))#The stage efficiency of the turbine
T02=T00-(W/(m*Cp))#The absolute temperature at the entry of second stage in K
T03=T02#The absolute temperature at exit of second stage in K
dH=Cp*(T02-T3s)#The total enthalpy loss in kJ/kg
dHn=dH/2#The enthalpy loss in the nozzle in kJ/kg
C1=Cr1/sin(pi/180*a11)#Absolute velocity at the inlet in m/s
dH0=((C1**2)/(2000*Cp))+(dHn)#The isentropic absolute enthalpy loss in nozzle in kJ/kg
dT0=dH0/Cp#The isentropic absolute temperature loss in nozzle in K
T1s=T00-dT0#The isentropic temperature at the entry in K
P1=P0*(T1s/T00)**(r/(r-1))#The pressure at the entry of turbine in bar
T1=T00-((C1**2)/(2000*Cp))#The temperature at the entry of turbine in K
d1=(P1*10**5)/(R*T1)#The density of the air at inlet in kg/m**3
b1=m/(d1*Cr1*3.141*Dt)#The width of the rotor at inlet in m
C2=Cr1#The avsolute velocity at the second stage entry in m/s
T2=T02-((C2**2)/(2000*Cp))#The temperature at the second stage entry in K
P23=(T2/T03)**(r/(r-1))#The pressure ratio at the second stage
P2=P23*P3#The pressure at the second stage in bar
d2=(P2*10**5)/(R*T2)#The density of the air at second stage in kg/m**3
C2=Cr1#The absolute velocity at the second stage in m/s
A2=m/(d2*C2)#The area of cross section at the second stage in m**2
h2=(A2/(3.14*D2m))#The rotor blade height at the exit in m
M1=C1/(r*R*T1)**(1/2)#The mach number at the nozzle
U2=(3.14*D2m*N)/60#The Peripheral velocity of impeller at exit in m/s
M2r=(((C2**2)+(U2**2))**(1/2))/(r*R*T2)**(1/2)#The mach number at the rotor exit
Ln=(dHn*10**3)/((C1**2)/2)#The nozzle loss coefficient
Lr=(dHn*10**3)/(((((C2**2)+(U2**2))**(1/2))**2)/2)#The rotor loss coefficient
#output
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)
```

In [3]:

```
from math import acos
#input data
ntt=0.9#Total-to-total efficiency
P00=300#The pressure at entry to the nozzle in kPa
T00=1150#The temperature at entry to the nozzle in K
T1=1013#The static temperature at the outlet of the nozzle in K
P03=100#The pressure at the outlet of the diffuser in kPa
R=284.5#The universal gas constant in J/kg.K
Cp=1.147#The specific heat of air at constant pressure in kJ/kg.K
r=1.33#The ratio of specific heats of given gas
#calculations
U1=(ntt*Cp*1000*T00*(1-((P03/P00)**((r-1)/r))))**(1/2)#The impeller tip speed in m/s
T01=T00#The absolute temperature at the entry in K
C1=(2000*Cp*(T01-T1))**(1/2)#The absolute velocity at the inletof turbine in m/s
a11=acos(pi/180*U1/C1)#The flow angle at the nozzle oulet in degree
M1=C1/(r*R*T1)**(1/2)#The mach number at the nozzle outlet
#output
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)
# answer in the textbook is not correct fot part(b)
```

In [4]:

```
#input data
D1=0.09#Rotor inlet tip diameter in m
D2t=0.062#Rotor outlet tip diameter in m
D2h=0.025#Rotor outlet hub diameter in m
N=30000#Blade speed in rpm
d2=1.8#Density of exhaust gases at impeller exit in kg/m**3
C2s=0.447#Ratio of absolute velocity and isentropic velocity at exit
U1Cs=0.707#Ratio of impeller tip velocity and isentropic velocity
#calculations
U1=(3.1415*D1*N)/60#The impeller tip speed in m/s
Cs=U1/U1Cs#Isentropic velocity in m/s
C2=C2s*Cs#Absolute velocity at the exit in m/s
A2=(3.141/4)*((D2t**2)-(D2h**2))#Area at the exit in m**2
Q2=A2*C2#Volume flow rate at the impeller exit in m**3/s
M=d2*Q2#Mass flow rate in kg/s
W=M*U1**2#Power developed in W
#output
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)
```

In [5]:

```
#input data
P00=3.5#Total-to-static pressure ratio
P2=1#Exit pressure in bar
T00=923#Inlet total temperature in K
U1Cs=0.66#Blade to isentropic speed ratio
D=0.45#Rotor diameter ratio
N=16000#Speed from nozzle in rpm
a11=20#Nozzle exit angle in degree
nn=0.95#Nozzle efficiency
b1=0.05#Rotor width at inlet in m
R=287#The universal gas constant in J/kg.K
Cp=1005#The specific heat of air at constant pressure in J/kg.K
r=1.4#The ratio of specific heats of air
#Calculations
T2s=T00*(1/P00)**((r-1)/r)#Isentropic temperature at the exit in K
Cs=(2*Cp*(T00-T2s))**(1/2)#The isentropic velocity in m/s
U1=U1Cs*Cs#The impeller tip speed in m/s
D1=(U1*60)/(3.14*N)#Rotor inlet diameter in m
D2=D*D1#Rotor outlet diameter in m
Cr2=U1*tan(pi/180*a11)#The relative velocity at the exit in m/s
U2=(3.1415*D2*N)/60#Peripheral velocity of impeller at exit in m/s
b22=degrees(atan(Cr2/U2))#The air angle at rotor exit in degree
T02=T00-((U1**2)/(Cp))#The absolute temperature at the exit in K
T2=T02-((Cr2**2)/(2*Cp))#The temperature at the exit of turbine in K
T1=T2+((U1**2)/(2*Cp))#The temperature at the entry of turbine in K
T1s=T00-((T00-T1)/nn)#Isentropic temperature at the entry in K
P1=P00*(T1s/T00)**(r/(r-1))#The pressure at the entry stage in bar
d1=(P1*10**5)/(R*T1)#The density of the air at the inlet in kg/m**3
A1=3.1415*D1*b1#The area at the inlet in m**2
Cr1=Cr2#The relative velocity at the entry in m/s
m=d1*A1*Cr1#The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 in kg/s
W=(m*U1**2)*10**-6#Power developed in MW
d2=(P2*10**5)/(R*T2)#The density of the air at the exit in kg/m**3
b2=m/(d2*3.141*D2*Cr2)#Rotor width at the exit in m
D2h=D2-b2#Hub diameter at the exit in m
D2t=D2+b2#Tip diameter at the exit in m
nts=(W*10**6)/(m*Cp*(T00-T2s))#Total-to-static efficiency
C1=U1/cos(pi/180*a11)#Absolute velocity at the entry in m/s
Ln=(Cp*(T1-T1s))/((C1**2)/2)#Nozzle enthalpy loss coefficient
W2=((U2**2)+(Cr2**2))**(1/2)#Resultant relative velocity at the exit in m/s
T2s=T1*(P2/P1)**((r-1)/r)#Isentropic temperature at the exit in K
Lr=(Cp*(T2-T2s))/((W2**2)/2)#Rotor enthalpy loss coefficient
#output
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)
```

In [6]:

```
#input data
P00=700#Total-to-static pressure ratio
T00=1145#Inlet total temperature in K
P1=527#The pressure at the entry stage in bar
T1=1029#The temperature at the entry of turbine in K
P2=385#The pressure at the second stage in bar
T2=915#The temperature at the second stage entry in K
T02=925#The absolute temperature at the exit in K
D2mD1=0.49#The ratio of rotor exit mean diameter to rotor inlet diameter
N=24000#Blade speed in rpm
R1=8.314#The gas constant of given gas in kJ/kg.K
r=1.67#The ratio of specific heats of the gas
m=39.94#Molecular weight of a gas
#calculations
R=R1/m#The universal gas constant in kJ/kg.K
Cp=(r*R)/(r-1)#The specific heat of air at constant pressure in kJ/kg.K
T2ss=T00*(P2/P00)**((r-1)/r)#Isentropic stage temperature at the exit in K
nts=(T00-T02)/(T00-T2ss)#Total-to-static efficiency of the turbine
U1=(Cp*1000*(T00-T02))**(1/2)#The impeller tip speed in m/s
D1=(U1*60)/(3.1415*N)#Rotor inlet diameter in m
D2m=D1*D2mD1#Rotor exit mean diameter in m
C1=(2*Cp*(T00-T1))**(1/2)#Absolute velocity at the entry in m/s
T1s=T00*(P1/P00)**((r-1)/r)#Isentropic temperature at the entry in K
Ln=(Cp*(T1-T1s))/((C1**2)/2)#Nozzle enthalpy loss coefficient
C2=(2*Cp*1000*(T02-T2))**(1/2)#The temperature at the exit of turbine in K
U2=(3.14*D2m*N)/(60)#Peripheral velocity of impeller at exit in m/s
W2=((C2**2)+(U2**2))**(1/2)#Resultant relative velocity at the exit in m/s
T2s=T1*(P2/P1)**((r-1)/r)#stage temperature at the exit in K
Lr=(Cp*1000*(T2-T2s))/((W2**2)/2)#Rotor enthalpy loss coefficient
ntt=1/((1/nts)-((C2**2)/(2*U1**2)))#Total-to-total efficiency
#output
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)
```