# Chapter 14 - Air and gas compressors¶

## Example 1: pg 400¶

In [1]:
#pg 400
print(' Example 14.1');

# aim : To determine
# (a) the free air delivered
# (b) the volumetric efficiency
# (c) the air delivery temperature
# (d) the cycle power
# (e) the isothermal efficiency
from math import pi,log
# given values
d = 200.*10**-3;# bore, [m]
L = 300.*10**-3;# stroke, [m]
N = 500.;# speed, [rev/min]
n = 1.3;# polytropic index
P1 = 97.;# intake pressure, [kN/m**2]
T1 = 273.+20;# intake temperature, [K]
P3 = 550.;# compression pressure, [kN/m**2]

# solution
# (a)
P4 = P1;
P2 = P3;
Pf = 101.325;# free air pressure, [kN/m**2]
Tf = 273+15;# free air temperature, [K]
SV = pi/4*d**2*L;# swept volume, [m**3]
V3 = .05*SV;# [m**3]
V1 = SV+V3;# [m**3]
V4 = V3*(P3/P4)**(1/n);# [m**3]
ESV = (V1-V4)*N;# effective swept volume/min, [m**3]
# using PV/T=constant
Vf = P1*ESV*Tf/(Pf*T1);# free air delivered, [m**3/min]
print ' (a) The free air delivered is (m^3/min) = ',round(Vf,3)

# (b)
VE = Vf/(N*(V1-V3));# volumetric efficiency
print ' (b) The volumetric efficiency is (percent) = ',round(VE*100,1)

# (c)
T2 = T1*(P2/P1)**((n-1)/n);#  free air temperature, [K]
print ' (c) The air delivery temperature is (C) = ',round(T2-273,1)

#  (d)
CP = n/(n-1)*P1*(V1-V4)*((P2/P1)**((n-1)/n)-1)*N/60;# cycle power, [kW]
print ' (d) The cycle power is (kW) = ',round(CP)

# (e)
# neglecting clearence
W = n/(n-1)*P1*V1*((P2/P1)**((n-1)/n)-1)
Wi = P1*V1*log(P2/P1);# isothermal efficiency
IE = Wi/W;# isothermal efficiency
print ' (e) The isothermal efficiency neglecting clearence  is (percent) = ',round(IE*100,1)

# End

 Example 14.1
(a) The free air delivered is (m^3/min) =  3.814
(b) The volumetric efficiency is (percent) =  80.9
(c) The air delivery temperature is (C) =  164.3
(d) The cycle power is (kW) =  14.0
(e) The isothermal efficiency neglecting clearence  is (percent) =  81.3


## Example 2: pg 408¶

In [2]:
#pg 408
print(' Example 14.2');

# aim : To determine
# (a) the intermediate pressure
# (b) the total volume of each cylinder
# (c) the cycle power
from math import sqrt
# given values
v1 = .2;# air intake, [m^3/s]
P1 = .1;# intake pressure, [MN/m^2]
T1 = 273.+16;# intake temperature, [K]
P3 = .7;# final pressure, [MN/m^2]
n = 1.25;# compression index
N = 10;# speed, [rev/s]

# solution
# (a)
P2 = sqrt(P1*P3);# intermediate pressure, [MN/m^2]
print ' (a) The intermediate pressure is (MN/m^2) = ',round(P2,3)

# (b)
V1  = v1/N;# total volume,[m^3]
# since intercooling is perfect so 2 lie on the isothermal through1, P1*V1=P2*V2
V2 = P1*V1/P2;# volume, [m^3]
print ' (b) The total volume of the HP cylinder is (litres) = ',round(V2*10**3,1)

# (c)
CP = 2*n/(n-1)*P1*v1*((P2/P1)**((n-1)/n)-1);# cycle power, [MW]
print ' (c) The cycle power is (MW) = ',round(CP*10**3)

print ' there is rounding mistake in the book so answer is not matching'

#  End

 Example 14.2
(a) The intermediate pressure is (MN/m^2) =  0.265
(b) The total volume of the HP cylinder is (litres) =  7.6
(c) The cycle power is (MW) =  43.0
there is rounding mistake in the book so answer is not matching


## Example 3: pg 409¶

In [3]:
#pg 409
print(' Example 14.3');

