In [1]:

```
# Variables
P1 = 0.1; #Pressure of air supplied in MPa
T1 = 308; #Temperature of air supplied in K
rv = 8; #Compression ratio
q1 = 2100; #Heat supplied in kJ/kg
Cp = 1.005; #Specific heat at constant pressure in kJ/kg-K
Cv = 0.718; #Specific heat at constant volume in kJ/kg-K
R = 0.287; #Universal gas constant in kJ/kg-K
# Calculations
y = Cp/Cv; #Ratio of specific heats
n = (1-(1/(rv**(y-1))))*100; #Cycle efficiency
v1 = (R*T1)/(P1*1000); #Specific volume at point 1 in (m**3)/kg
v2 = v1/rv; #Specific volume at point 2 in (m**3)/kg
T2 = T1*(rv**(y-1)); #Temperature at point 2 in K
T3 = (q1/Cv)+T2; #Temperature at point 3 in K
P2 = P1*(rv**y); #Pressure at point 2 in MPa
P3 = P2*(T3/T2); #Pressure at point 3 in MPa
wnet = (q1*n)/100; #Net workdone in J/kg
MEP = (wnet/(v1-v2))/1000; #Mean effective pressure in MPa
# Results
print 'Maximum pressure of the cycle is %3.3f MPa \
\nMaximum temperature of the cycle is %3.0f K \
\nCycle efficiency is %3.1f percent \
\nMean effective pressure is %3.3f MPa'%(P3,T3,n,MEP)
```

In [2]:

```
# Variables
d = 80; #Bore in mm
L = 85; #Stroke in mm
Vc = 0.06; #Clearance volume in litre
n = 0.22; #Actual thermal efficiency
y = 1.4; #Ratio of specific heats
# Calculations
Vs = (3.147/4)*(d**2)*L; #Stroke volume in mm**3
Vt = Vs+(Vc*(10**6)); #Total volume in mm**3
rv = Vt/(Vc*(10**6)); #Compression ratio
ni = (1-(1/(rv**(y-1)))); #Ideal thermal efficiency
nr = (n/ni)*100; #Relative efficiency
# Results
print 'Relative efficiency of the engine is %3.1f percent'%(nr)
```

In [3]:

```
# Variables
d = 0.137; #Bore in m
L = 0.13; #Stroke in m
Vc = 280*(10**-6); #Clearance volume in m**3
y = 1.4; #Ratio of specific heats
# Calculations
Vs = (3.147/4)*(d**2)*L; #Stroke volume in m**3
rv = (Vc/Vs)*100; #Compression ratio
rvf = (Vs+Vc)/Vc; #final compression ratio
n = (1-(1/rvf**(y-1)))*100; #Cycle efficiency
# Results
print 'Clearance volume is %3.1f percent of swept volume \
\nOtto cycle efficiency is %3.2f percent'%(rv,n)
```

In [1]:

```
# Variables
rv = 9.5; #Compression ratio
P1 = 100.; #Air pressure in kPa
T1 = 290.; #Air temperature in K
V1 = 600.*(10**-6); #Volume of air in m**3
T4 = 800.; #Final temperature in K
R = 287.; #Universal gas constant in J/kg.K
Cv = 0.718; #Specific heat at constant volume in kJ/kg.K
y = 1.4; #Ratio of specific heats
# Calculations
T3 = T4*(rv**(y-1)); #Temperature at the end of constant volume heat addition in K
P2 = P1*(rv**y); #Pressure at point 2 in kPa
T2 = T1*(rv**(y-1)); #Temperature at point 2 in K
P3 = P2*(T3/T2); #Pressure at point 3 in kPa
m = (P1*1000*V1)/(R*T1); #Specific mass in kg/s
Q = m*Cv*(T3-T2); #Heat transferred in kJ
n = (1-(1/rv**(y-1)))*100; #Thermal efficiency
Wnet = (n*Q)/100; #Net workdone in kJ
MEP = Wnet/(V1*(1-(1/rv))); #Mean effective pressure in kPa
# Results
print 'Maximum pressure of the cycle is %3.2f kPa \
\nMaximum temperature of the cycle is %3.1f K \
\nAmount of heat transferred is %3.2f kJ \
\nThermal efficiency is %3.1f percent \
\nMean effective pressure is %3.1f kPa'%(P3,T3,Q,n,MEP)
# rounding off error
```

In [5]:

