import math
#Input data
eff_com = 0.8 #Compressor efficiency
eff_t = 0.85 #Turbine efficiency
pr = 4. #Pressure ratio including combustion pressure loss(Po2s/Po1)
eff_c = 0.98 #Combustion efficiency
eff_m = 0.99 #Mechanical transmission efficiency
eff_n = 0.9 #Nozzle efficiency
Tmax = 1000. #Maximum cycle temperature in K
To3 = Tmax #Stagnation temperature before turbine inlet in K
w = 220. #mass flow rate in N/s
Cp_air = 1005. #Specific heat capacity at consmath.tant pressure in J/kg-K
k = 1.4 #Adiabatic consmath.tant for air
Cp_gas = 1153. #Specific heat capacity at consmath.tant pressure in J/kg-K
k_gas = 1.3 #Adiabatic consmath.tant
To1 = 15.+273 #Inlet Stagnation temperature of compressor in K
Po1 = 1. #Inlet Stagnation pressure in bar
Poe = Po1 #Exit stagnation pressure in bar, Since exit at ambient conditions
g = 9.81 #Acceleration due to gravity in m/s**2
#Calculation
To2s = To1*(pr)**((k-1)/k) #Exit Stagnation temperature of compressor at isentropic process in K
To2 = ((To2s-To1)/eff_com)+To1 #Exit Stagnation temperature of compressor in K
Wc = (Cp_air*(To2-To1)) #Work given to compressor in J/kg, Cp in J/kg-K
To4 = To3-(Wc/Cp_gas*eff_m) #Exit Stagnation temperature of turbine in K
To4s = To3-((To3-To4)/eff_t) #Exit Stagnation temperature of turbine at isentropic process in K
Po2 = Po1*pr #Exit Stagnation pressure of compressor in bar
Po3 = Po2 #Exit Stagnation pressure of combustion chamber in bar, Since the process takes place at consmath.tant pressure process
p1 = (To3/To4s)**(k_gas/(k_gas-1)) #Stagnation Pressure ratio of inlet and outlet of turbine
Po4s = Po3/p1 #Stagnation Pressure at outlet of turbine at isentropic process in bar
pr_n = Po4s/Poe #Pressure ratio of nozzle
Toes = To4/((pr_n)**((k_gas-1)/k_gas)) #Exit Stagnation temperature of nozzle at isentropic process in K
Toe = To4-((To4-Toes)*eff_n) #Exit Stagnation temperature of nozzle in K
Cj = math.sqrt(2*Cp_gas*(To4-Toe)) #Jet velocity in m/s
m = w/g #Mass flow rate of air in kg/s
F = m*Cj*10**-3 #Thrust in kN
Fs = (F*10**3)/m #Specific thrust in Ns/kg, F in N
Is = F/w #Specific impulse in sec
#Output
print 'A)Thrust is %3.3f kN \
\nB)Specific thrust is %3.2f Ns/kg'%(F,Fs)
import math
#Input data
u = 800.*(5./18) #Flight velocity in m/s
Pe = 60. #Ambient pressure in kPa
Pn = 300. #Pressure entering nozzle in kPa
Tn = 200.+273 #Temperature entering nozzle in K
m = 20. #Mass flow rate of air in kg/s
Cp = 1005. #Specific heat capacity at consmath.tant pressure in J/kg-K
k = 1.4 #Adiabatic consmath.tant for air
#Calculation
Te = Tn*(Pe/Pn)**((k-1)/k) #Exit temperature of nozzle in K
Cj = math.sqrt(2*Cp*(Tn-Te)) #Jet velocity in m/s
F = m*(Cj-u) #Thrust in N
P = F*u*10**-3 #Thrust power in kW
eff = ((2*u)/(Cj+u))*100 #Propulsive efficiency in percent
#Output
print 'A)Thrust developed is %3.1f N \
\nB)Thrust developed is %3.2f kW \
\nC)Propulsive efficiency is %3.3f percent'%(F,P,eff)
import math
#Input data
Mi = 0.8 #Inlet mach number
h = 10000. #Altitude in m
pr_c = 8. #Pressure ratio of compressor
To3 = 1200. #Stagnation temperature at turbine inlet in K
eff_c = 0.87 #Compressor efficiency
eff_t = 0.9 #Turbine efficiency
eff_d = 0.93 #Diffuser efficiency
eff_n = 0.95 #Nozzle efficiency
eff_m = 0.99 #Mechanical transmission efficiency
eff_cc = 0.98 #Combustion efficiency
pl = 0.04 #Ratio of combustion pressure loss to compressor delivery pressure
k = 1.4 #Adiabatic consmath.tant of air
R = 287. #Specific gas consmath.tant in J/kg-K
k_g = 1.33 #Adiabatic consmath.tant of gas
Cp_a = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
Cp_g = 1100. #Specific heat capacity at consmath.tant pressure of gas in J/kg-K
CV = 43000000. #Calorific value in J/kg (AssumE)
#Calculation
Ti = 223.15 #Inlet temperature in K from gas tables
Pi = 26.4 #Inlet pressure in kPa from gas tables
ai = math.sqrt(k*R*Ti) #Sound velocity in m/s
Ci = ai*Mi #Velocity of air in m/s,
u = Ci #Flight velocity in m/s, Since it is reaction force of Ci
t1 = 0.886 #Ratio of static to stagnation temperature a entry from gas tables at M = 0.8
To1s = Ti/t1 #Stagnation temperature at inlet of compressor at isentropic process in K
To1 = ((To1s-Ti)/eff_d)+Ti #Stagnation temperature at inlet of compressor in K
p1 = (To1s/Ti)**(k/(k-1)) #Pressure ratio i.e. (Po1s/Pi)
Po1s = Pi*p1 #inlet Stagnation pressure of compressor at isentropic process in kPa
Po1 = Po1s #Inlet Stagnation pressure of compressor in kPa
Po2 = pr_c*Po1 #Exit Stagnation pressure of compressor in kPa
To2s = To1s*(Po2/Po1)**((k-1)/k) #Exit Stagnation temperature of compressor at isentropic process in K
To2 = ((To2s-To1)/eff_c)+To1 #Exit Stagnation temperature of compressor in K
P_los = pl*Po2 #combustion pressure loss in kPa
Po3 = Po2-P_los #Exit Stagnation pressure of combustion chamber in kPa
To4 = To3-((Cp_a*(To2-To1))/(eff_m*Cp_g)) #Exit Stagnation temperature of turbine in K
To4s = To3-((To3-To4)/eff_t) #Exit Stagnation temperature of turbine at isentropic process in K
p1 = (To3/To4s)**(k_g/(k_g-1)) #Pressure ratio i.e. (Po3/Po4s)
Po4s = Po3/p1 #Stagnation Pressure at outlet of turbine at isentropic process in kPa
Poe = Pi #Exit stagnation pressure in kPa, Since exit is at ambient conditions
pr_n = Po4s/Poe #Pressure ratio of nozzle
Toes = To4/((pr_n)**((k_g-1)/k_g)) #Exit Stagnation temperature of nozzle at isentropic process in K
Toe = To4-((To4-Toes)*eff_n) #Exit Stagnation temperature of nozzle in K
Cj = math.sqrt(2*Cp_g*(To4-Toe)) #Jet velocity in m/s
Fs = Cj-u #Specific thrust in Ns/kg
f = ((Cp_g*To3)-(Cp_a*To2))/((eff_cc*CV)-(Cp_g*To3)) #Fuel-air ratio
TSFC = (f/Fs)#*10**5 #Thrust specific fuel consumption in kg/s-N x10**-5
#Output
print 'A)Specific thrust is %3.2f Ns/kg \
\nB)Thrust specific fuel consumption is %.3e kg/s-N'%(Fs,TSFC)
import math
#Input data
u = 300. #Flight velocity in m/s
Pi = 35. #Inlet pressure in kPa
Ti = -40.+273 #Inlet temperature in K
pr_c = 10. #Pressure ratio of compressor
T3 = 1100.+273 #Inlet turbine temperature in K
m = 50. #Mass flow rate of air in kg/s
k = 1.4 #Adiabatic consmath.tant of air
Cp = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
R = 287. #Specific gas consmath.tant in J/kg-K
#Calculation
ai = math.sqrt(k*R*Ti) #Sound velocity at diffuser in m/s
C1 = u #Velocity of air in m/s, Since it is reaction force of u
T1 = Ti+(C1**2/(2*Cp)) #Temperature at inlet of compressor in K
P1 = Pi*((T1/Ti)**(k/(k-1))) #Inlet pressure of compressor in kPa
P2 = pr_c*P1 #Exit pressure of compressor in kPa
P3 = P2 #Exit pressure of combustion chamber in kPa, Since the process takes place at consmath.tant pressure process
T2 = T1*(P2/P1)**((k-1)/k) #Exit temperature of compressor in K
T4 = T3-(T2-T1) #Exit temperature of turbine in K
P4 = P3/((T3/T4)**(k/(k-1))) #Pressure at outlet of turbine in kPa
Pe = Pi #Exit pressure in kPa, Since exit is at ambient conditions
pr_n = P4/Pe #Pressure ratio of nozzle
Te = T4/((pr_n)**((k-1)/k)) #Exit temperature of nozzle in K
Cj = math.sqrt(2*Cp*(T4-Te)) #Jet velocity in m/s
sig = u/Cj #Jet speed ratio
eff_prop = ((2*sig)/(1+sig))*100 #Propulsive efficiency of the cycle in %
#Output
print 'A)Temperature and pressure of gases at turbine exit is %3.2f K and %3i kPa \
\nB)Velocity of gases is %3.2f m/s \
\nC)Propulsive efficiency of the cycle is %3.2f percent'%(T4,P4,Cj,eff_prop)
import math
#Input data
n = 2 #Number of jets
D = 0.25 #Diameter of turbojet in m
P = 3000 #Net power at turbojet in W
mf_kWh = 0.42 #Fuel consumption in kg/kWh
CV = 49000 #Calorific value in kJ/kg
u = 300 #Flight velocity in m/s
d = 0.168 #Density in kg/m**3
AFR = 53 #Air fuel ratio
#Calculatioon
mf = mf_kWh*P/3600 #Mass flow rate of fuel in kg/s
ma = AFR*mf #Mass flow rate of air in kg/s
m = ma+mf #Mass flow rate of gas in kg/s
Q = m/d #Volume flow rate in m**3/s
Cj = (Q*4)/(2*math.pi*D**2) #Jet velocity in m/s
Ca = Cj-u #Absolute Jet velocity in m/s
F = ((m*Cj)-(ma*u))*10**-3 #Thrust in kN
eff = ((F*u)/(mf*CV))*100 #Overall efficiency in %
eff_prop = ((2*u)/(Cj+u))*100 #Propulsive efficiency of the cycle in %
eff_ther = (eff/eff_prop)*100 #Efficiency of turbine in %
#Output
print 'A)Absolute velocity of jet is %3.3f m/s \
\nB)Resistance of the plane is %3.4f kN \
\nC)Overall efficiency is %3.2f percent \
\nD)Efficiency of turbine is %3.3f percent'%(Ca,F,eff,eff_ther)
import math
#Input data
u = 900*(5./18) #Flight velocity in m/s
ma = 3000./60 #Mass flow rate of air in kg/s
dh = 200. #Enthalpy drop of nozzle in kJ/kg
eff_n = 0.9 #Nozzle efficiency
AFR = 85 #Air fuel ratio
eff_cc = 0.95 #Combustion efficiency
CV = 42000 #Calorific value in kJ/kg
#Calculation
mf = ma/AFR #Mass flow rate of fuel in kg/s
m = ma+mf #Mass flow rate of gas in kg/s
Cj = math.sqrt(2*eff_n*dh*10**3) #Jet velocity in m/s
sig = u/Cj #Jet speed ratio
F = ((m*Cj)-(ma*u))*10**-3 #Thrust in kN
Pt = F*u #Thrust power in kW
Pp = 0.5*((m*Cj**2)-(ma*u**2))*10**-3 #Propulsive power in kW
HS = eff_cc*mf*CV #Heat supplied in kW
eff_ther = (Pp/HS)*100 #Efficiency of turbine in %
eff_prop = (Pt/Pp)*100 #Propulsive efficiency of the cycle in %
eff = (Pt/HS)*100 #Overall efficiency in %
#Output
print 'A)Propulsive power is %3.2f kW \
\nB)Thrust power is %3.1f kW \
\nC)Propulsive efficiency is %3.3f percent \
\nD)Thermal efficiency is %3.2f percent \
\nE)Total fuel consumption is %3.3f kg/s F)Overall efficiency is %3.3f percent'%(Pp,Pt,eff_prop,eff_ther,mf,eff)
import math
#Input data
M = 0.8 #Mach number
CV = 42800. #Calorific value in kJ/kg
h = 10. #Altitude in km
F = 50. #Thrust in kN
ma = 45. #Mass flow rate of air in kg/s
mf = 2.65 #Mass flow rate of fuel in kg/s
#Calculation
m = ma+mf #Mass flow rate of gas in kg/s
a = 299.6 #Sound velocity in m/s, from gas tables
T = 233.15 #Inlet temperature in K
u = a*M #Flight velocity in m/s
Cj = ((F*10**3)+(ma*u))/m #Jet velocity in m/s
sig = u/Cj #Jet speed ratio
Fs = F*10**3/m #Specific thrust in Ns/kg, F in N
TSFC = mf*3600/(F*10**3) #Thrust specific fuel consumption in kg/N-hr, F in N
Pt = F*u #Thrust power in kW
Pp = 0.5*((m*Cj**2)-(ma*u**2))*10**-3 #Propulsive power in kW
HS = mf*CV #Heat supplied in kW
eff_ther = (Pp/HS)*100 #Efficiency of turbine in %
eff_prop = (Pt/Pp)*100 #Propulsive efficiency of the cycle in %
eff = (Pt/HS)*100 #Overall efficiency in %
#Output
print 'A)Specific thrust is %3.2f N/kg \
\nB)Thrust specific fuel consumption is %3.4f kg/N-hr \
\nC)Jet velocity is %3.3f m/s \
\nD)Thermal efficiency is %3.2f percent \
\nE)Propulsive efficiency is %3.3f percent F)Overall efficiency is %3.2f percent'%(Fs,TSFC,Cj,eff_ther,eff_prop,eff)
import math
#Input data
Mi = 0.8 #Inlet mach number
h = 10. #Altitude in km
To3 = 1200. #Stagnation temperature before turbine inlet in K
dTc = 175. #Stagnation temperature rise through the compressor in K
CV = 43000. #Calorific value in kJ/kg
eff_c = 0.75 #Compressor efficiency
eff_cc = 0.75 #Combustion efficiency
eff_t = 0.81 #Turbine efficiency
eff_m = 0.98 #Mechanical transmission efficiency
eff_n = 0.97 #Nozzle efficiency
Is = 25. #Specific impulse in sec
k = 1.4 #Adiabatic consmath.tant of air
R = 287. #Specific gas consmath.tant in J/kg-K
Cp = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
g = 9.81 #Acceleration due to gravity in m/s**2
#Calculation
Ti = 223.15 #Inlet temperature in K from gas tables
ai = math.sqrt(k*R*Ti) #Sound velocity in m/s
Toi = (1+((0.5*(k-1)*Mi**2)))*Ti #Stagnation temperature at diffuser inlet in K
To1 = Toi #Inlet Stagnation temperature of compressor in K, math.since hoi = ho1
To2 = dTc+To1 #Exit Stagnation temperature of compressor in K
pr_c = (1+(eff_c*((To2-To1)/To1)))**(k/(k-1)) #Compressor pressure ratio
f = ((Cp*To3)-(Cp*To2))/((eff_cc*CV*10**3)-(Cp*To3)) #Fuel-air ratio, calculation mistake in textbook
dTt = dTc/(eff_m*(1+f)) #Temperature difference across turbine
pr_t = 1/((1-(dTt/(To3*eff_t)))**(k/(k-1))) #Turbine pressure ratio
To4 = To3-dTc #Exit Stagnation temperature of turbine in K
u = ai*Mi #Flight velocity in m/s
sig = 1/(((Is*g)/u)+1) #Jet speed ratio
Ce = u/sig #Exit velocity in m/s
Cj = Ce #Jet velocity in m/s, Since Cj is due to exit velociy
Te = To4-(Ce**2/(2*Cp)) #Exit temperature in K
Tes = To4-((To4-Te)*eff_n) #Exit temperature in K, (At isentropic process)
pr_n = (To4/Te)**(k/(k-1)) #Nozzle pressure ratio
ae = math.sqrt(k*R*Te) #Exit Sound velocity in m/s
Me = Ce/ae #Exit mach number
print 'A)Fuel-air ratio is %3.5f \
\nB)Compressor, turbine, nozzle pressure ratio are %3.3f, %3.3f, %3.2f respectively \
\nC)Mach number at exhaust jet is %3.3f'%(f,pr_c,pr_t,pr_n,Me)
import math
#Input data
D = 2.5 #Diameter in m
u = 500.*(5./18) #Flight velocity in m/s
h = 8000. #Altitude in m
sig = 0.75 #Jet speed ratio
g = 9.81 #Acceleration due to gravity in m/s**2
#Calculation
d = 0.525 #from gas tables
A = math.pi*D**2*0.25 #Area of flow in m**2
Cj = u/sig #Jet velocity in m/s
Vf = (u+Cj)/2 #Velocity of flow in m/s
ma = d*A*Vf #Mass flow rate of air in kg/s
F = ma*(Cj-u)*10**-3 #Thrust in kN
P = F*u #Thrust power in kW
Fs = F*10**3/ma #Specific thrust in Ns/kg
Is = Fs/g #Specific impulse in sec
#Output
print 'A)Flow rate of air through the propeller is %3.3f m/s \
\nB)Thrust produced is %3.3f kN \
\nC)Specific thrust is %3.2f N-s/kg \
\nD)Specific impulse is %3.3f sec \
\nE)Thrust power is %3.1f kW'%(ma,F,Fs,Is,P)
import math
#Input data
h = 3000. #Altitude in m
Pi = 0.701 #Inlet pressure in bar
Ti = 268.65 #Inlet temperature in K
u = 525*(5./18) #Flight velocity in m/s
eff_d = 0.875 #Diffuser efficiency
eff_c = 0.79 #Compressor efficiency
C1 = 90. #Velocity of air at compressor in m/s
dTc = 230. #Temperature rise through compressor
k = 1.4 #Adiabatic consmath.tant of air
Cp = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
R = 287. #Specific gas consmath.tant in J/kg-K
#Calculation
ai = math.sqrt(k*R*Ti) #Sound velocity in m/s
Mi = u/ai #Inlet mach number
Toi = (1+((0.5*(k-1)*Mi**2)))*Ti #Stagnation temperature at diffuser inlet in K
To1 = Toi #Inlet Stagnation temperature of compressor in K, math.since hoi = ho1
T1 = To1-(C1**2/(2*Cp)) #Temperature at inlet of compressor in K
P1 = Pi*((1+(eff_d*((T1/Ti)-1)))**(k/(k-1))) #Inlet pressure of compressor in bar
dPc = P1-Pi #Pressure rise through inlet diffuser in bar
pr_c = (((eff_c*dTc)/To1)+1)**(k/(k-1)) #Pressure ratio of compressor
P = Cp*(dTc) #Power required by the compressor in kW/(kg/s)
eff = 1-(1/pr_c**((k-1)/k)) #Air standard efficiency
#Output
print 'A)Pressure rise through diffuser is %3.4f bar \
\nB)Pressure developed by compressure is %3.4f bar \
\nC)Air standard efficiency of the engine is %3.4f'%(dPc,P1,eff)
import math
#Input data
h = 9500. #Altitude in m
u = 800*(5./18) #Flight velocity in m/s
eff_prop = 0.55 #Propulsive efficiency of the cycle
eff_o = 0.17 #Overall efficiency
F = 6100. #Thrust in N
d = 0.17 #Density in kg/m**3
CV = 46000. #Calorific value in kJ/kg
#Calculation
mf = (F*u)/(eff_o*CV*10**3) #Mass flow rate of fuel in kg/s
Cj = ((2*u)/(eff_prop))-u #Jet velocity in m/s, wrong calculation in textbook
Ca = Cj-u #Absolute Jet velocity in m/s
ma = (F-(mf*Cj))/(Ca) #Mass flow rate of air in kg/s
m = ma+mf #Mass flow rate of gas in kg/s
f = ma/mf #Air fuel ratio
Q = m/d #Volume flow rate in m**3/s
Dj = math.sqrt((4*Q)/(math.pi*Cj))*10**3 #Diameter of jet in mm, Cj value wrong in textbook
P = ((F*u)/eff_prop)*10**-3 #Power output of engine in kW
#Output
print 'A)Diamter of the jet is %3.1f mm \
\nB)Power output is %3.1f kW \
\nC)Air-fuel ratio is %3.3f \
\nD)Absolute velocity of the jet is %3i m/s'%(Dj,P,f,Ca)
import math
#Input data
u = 960*(5./18) #Flight velocity in m/s
ma = 40. #Mass flow rate of air in kg/s
AFR = 50. #Air fuel ratio
sig = 0.5 #Jet speed ratio, for maximum thrust power
CV = 43000. #Calorific value in kJ/kg
#Calculation
mf = ma/AFR #Mass flow rate of fuel in kg/s
m = ma+mf #Mass flow rate of gas in kg/s
Cj = u/sig #Jet velocity in m/s
F = ((m*Cj)-(ma*u))*10**-3 #Thrust in kN
Fs = F*10**3/m #Specific thrust in Ns/kg, F in N
Pt = F*u #Thrust power in kW
eff_prop = ((2*sig)/(1+sig))*100 #Propulsive efficiency of the cycle in %
eff_ther = ((0.5*m*(Cj**2-u**2))/(mf*CV*10**3))*100 #Efficiency of turbine in %
eff = (eff_prop/100)*(eff_ther/100)*100 #Overall efficiency in %
TSFC = mf*3600/(F*10**3) #Thrust specific fuel consumption in kg/Nhr
#Output
print 'A)Jet velocity is %3.1f m/s \
\nB)Thrust is %3.3f kN \
\nC)Specific thrust is %3.2f N-s/kg \
\nD)Thrust power is %3.2f kW \
\nE)propulsive, thermal and overall efficiency is %3.2f, %3.2f and %3.3f respectively \
\nF)Thrust specific fuel consumption is %3.4f kg/Nhr'%(Cj,F,Fs,Pt,eff_prop,eff_ther,eff,TSFC)
import math
#Input data
u = 960*(5./18) #Flight velocity in m/s
ma = 54.5 #Mass flow rate of air in kg/s
dh = 200. #Change of enthalpy for nozzle in kJ/kg
Cv = 0.97 #Velocity coefficient
AFR = 75. #Air fuel ratio
eff_cc = 0.93 #Combustion efficiency
CV = 45000. #Calorific value in kJ/kg
#Calculation
mf = ma/AFR #Mass flow rate of fuel in kg/s
Cj = Cv*math.sqrt(2*dh*10**3) #Jet velocity in m/s
F = ma*(Cj-u) #Thrust in kN
TSFC = mf*3600/(F) #Thrust specific fuel consumption in kg/Nhr
HS = mf*eff_cc*CV #Heat supplied in kJ/s
Pp = 0.5*ma*(Cj**2-u**2)*10**-3 #Propulsive power in kW
Pt = F*u #Thrust power in kW
eff_p = Pt/(Pp*10**3) #Propulsive efficiency of the cycle
eff_t = Pp/HS #Efficiency of turbine
eff_o = Pt*10**-3/HS #Overall efficiency
#Output
print 'A)Exit velocity of the jet is %3.2f m/s \
\nB)Fuel rate is %3.4f kg/s \
\nC)Thrust specific fuel consumption is %3.5f kg/Nhr \
\nD)Thermal efficiency is %3.3f \
\nE)Propulsive power is %3.2f kW \
\nF)Propulsive efficiency is %3.4f \
\nG)Overall efficiency is %3.5f'%(Cj,mf,TSFC,eff_t,Pp,eff_p,eff_o)
import math
#Input data
u = 750*(5./18) #Flight velocity in m/s
h = 10000. #Altitude in m
eff_p = 0.5 #Propulsive efficiency of the cycle
eff_o = 0.16 #Overall efficiency
d = 0.173 #Density in kg/m**3
F = 6250. #Thrust in N
CV = 45000. #Calorific value in kJ/kg
#Calculation
sig = eff_p/(2-eff_p) #Jet speed ratio
Cj = u/sig #Jet velocity in m/s
Ca = Cj-u #Absolute Jet velocity in m/s
ma = F/Ca #Mass flow rate of air in kg/s
Q = ma*60/d #Volume flow rate in m**3/min
A = Q/(Cj*60) #Area of flow in m**2
D = math.sqrt((4*A)/(math.pi))*10**3 #Diameter in mm
Pt = F*u #Thrust power in W
Pp = (Pt/eff_p)*10**-3 #Propulsive power in kW
eff_t = eff_o/eff_p #Efficiency of turbine
HS = Pp/eff_t #Heat supplied in kJ/s
mf = HS/CV #Mass flow rate of fuel in kg/s
AFR = ma/mf #Air fuel ratio
#Output
print 'A)Absolute velocity of the jet is %3.2f m/s \
\nB)Volume of air compressed per minute is %3.2f m**3/min \
\nC)Diameter of the jet is %3i mm \
\nD)Power unit of the unit is %3.3f kW \
\nE)Air fuel ratio is %3.1f'%(Ca,Q,D,Pp,AFR)
import math
#Input data
P1 = 0.56 #Inlet pressure of compressor in bar
T1 = 260 #Temperature at inlet of compressor in K
pr_c = 6 #Pressure ratio of compressor
eff_c = 0.85 #Compressor efficiency
u = 360*(5./18) #Flight velocity in m/s
D = 3 #Propeller diameter in m
eff_p = 0.8 #Efficiency of propeller
eff_g = 0.95 #Gear reduction efficiency
pr_t = 5 #Expansion ratio
eff_t = 0.88 #Turbine efficiency
T3 = 1100 #temperature at turbine inlet in K
eff_n = 0.9 #Nozzle efficiency
Cp = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
CV = 40000 #Calorific value in kJ/kg
k = 1.4 #Adiabatic consmath.tant of air
R = 287 #Specific gas consmath.tant in J/kg-K
#Calculation
P2 = pr_c*P1 #Exit pressure of compressor in bar
T2s = T1*(pr_c)**((k-1)/k) #Exit temperature of compressor at isentropic proces in K
T2 = T1+((T2s-T1)/eff_c) #Exit temperature of compressor in K
Wc = Cp*(T2-T1)*10**-3 #Power input to compressor in kJ/kg of air
C1 = u #Air velocity in m/s, math.since C1 is resulmath.tant of u
C = C1/eff_p #Average velocity in m/s
C2 = (2*C)-C1 #Exit velocity from compressor in m/s
Ap = 0.25*math.pi*D**2 #Area of propeller passage in m**2
Q = Ap*C #Quantity of air inducted in m**3/s
mf = ((T3-T2)*Cp)/((CV*10**3)-(Cp*T3)) #Mass flow rate of fuel in kg/s
f = mf #Fuel consumption in kg/kg of air
AFR = 1/mf #Air fuel ratio
P3 = P2 #Exit pressure of combustion chamber in bar, Since process is at consmath.tant pressure
P4 = P3/pr_t #Exit pressure of turbine in bar
T4s = T3/((pr_t)**((k-1)/k)) #Exit temperature of turbine at isentropic proces in K, wrong calculation
T4 = T3-(eff_t*(T3-T4s)) #Exit temperature of turbine in K
Po = (1+f)*Cp*(T3-T4)*10**-3 #Power output per kg of air in kJ/kg of air
Pa = Po-Wc #Power available for propeller in kJ/kg of air
Pe = P1 #Exit pressure in bar, Since exit is at ambient conditions
Tes = T4/((P4/Pe)**((k-1)/k)) #Exit temperature of nozzle at isentropic proces in K
Cj = math.sqrt(2*Cp*eff_n*(T4-Tes)) #Jet velocity in m/s
Fs = ((1+f)*Cj)-u #Specific thrust in Ns/kg, F in N
Pp = ((0.5*P1*10**5*Q*(C2**2-C1**2))/(R*T1))*10**-3 #Propulsive power by propeller in kJ/s
Ps = Pp/eff_g #Power supplied by the turbine in kW
ma = Ps/Pa #Air flow rate in kg/s
Fj = ma*Cj*10**-3 #Jet thrust in kN, calculation mistake
Fp = (Pp*eff_p)/u #Thrust produced by propeller in kN
#Output
print 'A)Air fuel ratio is %3.2f \
\nB)Thrust produced by the nozzle is %3.3f kN \
\nC)Thrust by the propeller is %3.3f kN \
\nD)mass flow rate through the compressor is %3.2f kg/s'%(AFR,Fj,Fp,ma)
import math
#Input data
M1 = 1.5 #Mach number
h = 6500. #Altitude in m
D = 0.5 #Diameter in m
To4 = 1600. #Stagnation temperature at nozzle inlet in K
CV = 40000. #Calorific value in kJ/kg
k = 1.4 #Adiabatic consmath.tant of air
R = 287. #Specific gas consmath.tant in J/kg-K
eff_d = 0.9 #Diffuser efficiency
eff_cc = 0.98 #Combustion efficiency
eff_n = 0.96 #Nozzle efficiency
pr_l = 0.02 #Pressure ratio i.e. Stagnation pressure loss to Exit presure of compressor
Cp = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
#Calculation
P1 = 0.44 #Inlet pressure of compressor in bar
T1 = 245.9 #Temperature at inlet of compressor in K
a1 = 314.5 #Sound velocity at compressor in m/s
d1 = 0.624 #Density at compressor in kg/m**3
A1 = 0.25*math.pi*D**2 #Area at diffuser inlet in m**2
u1 = M1*a1 #Flight velocity in m/s
ma = d1*A1*u1 #Mass flow rate of air in kg/s
To2 = T1*(1+(((k-1)/2)*M1**2)) #Stagnation temperature at commpressor inlet in K
To1 = To2 #Stagnation temperature at commpressor outlet in K, (It is in case of diffuser)
pr_d = ((eff_d*(((k-1)/2)*M1**2))+1)**(k/(k-1)) #Pressure ratio of diffuser
P2 = pr_d*P1 #Exit pressure of compressor in bar
Po2 = P2 #Stagnation pressure at exit of compressor in bar
Po3 = (Po2-(pr_l*Po2)) #Stagnation pressure at exit of combustion chamber in bar
Poe = P1 #Exit stagnation pressure in kPa, Since exit is at ambient conditions
pr_n = Po3/Poe #Pressure ratio of nozzle
p1 = 1/pr_n #Inverse of pr_n to find in gas tables
M4s = 1.41 #Mach number at turbine exit from gas tables
T4s = To4/(1+((0.5*(k-1)*M4s**2))) #Exit temperature of turbine at isentropic process in K
To3 = To4 #Stagnation temperature at inlet turbine in K,
T4 = To3-(eff_n*(To3-T4s)) #Exit temperature of turbine in K
C4 = math.sqrt(2*Cp*(To4-T4)) #Flight velocity of air in m/s
a4 = math.sqrt(k*R*T4) #Sound velocity in m/s
Me = C4/a4 #Nozzle jet mach number
f = (Cp*(To3-To2))/(eff_cc*CV*10**3) #Fuel air ratio
mf = ma*f #Mass flow rate of fuel in kg/s
m = ma+mf #Mass flow rate of gas in kg/s
eff_i = (1/(1+((2/(k-1))*(1/M1**2))))*100 #Efficiency of the ideal cycle in %
sig = u1/C4 #Jet speed ratio
eff_p = ((2*sig)/(1+sig)) #Propulsive efficiency in %
F = ((m*C4)-(ma*u1))*10**-3 #Thrust in kN
#Output
print 'A)Efficiency of the ideal cycle is %3i percent \
\nB)Flight speed is %3.3f m/s \
\nC)Air flow rate is %3.3f kg/s \
\nD)Diffuser pressure ratio is %3.4f \
\nE)Fuel air ratio is %3.5f \
\nF)Nozzle pressure ratio is %3.2f \
\nG)Nozzle jet mach number is %3.3f \
\nH)Propulsive efficiency is %3.4f percent \
\nI)Thrust is %3.3f kN'%(eff_i,C4,ma,pr_d,f,pr_n,Me,eff_p,F)
import math
#Input data
ma = 18. #Mass flow rate of air in kg/s
Mi = 0.6 #Inlet mach number
h = 4600. #Altitude in m
Pi = 55. #Inlet pressure in
Ti = -20.+273 #Inlet temperature in K
eff_d = 0.9 #Diffuser efficiency
pr_d = 5. #Diffuser pressure ratio
T3 = 1000.+273 #Inlet turbine temperature in K
Pe = 60. #Exit pressure in kPa
eff_c = 0.81 #Compressor efficiency
eff_t = 0.85 #Turbine efficiency
eff_n = 0.915 #Nozzle efficiency
CV = 46520. #Calorific value in kJ/kg
Cp = 1005. #Specific heat capacity at consmath.tant pressure of air in J/kg-K
k = 1.4 #Adiabatic consmath.tant
R = 287. #Specific gas consmath.tant in J/kg-K
#Calculation
Ci = Mi*math.sqrt(k*R*Ti) #Velocity of air in m/s,
u = Ci #Flight velocity in m/s, Since it is reaction force of Ci
T1 = Ti+(Ci**2/(2*Cp)) #Temperature at inlet of compressor in K
P1s = Pi*(T1/Ti)**(k/(k-1)) #Inlet pressure of compressor at isentropic process in kPa
P1 = Pi+(eff_d*(P1s-Pi)) #Inlet pressure of compressor in kPa
P2 = P1*pr_d #Outlet pressure of compressor in kPa
T2s = T1*(pr_d)**((k-1)/k) #Outlet temperature of compressor at isentropic process in K
T2 = T1+((T2s-T1)/eff_c) #Exit temperature of compressor in K
Wc = Cp*(T2-T1)*10**-3 #Workdone on compressor in kJ/kg of air
Pc = ma*Wc #Power input in kW
Pt = Pc #Power out put of turbine for isentropic process in kW
f = (T3-T2)/((CV*10**3/Cp)-T3) #Fuel air ratio
Wt = Wc #Workdone by the turbine in kJ/kg of air
T4 = T3-(Wt*10**3/Cp) #Exit temperature of turbine in K
T4s = T3-((T3-T4)/eff_t) #Exit temperature of turbine at isentropic process in K
P3 = P2 #Exit pressure of combustion chamber in kPa, Since the process takes place at consmath.tant pressure process
P4 = P3*(T4s/T3)**(k/(k-1)) #Pressure at outlet of turbine in kPa
pr_n = P4/Pe #Pressure ratio of nozzle
Tes = T4/(pr_n)**((k-1)/k) #Exit temperature of nozzle at isentropic process in K
Te = T4-(eff_n*(T4-Tes)) #Exit temperature of nozzle in K
Cj = math.sqrt(2*Cp*(T4-Te)) #Jet velocity in m/s
Ce = Cj #Flight velocity in m/s
ae = math.sqrt(k*R*Te) #Sound velocity at nozzle in m/s
Me = Ce/ae #Nozzle jet mach number
F = ma*(((1+f)*Cj)-u) #Thrust in N
P = F*u*10**-3 #Thrust power in kW
#Output
print 'A)Power input of compressor is %3.2f kW \
\nB)Power output of turbine is %3.2f kW \
\nC)F/A ratio on mass basis is %3.4f \
\nD)Exit mach number is %3.3f \
\nE)Thrust is %3.2f N \
\nF)Thrust power is %3.1f kW'%(Pc,Pt,f,Me,F,P)