# aim : To determine
# (a) the intermediate pressures
# (b) the effective swept volume of the LP cylinder
# (c) the temperature and the volume of air delivered per stroke at 15 bar
# (d) the work done per kilogram of air
import math
# given values
d = 450.*10**-3;#  bore , [m]
L = 300.*10**-3;#  stroke, [m]
cl = .05;#  clearence
P1 = 1.; # intake pressure, [bar]
T1 = 273.+18;# intake temperature, [K]
P4 = 15.;# final delivery pressure, [bar]
n = 1.3;#  compression and expansion index
R = .29;# gas constant, [kJ/kg K]

# solution
# (a)
k=(P4/P1)**(1./3);
# hence
P2 = k*P1;#  intermediare pressure, [bar]
P3 = k*P2;#  intermediate pressure, [bar]

print ' (a) The intermediate pressure is P2 (bar) = ',round(P2,3)
print '     The intermediate pressure is  P3 (bar) = ',round(P3,3)

# (b)
SV = math.pi*d**2/4*L;#  swept volume of LP cylinder, [m**3]
# hence
V7 = cl*SV;# volume, [m**3]
V1 = SV+V7;# volume, [m**3]
# also
P7 = P2;
P8 = P1;
V8 = V7*(P7/P8)**(1/n);#  volume, [m**3]
ESV = V1-V8;# effective swept volume of LP cylinder, [m**3]

print ' (b) The effective swept volume of the LP cylinder is (litres) = ',round(ESV*10**3,2)

# (c)
T9 = T1;
P9 = P3;
T4 = T9*(P4/P9)**((n-1)/n);# delivery temperature, [K]
# now using P4*(V4-V5)/T4=P1*(V1-V8)/T1
V4_minus_V5 = P1*T4*(V1-V8)/(P4*T1);# delivery volume, [m**3]

print ' (c) The delivery temperature is (C) = ',round(T4-273,1)
print '      The delivery volume is (litres) = ',round(V4_minus_V5*10**3,2)

#  (d)

W = 3*n*R*T1*((P2/P1)**((n-1)/n)-1)/(n-1);#  work done/kg ,[kJ]
print ' (d) The work done per kilogram of air is (kJ) = ',round(W,1)

print 'The answer is a bit different due to rounding off error in textbook'
# End

 Example 14.3
(a) The intermediate pressure is P2 (bar) =  2.466
The intermediate pressure is  P3 (bar) =  6.082
(b) The effective swept volume of the LP cylinder is (litres) =  45.32
(c) The delivery temperature is (C) =  85.4
The delivery volume is (litres) =  3.72
(d) The work done per kilogram of air is (kJ) =  254.1
The answer is a bit different due to rounding off error in textbook


## Example 4: pg 416¶

In [4]:
#pg 416
print(' Example 14.4');

# aim : To determine
# (a) the final pressure and temperature
# (b) the energy required to drive the compressor

# given values
rv = 5.;# pressure compression ratio
m_dot = 10.;# air flow rate, [kg/s]
P1 = 100.;# initial pressure, [kN/m**2]
T1 = 273.+20;# initial temperature, [K]
n_com = .85;# isentropic efficiency of compressor
Gama = 1.4;# heat capacity ratio
cp = 1.005;# specific heat capacity, [kJ/kg K]

# solution
# (a)
T2_prim = T1*(rv)**((Gama-1)/Gama);# temperature after compression, [K]
# using isentropic efficiency=(T2_prim-T1)/(T2-T1)
T2 = T1+(T2_prim-T1)/n_com;#  final temperature, [K]
P2 = rv*P1;# final pressure, [kN/m**2]
print ' (a) The final temperature is (C) = ',round(T2-273)
print ' (b) The final pressure is (kN/m^2) = ',P2

# (b)
E = m_dot*cp*(T1-T2);# energy required, [kW]
print ' (b) The energy required to drive the compressor is (kW) = ',round(E)
if(E<0):
else:

print 'The answer is a bit different due to rounding off error in textbook'
#  End

 Example 14.4
(a) The final temperature is (C) =  221.0
(b) The final pressure is (kN/m^2) =  500.0
(b) The energy required to drive the compressor is (kW) =  -2023.0
The answer is a bit different due to rounding off error in textbook


## Example 5: pg 417¶

In [5]:
#pg 417
print(' Example 14.5');

# aim : To determine
#  the power absorbed in driving the compressor

# given values
FC = .68;# fuel consumption rate, [kg/min]
P1 = 93.;# initial pressure, [kN/m^2]
P2 = 200.;# final pressure, [kN/m^2]
T1 = 273.+15;# initial temperature, [K]
d = 1.3;# density of mixture, [kg/m^3]
n_com = .82;# isentropic efficiency of compressor
Gama = 1.38;# heat capacity ratio

