In [2]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
Cpg = 1.13 #Specific heat of gases(in kJ/kg.K):
Cpa = 1.005
rg = 1.33
ra = 1.4
C = 41.84*10**3 #kJ/kg of fuel
T1 = 272 #Temperatures(in K):
T3 = 1000
nc = 0.84 #Compression efficiency:
p3 = 3
p2 = 3
p1 = 0.5
p5 = 0.4
nt = 0.82 #Turbine efficiency:
nn = 0.92 #Nozzle efficiency:
Ca = 200 #Speed(in m/s):
T2 = T1*(p2/p1)**((ra-1)/ra) #Temperature at state 2(in K):
T2a = T1+(T2-T1)/nc #Temperature at state 2'(in K):
Wc = Cpa*(T2a-T1) #Compressive work(in kW):
r = (C-Cpg*T3)/(Cpg*T3-Cpa*T2a) #Air fuel ratio:
T4a = T3-Cpa/Cpg*(T2a-T1)/(1+r) #Temperature at state 4'(in K):
T4a = 810.46
T4 = T3-(T3-T4a)/nt
p4 = p3*(T4/T3)**(rg/(rg-1)) #Pressure of gas leaving turbine(in bar):
T5 = T4a*(p5/p4)**((rg-1)/rg) #Temperature at state 5(in K):
T5a = T4a-nn*(T4a-T5) #Temperature at state 5'(in K):
C5a = sqrt(2*Cpg*(T4a-T5a)*10**3) #Exit jet velocity(in m/s):
Ce = C5a
T = (1+1/r)*Ce-Ca #Thrust per kg of air per second:
#Results:
print "Power required for compressor: ",round(Wc,2),"kW/kg"
print "Air fuel ratio: ",round(r,2)
print "Pressure of gas leaving turbine: ",round(p4,2),"bar"
print "Thrust: ",round(T,2),"N/kg/s"
```

In [4]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
T1 = 285 #K
p1 = 1 #bar
T3 = 773 #K
p2 = 4 #bar
r = 1.4
Cpa = 1.005 #kJ/kg.K
CV = 43100 #kJ/kg.K
T3 = 273+500 #K
#Calculations:
T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):
T2a = T1+1.1*(T2-T1) #Temperature at state 2'(in K):
Wc = Cpa*(T2a-T1) #Work required in compressor(in kJ/kg of air):
qa = Cpa*(T3-T2a) #Heat added in combustion chamber(in kJ/kg of air):
r1 = CV/qa #Air fuel ratio:
T5 = T3*(p1/p2)**((r-1)/r) #Temperature at state 5(in K):
hd = Cpa*(T3-T5-T2a+T1) #Enthalpy drop in the nozzle(in kJ/kg of air):
Ce = sqrt(2*hd*10**3) #Velocity of exit gas from nozzle(in m/s):
T = (1+1/r)*Ce #Thrust(in N/kg/s):
#Results:
print "Power required to drive compressor: ",round(Wc,2),"kW/kg of air"
print "Air-fuel ratio: ",round(r1,2)
print "Thrust: ",round(Ce,2),"N/kg of air/s"
```

