## Ex1-pg251¶

In [3]:
import math
#calculate the

##given data
D2 = 23.76;##diameter of rotor in cm
N = 38140.;##rotational speed in rev/min
alpha2 = 72.;##absolute flow angle in deg
d = 0.5*D2;##rotor mean exit diameter

##Calcultaions
U2 = math.pi*N*D2/(100.*60.);
w2 = U2/math.tan(alpha2*math.pi/180.);
c2 = U2*math.sin(alpha2*math.pi/180.);
w3 = 2*w2;
U3 = 0.5*U2;
c3 = math.sqrt(w3**2. - U3**2);
delW = 0.5*((U2**2. - U3**2.)+(w3**2. - w2**2.)+(c2**2. - c3**2.));
inp_U2 =  0.5*(U2**2. - U3**2.)/delW;
inp_w2 = 0.5*(w3**2. - w2**2.)/delW;
inp_c2 = 0.5*(c2**2. - c3**2.)/delW;

##Results
print'%s %.2f %s %.2f %s %.2f %s '%('The fractional inputs from the three terms are, for the U^2 terms,',inp_U2,''and '\n for the w^2 terms,',inp_w2,''and ' for the c^2 terms, ',inp_c2,'')

##there are errors in the answers given in textbook

The fractional inputs from the three terms are, for the U^2 terms, 0.42  0.18  0.41


## Ex2-pg254¶

In [5]:
import math
#calculate the

##given data
r = 1.5;##operating pressure ratio
K1 = 1.44*10**-5;
K2 = 2410.;
K3 = 4.59*10**-6;
T01 = 400.;##in K
D2 = 72.5;##rotor inlet diamete in mm
D3_av = 34.4;##rotor meaan outlet diameter in mm
b = 20.1;##rotor outlet annulus width in mm
zetaN = 0.065;##enthalpy loss coefficient
alpha2 = 71.;##in deg
beta3_av = 53.;##in deg
Cp = 1005.;##inJ/(kg.K)
gamma = 1.4;

##Calculations
N = K2*math.sqrt(T01);
U2 = math.pi*N*D2/(60.*1000.)
delW = U2**2.;
delh = Cp*T01*(1.-(1./r)**((gamma-1.)/gamma));
eff_ts = delW/(delh);
delW_act = K3*K2*math.pi*T01/(30.*K1);
eff_ov = delW_act/delh;
zetaR = (2.*((1./eff_ts)-1.) - (zetaN/math.sin(alpha2*math.pi/180.)))*((D2/D3_av)**2.)*(math.sin(beta3_av*math.pi/180.))**2 - (math.cos(beta3_av*math.pi/180.))**2;
r3 = 0.5*(D3_av-b)*10**-3;
w3_w2av_min = (D3_av/D2)*math.tan(alpha2*math.pi/180.)*((2.*r3/D3_av)**2. + (1./math.tan(beta3_av*math.pi/180.))**2.)**0.5;
w3_w2av = (D3_av/D2)*math.tan(alpha2*math.pi/180.)*(1.+((1./math.tan(beta3_av*math.pi/180.))**2))**0.5;

##Results
print'%s %.2f %s'%('The total-to-static efficiency = ',eff_ts*100,'percentage');
print'%s %.2f %s'%('\n The overall efficiency =',eff_ov*100,'percentage');
print'%s %.2f %s'%('\n The rotor enthalpy loss coefficient = ',zetaR,'');
print'%s %.2f %s'%('\n The rotor relative velocity ratio = ',w3_w2av,'');

##there are small errors in the answers given in textbook

The total-to-static efficiency =  76.13 percentage

The overall efficiency = 73.17 percentage

The rotor enthalpy loss coefficient =  1.22

The rotor relative velocity ratio =  1.73


## Ex3-pg262¶

In [6]:
import math
#calculate the

##given data
Z = 12.;##number of vanes
delW = 230.;##in kW
T01 = 1050.;##stagnation temperature in K
mdot = 1.;##flow rate in kg/s
eff_ts = 0.81;##total-to-static efficiency
Cp = 1.1502;##in kJ/(kg.K)
gamma = 1.333;
R = 287.;##gas constant