```
# Variables
rv = 8.; #Compression ratio
P1 = 95.; #Pressure at point 1 in kPa
T1 = 300.; #Temperature at point 1 in K
q23 = 750.; #Heat transferred during consmath.tant volume heat addition process in kJ/kg
y = 1.4; #Ratio of specific heats
Cv = 0.718; #Specific heat at constant volume in kJ/kg-K
R = 287.; #Universal gas constant in J/kg-K
# Calculations
T2 = T1*(rv**(y-1)); #Temperature at point 2 in K
P2 = P1*(rv**y); #Pressure at point 2 in kPa
T3 = (q23/Cv)+T2; #Temperature at point 3 in K
P3 = P2*(T3/T2); #Pressure at point 3 in kPa
nth = (1-(1/(rv**(y-1))))*100; #Thermal efficiency
Wnet = (nth*q23)/100; #Net work output in kJ/kg
v1 = (R*T1)/(P1*1000); #Speific volume at point 1 in (m**3)/kg
MEP = Wnet/(v1*(1-(1/rv))); #Mean effective pressure in kPa
# Results
print 'Pressure at the end of heat addition process is %3.1f kPa'%P3
print 'Temperature at the end of heat addition process is %3.1f K'%T3
print 'Net work output is %3.2f kJ/kg'%Wnet
print 'Thermal efficiency is %3.2f percent'%nth
print 'Mean effective pressure is %3.0f kPa'%MEP
```

In [6]:

```
# Variables
rv = 14.; #Compression ratio
c = 0.06; #Cut-off percentage
y = 1.4; #Ratio of specific heats
# Calculations
rc = 1.78; #Cut-off ratio
nth = (1-(((rc**y)-1)/((rv**(y-1))*y*(rc-1))))*100; #Thermal efficiency
# Results
print 'Air standard efficiency is %3.1f percent'%(nth)
```

In [8]:

```
# Variables
rv = 16.; #Compression ratio
P1 = 0.1; #Pressure at point 1 in MPa
T1 = 288.; #Temperature at point 1 in K
T3 = 1753.; #Temperature at point 3 in K
y = 1.4; #Ratio of specific heats
Cp = 1.005; #Specific heat at constant pressure in kJ/kg-K
R = 0.287; #Universal gas constant in kJ/kg-K
# Calculations
T2 = int(T1*(rv**(y-1))); #Temperature at point 2 in K
rc = round(T3/T2,2); #Cut-off ratio
q1 = Cp*(T3-T2); #Heat supplied in kJ/kg
nth = (1-(((rc**y)-1)/((rv**(y-1))*y*(rc-1))))*100; #Cycle efficiency
wnet = int((q1*nth)/100); #Net work done in kJ/kg
v1 = round((R*T1)/(P1*1000),3); #Speific volume at point 1 in (m**3)/kg
v2 = round(v1/rv,3); #Speific volume at point 2 in (m**3)/kg
MEP = wnet/(v1-v2); #Mean effective pressure in kPa
# Results
print 'Cut-off ratio is %3.2f \
\nHeat supplied is %3.1f kJ/kg\
\nCycle efficiency is %3.1f percent \
\nMean effective pressure is %3.2f kPa'%(rc,q1,nth,MEP)
# rounding off error
```

In [8]:

```
# Variables
d = 0.15; #Bore in m
L = 0.25; #Stroke in m
Vc = 400*(10**-6); #Clearance volume in m**3
V2 = Vc; #Clearance volume in m**3
c1 = 0.05; #Cut-off percentage 1
c2 = 0.08; #Cut-off percentage 2
y = 1.4; #Ratio of specific heats
# Calculations
Vs = (3.147/4)*(d**2)*L; #Stroke volume in m**3
V31 = V2+(c1*Vs); #Volume at the point of cut-off in m**3
rc1 = V31/V2; #Cut-off ratio 1
rv = (Vc+Vs)/Vc; #Compression ratio
nth1 = (1-(((rc1**y)-1)/((rv**(y-1))*y*(rc1-1))))*100; #Air standard efficiency 1
V32 = V2+(c2*Vs); #Volume at the point of cut-off in m**3
rc2 = V32/V2; #Cut-off ratio 2
nth2 = (1-(((rc2**y)-1)/((rv**(y-1))*y*(rc2-1))))*100; #Air standard efficiency 2
pl = nth1-nth2; #Percentage loss in efficiency
# Results
print 'Air standard efficiency at 5 percent cut-off is %3.2f percent\
\nAir standard efficiency at 8 percent cut-off is %3.2f percent\
\nPercentage loss in efficiency is %3.2f percent'%(nth1,nth2,pl)
```

