from math import ceil
#Given:
V_s = 3000. #Total swept volume in cc
ip = 14. #Indicated power in kW/m**3
N = 3500. #Engine speed in rpm
eta_v = 80. #Volumetric efficiency in percent
T1 = 27+273. #Atmospheric temperature in K
P1 = 1.013 #Atmospheric pressure in bar
r_p = 1.7 #pressure ratio
eta_C = 75. #Isentropic efficiency of blower in percent
eta_m = 80. #Mechanical efficiency in percent
g = 1.4 #Specific heat ratio(gamma)
#Solution:
V_s = V_s*N/2*1e-6 #Total swept volume in m**3/min
Vi = V_s*eta_v/100 #Unsupercharged induced volume in m**3/min
P2 = P1*r_p #Blower delivery pressure in bar
T21 = T1*r_p**((g-1)/g) #Isentropic temperature at 2 in K
T21 = ceil(T21)
T2 = (T21-T1)/(eta_C/100)+T1 #Temperature at 2 in K
V1 = V_s*(P2/T2)*(T1/P1) #Volume at atmospheric conditions in m**3/min
Vi_inc = V1-Vi #Increase in induced volume in m**3/min
ip_inc1 = ip*Vi_inc #Increased in ip from air induced in kW
ip_inc2 = (P2-P1)*100*V_s/60 #Increased in ip due to increased induction pressure in kW
ip_inc = ip_inc1+ip_inc2 #Total increase in ip in kW
bp_inc = eta_m/100*ip_inc #Total increase in bp in kW
R = 0.287 #Specific gas consmath.tant in kJ/kgK
cp = 1.005 #Specific heat in kJ/kgK
m2 = P2*100*V_s/(R*T2*60) #Mass of air delivered by the blower in kg/s
Power = m2*cp*(T2-T1)/(eta_m/100) #Power required by the blower in kW
bp_inc = bp_inc-Power #Net increase in brake power in kW
#Results:
print " The net increase in the brake power = %.1f kW"%(bp_inc)
#Given:
T1 = 10.+273 #Temperature at sea level in K
P1 = 1.013 #Pressure at sea level in bar
bp = 250. #Brake power in kW
eta_v = 78. #Volumetric efficiency in percent
bsfc = 0.245 #Brake specific fuel consumption in kg/kWh
A_F = 17. #Air fuel ratio
N = 1500. #Engine speed in rpm
h = 2700. #Altitude in m
P_a = 0.72 #Pressure at altitude in bar
p = 8. #Percentage of gross power taken by the supercharger
T2 = 32.+273 #Temperature of air leaving the supercharger in K
#Solution:
#Unsupercharged
m_f = bsfc*bp/60 #Fuel consumption in kg/min
m_a = A_F*m_f #Air consumption in kg/min
m_a = m_a/(N/2) #Air consumption per cycle in kg
m1 = m_a/eta_v*100 #Mass of air corresponding to swept volume
R = 0.287 #Specific gas consmath.tant in kJ/kgK
V_s = m1*R*T1/(P1*100) #Swept volume in m**3
bmep = bp/(V_s*N/(60*2)) #Brake mean effective pressure in kN/m**2
#Supercharged
bp2 = bp/(1-p/100) #Gross power produced by the engine in kW
m_a2 = bp2/bp*m_a #Mass of air required per cycle in kg
m2 = m_a2/eta_v*100 #Mass of air corresponding to swept volume
P2 = m2*R*T2/(V_s*100) #Pressure of air leaving the supercharger in bar
deltaP = P2-P_a #Increase in pressure required in bar
#Results:
print " The required engine capacity, V_s = %.4f m**3"%(V_s)
print " The anticipated brake mean effective pressure, bmep = %.1f bar"%(bmep/100)
print " The increase of air pressure required at the supercharger = %.3f bar"%(deltaP)
import math
from sympy import Symbol, solve
from numpy import arange
def horner(coeffs, x):
acc = 0
for c in (coeffs):
acc = acc * x + c
return acc
#Given:
V_s = 3300. #Swept volume in cc
#For normally aspirated
bmep1 = 9.3 #Brake mean effective pressure in bar
N1 = 4500. #Engine speed in rpm
eta_it1 = 28.5 #Indicated thermal efficiency in percent
eta_m1 = 90. #Mechanical efficiency in percent
m1 = 205. #Mass of unboosted engine in kg
#For supercharged
bmep2 = 12.1 #Brake mean effective pressure in bar
N2 = 4500 #Engine speed in rpm
eta_it2 = 24.8 #Indicated thermal efficiency in percent
eta_m2 = 90 #Mechanical efficiency in percent
m2 = 225 #Mass of boosted engine in kg
h = Symbol('h') #Defining the unknown h hours duration
CV = 44000 #Calorific value of fuel in kJ/kg
#Solution:
#For normally aspirated
bp1 = bmep1*100*V_s/1e+6*N1/(2*60) #Brake power in kW
bp1 = round(bp1)
ip1 = bp1/eta_m1*100 #Indicated power in kW
m_f1 = ip1/(eta_it1/100*CV) #Fuel flow in kg/s
m_f1 = m_f1*3600*h #Mass of fuel flow in h hours in kg
Mass1 = (m1+m_f1)/bp1 #Specific mass in kg/kW
#For supercharged
bp2 = bmep2*100*V_s/1e+6*N2/(2*60) #Brake power in kW
bp2 = round(bp2)
ip2 = bp2/eta_m2*100 #Indicated power in kW
m_f2 = ip2/(eta_it2/100*CV) #Fuel flow in kg/s
m_f2 = m_f2*3600*h #Mass of fuel flow in h hours in kg
Mass2 = (m2+m_f2)/bp2 #Specific mass in kg/kW
Mass2 = [0.366568,1.5]
Mass1 = [0.31897926, 1.7826]
for h in arange(0,10.01,0.01): #Defining the range of h(hours)
if (horner(Mass1,h) > horner(Mass2,h)): #Specific mass of boosted engine is always be less than unboosted
continue
else:
h_max = h
break
#Results:
print " The maximum value of h hours duration, h_max = %.2f hours"%(h_max)
from scipy.optimize import fsolve
import math
#Given:
T1 = 20.+273 #Temperature of air enters the compressor in K
Q1 = 1340. #Heat added to air in kJ/min
T3 = 60.+273 #Temperature of air leaves the cooler or enters the engine in K
P3 = 1.72 #Pressure of air leaves the cooler or enters the engine in bar
eta_v = 0.70 #Volumetric efficiency of engine
n = 6. #Number of cylinders
d = 90.
l = 100. #Bore and stroke of cylinder in mm
N = 2000. #Engine speed in rpm
T = 147. #Output brake torque in Nm
eta_m = 0.75 #Mechanical efficiency
#Solution:
bp = 2*math.pi*N/60*T*10**-3 #Brake power in kW
ip = bp/eta_m #Indicated power in kW
ip = ip/n #Indicated power per cylinder in kW
A = (math.pi/4)*d**2*1e-6 #Area of cylinder in m**2
l = l*1e-3 #Stroke of cylinder in m
imep = ip/(l*A*N/(2*60)) #Indicated mean effective pressure in kN/m**2
imep = imep/100 #Indicated mean effective pressure in bar
V_s = n*A*l*N/2 #Engine swept volume in m**3/min
Vi = V_s*eta_v #Induced volume of air in m**3/min
R = 0.287 #Specific gas consmath.tant in kJ/kgK
cp = 1.005 #Specific heat in kJ/kgK
m_e = P3*100*Vi/(R*T3) #Mass of air induced into the engine in kg/min
Q1 = 1340./60 #Heat added to air in kW
m_c = 1 #Assume for calculation
def f(T2):
W_c = m_c*cp*(T2-T1) #Work done on air in compressor kW
Q_c = m_c*cp*(T2-T3) #Heat given to the air passes through the cooler in kW
return W_c/Q_c-bp/Q1
T2 = fsolve(f,500)
m_c = bp*60/(cp*(T2-T1)) #Mass of air flow into the compressor in kg/min
#Results:
print " a)The engine indicated mean effective pressure, imep = %.2f bar"%(imep)
print " b)The air consumption in the engine, m_e = %.2f kg/min"%(m_e)
print " c)The air flow into the compressor, m_c = %.2f kg/min"%(m_c)