##Calculations
S = delW/(Cp*T01);
alpha2 = (180./math.pi)*math.acos(math.sqrt(1./Z));
beta2 = 2.*(90.-alpha2);
p3_p01 = (1.-(S/eff_ts))**(gamma/(1.-gamma));
M02 = math.sqrt((S/(gamma-1.))*((2.*math.cos(beta2*math.pi/180.))/(1.+math.cos(beta2*math.pi/180.))));
M2 = math.sqrt((M02**2)/(1-0.5*(gamma-1.)*(M02**2)));
U2 = math.sqrt((gamma*R*T01)*(1./math.cos(beta2*math.pi/180.))*(S/(gamma-1.)));

##Results
print'%s %.2f %s %.2f %s '%('(i) The absolut and relative flow angles:\n alpha2 = ',alpha2,' deg'and '\n beta2 = ',beta2,' deg');
print'%s %.2f %s'%('\n (ii) The overall pressure ratio =',p3_p01,'');
print'%s %.2f %s %.2f %s '%('\n (iii) The rotor rip speed = ',U2,' m/s'and '\n The inlet absolute Mach number = ',M2,'');

##there are small errors in the answers given in textbook

(i) The absolut and relative flow angles:
alpha2 =  73.22
beta2 =  33.56  deg

(ii) The overall pressure ratio = 2.92

(iii) The rotor rip speed =  525.05
The inlet absolute Mach number =  0.75


## Ex4-pg268¶

In [7]:
import math
#calculate the

##given data
cm3_U2 = 0.25;
nu = 0.4;
r3s_r2 = 0.7;
w3av_w2 = 2.0;

##Calculations
r3av_r3s = 0.5*(1.+nu);
r3av_r2 = r3av_r3s*r3s_r2;
beta3_av = (180./math.pi)*math.atan(r3av_r2/cm3_U2);
beta3s = (180./math.pi)*math.atan(r3s_r2/cm3_U2);
w3s_w2 = 2.*math.cos(beta3_av*math.pi/180.)/math.cos(beta3s*math.pi/180.);

##Results
print'%s %.2f %s'%('The relative velocity ratio =',w3s_w2,'');

The relative velocity ratio = 2.70


## Ex5-pg268¶

In [8]:
import math
#calculate the

##given data
Z = 12.;##number of vanes
delW = 230.;##in kW
T01 = 1050.;##stagnation temperature in K
mdot = 1.;##flow rate in kg/s
eff_ts = 0.81;##total-to-static efficiency
Cp = 1.1502;##in kJ/(kg.K)
gamma = 1.333;
R = 287.;##gas constant
cm3_U2 = 0.25;
nu = 0.4;
r3s_r2 = 0.7;
w3av_w2 = 2.0;
p3 = 100.;##static pressure at rotor exit in kPa
zetaN = 0.06;##nozzle enthalpy loss coefficient
U2 = 538.1;##in m/s
p01 = 3.109*10**5;##in Pa

##Calculations
S = delW/(Cp*T01);
T03 = T01*(1.-S);
T3 = T03 - (cm3_U2**2)*(U2**2)/(2.*Cp*1000.);
r2 = math.sqrt(mdot/((p3*1000./(R*T3))*(cm3_U2)*U2*math.pi*(r3s_r2**2)*(1.-nu**2)));
D2 = 2.*r2;
omega = U2/r2;
N = omega*30./math.pi;
ctheta2 = S*Cp*1000.*T01/U2;
alpha2 = (180/math.pi)*math.acos(math.sqrt(1./Z));
cm2 = ctheta2/math.tan(alpha2*math.pi/180.);
c2 = ctheta2/math.sin(alpha2*math.pi/180.);
T2 = T01 - (c2**2)/(2.*Cp*1000.);
p2 = p01*(1-(((c2**2)*(1.+zetaN))/(2.*Cp*1000.*T01)))**(gamma/(gamma-1.));
b2_D2 = (0.25/math.pi)*(R*T2/p2)*(mdot/(cm2*r2**2.));