In [9]:

```
# Variables
e = 7.5; #Expansion ratio
c = 15.; #Compression ratio
P1 = 98.; #Pressure at point 1 in kN/(m**2)
P4 = 258.; #Pressure at point 4 in kN/(m**2)
T1 = 317.; #Temperature at point 1 in K
y = 1.4; #Ratio of specific heats
# Calculations
T4 = T1*(P4/P1); #Temperature at point 4 in K
T3 = T4*(e**(y-1)); #Temperature at point 3 in K
t3 = T3-273; #Temperature at point 3 in oC
T2 = T1*(c**(y-1)); #Temperature at point 2 in K
n = (1-((T4-T1)/(y*(T3-T2))))*100; #Thermal efficiency
# Results
print 'Maximum temperature attained during the cycle is %3.1f oC \
\nThermal efficiency of the cycle is %3.1f percent'%(t3,n)
# rounding off error
```

In [11]:

```
# Variables
rv = 20.; #Compression ratio
P1 = 95.; #Pressure at point 1 in kPa
T1 = 293.; #Temperature at point 1 in K
T3 = 2200.; #Temperature at point 3 in K
y = 1.4; #Ratio of specific heats
R = 287.; #Universal gas constant in J/kg-K
Cp = 1.005; #Specific heat at constant pressure in kJ/kg-K
# Calculations
P2 = P1*(rv**y); #Pressure at point 2 in kPa
T2 = T1*(rv**(y-1)); #Temperature at point 2 in K
v2 = (R*T2)/(P2*1000); #Specific volume at point 2 in (m**3)/kg
v3 = v2*(T3/T2); #Specific volume at point 3 in (m**3)/kg
rc = v3/v2; #Cut-off ratio
nth = (1-(((rc**y)-1)/((rv**(y-1))*y*(rc-1))))*100; #Thermal efficiency
q23 = Cp*(T3-T2); #Heat flow between points 2 and 3 in kJ/kg
wnet = (nth*q23)/100; #Net workdone in kJ/kg
MEP = wnet/(v2*(rv-1)); #Mean effective pressure in kPa
# Results
print 'Thermal efficiency is %3.1f percent \
\nMean effective pressure is %.f kPa'%(nth,MEP)
# rounding off error
```

In [11]:

```
# Variables
rv = 21.; #Compression ratio
re = 10.5; #Expansion ratio
y = 1.4; #Ratio of specific heats
# Calculations
rc = rv/re; #Cut-off ratio
nth = (1-(((rc**y)-1)/((rv**(y-1))*y*(rc-1))))*100; #Air standard efficiency
# Results
print 'Cut-off ratio is %3.0f \
\nAir standard efficiency is %3.2f percent'%(rc,nth)
```

In [12]:

```
# Variables
rv = 16.; #Compression ratio
rp = 1.5; #Pressure ratio
y = 1.4; #Ratio of specific heats
cp = 8; #Cut-off percentage
# Calculations
rc = 2.2; #Cut-off ratio
ntd = (1-((rp*(rc**y)-1)/((rv**(y-1)*((rp-1)+(y*rp*(rc-1)))))))*100; #Dual cycle efficiency
# Results
print 'Ideal efficiency of engine is %3.1f percent'%(ntd)
```

In [13]:

```
# Variables
d = 0.2; #Bore in m
L = 0.5; #Stroke in m
c = 0.06; #Cut-off percentage
y = 1.4; #Ratio of specific heats
rv = 15.; #Compression ratio
rp = 1.4; #Pressure ratio
# Calculations
Vs = (3.147/4)*(d**2)*L; #Stroke volume in m**3
DV = c*Vs; #Difference in volumes at points 4 and 3
V3 = Vs/(rv-1); #Specific volume at point 3 in m**3
V4 = V3+DV; #Specific volume at point 4 in m**3
rc = V4/V3; #Cut-off ratio
ntd = (1-((rp*(rc**y)-1)/((rv**(y-1)*((rp-1)+(y*rp*(rc-1)))))))*100; #Ideal efficiency
# Results
print 'Ideal efficiency of the engine is %3.1f percent'%(ntd)
```

In [12]:

```
# Variables
d = 0.2; #Bore in m
L = 0.3; #Stroke in m
c = 0.04; #Cut-off percentage
y = 1.4; #Ratio of specific heats
rv = 8.; #Compression ratio
P1 = 1.; #Pressure at point 1 in bar
P3 = 60.; #Pressure at point 3 in bar
T1 = 298.; #Temperature at point 1 in K
R = 287.; #Universal gas constant in J/kg
Cv = 0.718; #Speific heat at constant volume in kJ/kg-K
Cp = 1.005; #Speific heat at constant pressure in kJ/kg-K
# Calculations
Vs = (3.147/4)*(d**2)*L; #Stroke volume in m**3
V2 = Vs/(rv-1); #Specific volume at point 2 in m**3
V3 = V2; #Specific volume at point 3 in m**3
V1 = V2+Vs; #Specific volume at pont 1 in m**3
V5 = V1; #Specific volume at pont 5 in m**3
P2 = P1*(rv**y); #Pressure at point 2 in bar
T2 = T1*(rv**(y-1)); #Temperature at point 2 in K
T3 = T2*(P3/P2); #Temperature at point 3 in K
V4 = V3+(c*(V1-V2)); #Specific volume at point 4 in m**3
T4 = T3*(V4/V3); #Temperature at point 4 in K
T5 = T4*((V4/V5)**(y-1)); #Temperature at point 5 in K
q1 = (Cv*(T3-T2))+(Cp*(T4-T3)); #Heat added in kJ/kg
q2 = Cv*(T5-T1); #Heat rejected in kJ/kg
nth = (1-(q2/q1))*100; #Thermal efficiency
m = (P1*V1*(10**5))/(R*T1); #Mass of air supplied in kg
W = m*(q1-q2); #Workdone in kJ/cycle
# Results
print 'Amount of heat added is %3.1f kJ/kg \
\nAmount of heat rejected is %3.2f kJ/kg \
\nWorkdone per cycle is %3.2f kJ/cycle \
\nThermal efficiency is %3.2f percent'%(q1,q2,W,nth)
# rounding off error
```

In [15]:

```
# Variables
P1 = 1.; #Pressure at point 1 in bar
P3 = 70.; #Pressure at point 3 in bar
T1 = 310.; #Temperature at point 1 in K
rv = 10.; #Compression ratio
y = 1.4; #Ratio of specific heats
qin = 2805.; #Heat added in kJ/kg
m = 1.; #Mass of air in kg
R = 287.; #Universal gas constant in J/kg
Cv = 0.718; #Speific heat at constant volume in kJ/kg-K
Cp = 1.005; #Speific heat at constant pressure in kJ/kg-K
# Calculations
V1 = (m*R*T1)/(P1*(10**5)); #Volume at point 1 in m**3
T2 = T1*(rv**(y-1)); #Temperature at point 2 in K
P2 = P1*(rv**y); #Pressure at point 2 in K
T3 = T2*(P3/P2); #Temperature at point 3 in K
q23 = Cv*(T3-T2); #Heat supplied at constant volume in kJ/kg
q34 = qin-q23; #Heat supplied at constant pressure in kJ/kg
T4 = (q34/Cp)+T3; #Temperature at point 4 in K
V2 = V1/rv; #Volume at point 2 in m**3
V4 = V2*(T4/T3); #Volume at point 4 in m**3
V5 = V1; #Volume at point 5 in m**3
T5 = T4*((V4/V5)**(y-1)); #Temperature at point 5 in K
qout = Cv*(T5-T1); #Heat rejected in kJ/kg
nth = (1-(qout/qin))*100; #Thermal efficiency
W = qin-qout; #Workdone in kJ/kg
Vs = V1*(1-(1/rv)); #Swept volume in (m**3)/kg
MEP = (W/Vs)/100; #Mean effective pressure in bar
# Results
print 'Mean effective pressure is %3.2f bar\
\nThermal efficiency is %3.2f percent'%(MEP,nth)
```

In [17]:

```
# Variables
P1 = 1.; #Pressure at point 1 in bar
T1 = 298.; #Temperature at point 1 in K
P2 = 3.; #Pressure at point 2 in bar
T3 = 923.; #Temperature at point 3 in K
y = 1.4; #Ratio of specific heats
Cp = 1.005; #Speific heat at constant pressure in kJ/kg-K
# Calculations
x = (y-1)/y; #Ratio
rp = P2/P1; #Pressure ratio
nth = (1-(1/(rp**x)))*100; #Cycle efficiency
T2 = T1*(rp**x); #Temperature at point 2 in K
q1 = Cp*(T3-T2); #Heat supplied in kJ/kg
Wout = (nth*q1)/100; #Work output in kJ/kg
q2 = q1-Wout; #Heat rejected in kJ/kg
T4 = T3*((1/rp)**x); #Temperature at point 4 in K
# Results
print 'Cycle efficiency is %3.2f percent \
\nHeat supplied to air is %3.1f kJ/kg \
\nWork available at the shaft is %3.2f kJ/kg\
\nHeat rejected in the cooler is %3.2f kJ/kg \
\nTurbine exit temperature is %3.2f K'%(nth,q1,Wout,q2,T4)
```

In [14]:

```
import math
# Variables
T1 = 283.; #Temperature at point 1 in K
T3 = 1353.; #Temperature at point 3 in K
y = 1.41; #Ratio of specific heats
Cp = 1.007; #Specific heat constant pressure in kJ/kg-K
# Calculations
x = (y-1)/y; #Ratio
rpmax = ((T3/T1)**(1/x)); #Maximum pressure ratio
rpopt = math.sqrt(rpmax); #Optimum pressure ratio
T2 = T1*(rpopt**x); #Temperature at point 2 in K
T4 = T2; #Maximum temperature at point 4 in K
Wmax = Cp*((T3-T4)-(T2-T1)); #Maximum net specific work output in kJ/kg
nth = (Wmax/(Cp*(T3-T2)))*100; #Thermal efficiency
WR = nth/100; #Work ratio
nc = ((T3-T1)/T3)*100; #Carnot efficiency
# Results
print 'Optimum pressure ratio is %3.2f \
\nMaximum net specific work output %3.0f kJ/kg \
\nThermal efficiency %3.0f percent \
\nWork ratio is %3.2f \
\nCarnot efficiency is %3.0f percent'%(rpopt,Wmax,nth,WR,nc)
# rounding off error. please check.
```

In [20]:

```
# Variables
Tmin = 300.; #Minimum temperature in K
Tmax = 1073.; #Maximum temperature in K
Cp = 1.005; #Specific heat at constant pressure in kJ/kg-K
# Calculations
Wmax = Cp*((math.sqrt(Tmax)-math.sqrt(Tmin))**2); #Maximum work output in kJ/kg
nB = (1-math.sqrt(Tmin/Tmax))*100; #Brayton cycle efficiency
nC = (1-(Tmin/Tmax))*100; #Carnot efficiency
r = nB/nC; #Ratio of brayton cycle efficiency to carnot efficieny
# Results
print 'Maximum work per kg of air is %3.2f kJ/kg \
\nCycle efficiency is %3.0f percent\
\nRatio of brayton cycle efficiency to carnot efficieny is %3.3f'%(Wmax,nB,r)
```

In [21]:

```
# Variables
T1 = 291.; #Temperature at point 1 in K
P1 = 100.; #Pressure at point 1 in kN/(m**2)
nC = 0.85; #Isentropic efficiency of compressor
nT = 0.88; #Isentropic effficiency of turbine
rp = 8.; #Pressure ratio
T3 = 1273.; #Temperature at point 3 in K
m = 4.5; #Mass flow rate of air in kg/s
y = 1.4; #Ratio of speciifc heats
Cp = 1.006; #Specific heat at constant pressure in kJ/kg-K
# Calculations
x = (y-1)/y; #Ratio
T2s = T1*(rp**x); #Temperature at point 2s in K
T2 = T1+((T2s-T1)/nC); #Temperature at point 2 in K
t2 = T2-273; #Temperature at point 2 in oC
T4s = T3*((1/rp)**x); #Temperature at point 4s in K
T4 = T3-((T3-T4s)*nT); #Temperature at point 4 in K
t4 = T4-273; #Temperature at point 4 in oC
W = m*Cp*((T3-T4)-(T2-T1)); #Net power output in kW
nth = (((T3-T4)-(T2-T1))/(T3-T2))*100; #Thermal efficiency
WR = W/(m*Cp*(T3-T4)); #Work ratio
# Results
print 'Net power output of the turbine is %3.0f kW \
\nThermal efficiency of the plant is %3.0f percent\
\nWork ratio is %3.3f'%(W,nth,WR)
```