# solution
R = P1/(d*T1);# gas constant, [kJ/kg K]
# for mixture
cp = Gama*R/(Gama-1);# heat capacity, [kJ/kg K]
T2_prim = T1*(P2/P1)**((Gama-1)/Gama);# temperature after compression, [K]
# using isentropic efficiency=(T2_prim-T1)/(T2-T1)
T2 = T1+(T2_prim-T1)/n_com;#  final temperature, [K]
m_dot = FC*15/60.;# given condition, [kg/s]
P = m_dot*cp*(T2-T1);# power absorbed by compressor, [kW]
#results
print ' The power absorbed by compressor is (kW) = ',round(P,2)

# End

 Example 14.5
The power absorbed by compressor is (kW) =  12.64


## Example 6: pg 418¶

In [6]:
#pg 418
print(' Example 14.6');

# aim : To determine
#  the power required to drive the blower

# given values
m_dot = 1;# air capacity, [kg/s]
rp = 2;# pressure ratio
P1 = 1*10**5;# intake pressure, [N/m^2]
T1 = 273+70.;# intake temperature, [K]
R = .29;# gas constant, [kJ/kg k]

# solution
V1_dot = m_dot*R*T1/P1*10**3;# [m^3/s]
P2 = rp*P1;# final pressure, [n/m^2]
P = V1_dot*(P2-P1);# power required, [W]
#results
print ' The power required to drive the blower is (kW) = ',round(P*10**-3,1)

# End

 Example 14.6
The power required to drive the blower is (kW) =  99.5


## Example 7: pg 418¶

In [7]:
#pg 418
print(' Example 14.7');

# aim : To determine
#  the power required to drive the vane pump

# given values
m_dot = 1;# air capacity, [kg/s]
rp = 2;# pressure ratio
P1 = 1*10**5;# intake pressure, [N/m^2]
T1 = 273.+70;# intake temperature, [K]
Gama = 1.4;# heat capacity ratio
rv = .7;# volume ratio

# solution
V1 = .995;# intake pressure(as given previous question),[m^3/s]
# using P1*V1^Gama=P2*V2^Gama, so
P2 = P1*(1/rv)**Gama;# pressure, [N/m^2]
V2 = rv*V1;# volume,[m^3/s]
P3 = rp*P1;# final pressure, [N/m^2]
P = Gama/(Gama-1)*P1*V1*((P2/P1)**((Gama-1)/Gama)-1)+V2*(P3-P2);# power required,[W]
#results
print ' The power required to drive the vane pump is (kW) = ',round(P*10**-3)

#  End

 Example 14.7
The power required to drive the vane pump is (kW) =  78.0


## Example 8: pg 420¶

In [8]:
#pg 420
print(' Example 14.8');

# aim : To determine
#  the total temperature and pressure of the mixture

# given values
rp = 2.5;# static pressure ratio
FC = .04;# fuel consumption rate, [kg/min]
P1 = 60.;# inilet pressure, [kN/m^2]
T1 = 273.+5;# inilet temperature, [K]
n_com = .84;# isentropic efficiency of compressor
Gama = 1.39;# heat capacity ratio
C2 = 120.;#exit velocity from compressor, [m/s]
rm = 13.;# air-fuel ratio
cp = 1.005;# heat capacity ratio

# solution
P2 = rp*P1;# given condition, [kN/m^2]
T2_prim = T1*(P2/P1)**((Gama-1)/Gama);# temperature after compression, [K]
# using isentropic efficiency=(T2_prim-T1)/(T2-T1)
T2 = T1+(T2_prim-T1)/n_com;#  final temperature, [K]
m_dot = FC*(rm+1);# mass of air-fuel mixture, [kg/s]
P = m_dot*cp*(T2-T1);# power to drive compressor, [kW]
print ' The power required to drive compressor is (kW) = ',round(P,1)

Tt2 = T2+C2**2/(2*cp*10**3);# total temperature,[K]
Pt2 = P2*(Tt2/T2)**(Gama/(Gama-1));# total pressure, [kN/m^2]
print ' The temperature in the engine is (C) = ',round(Tt2-273,2)
print ' The pressure in the engine cylinder is (kN/m^2) = ',round(Pt2,1)

print ' There is rounding mistake in the book'

#  End

 Example 14.8
The power required to drive compressor is (kW) =  54.6
The temperature in the engine is (C) =  109.19
The pressure in the engine cylinder is (kN/m^2) =  160.5