# Variables
P1 = 100.;
T1 = 300.;
P2 = 650.;
n = 1.25;
r = 0.05;
# Calculations
Ev = 1-(r*(((P2/P1)**(1./n))-1));
# Results
print 'Volumetric Efficiency = %2.2f Percent'%(Ev*100);
# Variables
D = 0.24;
LN = 5./6;
P1 = 100.;
P2 = 1000.;
n = 1.35;
# Calculations
A = (22./7)*(1./4)*D*D;
IP = (n/(n-1))*(P1*A*LN)*(((P2/P1)**((n-1)/n))-1);
# Results
print 'Indicated Power = %2.2f kW'%(IP);
# Variables
N = 300.;
D = 0.2;
L = 0.24;
P1 = 1.01325;
P2 = 8*1.01325;
n = 1.35;
Et = 0.96;
Em = 0.85;
Vs = (22./7)*(1./4)*D*D*L;
# Calculations and Results
IP = (n/(n-1))*(P1*Vs)*(N/60)*(((P2/P1)**((n-1)/n))-1);
print 'Indicated Power = %2.1f kW'%(IP*100);
BP = IP/(Et*Em);
print 'Brake Power = %2.2f kW'%(BP*100);
# Variables
n = 1.35;
P1 = 1.013;
V1 = 1./60;
P2 = 7;
Et = 0.85;
Em = 0.9;
# Calculations and Results
IP = (n/(n-1))*(P1*100*V1)*(((P2/P1)**((n-1)/n))-1);
print 'Indicated Power = %2.1f kW'%(IP);
BP = IP/(Et*Em);
print 'Brake Power = %2.2f kW'%(BP);
# Variables
n = 1.2;
P1 = 1;
P2 = 6;
Vs = 1.5/60;
# Calculations and Results
IP = (n/(n-1))*(P1*100*Vs)*(((P2/P1)**((n-1)/n))-1);
print 'Indicated Power = %2.1f kW'%(IP);
MP = 6.55;
Em = IP/MP;
print 'Mechanical Efficiency = %2.1f Percent'%(Em*100);
# Variables
N = 300.;
V14 = 14/(2*N);
Vs = 0.023/(1.05-0.22);
n = 1.3;
P1 = 1.013;
P2 = 7.;
IP = (n/(n-1))*(P1*100*V14)*(((P2/P1)**((n-1)/n))-1)*(2*N/60);
print 'Indicated Power = %2.1f kW'%(IP);
T1 = 288;
T2 = T1*((P2/P1)**((n-1)/n));
print 'Delivery Temperature = %2.0f K'%(T2);
print 'Swept Volume = %2.4f m**3'%(Vs);
# Variables
P1 = 1.;
P2 = 10.;
Vs = 0.015;
FAD = 3.;
Vc = Vs*0.06;
n = 1.3;
T1 = 20.+273;
# Calculations and Results
IP = (n/(n-1))*(P1*100*3)*(((P2/P1)**((n-1)/n))-1);
print 'Indicated Power = %2.1f kW'%(IP/60);
V4 = Vc*((P2/P1)**(1./n));
V1 = Vs+Vc;
V14 = 0.0107;
RS = 3/V14;
print 'Rotation Speed = %2.0f RPM'%(RS);
Tf = 288;
Pf = 101.325;
Vf = (P1*100*(FAD)*Tf)/(T1*Pf);
print 'Vf = %2.4f m**3/min'%(Vf);
Mcd = V1/(V14);
print 'Mcd = %2.1f '%(Mcd);
# Variables
P1 = 1.;
P2 = 10.;
Vs = 0.014;
n = 1.3;
V1 = 3.;
FAD = 3.;
# Calculations and Results
W = (n/(n-1))*(P1*100*V1/60)*(((P2/P1)**((n-1)/n))-1);
print 'Power required = %2.1f kW'%(W);
RPM = FAD/Vs;
print 'Rotational Speed = %2.0f rpm'%(RPM);
# Variables
Vs = 5.665/600;
Vc = 0.04*Vs;
V3 = Vc;
n = 1.3;
P3 = 5.6;
P2 = 0.97;
V4 = V3*((P3/P2)**(1./n));
V1 = Vs+Vc;
Vd = V1-V4;
T1 = 300;
Tf = 288;
P1 = 0.96;
Pf = 1.01325;
# Calculations and Results
Vf = (Tf*P1*Vd)/(Pf*T1);
Mcd = V1/(Vd);
print 'Vf = %.1e m**3/cycle'%(Vf);
print 'Mc/Md = %2.2f '%(Mcd);
N = 600;
W = (n/(n-1))*(P1*100*Vd)*(((P3/P1)**((n-1)/n))-1);
IP = W*N/60;
print 'Indicated Power = %2.2f kW'%(IP);
# Variables
IP = 15.;
n = 1.2;
P1 = 100.;
P2 = 700.;
# Calculations
x = ((P2/P1)**((n-1)/n))-1;
V1N = (IP*(n-1)*60)/(n*P1*x*2);
LN = 150/2;
D2 = V1N*4/((22./7)*LN);
D = D2**0.5;
L = D*1.5;
# Results
print 'D = %2.0f mm'%(D*1000);
print 'L = %2.0f mm'%(L*1000);
# Variables
P1 = 1.;
P2 = 16.;
n = 1.3;
LN = 100.;
N = 350.;
IP = 30.;
Ev = 0.95;
# Calculations
L = LN/N;
x = (((P2/P1)**((n-1)/n))-1);
V14 = (IP*(n-1)*60)/(n*P1*100*x*N);
Vs = V14/Ev;
D2 = Vs*4/((22./7)*L);
D = D2**0.5;
# Results
print 'D = %2.0f mm'%(D*1000);
print 'L = %2.0f mm'%(L*1000);
import math
# Variables
D = 0.2;
L = 0.3;
Vs = (22./7)*(1./4)*D*D*L;
Vc = 0.04*Vs;
V3 = Vc;
P2 = 9;
P1 = 1;
n = 1.3;
V4 = V3*((P2/P1)**(1./n));
# Calculations and Results
V1 = Vs+Vc;
W = (n/(n-1))*(P1*100)*(V1-V4)*(((P2/P1)**((n-1)/n))-1);
R = 0.287;
T1 = 15+273;
Md = (P1*(V1-V4)*100)/(R*T1);
Wpkg = W/Md;
print 'Word done per kg: %3.2f kJ/kg of air'%(Wpkg);
T2 = T1*((P2/P1)**((n-1)/n));
G = 1.4;
Q = ((G-n)/(G-1))*((R*(T1-T2))/(n-1));
print 'Heat Transfereed: %3.2f kJ/kg'%(Q);
Pm = W/Vs;
print 'Mean Effective Pressure: %3.2f kPa'%(Pm);
Mac = V1/(V1-V4);
print 'Mass of air compressed to delivered: %3.2f '%(Mac);
Tf = T1;
Pf = 101.325;
Vf = (P1*100*(V1-V4)*Tf)/(Pf*T1);
RPM = 500;
Vf = Vf*RPM;
print 'FAD at standand condition: %3.2f m**3/min'%(Vf);
IP = (W*RPM)/60;
Etrans = 0.92;
Emech = 0.85;
Emotor = 0.75;
MP = IP/(Etrans*Emech*Emotor);
print 'Motor Power: %3.2f kW'%(MP);
MAC = Md*RPM;
print 'Mass of air compressed: %3.2f kg/min'%(MAC);
ACC = MAC*Mac;
print 'Air compressed in cylinder: %3.2f kg/min'%(ACC);
print 'End Temperature: %3.2f K'%(T2);
# Variables
Vs = 0.015;
Vc = 0.06*Vs;
V3 = Vc;
n = 1.3;
P2 = 10.;
P1 = 1.;
N = 280.;
# Calculations and Results
V4 = V3*((P2/P1)**(1./n));
print 'V4: %3.4f m**3/cycle'%(V4);
print 'V3: %3.4f m**3/cycle'%(V3);
V1 = Vs+Vc;
print 'V1: %3.4f m**3/cycle'%(V1);
V14 = V1-V4; #Suction Volume
V2 = V1*((P1/P2)**(1./n));
IP = (n/(n-1))*(P1*100*(V14))*(((P2/P1)**((n-1)/n))-1)*(N/60);
print 'IP: %3.0f kW'%(IP);
# Variables
P2 = 6;
P1 = 0.96;
n = 1.3;
CV = 0.04;
# Calculations and Results
Ev = (1-(CV*(((P2/P1)**(1./n))-1)))*100;
print 'Clearance Volumetric Efficiency: %3.1f Percent'%(Ev);
D = 0.09;
L = 0.1;
Vs = (22./7)*(1./4)*(D*D*L);
Vc = 0.04*Vs;
V4 = Vc*((P2/P1)**(1./n));
V1 = Vc+Vs;
EDV = V1-V4;
print 'Effective Displacement Volume: %.3e m**3'%(EDV);
T1 = 313;
Tf = 293;
Pf = 1;
Vf = ((P1*(EDV)*Tf))/(T1*Pf);
N = 410;
FAD = Vf*N*2*60;
print 'Free air delivered: %3.2f m**3'%(FAD);
W = (n/(n-1))*(P1*100*(V1-V4))*(((P2/P1)**((n-1)/n))-1);
IP = W*2*N/60;
print 'Indicated Power: %3.2f kW'%(IP);
import math
# Variables
P1 = 1.;
P2 = 5.;
T1 = 27.+273;
m = 1.;
R = 0.287;
# Calculations and Results
W1 = m*R*T1*(math.log(P2/P1));
print 'Work in isothermal process: %3.1f kJ'%(W1);
G = 1.4;
W2 = (G/(G-1))*(m*R*T1)*(((P2/P1)**((G-1)/G))-1);
print 'Work in isentropic process: %3.0f kJ'%(W2);
n = 1.25;
W3 = (n/(n-1))*(m*R*T1)*(((P2/P1)**((n-1)/n))-1);
print 'Work in polytropic process: %3.1f kJ'%(W3);
import math
# Variables
IP = 41.;
P1 = 1.;
T1 = 17.+273;
P2 = 7.;
N = 100.;
n = 1.2;
# Calculations
L = 150/(2*N);
V1 = (22./7)*(1./4)*(L); #Along with D**2
W = (n/(n-1))*(P1*100*V1)*(((P2/P1)**((n-1)/n))-1);
D2 = (IP*60)/(W*2*N);
D = math.sqrt(D2);
# Results
print 'D: %3.3f m'%(D);
# Variables
D = 0.15;
L = 0.2;
P1 = 1.;
T1 = 17.+273;
P2 = 7.;
N = 100.;
R = 0.287;
V1 = (22./7)*(1./4)*D*D*L;
m = (P1*100*V1)/(R*T1);
Mpm = m*N;
n = 1.25;
# Calculations and Results
IP = (n/(n-1))*(P1*100*V1)*(((P2/P1)**((n-1)/n))-1)*(N/60);
print 'Mass/min: %3.1f Mpm'%(Mpm);
print 'Indicated Power: %3.1f kW'%(IP);
T2 = T1*((P2/P1)**((n-1)/n));
print 'T2: %3.1f K'%(T2);
# Variables
D = 0.15;
N = 100.;
L = 0.2;
P1 = 1.;
T1 = 27.+273;
P2 = 6.;
n = 1.25;
Vs = (22./7)*(1./4)*D*D*L;
Vc = 0.05*Vs;
V1 = Vs+Vc;
V4 = Vc*((P2/P1)**(1./n));
# Calculations and Results
IP = (n/(n-1))*(P1*100*(V1-V4))*(((P2/P1)**((n-1)/n))-1);
IPf = IP**(N/60)
print 'IP: %3.2f kJ'%(IPf);
Pm = IP/Vs;
print 'Mean Effective Pressure: %3.2f kN/m**2'%(Pm);
# Variables
n = 1.2;
m = 5.;
R = 0.287;
T2 = 107.+273;
T1 = 27.+273;
# Calculations and Results
IP = (n/(n-1))*(m/60)*(R*(T2-T1));
print 'Air Power: %3.2f kW'%(IP);
BP = 14;
Em = IP*100/BP;
print 'Mechanical Efficiency: %3.0f Percent'%(Em);
import math
# Variables
V1 = 50.;
P1 = 1.;
P2 = 5.5;
n = 1.3;
Em = 0.82;
# Calculations and Results
IP = (n/(n-1))*(P1*100*V1)*(((P2/P1)**((n-1)/n))-1)*(1./60);
BP = IP/Em;
print 'IP: %3.1f kW'%(IP);
print 'BP: %3.1f kW'%(BP);
IsoP = P1*100*V1*(math.log(P2/P1))*(100./60);
Eo = IsoP/BP;
print 'Isothermal Efficiecy: %3.1f Percent'%(Eo);
# Variables
P1 = 1.;
P2 = 5.5;
T1 = 27.+273;
Pa = 1.01325;
Ta = 17.+273;
C = 0.06;
n = 1.3;
# Calculations
Ev = ((P1*Ta)/(Pa*T1))*(1+C-(C*((P2/P1)**(1./n))));
# Results
print 'Volumetric Efficiency: %3.0f Percent'%(Ev*100);
# Variables
V14 = 7.5;
P1 = 1.;
T1 = 27.+273;
P2 = 5.5;
n = 1.3;
C = 0.06;
# Calculations and Results
T2 = T1*((P2/P1)**((n-1)/n));
print 'T2: %3.1f K'%(T2);
Ev = 1+C-(C*((P2/P1)**((1./n))));
print 'Vol Eff: %3.1f Percent'%(Ev*100);
AP = (n/(n-1))*(P1*100*V14/60)*(((P2/P1)**((n-1)/n))-1);
print 'Air Power: %3.1f kW'%(AP);
Em = 0.9;
BP = AP/Em;
print 'BP: %3.1f kW'%(BP);
Emot = 0.96;
EMC = BP/Emot;
print 'Electric Motor Capacity: %3.1f kW'%(EMC);
import math
# Variables
V1 = 5.;
P1 = 1.;
P2 = 5.;
n = 1.25;
Em = 0.9;
# Calculations and Results
IP = (n/(n-1))*(P1*100*V1/60)*(((P2/P1)**((n-1)/n))-1);
SP = IP/Em;
print 'Shaft Power: %3.1f kW'%(SP);
IsoP = P1*100*V1*(math.log(P2/P1))*(1./60);
Eo = IsoP/SP;
print 'Overall Efficiency: %3.0f Percent'%(Eo*100);
import math
# Variables
V1 = 25.;
P1 = 1.;
P2 = 7.;
N = 460.;
Em = 0.8;
Ev = 0.76;
Ei = 0.81;
# Calculations
IsoP = P1*100*V1*(math.log(P2/P1));
IndP = IsoP/Ei;
Vs = V1/Ev;
Pm = IndP/Vs;
BP = IndP/(3600*Em);
# Results
print 'Mean Effective Pressure: %3.2f bar'%(Pm/100);
print 'BP: %3.2f kW'%(BP);
# Variables
Va = 3.;
Pa = 1.;
Ta = 17.+273;
P2 = 8.2;
N = 300.;
n = 1.35
LD = 1.2;
Em = 0.9;
C = 0.05;
# Calculations and Results
P1 = Pa-0.05;
T1 = Ta+10;
V14 = (Pa*Va*T1)/(P1*Ta);
IP = (n/(n-1))*(P1*100*V14/60)*(((P2/P1)**((n-1)/n))-1);
BP = IP/Em;
print 'BP: %3.1f kW'%(BP);
Ev = 1+C-(C*((P2/P1)**(1./n)));
print 'Volumetric Efficiency: %3.1f Percent'%(Ev*100);
Vs = (22./7)*(1./4)*LD;
VsMin = Vs*2*N;
D3 = V14/(VsMin*Ev);
D = D3**(1./3);
print 'Cylinder Diameter: %3.0f mm'%(D*1000);
import math
# Variables
V1 = 1.;
P1 = 1.013;
T1 = 15.+273;
P2 = 7.;
R = 0.287;
n = 1.35;
# Calculations and Results
m = (P1*100*V1)/(R*T1);
print 'Mass of air per minute: %3.1f kg'%(m);
T2 = T1*(((P2/P1)**((n-1)/n)));
print 'T2: %3.1f K'%(T2);
IP = (n/(n-1))*(P1*100*V1/60)*(((P2/P1)**((n-1)/n))-1);
print 'IP: %3.1f kW'%(IP);
IsoP = P1*100*V1*(1./60)*math.log(P2/P1);
Ei = IsoP/IP;
print 'Isothermal Efficiency: %3.0f Percent'%(Ei*100);
import math
# Variables
P1 = 1.013;
T1 = 15.+273;
P2 = 7.;
FAD = 0.3;
G = 1.4;
# Calculations and Results
IP = (G/(G-1))*(P1*100*FAD/60)*(((P2/P1)**((G-1)/G))-1);
print 'For Isentropic process ';
print 'IP: %3.1f kW'%(IP);
T2 = T1*((P2/P1)**((G-1)/G));
print 'T2: %3.0f K'%(T2);
print 'For Reversible Isothermal process ';
IP = P1*100*FAD*(1./60)*(math.log(P2/P1));
print 'IP: %3.3f kW'%(IP);
T2 = T1;
print 'T2: %3.0f K'%(T2);
print 'For Polytropic process ';
n = 1.25
IP = (n/(n-1))*(P1*100*FAD/60)*(((P2/P1)**((n-1)/n))-1);
print 'IP: %3.3f kW'%(IP);
T2 = T1*((P2/P1)**((n-1)/n));
print 'T2: %3.2f K'%(T2);
import math
# Variables
V1 = 94.;
P1 = 1.;
T1 = 25.+273;
P2 = 9.;
# Calculations and Results
print 'For isothermal process ';
T2 = T1;
print 'T2: %3.0f K'%(T2);
P = P1*100*V1*math.log(P2/P1);
print 'Power required: %3.0f kW'%(P/60);
Q = P;
print 'Heat Rejected: %3.0f KW'%(Q/60);
print ' For adiabatic process ';
G = 1.4;
T2 = T1*((P2/P1)**((G-1)/G));
print 'T2: %3.0f K'%(T2);
P = (G/(G-1))*(P1*100*V1/60)*(((P2/P1)**((G-1)/G))-1);
print 'Power required: %3.0f kW'%(P);
Q = 0;
print 'Heat Rejected: %3.0f kW'%(Q);
print ' For adiabatic process ';
n = 1.25;
T2 = T1*((P2/P1)**((n-1)/n));
print 'T2: %3.0f K'%(T2);
P = (n/(n-1))*(P1*100*V1/60)*(((P2/P1)**((n-1)/n))-1);
print 'Power required: %3.0f kW'%(P);
R = 0.287;
Cp = 1.005;
m = (P1*100*V1)/(R*T1);
H = m*(1./60)*Cp*(T2-T1);
Q = H-P;
print 'Heat Rejected: %3.0f kW'%(Q);
# note: rounding off error.
import math
# Variables
P1 = 1.;
P2 = 12.;
n = 1.3;
N = 350.;
L = 180./(2*N);
IP = 30.;
Ev = 0.92;
# Calculations
W = (n/(n-1))*(P1*100)*(((P2/P1)**((n-1)/n))-1); #with (V1-V4)
V14 = (IP*60)/(N*W);
Vs = V14/Ev;
D2 = Vs*4/((22./7)*L);
D = math.sqrt(D2);
# Results
print 'D: %3.3f m'%(D);
print 'L: %3.3f m'%(L);
import math
# Variables
m = 1.;
P1 = 1.;
P2 = 5.;
T1 = 27.+273;
n = 1.25;
R = 0.287;
# Calculations and Results
W = m*R*T1*math.log(P2/P1);
print 'Work Done for Isothermal Process: %3.2f kJ/kg '%(W);
G = 1.4;
W = (G/(G-1))*(m*R*T1)*(((P2/P1)**((G-1)/G))-1);
print 'Work Done for Isentropic Process: %3.2f kJ/kg '%(W);
W = (n/(n-1))*(m*R*T1)*(((P2/P1)**((n-1)/n))-1);
print 'Work Done for Polytropic Process: %3.2f kJ/kg '%(W);
# Variables
D = 0.15;
L = 0.3;
P1 = 1.;
T1 = 27.+273;
P2 = 8.;
N = 120.;
G = 1.4;
R = 0.287;
Vs = (22./7)*(1./4)*D*D*L;
# Calculations and Results
m = (P1*100*Vs)/(R*T1);
print 'Mass of air compressed per cycle: %3.4f kJ/cycle '%(m);
W = (G/(G-1))*(P1*100*Vs)*(((P2/P1)**((G-1)/G))-1);
print 'Work required per cycle: %3.3f kJ/cycle '%(W);
P = (W*N)/60;
print 'Power required to drive compressor: %3.2f kJ/cycle '%(P);