##Results
print'%s %.2f %s %.2f %s %.2f %s '%('(i) The diamaeter of the rotor = ',D2,' m'and '\n its speed of rotation = ',omega,' rad/s'and ' (N = ',N,' rev/min)');
print'%s %.2f %s'%('\n(ii) The vane width to diameter ratio at rotor inlet = ',b2_D2,'');

##there are some errors in the answers given in textbook

(i) The diamaeter of the rotor =  0.24
its speed of rotation =  4564.96  (N =  43592.14  rev/min)

(ii) The vane width to diameter ratio at rotor inlet =  0.06


## Ex6-pg271¶

In [9]:
import math
#calculate the

##given data
Z = 12.;##number of vanes
delW = 230.;##in kW
T01 = 1050.;##stagnation temperature in K
mdot = 1.;##flow rate in kg/s
eff_ts = 0.81;##total-to-static efficiency
Cp = 1.1502;##in kJ/(kg.K)
gamma = 1.333;
R = 287.;##gas constant
cm3_U2 = 0.25;
nu = 0.4;
r3s_r2 = 0.7;
w3av_w2 = 2.0;
p3 = 100.;##static pressure at rotor exit in kPa
zetaN = 0.06;##nozzle enthalpy loss coefficient
U2 = 538.1;##in m/s
p01 = 3.109*10**5;##in Pa

##results of Example 8.4 and Example 8.5
r3av_r3s = 0.5*(1+nu);
r3av_r2 = r3av_r3s*r3s_r2;
alpha2 = (180./math.pi)*math.acos(math.sqrt(1/Z));
beta2 = 2.*(90.-alpha2);
beta3_av = (180./math.pi)*math.atan(r3av_r2/cm3_U2);
beta3s = (180./math.pi)*math.atan(r3s_r2/cm3_U2);
w3s_w2 = 2.*math.cos(beta3_av*math.pi/180.)/math.cos(beta3s*math.pi/180.);
S = delW/(Cp*T01);
T03 = T01*(1-S);
T3 = T03 - (cm3_U2**2)*(U2**2.)/(2.*Cp*1000.);
r2 = math.sqrt(mdot/((p3*1000./(R*T3))*(cm3_U2)*U2*math.pi*(r3s_r2**2)*(1.-nu**2.)));
D2 = 2.*r2;
omega = U2/r2;
N = omega*30./math.pi;
ctheta2 = S*Cp*1000.*T01/U2;
alpha2 = (180./math.pi)*math.acos(math.sqrt(1./Z));
cm2 = ctheta2/math.tan(alpha2*math.pi/180.);
c2 = ctheta2/math.sin(alpha2*math.pi/180.);
T2 = T01 - (c2**2.)/(2.*Cp*1000.);
p2 = p01*(1-(((c2**2)*(1.+zetaN))/(2.*Cp*1000.*T01)))**(gamma/(gamma-1));
b2_D2 = (0.25/math.pi)*(R*T2/p2)*(mdot/(cm2*r2**2));

##Calculations
c3 = cm3_U2*U2;
cm3 = c3;
w3_av = 2.*cm3/(math.cos(beta2*math.pi/180.));
w2 = w3_av/2.;
c0 = math.sqrt(2.*delW*1000./eff_ts);
zetaR = (c0**2. *(1.-eff_ts)- (c3**2.)- zetaN*(c2**2))/(w3_av**2);
i = beta2;
n = 1.75;
eff_ts_new = 1-((c3**2)+zetaN*(c2**2)+zetaR*(w3_av**2)+(1.-(math.cos(i*math.pi/180))**n)*(w2**2))/(c0**2);

##Results
print'%s %.2f %s'%('(a)The rotor enthalpy loss coefficient = ',zetaR,'');
print'%s %.2f %s'%('\n(b) The total-to-static efficiency of the turbine =',eff_ts_new,'');

##there are some errors in the answers given in textbook

(a)The rotor enthalpy loss coefficient =  0.75

(b) The total-to-static efficiency of the turbine = 0.80