import math
# Variables
T2 = 488.
T1 = 298.; n = 1.3; R =8314./44;
# Calculation and Results
rp = (T2/T1)**(n/(n-1));
print "Pressure ratio is",round(rp,2)
b = 0.12; # Bore of compressor
L = 0.15; # Stroke of compressor
V1 = (math.pi/4)*(b)**2*L ;
P1 = 120e03; # in kPa
W = ((n*P1*V1)/(n-1))*(((rp)**((n-1)/n))-1);
P = (W*1200*0.001)/60 ;
print "Indicated power is",round(P,2),"kW"
print "Shaft power is",round((P/0.8),1),"kW"
V1_dot = V1*(1200./60);
m_dot = (P1*V1_dot)/(R*T1);
print "Mass flow rate is",round(m_dot,4),"kg/s"
rp_1 = rp**2;
print "Pressure ratio when second stage is added is",round(rp_1,1)
V2 = (1./rp)**(1./n)*V1;
print "Volume derived per cycle is V2",round(V2,5),"m3"
d = math.sqrt((V2*4)/(L*math.pi));
print "Second stage bore would be",round((d*1000),0),"mm"
import math
# Variables
P1 = 101.3e03
P4 = P1; # in Pa
P2 = 8*P1
P3 = P2;
T1 = 288.
Vs = 2000.;
V3 = 100.
Vc = V3;
# Calculation and Results
V1 = Vs + Vc ;
n = 1.25
R = 287.;
V4 = ((P3/P4)**(1./n))*V3;
W = ((n*P1*(V1-V4)*1e-06)/(n-1))*(((P2/P1)**((n-1)/n))-1);
P = (W*800*0.001)/60 ;
print "Indicated poer is",round(P,2),"kW"
print "Volumetric efficiency is",round((100*(V1-V4)/Vs),1),"%"
m = (P1*(V1-V4)*1e-06)/(R*T1);
m_dot = m*800;
print "Mass flow rate is",round(m_dot,2),"kg/min"
FAD = (V1-V4)*1e-06*800;
print "Free air delivery is",round(FAD,2),"m3/min"
Wt = P1*(V1-V4)*1e-06*math.log(P2/P1);
n_isothermal = (Wt*800*0.001)/(P*60);
print "Isothermal efficiency is",round(100*n_isothermal,1),"%"
ip = P/0.85;
print "Input power is",round(ip,2),"kW"
import math
# Variables
P1 = 1.;
P3 = 9.;
# Calculation
P2 = math.sqrt(P1*P3);
T1 = 300.;
cp = 1.005;
R = 0.287; n = 1.3;
W = ((2*n*R*T1)/(n-1))*((P2/P1)**((n-1)/n)-1);
T2 = T1*(P2/P1)**((n-1)/n);
H = cp*(T2-T1);
# Results
print "Heat rejected to the intercooler is",round(H,2),"kJ/kg"
# rounding off error is there.
import math
# Variables
P1 = 1.013
P4 = 80.;
P2 = math.sqrt(P1*P4);
V_dot = 4./60; # in m3/s
n = 1.25;
n_mech = 0.75;
# Calculation
W_dot = ((2*n)/(n-1))*((P1*100*V_dot)/n_mech)*((P2/P1)**((n-1)/n)-1);
N = 250.;
L = (3*60.)/(2*N); # Stroke length of piston in m
Vlp = 4/N;
n_vol = 0.8;
Dlp = math.sqrt((Vlp*4)/(n_vol*L*math.pi));
Dhp = Dlp*math.sqrt(P1/P2);
# Results
print "Minimum power required is",round(W_dot,2),"kW"
print "Stroke of the compressor is",L*100,"cm"
print "Bore of high pressure compressure is",round((Dhp*100),2),"cm"
print "Bore of lo pressure compressure is",round((Dlp*100),1),"cm"
# Variables
V12 = 0.4; # V12 = V1./V2
T1 = 38.+273;
n = 1.3;
P3 = 112.; # back pressure
m = 1.25; R = 0.287;
# Calculation
T2 = ((V12)**(n-1))*T1;
P1 = 700.; # in kPa
P2 = P1*(V12)**n;
V2 = (m*R*T2)/P2;
v2 = V2/m ;
A = R*T1 + R*(T1-T2)/(n-1) - P3*v2; # Area of indicator diagram
IO = A*0.85*m;
# Results
print "Indicated output is",round(IO,2),"kJ"
import math
# Variables
P1 = 1.
P41 = 15.; # P41 = P4/P1
P21 = (P41)**(1./3);
P2 = P21*P1;
n = 1.3;
R = 0.287;
P3 = P21*P2;
P11 = P2; P12 = P1;
b = 0.45
s = 0.3; # Bore and stroke of cylinder
Vs = (math.pi/4)*b**2*s; # Swept volume of the cylinder
# Calculation and Results
V11 = 0.05*Vs; # Clearance volume
V1 = V11+Vs;
V12 = V11*(P11/P12)**(1./n);
print "Effective swept volume of the LP cylinder is",round((V1-V12),5),"m3"
T1 = 291.
T3 = T1;
T5 = T1;
P43 = P21; # P4/P3
T6 = T5*(P43)**((n-1)/n);
print "Delivery temperature is",round(T6,1),"K"
P4 = 15; # Delivery pressure
V6_7 = (P1/P4)*(T6/T1)*(V1-V12); # V6-V7
print "Volume of the air delivered",round(V6_7,5),"m3"
W = ((3*n*R*T1)/(n-1))*((P21)**((n-1)/n)-1);
print "Work done per kg of the air is",round(W,1),"kJ"
# rounding off error is there. please check.
# Variables
P1 = 1.013;
P2 = 1.5*P1;
Vs = 0.03
Va = Vs;
WD = (P2-P1)*Vs*100.;
Pi = (P1+P2)/2;
g = 1.4;
# Calculation
Aa = ((g*P1*100*Vs)/(g-1))*((Pi/P1)**((g-1)/g)-1);
Vb = Va *(P1/Pi)**(1./g);
Ab = Vb*(P2-Pi)*100;
WR = Aa+Ab;
# Results
print "Work required is",round(WR,2),"kJ/rev"
# For Blower
import math
m_dot = 1.;
R = 0.287;
T1 = 343.;
P1 = 100.;
P2 = 2*P1;
g = 1.4;
# Calculation and Results
V_dot = (m_dot*R*T1)/P1;
PRb = V_dot*(P2-P1);
print "Power required by the blower is",round(PRb,1),"kW"
# For van compressor
P1v = 1.
V21 = 0.7 # V2/V1
P2v = P1v*(1./V12)**g;
V2_dot = 0.7;
V1_dot = 0.7*V_dot;
P3v = 2.;
PRv = (g/0.4)*P1*0.995*( (1.65/1)**(0.4/g) - 1) + 0.696*(2 - 1.65)*P1
print "Power Required by van compressor is",round(PRv),"kW"
# Variables
T1 = 283.
P21 = 2.5; # P2/P1
P32 = 2.1; # P3/P2
ns = 0.85
ma = 5.;
cp = 1.005;
# Calculation
T2s = round(T1*(P21)**((g-1)/g),1);
T2 = round(T1 + (T2s-T1)/ns,2);
T3 = T2-50;
T4s = round(T3*(P32)**((g-1)/g),2);
T4 = T3 + (T4s-T3)/ns;
P = ma*cp*((T2-T1)+(T4-T3));
# Results
print "Total compressor power is",round(P,1),"kW"
# note : T4 is calculted wrongly in book. please check.
# Variables
T1 = 278.
P21 = 2.5; # P2/P1
cp = 1.005
ns = 0.84; V2 = 120.;
# Calculation
T2s = T1*(P21)**((g-1)/g);
T2 = T1 + (T2s-T1)/ns;
mg = 0.04*(13+1);
P = mg*cp*(T2-T1);
T02 = T2 + V2**2/(2*cp*1000);
P1 = 0.6;
P2 = P21*0.6;
P02 = P2*(T02/T2)**(g/(g-1));
# Results
print "Power required to drive the compressor is",round(P,1),"kW"
print "Stagnation temperature is",round(T02,2),"K"
print "Stagnation pressure is",round(P02,3),"bar"
# note : rounding off error is there. please check.