In [6]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
Cpg = 1.14 #kJ/kg.K,Specific heat of gases(in kJ/kg.K):
Cpa = 1.005 #kJ/kg.K,Specific heat of gases(in kJ/kg.K):
nm = 0.96 #Mechanical efficiency:
nc = 0.87 #Polytropic efficiency of compressor:
nt = 0.90 #Turbine efficiency:
nn = 0.95 #Nozzle efficiency:
B = 5.5 #By pass ratio:
ma = 200 #Mass flow rate of air(in kg/s):
p2 = 1.5 #Pressures(in bar):
p1 = 1
p3 = 28
pa = p1
T1 = 288 #Temperatures(in K):
rg = 1.33
ra = 1.4
CV = 43100 #kJ/kg
T4 = 1573 #K
#Calculations:
a1 = 1/nc*(ra-1)/ra #For compression:a1 = ((ne-1)/ne)
a1 = 0.328
a2 = nt*(rg-1)/rg #For expansion:a2 = (nt-1)/nt
a2 = 0.223
T2a = T1*(p2/p1)**a1 #Temperature at state 2'(in K):
T3a = T2a*(p3/p2)**a2 #Temperature at state 3'(in K):
dT = nn*T2a*(1-(pa/p2)**((ra-1)/ra))#Using nozzle efficiency:
C8 = sqrt(2*Cpa*10**3*dT) #Velocity at exit of nozzle(in m/s):
mab = ma*B/(B+1) #Mass flow rate of bypass air(in kg/s):
mca = ma-mab #Mass flow rate of hot gases(in kg/s):
Tb = mab*C8/10**3 #Thrust available due to by pass air(in kN):
r1 = (Cpg*T4-Cpa*T3a)/(CV-Cpg*T4) #Air fuel ratio:
T5a = T4-(Cpa*(T3a-T2a)/(nm*(1+r1)*Cpg))#Temperature at state 5'(in K):
T6a = (Cpg*nm*T5a-(1+B)*Cpa*(T2a-T1))/(Cpg*nm)#Temperature at state 6'(in K):
p4 = p3-p2 #Pressure at state 4(in bar):
p5 = p4*(T5a/T4)**(1/a2) #Pressure at state 5(in bar):
p6 = p5*(T6a/T5a)**(1/a2)#Pressure at state 6(in bar):
c = ((rg+1)/2)**(rg/(rg #Pressure at state 7(in bar):
dT1 = nn*T6a*(1-(p7/p6)**((rg-1)/rg))#For exit nozzle(in K):
C7 = sqrt(2*Cpg*10**3*dT1) #Velocity at exit of nozzle(in m/s):
Tg = mca*C7/10**3 #Thrust due to hot gases(in kN):
Tt = Tg+Tb #Total thrust(in kN):
st = Tt/ma #Specific thrust(in kN/kg/s):
sfc = r1*mca*3600/(Tt*10**3) #Specific fuel consumption(in kg/h.N):
#Results:
print "Specific thrust: ",round(st,3),"kN/kg/s"
print "Specific fuel consumption: ",round(sfc,2),"kg/h.N"
```

In [8]:

```
from __future__ import division
#Variable Declaration:
Ca = 277.78 #Velociy of turbojet plane(in m/s):
r1 = 0.5 #Thrust to velocity ratio:
m = 50 #Rate at which air enters(in kg/s):
r = 52 #Air fuel ratio:
LCV = 43100 #Lower calorific value of fuel:
#Calculations:
Ce = Ca/r1 #Jet velocity(in m/s):
T = (m+m/r)*Ce-m*Ca #Thrust(in N):
St = T/m #Specific thrust(in N/kg/s):
P = T*Ca/10**3 #Thrust power(in kW):
np = 2/(1+1/r1)*100 #Propulsive efficiency:
nt = ((1+1/r)*Ce**2-Ca**2)/(2*1/r*LCV)/10 #Thermal efficiency:
no = np*nt/100 #Overall efficiency:
sfc = m/r*3600/(T) #Specific fuel consumption(in kg/h.N):
#Results:
print "Jet velocity: ",round(Ce,2),"m/s"
print "Thrust: ",round(T/10**3,2),"kN"
print "Specific thrust: ",round(St,2),"N/kg/s"
print "Thrust power: ",round(P,2),"kW"
print "Propulsive efficiency: ",round(np,2),"%"
print "Thermal efficiency: ",round(nt,2),"%"
print "Overall efficiency: ",round(no,2),"%"
print "Specific fuel consumption: ",round(sfc,4),"kg/h.N"
```

In [12]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
p1 = 2.2 #Pressures(in bar):
T1 = 220 #Temperatures(in K):
T4 = 1273
C1 = 260 #Velocities(in m/s):
nn = 0.85 #Nozzle efficiency:
nt = 0.88 #Turbine efficiency:
nd = 0.90 #Diffuser efficiency:
Cp = 1.005#Specific heat(in kJ/kg.K):
r = 1.4 #Adiabatic index of compression:
r1 = 12 #Pressure ratio:
T3a = 568.635
p6 = 2.2
#Calculations:
T2 = T1+ C1**2/(2*Cp*1000) #Temperature at state 2(in K):
p2 = p1*(T2/T1)**(r/(r-1)) #Pressure at state 2(in bar):
p3 = p2*r1
p4 = p3
T3 = T2*(p3/p2)**((r-1)/r)#Temperature at state 3(in K):
T3a = T2+(T3-T2)/nn #Temperature at state 3'(in K):
T5a = T4-(T3a-T2) #Temperature at state 5'(in K):
T4 = T3a -T2 +T5a
T5 = T4-(T4-T5a)/nt #Temperature of state 5(in K):
p5 = p4*(T5/T4)**(r/(r-1)) #Pressure at state 5(in bar):
T6 = T5*(p6/p5)**((r-1)/r)
T2a = T1+(T2-T1)/nd #Temperature at state 2'(in K):
C6 = sqrt(2*(T5-T6)*Cp*10**3) #Velocity at exit of nozzle(in m/s):
#Results:
print "Velocity of exit of nozzle: ",round(C6,2),"m/s"
```

In [14]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
CV = 45000 #Calorific value(in kJ/kg):
T1 = 1000 #Inlet temperature(in C):
T4 = T1
nn = 0.9 #Nozzle efficiency:
nd = 0.9 #Diffuser efficiency:
nc = 0.8 #Compressive efficiency:
nt = 0.8 #Turbine efficiency:
Cp = 1.005 #Specific heat(in kJ/kg.K):
p3 = 7.248 #bar
r = 1.4
p6 = 0.7
R = 0.287 #Gas constant(in kJ/kg.K):
T2a = 282.11 #Temperature at state 2(in K):
T3a = 568.635
#Calculations:
p4 = p3-0.15
r1 = (CV-T1*Cp)/(Cp*T1-Cp*T3a) #Air fuel ratio:
T5a = T4-(T3a-T2a) #Temperature at state 5'(in K):
T5 = T4-(T4-T5a)/nt #Temperature at state 5(in K):
p5 = p4*(T5/T4)**(r/(r-1))
T6 = T5a*(p6/p5)**((r-1)/r) #Temperature at state 6(in K):
T6a = T5a-(T5a-T6)*nn #Temperature at state 6'(in K):
C6 = sqrt(2*Cp*(T5a-T6a)*10**3) #Velocity at exit of nozzle(in m/s):
v = 200/10 #Volume flow rate of air(in m**3/s):
m = 0.7*10**2*v/(R*260) #Mass flow rate(in kg/s):
St = (1+1/r1)*C6 #Specific thrust(in N/kg of air/s):
Tt = m*St #Total thrust(in N):
#Results:
print "Specific thrust: ",round(St,2),"N/kg of air/s"
print "Total thrust: ",round(Tt,2),"N"
```

In [16]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
Cpa = 1.005 #Specific heat(in kJ/kg.K):
Cpg = 1.087
ra = 1.4
rg = 1.33
R = 0.287 #Gas constant(in kJ/kg.K):
C0 = 250 #Speed of aeroplane(in m/s):
C4a = 180 #Velocity at exit of turbine(in m/s):
CV = 43000 #kJ/kg
P = 800 #Thrust power(in kW):
T0 = -20+273 #Temperatures(in K):
T2 = 474.25
T3 = 973
p0 = 0.3 #Pressures(in bar):
p1 = 0.31
nc = 0.85 #Compressor efficiency:
nj = 0.90 #Jet engine efficiency:
r1 = 6 #Pressure ratio:
#Calculations:
p5 = p0
T1 = T0+C0**2/(2*Cpa*10**3) #Temperature at state 2(in K):
T2a = T1+(T2-T1)/nc
p2 = p1*r1 #Pressure at state 2(in bar):
p3 = p2
FA = (Cpa*T3-Cpg*T2a)/(CV-Cpa*T3) #Fuel air ratio:
T4a = T3-Cpa/Cpg*(T2a-T1)/(1+FA) #Temperature at state 4'(in K):
T4 = T3-(T3-T4a)/nc #Temperature at state 4(in K):
p4 = p3*(T4/T3)**(rg/(rg-1)) #Pressure at state 4(in bar):
T5 = T4a*(p5/p4)**((rg-1)/rg) #Temperature at state 5(in K):
C5 = sqrt(2*nj*(Cpg*10**3*(T4a-T5)+C4a**2/2)) #Nozzle exit velocity(in m/s):
no = (((1+FA)*C5-C0)*C0)/(FA*CV*10**3)*100 #Overall efficiency:
ma = P*10**3/(((1+FA)*C5-C0)*C0) #Rate of air consumption(in kg/s):
Pt = ma*(1+FA)*Cpg*(T3-T4a) #Power produced by the turbine(in kW):
T5a = T4a-((C5**2-C4a**2)/(2*Cpg*10**3)) #Temperature at state 5'(in K):
d5a = p5*10**2/(R*T5a) #Density of exhaust gases(in m**3/kg):
Aj = ma*(1+FA)/(C5*d5a) #Jet exit area(in m**2):
#Results:
print "Air-fuel ratio: ",round(1/FA,2),":1"
print "Rate of air consumption: ",round(ma,2),"kg/s"
print "Power produced by turbine: ",round(Pt,2),"kW"
print "Jet exit area: ",round(Aj,2),"m**2"
```

In [18]:

```
from __future__ import division
from math import sqrt,pi
#Variable Declaration:
Ca = 250 #Speed of jet plane(in m/s):
d = 0.15 #Density of air(in kg/m**3):
D = 6800 #Drag(in kW):
np = 0.56 #Propulsive efficiency:
#Calculations:
Ce = 2*Ca/np-Ca #Relative velocity(in m/s):
C = Ce-Ca #Absolute velocity of jet(in m/s):
ma = D/(Ce-Ca) #Mass flow rate(in kg/s):
v = ma/d #Volume flow rate(in m**3/s):
dj = sqrt(v*4/(2*pi*Ce)) #Jet diameter(in m):
#Results:
print "Jet diamter: ",round(dj*100,1),"cm"
```

In [20]:

```
from __future__ import division
#Variable Declaration:
R = 0.287 #Gas constant(in kJ/kg.K):
r1 = 0.4 #Density ratio:
Cp = 1.005 #Specific heat(in kJ/kg.K):
d = 0.018 #Drag coefficient:
Ce = 550 #Jet velocity(in m/s):
A = 20 #Wing area(in m**2):
Ca = 900*1000/3600 #Speed of aeroplane(in m/s):
d1 = 1.01325*10**2/(R*288) #Density of STP(in kg/m**3):
d2 = r1*d1 #Density of air at altitude(in kg/m**3):
T = d*A*d2*Ca**2/2 #Thrust on aeroplane:
ma = T/(Ce-Ca) #Mass flow rate(in kg/s):
St = T/ma #Specific thrust(in N/kg of air):
#Results:
print "Specific thrust: ",round(St),"N/kg of air"
```

In [22]:

```
from __future__ import division
from math import sqrt
#Variable Declaration:
Ca = 250 #Speed of air craft(in m/s):
m = 55 #Mass flow rate(in kg/s):
r = 85 #Air fuel ratio:
nc = 0.96 #Combustion efficiency:
CV = 43000 #Lower calorific value(in kJ/kg):
dh = 220 #Isentropic enthalpy change(in kJ/kg):
n = 0.95 #Velocity coefficient:
#Calculations:
Ce = n*sqrt(2*dh*10**3)#Jet velocity(in m/s):
Ce = 615.67
St = 400.67 #Specific thrust per kg of air(in N/kg air):
r1 = 1/r*3600*m #Fuel flow rate(in kg/hr):
sfc = r1/(St*m) #Specific fuel consumption(in kg/N.hr):
P = m*(Ce-Ca)*Ca/10**3 #Thrust power(in kW):
Pp = m*(Ce**2-Ca**2)/2/10**3 #Propulsive power(in kW):
np = P/Pp*100 #Propulsive efficiency:
no = P/(m/r*CV*nc)*100 #Overall efficiency:
#Results:
print "Propulsive power: ",round(Pp,2),"kW"
print "Propulsive efficiency: ",round(np,2),"%"
print "Overall efficiency: ",round(no,2),"%"
```