In [1]:

```
# Variables
P1 = 0.1; #Pressure at point 1 in MPa
T1 = 303.; #Temperature at point 1 in K
T3 = 1173.; #Temperature at point 3 in K
rp = 6.; #Pressure ratio
nC = 0.8; #Compressor efficiency
nT = nC; #Turbine efficiency
e = 0.75; #Regenerator effectiveness
y = 1.4; #Ratio of specific heats
Cp = 1.005; #Specific heat at constant pressure in kJ/kg-K
# Calculations
x = (y-1)/y; #Ratio
T2s = T1*(rp**x); #Temperature at point 2s in K
T4s = T3/(rp**x); #Temperature at point 4s in K
DTa = (T2s-T1)/nC; #Difference in temperatures at point 2 and 1 in K
DTb = (T3-T4s)*nT; #Difference in temperatures at point 3 and 4 in K
wT = Cp*DTb; #Turbine work in kJ/kg
wC = Cp*DTa; #Compressor work in kJ/kg
T2 = DTa+T1; #Temperature at point 2 in K
q1 = Cp*(T3-T2); #Heat supplied in kJ/kg
nth1 = ((wT-wC)/q1)*100; #Cycle efficiency without regenerator
T4 = T3-DTb; #Temperature at point 4 in K
T5 = T2+(e*(T4-T2)); #Temperature at point 5 in K
q2 = Cp*(T3-T5); #Heat supplied with regenerator in kJ/kg
nth2 = ((wT-wC)/q2)*100; #Cycle efficiency with regenerator
p = ((nth2-nth1)/nth1)*100; #Percentage increase due to regeneration
# Results
print 'Percentage increase in the cycle efficiency due to regeneration is %3.2f percent'%(p)
# rounding off error. please check.
```

In [23]:

```
# Variables
P1 = 1.; #Pressure at point 1 in atm
P3 = 5.; #Pressure at point 3 in atm
T1 = 288.; #Temperature at point 1 in K
T4 = 1143.; #Temperature at point 4 in K
y = 1.4; #Ratio of specific heats
Cp = 1.005; #Specific heat at constant pressure in kJ/kg-K
# Calculations
rp = P3/P1; #Pressure ratio
x = round((y-1)/y,3); #Ratio
rpx = round(rp**x,2)
T3 = round(T1*(rpx)); #Temperature at point 3 in K
T5 = T4-(T3-T1); #Temperature at point 5 in K
T6 = T4/(rpx); #Temperature at point 6 in K
C6 = math.sqrt(2000*Cp*(T5-T6)); #Velocity of air leaving the nozzle in m/s
# Results
print 'Velocity of air leaving the nozzle is %3.1f m/s'%(C6)
# rounding error. Please check. there is rounding off error in book
```

In [24]:

```
# Variables
C1 = 280.; #Velocity of aircraft in m/s
P1 = 48.; #Pressure at point 1 kPa
T1 = 260.; #Temperature at point 1 in K
rp = 13.; #Pressure ratio
T4 = 1300.; #Temperature at point 4 in K
Cp = 1005.; #Specific heat at constant pressure in J/kg
y = 1.4; #Ratio of specific heats
# Calculations
x = (y-1)/y; #Ratio
T2 = T1+((C1**2)/(2*Cp)); #Temperature at point 2 in K
P2 = P1*((T2/T1)**(1/x)); #Pressure at point 2 in kPa
P3 = rp*P2; #Pressure at point 3 in kPa
P4 = P3; #Pressure at point 4 in kPa
T3 = T2*(rp**x); #Temperature at point 3 in K
T5 = T4-T3+T2; #Temperature at point 5 in K
P5 = P4*((T5/T4)**(1/x)); #Pressure at point 5 in kPa
P6 = P1; #Pressure at point 6 in kPa
T6 = T5*((P6/P5)**x); #Temperature at point 6 in K
C6 = math.sqrt(2*Cp*(T5-T6)); #Velocity of air at nozzle exit in m/s
W = (C6-C1)*C1; #Propulsive power in J/kg
Q = Cp*(T4-T3); #Total heat transfer rate in J/kg
nP = (W/Q)*100; #Propulsive efficiency
# Results
print 'Pressure at the turbine exit is %3.1f kPa \
\nVelocity of exhaust gases are %3.1f m/s \
\nPropulsive efficiency is %3.1f percent'%(P5,C6,nP)
```