from __future__ import division
# Initialisation of Variables
v1=1#.........#Volume of air taken in m**3/min
p1=1.013#...............#Intake pressure in bar
t1=288#...............#Intake temperature in K
p2=7#......................#Delivery pressure in bar
n=1.35#..............#Adiabatic index
R=287#..............#Gas constant in kJ/kgK
#Calculations
m=(p1*v1*10**5)/(R*t1)#..............#Mass of air delivered per min in kg
t2=t1*((p2/p1)**((n-1)/n))#...........#Delivery temperature in K
iw=(n/(n-1))*m*R*(t2-t1)#............#Indicated work in kJ/min
IP=iw/(60*1000)#....................#Indicated power
print "Indicated power = %0.2f kW"%IP
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
N=300#............#Compressor rpm
afr=15#.........#Air fuel ratio
etamech=0.85#....#Mechanical efficiency
etamt=0.9#.......#Motor transmission efficiency
v=1#............#Volume dealt with per min at inlet in m**3/min
rld=1.5#........#Ratio of stroke to diameter
v1=1#.........#Volume of air taken in m**3/min
p1=1.013#...............#Intake pressure in bar
t1=288#...............#Intake temperature in K
p2=7#......................#Delivery pressure in bar
n=1.35#..............#Adiabatic index
R=287#..............#Gas constant in kJ/kgK
#Calculations
m=(p1*v1*10**5)/(R*t1)#..............#Mass of air delivered per min in kg
t2=t1*((p2/p1)**((n-1)/n))#...........#Delivery temperature in K
iw=(n/(n-1))*m*R*(t2-t1)#............#Indicated work in kJ/min
IP=iw/(60*1000)#....................#Indicated power in kW
vdc=v/N#........#Volume drawn in per cycle in m**3
D=(vdc/((pi/4)*rld))**(1/3)#..........#Cylinder bore in m
print "Cylinder bore = %0.2f mm"%(D*1000)
pc=IP/etamech#.........#Power input to the compressor in kW
mp=pc/etamt#..........#Motor power in kW
print "Motor power = %0.2f kW"%mp
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
p1=1#......#Suction pressure in bar
t1=293#.....#Suction temperature in K
n=1.2#......#Compression index
p2=10#......#Delivery pressure in bar
R=0.287#....#Gas constant in kJ/kgK
cv=0.718#...#Specific heat at constant volume in kJ/kgK
#Calculations
t2=t1*((p2/p1)**((n-1)/n))#.....#Temperature at the end of compression in K
print "Temperature at the end of compression = %0.2f K"%t2
W=1*R*t1*(n/(n-1))*(((p2/p1)**((n-1)/n))-1)#.......#Work done during compression of air in kJ
print "Work done during compression per kg of air = %0.2f kJ"%W
Q=(t2-t1)*(cv-((R)/(n-1)))#..........#Heat transferred during compression of air in kJ/kg
print "Heat transferred during compression per kg of air = %0.2f kJ"%Q
from __future__ import division
from math import pi, sqrt,log
# Initialisation of Variables
p1=1#........#Suction pressure in bar
t1=293#.......#Suction temperature in K
p2=6#..........#Discharge pressure in bar
t2=453#.......#Discharge temperature in K
N=1200#.........#Compressor rpm
Ps=6.25#........#Shaft power in kW
ma=1.7#........#Mass of air delivered in kg/min
D=0.14#......#Engine bore in m
L=0.10#.......#Engine stroke in m
R=287#..........#Gas constant in kJ/kgK
#Calculations
Vd=(pi/4)*D*D*L*N#.........#Displlacement volume in m**3/min
FAD=ma*R*t1/(p1*10**5)#........#Free air delivered
etav=FAD/Vd#.....#Volumetric efficiency
print "Volumetric Efficiency = %0.2f %%"%(etav*100)
n=1/(1-((log(t2/t1))/(log(p2/p1))))#........#Index of compression
IP=(n/(n-1))*(ma/60)*(R/1000)*t1*(((p2/p1)**((n-1)/n))-1)#..........#Indicated power in kW
print "Indicated power = %0.2f kW"%IP
Piso=((ma/60)*(R/1000)*t1*(log(p2/p1)))#..........#Isothermal power
etaiso=Piso/IP#..............#Isothermal efficiency
print "Isothermal efficiency = %0.2f %%"%(etaiso*100)
etamech=IP/Ps#...........#Mechanical efficiency
print "Mechanical efficiency = %0.2f %%"%(etamech*100)
etao=Piso/Ps#........#Overall efficiency
print "Overall efficiency = %0.2f %%"%(etao*100)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ma=6.75#.........#Mass of air compressed in kg/min
p1=1#............#Initial pressure in atm
cp=1.003#.........#Specifc heat at constant vpressure in kJ/kgK
t1=21#...........#Initial temperature in Celsius
t2=43#..........#Final temperature in Celsius
rp=1.35#.........#Pressure ratio
ga=1.4#.........#Ratio os specific heats
delt=3.3#.......#Change in temperature
cpw=4.18#.......#Specific heat for water in kJ/kgK
#Calculations
W=ma*cp*(t2-t1)#............#Work output in kJ
print "Work output = %0.2f kW"%W
t21=(t1+273)*(rp**((ga-1)/ga))#...........#Final temperature if the compression had been isentropic
Qr=ma*cp*(t21-(t2+273))#............#Heat rejected in kJ
mw=Qr/(cpw*delt)#........#Mass of cooling water in kg/min
print "Mass of cooling water = %0.2f kg/min"%mw
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ma=14#........#Quantity of air delivered in kg/min
p1=1.013#......#Intake pressure in bar
t1=288#.........#Intake temperature in K
p2=7#...........#Delivery pressure in bar
N=300#..........#Compressor rpm
pervc=0.05#.......#Percentage of clearance volume in the total stroke volume
n=1.3#............#Compressor and expansion index
#Calculations
V1byVs=pervc+1#
v1minv4=ma/(N*2)#
v4byv3=((p2/p1)**(1/n))#
v4byvs=v4byv3*pervc#
Vs=v1minv4/(V1byVs-v4byvs)#.....#Swept volume in m**3
print "Swept volume = %0.2f m**3"%Vs
t2=t1*((p2/p1)**((n-1)/n))#........#Delivery Temperature in K
print "Delivery temperature = %0.2f K"%t2
IP=((n)/(n-1))*p1*(10**5)*((ma)/(60*1000))*(((p2/p1)**((n-1)/n))-1)#
print "Indicated Power = %0.2f kW"%IP
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
FAD=14#...........#Free air delivered in m**3/min
p1=0.95#.........#Induction pressure in bar
t1=305#........#Induction temperature in K
p2=7#...........#Delivery pressure in bar
n=1.3#...........#Adiabatic index
VcbyVs=0.05#........#Ratio of clearance volume and swept volume
R=287#...........#Gas constant in J/kgK
t=288#...........#free air temperature in K
p=1.013#.........#free air pressure in bar
#Calculations
m=(p*100000*FAD)/(R*t)#..........#Mass delivered per min in kg
t2=t1*((p2/p1)**((n-1)/n))#
IP=((n/(n-1))*m*(R/1000)*(t2-t1))/60#.........#Indicated power in kW
print "Indicated power = %0.2f kW"%IP
v4byv3=(p2/p1)**(1/n)#v4byvs=v4byv3*VcbyVs#v1minv4=(1+VcbyVs)-v4byvs#
Vbyvs=v1minv4*(t/t1)*(p1/p)#
etav=Vbyvs/1#.............#Volumetric efficiency
print "Volumetric efficiency = %0.2f %%"%(etav*100)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
FAD=16#.......#Free air delivered in m**3/min
p1=0.96#......#Suction pressure in bar
t1=303#.......#Suction temperature in K
n=1.3#........#Compression index
k=0.04#........#Clearance ratio
p2=6#.........#Delivery pressure in bar
etamech=0.9#...#Mechanical efficiency
vp=300#.......#Piston speed in m/min
N=500#........#Compressor rpm
p=1#.....#Ambient pressure in bar
t=288#.....#Ambient temperature in K
etac=0.85#...#Compressor efficiency
R=0.287#......#Universal gas constant
#Calculations
m=(p*10**5*FAD)/(R*1000*t)#...........#Mass flow rate of compressor in kg/min
t2=t1*((p2/p1)**((n-1)/n))#.....#Temperature at the end of compression in K
P=(n/(n-1))*(m/60)*R*(t2-t1)*(1/etamech)*(1/etac)#..........#Power input to compressor in kW
print "Power input to compressor = %0.2f kW"%P
L=vp/(2*N)#.........#Stroke in m
print "Compressor stroke = %0.2f mm"%(L*1000)
etav=((t/t1)*(p1/p)*(1+k-(k*((p2/p1)**(1/n)))))#........#Volumetric efficiency
D=sqrt(FAD/((pi/4)*L*N*2*etav))#...........#Compressor bore in m
print "Compressor bore = %0.2f mm"%(D*1000)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
m=0.6#..........#Mass of air delivered in kg/min
p2=6#.........#Delivery pressure in bar
p1=1#..........#Induction pressure in bar
t1=303#........#Induction temperature in K
D=0.1#.........#Compressor bore in m
L=0.15#........#Compressor stroke in m
k=0.03#........#Clearance ratio
etamech=0.85#....#Mechanical efficiency
R=0.287#.......#Gas constant in kJ/kgK
n=1.3#........#Compression index
#Calculations
etav=(1+k)-(k*((p2/p1)**(1/n)))#..........#Volumetric efficiency
print "Volumetric efficiency = %0.2f %%"%(etav*100)
IP=(n/(n-1))*(m/60)*R*t1*(((p2/p1)**((n-1)/n))-1)#.........#Indicated power in kW
P=IP/etamech#...........#Power required to drive the compressor in kW
print "Power required to drive the compressor = %0.2f kW"%P
FAD=(m*R*t1*1000)/(p1*10**5)#...........#Free air delivery in m**3/min
Vd=FAD/etav#........#Displacement volume in m**3/min
N=Vd/((pi/4)*D*D*L)#.........#Compressor rpm
print "Compressor rpm : ",round(N)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
L=88#...........#Compressor stroke in cm
k=0.02#...........#Clearance ratio
p3=8.2#...........#Delivery pressure in bar
p4=1.025#.......#Suction pressure in bar
p1=p4#.......#Suction pressure in bar
n=1.3#.........#Compression index
lo=0.55#...#Length of distance piece fitted after overhaul in cm
#Calculations
pcfa=(((L+(L*k))-((L*k)*((p3/p4)**(1/n))))-(((k*L)+lo+L)-(((k*L)+lo)*((p3/p4)**(1/n)))))/((L+L*k)-((L*k)*((p3/p4)**(1/n))))
print "Percentage change in free air delivery = %0.2f %%"%(pcfa*100)
pcpa=pcfa#......#Percentage change in power delivered
print "Percentage change in power delivered = %0.2f %%"%(pcpa*100)
from __future__ import division
from math import pi
# Initialisation of Variables
v=30#.............#Suction volume in m**3/min
p1=1#...........#Suction pressure in bar
t1=300#.........#Suction temperature in K
p2=16#...........#Delivery pressure in bar
N=320#..........#Compressor rpm
k=0.04#.........#Clearance ratio
rld=1.2#.........#Ratio of stroke to bore
etamech=0.82#....#Mechanical efficiency
n=1.32#.........#Compression index
ti=39+273#......#Temperature inside the suction chamber in K
nc=4#.........#No of cylineders
#Calculations
W=(n/(n-1))*(p1/1000)*10**5*(v/60)*(((p2/p1)**((n-1)/n))-1)#........#Work done in kW
mp=W/etamech#..........#Motor power in kW
print "Motor power = %0.2f kW"%mp
etav=((1+k)-(k*((p2/p1)**(1/n))))*(t1/ti)#........#Volumetric efficiency
Vs=(v/nc)*(1/(2*N))*(1/etav)#............#Swept volume of cylinder in m**3
D=(Vs/((pi/4)*rld))**(1/3)#.............#Compressor bore in m
L=D*rld#..............#Compresor stroke in m
print "Compressor bore = %0.2f mm"%(D*1000)
print "Compressor stroke = %0.2f mm"%(L*1000)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
n=2#........#No of cylinders
ma=16#........#Mass of air supplied per min in kg
p1=1#........#Suction pressure in bar
t1=288#.......#Suction temperature in K
k=0.04#.......#Clearance ratio
ni=1.3#........#Compression index
R=0.287#........#Gas constant in kJ/kgK
N=2000#........#Engine rpm
p3=7#...........#Delivery pressure in bar
rld=1.2#...........#Ratio of stroke to bore for compressor cylinder and engine cylinder
etamech=0.82#.........#Mechanical efficiency of engine
pmb=5.5#..........#Mean effective pressure in bar in engine
ne=4#.............#No of engine cylinders
#Calculations
Vs=(((ma/n)*R*1000*t1)/(p1*10**5*N))/((1+k)-(k*((p3/p1)**(1/ni))))#
Dc=(Vs/((pi/4)*rld))**(1/3)#.........#Diameter of compressor cylinder in m
Lc=rld*Dc#.............#Stroke of the compressor cylinder in m
print "Diameter of compressor cylinder = %0.2f mm"%(Dc*1000)
print "Stroke of compressor cylinder = %0.2f mm"%(Lc*1000)
IP=(ni/(ni-1))*(ma/60)*R*t1*(((p3/p1)**((ni-1)/ni))-1)#......#Indicated power of the compressor in kW
BP=IP/etamech#...............#Brake power of the engine in kW
De=((BP*60*1000)/(ne*pmb*10**5*rld*(pi/4)*N))**(1/3)#......#Diameter of the engine cylinder in m
Le=rld*De#...........#Stroke of the engine cylinder in m
print "Diameter of engine cylinder = %0.2f mm"%(De*1000)
print "Stroke of engine cylinder = %0.2f mm"%(Le*1000)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
nc=1.25#......#Index of compression
ne=1.3#......#Index of expansion
etamech=0.85#.......#Mechanical efficiency
p1=1#.........#Suction pressure in bar
p2=7.5#.......#Delivery pressure in bar
t1=25+273#....#Suction temperature in bar
Vamb=2.2#.....#Volume of free air delivered in m**3
N=310#........#Engine rpm
k=0.05#.......#Clearance ratio
pamb=1.03#.....#Ambient pressure in bar
tamb=293#......#Ambient temperature in K
#Calculations
etav=(1+k-(k*((p2/p1)**(1/ne))))#........#Volumetric efficiency
print "Volumetric efficiency = %0.2f %%"%(etav*100)
v1=(pamb*Vamb*t1)/(p1*tamb)#.......#Volume of air delivered at suction condition in m**3
vs=(v1/(etav*N*2))#.........#Swept volume in m**3
D=(vs/(pi/4))**(1/3)#........#Diameter of the cylinder in m
L=D#
print "Diameter of the cylinder = %0.2f cm"%(D*100)
print "Stroke of the cylinder = %0.2f cm"%(L*100)
W=2*vs*10**5*(((nc)/(nc-1))*p1*(1+k)*(((p2/p1)**((nc-1)/(nc)))-1)-((ne)/(ne-1))*p1*(k*((p2/p1)**(1/ne)))*(((p2/p1)**((ne-1)/(ne)))-1))#..........#Work done per cycle of operation in Nm/cycle
IP=W*N/(60*1000)#...............#Indicated power in kW
BP=IP/etamech#.............#Brake power in kW
print "Brake power = %0.2f kW"%BP
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
v=14#..........#Volume of air delivered in m**3
p1=1#........#Suction pressure in bar
p2=7#........#Delivery pressure in bar
N=310#........#Compressor rpm
n=1.35#........#Compression index
k=0.05#........#Clearance ratio
rld=1.5#.........#Ratio of cylinder length and diameter
#Calculations
etav=(1+k)-(k*((p2/p1)**(1/n)))#..........#Volumetric efficiency
Vs=v/(etav*N)#.............#Swept volume in m**3
D=((Vs)/((pi/4)*rld))**(1/3)#......#Compressor diameter in m
L=rld*D#......................#Compressor stroke in m
print "Compressor diameter = %0.2f cm"%(D*100)
print "Compressor stroke = %0.2f cm"%(L*100)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
D=0.33#.........#Cylinder diameter in m
L=0.35#.........#Cylinder stroke in m
k=0.05#.........#Clearance ratio
N=300#..........#Compressor rpm
psuc=0.95#........#Suction pressure in bar
tsuc=298#.........#Suction temperature in K
pamb=1.013#......#Ambient pressure in bar
tamb=293#.........#Ambient temperature in K
p2=4.5#...........#Delivery pressure in bar
n=1.25#..........#Compression index
cv=0.717#...........#Specific heat at constant volume in kJ/kgK
ga=1.4#..........#Ratio of specific heats
etamech=0.8#......#Mechanical efficiency
R=0.287#.........#Gas constant in kJ/kgK
#Calculations
Vs=(pi/4)*D*D*L*N*2#............#Swept volume in m**3
p1=psuc#
etav=1-(k*(((p2/p1)**(1/n))-1))#........#Volumetric efficiency
Vad=Vs*etav#................#Actual air drawn per min in m**3
FAD=(psuc/pamb)*(tamb/tsuc)*Vad#............#Free air delivered in m**3/min
print "Free air delivered = %0.2f m**3/min"%FAD
t1=tsuc#
ma=(p1*10**5*Vad)/(R*1000*t1)#.......#Mass of air delivered per min in kg
t2=t1*((p2/p1)**((n-1)/n))#..........#Delivery temperature in K
Qr=ma*cv*((ga-n)/(n-1))*(t2-t1)#..........#Heat rejected during compression in kJ/min
print "Heat rejected during compression = %0.2f kJ/min"%Qr
P=((n)/(n-1))*R*t1*(ma/60)*(((p2/p1)**((n-1)/(n)))-1)*(1/etamech)#..........#Power needed to drive the compressor in kW
print "Power needed to drive the compressor = %0.2f kW"%P
from __future__ import division
from math import pi, sqrt
#Initialisation of variables
p1=1.03#...........#Intake pressure in bar
t1=300#............#Intake temperature in K
p2=7#.............#Intake pressure for High pressure cylinder in bar
t2=310#..............#Temperature of air entering high pressure cylinder in K
p3=40#............#Pressure of air after compression in bar
V=30#.........#volume of air delivered in m**3/h
R=0.287#............#Gas constant for air in kJ/kgK
ga=1.4#...........#Ratio of specific heats
#Calculations
m=p1*10**5*V/(R*1000*t1)#..........#Mass of air compressed in kg/h
t21=t1*((p2/p1)**((ga-1)/ga))#.......#Actual temperature of air entering high pressure cylinder in K
t3=t2*((p3/p2)**((ga-1)/ga))#........#Actual temperature of air after compression in K
W=((ga)/(ga-1))*m*(R/3600)*(t21-t1+t3-t2)#..........#Power required to run compressor in kW
print "Power required to run the compressor = %0.2f kW"%W
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
FAD=6#.......#Free air delivered in m**3/min
p1=1#........#suction pressure in bar
t1=300#......#Suction temperature in K
p3=40#.......#Delivery pressure in bar
p2=6#........#Intermediate pressure in bar
t3=300#........#Temperature at the inlet to 2nd stage in K
n=1.3#.........#Compression index
etamech=0.8#.....#Mechanical efficiency
N=400#............#Compressor rpm
R=0.287#.........#Gas constant in kJ/kgK
#Calculations
dlp=(FAD/(N*(pi/4)))**(1/3)#...............#Diameter of the low pressure cylinder in m
dhp=sqrt(1/(dlp*N*(pi/4)))#............#Diameter of high pressure cylinder in m
print "Diameter of low pressure cylinder = %0.2f mm"%(dlp*1000)
print "Diameter of high pressure cylinder = %0.2f mm"%(dhp*1000)
m=(p1*FAD*10**5)/(R*t1*1000*60)#........#Mass flow of air in kg/s
W=n*(1/(n-1))*m*R*t1*(((p2/p1)**((n-1)/n))+((p3/p2)**((n-1)/n))-2)#........#Indicated work in kJ/s
P=W/etamech#...............#Power required in kW
print "Power required to run the compressor = %0.2f kW"%P
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ns=2#.............#No of stages
v1=0.2#.........#Intake volume in m**3/s
p1=1#..........#Intake pressure in bar
t1=289#...............#Intake temperature in K
p3=7#.........#Final pressure in bar
n=1.25#.......#Compression index
N=600#........#Compressor rpm
cp=1.005#.....#Specific heat at constant pressure in kJ/kgK
R=0.287#......#Gas constant in kJ/kgK
#Calculations
p2=sqrt(p1*p3)#......#Intermediate pressure in bar
print "Intermediate pressure = %0.2f Mpa"%(p2/10)
vslp=60*v1/N#..........#Volume of low pressure cylinder in m**3
vshp=p1*vslp/p2#..........#Volume of high pressure cylinder in m**3
print "Volume of low pressure cylinder = %0.2f m**3"%vslp
print "Volume of high pressure cylinder = %0.2f m**3"%vshp
W=(ns*(n/(n-1)))*p1*10**5*(v1/1000)*(((p3/p1)**((n-1)/(ns*n)))-1)#...........#Power required to drive the compressor in kW
print "Power required to drive the compressor = %0.2f kW"%W
m=p1*10**5*v1/(R*t1*1000)#.........#Mass of air handled in kg/s
t2=t1*((p2/p1)**((n-1)/n))#.........#Temperature at the end of first stage compression in K
Qr=m*cp*(t2-t1)#.......#Heat rejected in the intercooler in kW
print "Heat rejected in the intercooler = %0.2f kW"%Qr
from __future__ import division
from math import pi, sqrt
#initialisation of variables
p3=30#..........#delivery pressure in bar
p1=1#.........#suction pressure in bar
t1=273+15#.......#suction temperature in K
n=1.3#.........#adiabatic index
#calculation
p2=sqrt(p1*p3)#.....#Pressure before entering High pressure cylinder in bar
t21=t1*((p2/p1)**((n-1)/n))#.........#Actual temperature before entering the high pressure turbine in K
r=sqrt((p2**(1/n))*(t21/t1))#............#Ratio of cylinder diameters
print "Ratio of cylinder diameters : %0.3f"%r
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ns=2#.........#No of stages
p1=1#........#Suction pressure in bar
p2=7.4#.......#Intercooler pressure in bar
p3=42.6#.......#Delivery pressure in bar
t1=15+273#......#Suction temperature in K
n=1.3#........#Compression index
R=0.287#.......#Gas constant in kJ/kgK
dlp=0.09#.......#Diameter of low pressure cylinder in m
dhp=0.03#.......#Diameter of high pressure cylinder in m
etav=0.9#.....#Volumetric efficiency
#Calculations
W=n*(1/(n-1))*R*t1*(((p2/p1)**((n-1)/n))+((p3/p2)**((n-1)/n))-2)#
print "Work done in compressing 1 kg of gas = %0.2f kJ"%W
#Given that stroke length is same in both cases
rV=p2/p1#.........#Ratio of volumes
rECV=((dlp/dhp)**2)*etav#.........#Ratio of effective cylinder volumes
if (rECV>rV):
print "Pressure in the intercooler would rise."
elif (rECV<rV):
print "Pressure in the intercooler would fall"
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
V=4#...........#Volume of air handled in m**3/min
p1=1.016#.....#Suction pressure in bar
t1=288#........#Suction temperature in K
N=250#.........#Compressor rpm
p3=78.65#.....#Delivery pressure in bar
vp=3#........#Piston speed in m/s
etamech=0.75#.....#mechanical efficiency
etav=0.8#........#Volumetric efficiency
n=1.25#..........#Compression index
R=287#...........#Gas constant in J/kgK
ns=2#............#No of stages
#Calculations
l=(vp*60)/(2*N)#..........#Stroke length in m
d=sqrt(V/((pi/4)*l*N*etav))#.......#Bore in m
print "Stroke length = %0.2f m"%l
print "Bore = %0.2f m"%d
m=(p1*10**5*V)/(R*t1)#.......#Mass of air handled by the compressor in kg/min
p2=sqrt(p1*p3)#.............#Intermediate pressure in bar
t2=t1*((p2/p1)**((n-1)/n))#.........#Temperature at the end of first stage compression in K
W=ns*(n/(n-1))*(m/60)*(R/1000)*(t2-t1)*(1/etamech)#..........#Work required in kW
print "Work required = %0.2f kW"%W
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
m=4.5#.........#Amount of air compressed in kg/min
ps=1.013#.......#Suction pressure in bar
ts=288#.........#Suction temperature in K
rp=9#...........#Pressure ratio
n=1.3#.........#Compression index
k=0.05#........#Clearance ratio
N=300#.........#Compressor rpm
R=287#.........#Gas constant in J/kgK
ns=2#............#No of stages
#Calculations
ti=round(ts*((sqrt(rp))**((n-1)/n)))#......#Intermediate temperature in K
W=round(ns*n*(1/(n-1))*m*(R/1000)*(ti-ts))#..........#Work required per min in kJ
IP=W/60#.........#Indicated power in kW
print "Indicated power = %0.2f kW"%IP
mc=m/N#...........#Mass induced per cycle in kg
etav=(1+k)-(k*(sqrt(rp)**(1/n)))#.......#Volumetric efficiency
Vs=(mc*R*ts)/(ps*10**5*etav)#........#Swept volume for low pressure cylinder in m**3
print "Swept volume for low pressure cylinder = %0.4f m**3"%Vs
vdhp=(mc*ts*R)/(sqrt(rp)*ps*10**5)#............#Volume of air drawn in high pressure cylinder per cycle in m**3
vshp=vdhp/etav#...............#Swept volume ofhigh pressure cylinder in m**3
print "Swept volume of high pressure cylinder = %0.4f m**3"%vshp
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
v1=2.2#...........#free air delivered by the compressor in m**3/min
p1=1#........#Suction pressure in bar
t1=298#.......#Suction temperature in K
pd=55#........#Delivery pressure in bar
N=210#.......#Compressor rpm
n=1.3#........#Compression index
k=0.05#.......#Clearance ratio for high pressure and low pressure cylinders
R=287#.......#Gas constant in J/kgK
ns=2#.......#No of stages
#Calculations
ps=p1#
m =(p1*v1*10**5)/(R*t1)#.........#Mass of air deivered in m**3/min
W=(ns*(n/(n-1)))*m*R*t1*(((pd/ps)**((n-1)/(ns*n)))-1)#...........#Work done by compressor in Nm/min
P=W/(60*1000)#...........#Power required to run the compressor
print "Power required to run the compressor = %0.2f kW"%P
pi=sqrt(ps*pd)#........#Intermediate pressure in bar
etav1=(1+k)-(k*((pi/p1)**(1/n)))#...........#Volumetric efficiency of the low pressure cylinder
Vs=(v1*10**6)/(etav1*N)#............#Swept volume in cm**3
dlp=(Vs/((pi/4)))**(1/3)#..........#Diameter of low pressure cylinder in cm
llp=dlp#.................#Stroke of low pressure cylinder in cm
print "Bore of low pressure cylinder = %0.2f cm"%dlp
print "Stroke of low pressure cylinder = %0.2f cm"%llp
dhp=sqrt(dlp*dlp/pi)#.........#Diameter of high pressure cylinder in cm
lhp=llp#
print "Bore of high pressure cylinder = %0.2f cm"%dhp
print "Stroke of high pressure cylinder = %0.2f cm"%lhp
rcv=pi/ps#.....#Ratio of cylinder volumes
print "Ratio of cylinder volumes : %0.4f"%rcv
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
p1=1#........#Suction pressure in bar
p2=4#.....#Intermediate pressure in bar
p5=3.8#.......#Pressure of air leaving the interooler in bar
p6=15.2#........#Delivery pressure in bar
t1=300#..........#Suction temperature in K
dlp=0.36#........#Diameter of low pressure cylinder in m
llp=0.4#........#Stroke of low pressure cylinder in m
N=220#........#Compressor rpm
k=0.04#........#Clearance ratio
cp=1.0035#.........#Specific heat at constant pressure in kJ/kgK
n=1.3#........#Compression index
R=0.287#........#Gas constant in kJ/kgK
p8=p5#
p3=p2#
p7=p6#
t5=t1#
#Calculations
Vslp=(pi/4)*dlp*dlp*llp*N*2#.......#Swept volume in m**3
etavlp=(1+k)-(k*((p2/p1)**(1/n)))#.....#Volumetric efficiency
valp=Vslp*etavlp#................#Volume of air drawn in low pressure cylinder in m**3
m=(p1*10**5*valp)/(R*1000*t1)#........#Mass of air drawin in kg/min
t2=round(t1*((p2/p1)**((n-1)/n)))#
Qr=m*cp*(t2-t5)#........#Heat rejected to the intercooler in kJ/min
print "Heat rejected to the intercooler = %0.2f kJ/min"%Qr
vahp=(m*R*t5*1000)/(p5*10**5)#...#Volume of air drawn into high pressure cylinder per min in m**3
Vshp=vahp/etavlp#.........#Swept volume of high pressure cylinder in m**3/min
dhp=sqrt(Vshp/((pi/4)*2*N*llp))#..........#Diameter of high pressure cylinder in m
print "Diameter of high pressure cylinder = %0.2f mm"%(dhp*1000)
P=(n/(n-1))*m*(1/60)*R*(t2-t1)#.......#Power required for high pressure cylinder in kW
print "Power required for high pressure cylinder = %0.2f kW"%P
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ps=1#........#Suction pressure in bar
pi=4.2#.....#Intermediate pressure in bar
pi1=4#.......#Pressure of air leaving the interooler in bar
pd=18#........#Delivery pressure in bar
t1=298#..........#Suction temperature in K
t5=t1#
dlp=0.4#........#Diameter of low pressure cylinder in m
llp=0.5#........#Stroke of low pressure cylinder in m
N=200#........#Compressor rpm
k=0.05#........#Clearance ratio
cp=1.004#.........#Specific heat at constant pressure in kJ/kgK
n=1.25#........#Compression index
R=0.287#........#Gas constant in kJ/kgK
#Calculations
Vslp=(pi/4)*dlp*dlp*llp#..........#Swept volume of low pressure cylinder in m**3
etavlp=(1+k)-(k*((pi/ps)**(1/n)))#.....#Volumetric efficiency
t2=round(t1*((pi/ps)**((n-1)/n)))#
m=(ps*10**5*etavlp*Vslp)/(R*1000*t1)#...#Mass of air in kg
wlp=((n)/(n-1))*R*1000*t1*m*(((pi/ps)**((n-1)/(n)))-1)#..........#Work done per min in Nm in low pressure cylinder
whp=((n)/(n-1))*R*t5*m*1000*(((pd/pi1)**((n-1)/(n)))-1)#..........#Work done per min in Nm in high pressure cylinder
W=wlp+whp#.........#Net work done in Nm
IP=(W*N)/(60*1000)#............#Power required to run the compressor in kW
print "Power required to run the compressor = %0.2f kW"%IP
Qr=m*N*cp*(t2-t1)#...........#Heat rejected in intercooler in kJ/min
print "Heat rejected in intercooler = %0.2f kJ/min"%Qr
from __future__ import division
from math import pi, sqrt,log
# Initialisation of Variables
p1=1#............#Intake pressure in bar
p2=4#..............#Pressure after first stage in bar
p3=16#............#Final pressure in bar
ns=2#............#No of stages
t1=300#............#Intake temperature in K
n=1.3#............#Compression index
klp=0.04#.........#Clearance ratio for low pressure cylinder
khp=0.06#........#Clearance ratio for high pressure cylinder
N=440#............#Engine rpm
R=0.287#..........#Gas constant in kJ/kgK
m=10.5#.............#Mass of air delivered in kg/min
cp=1.005#.........#Specific heat at constant pressure in kJ/kgK
#Calculations
rp=sqrt(p1*p3)#...........#Pressure ratio per stage
P=((ns*n)/(n-1))*R*t1*(m/60)*(((p3/p1)**((n-1)/(ns*n)))-1)#..........#Work done per min in Nm
print "Power required = %0.2f kW"%P
isoWd=(m/60)*R*t1*log(p3/p1)#..........#Isothermal work done in Nm
print "Isothermal work done = %0.2f kW"%isoWd
etaiso=isoWd/P#...............#Isothermal efficiency
print "Isothermal efficiency = %0.2f %%"%(etaiso*100)
FAD=(m*R*t1*1000)/(p1*10**5)#.............#Free air delivered in m**3/min
print "Free air delivered = %0.2f m**3/min"%FAD
t2=t1*((p2/p1)**((n-1)/n))#.....#Temperature at the end of compression in K
Qt=(m/60)*cp*(t2-t1)#..............#Heat transferred in intercooler in kW
print "Heat transferred in intercooler = %0.2f kW"%Qt
etavlp=(1+klp)-(klp*((p2/p1)**(1/n)))#..........#Volumetric efficiency of low pressure stage
etavhp=(1+khp)-(khp*((p2/p1)**(1/n)))#..........#Volumetric efficiency of high pressure stage
vslp=FAD/(N*etavlp)#......#Swept volume for low pressure stage in m**3
vclp=klp*vslp#..............#Clearance volume for low pressure stage in m**3
print "\nSwept volume for low pressure stage = %0.2f m**3\n"%(vslp)
print "\nClearance volume for low pressure stage = %0.2e m**3\n"%(vclp)
vshp=FAD/(N*rp*etavhp)#......#Swept volume for high pressure stage in m**3
vchp=khp*vshp#..............#Clearance volume for high pressure stage in m**3
print "\nSwept volume for high pressure stage = %0.2f m**3\n"%(vshp)
print "\nClearance volume for high pressure stage = %0.2e m**3\n"%(vchp)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ns=3#......#No of stages
p1=1.05#......#Intake pressure in bar
pd=40#..........#Delivery pressure in bar
V=3#..........#Volume of air xupplied per min in m**3
n=1.25#........#Compression index
#Calculations
Wd=((ns*n)/(n-1))*p1*V*10**5*(((pd/p1)**((n-1)/(ns*n)))-1)#..........#Work done per min in Nm
print "Work done = %0.2f Nm"%Wd
isoWd=10**5*p1*V*log(pd/p1)#..........#Isothermal work done in Nm
print "Isothermal work done = %0.2f Nm"%isoWd
etaiso=isoWd/Wd#...............#Isothermal efficiency
print "Isothermal efficiency = %0.2f %%"%(etaiso*100)
wdss=((n)/(n-1))*p1*V*10**5*(((pd/p1)**((n-1)/(n)))-1)#..........#Single stage Work done per min in Nm
print "Single stage work done per min = %0.2f Nm"%wdss
perws=(wdss-Wd)/wdss#.......#Percentage of work saved
print "Percentage of work saved : %0.2f %%"%(perws*100)
# Initialisation of Variables
p1=1#.............#Intake pressure in bar
p4=36#........#Final pressure in bar
n=1.25#.........#Compression index
R=0.287#.......#Gas constant in kJ/kgK
t1=300#..........#Intake temperature in K
ns=3#...........#No of stages
v=15#..........#Volume of air delivered in m**3
#Calculations
p2=p1*((p4/p1)**(1/ns))#
p3=p2*((p4/p1)**(1/ns))#
print "\n\nIntermediate pressures: \n p2 = %0.2f\n p3 = %.2f\n"%(p2,p3)
t2=t1*((p4/p1)**(((n-1)/n)*(1/ns)))#....#Delivery temperature in K
m=p1*10**5*v/(R*1000*t1)#...........#Mass of air handled per min in kg
Wt=((n/(n-1))*m*R*(1/60)*(t2-t1)*ns)#........#Total work done in three stages
print "Indicated power required = %0.2f kW"%Wt
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ns=3#........#No of stages
N=200#.......#Compressor rpm
p1=1#.......#Intake pressure in bar
t1=20+273#....#Intake temperature in K
D=0.35#......#Engine bore in m
L=0.4#.......#Engine stroke in m
p2=4#........#Discharge pressure from first stage in bar
p6=16#........#Discharge pressure from second stage in bar
p10=64#........#Discharge pressure from third stage in bar
pd=0.2#........#Loss of pressure between intercoolers in bar
R=0.287#......#Gas constant in kJ/kgK
k=0.04#.......#Clearence volume in 4% of the stroke volume
n1=1.2#.....#Compressor index for first stage
n2=1.25#.....#Compressor index for second stage
n3=1.3#.....#Compressor index for third stage
cp=1.005#......#Specific heat at constant pressure in kJ/kgK
etamech=0.8#.....#Mechanical efficiency
#Calculations
p5=p2-pd#
p9=p6-pd#
t5=t1#
t9=t1#
Vs=(pi/4)*D*D*L*N*2#............#Swept volume of low pressure cylinder per min in m**3
etav1=(1+k)-(k*((p2/p1)**(1/n1)))#.....#Volumetric efficiency in first stage
etav2=(1+k)-(k*((p6/p5)**(1/n2)))#.....#Volumetric efficiency in second stage
etav3=(1+k)-(k*((p10/p9)**(1/n3)))#.....#Volumetric efficiency in third stage
vain1=Vs*etav1#.................#Volume of air taken in first stage in m**3/min
m=(p1*10**5)*vain1/(R*t1*1000)#...........#Mass of air intake in kg/min in first stage
t2=round(t1*((p2/p1)**((n1-1)/n1)))#
t6=t5*((p6/p5)**((n2-1)/n2))#
t10=t9*((p10/p9)**((n3-1)/n3))#
Qr1=m*cp*(t2-t5)#........#Heat rejected in intercooler after first stage in kJ/min
Qr2=m*cp*(t6-t9)#........#Heat rejected in intercooler after second stage in kJ/min
Qr3=m*cp*(t10-t1)#........#Heat rejected in intercooler after third stage in kJ/min
print "Heat rejected in intercooler after first stage = %0.2f kJ/min"%Qr1
print "Heat rejected in intercooler after second stage = %0.2f kJ/min"%Qr2
print "Heat rejected in intercooler after third stage = %0.2f kJ/min"%Qr3
vainip=m*R*t5*1000/(p5*10**5)#.........#Volume drawn in intermediate pressure cylinder/min
Vsip=vainip/etav2#.............#Swept volume of intermediate cylinder in m**3/min
Dip=sqrt(Vsip/(2*N*L*(pi/4)))#............#Diameter of the intermediate cylinder in m
print "Diameter of the intermediate cylinder = %0.2f mm"%(Dip*1000)
vainhp=m*R*t9*1000/(p9*10**5)#.........#Volume drawn in high pressure cylinder/min
Vshp=vainhp/etav3#.............#Swept volume of high pressure cylinder in m**3/min
Dhp=sqrt(Vshp/(2*N*L*(pi/4)))#............#Diameter of the intermediate cylinder in m
print "Diameter of the intermediate cylinder = %0.2f mm"%(Dhp*1000)
Ps=(((n1/(n1-1))*m*R*(t2-t1))+((n2/(n2-1))*m*R*(t6-t5))+((n3/(n3-1))*m*R*(t10-t9)))*(1/(60*etamech))#...#Shaft power in kW
print "Shaft power = %0.2f kW"%Ps
cv=cp-R#..........#Specific heat at constant volume in kJ/kgK
ga=cp/cv#...........#Ratio of specific heats
Qt1=cv*((ga-n1)/(ga-1))*(t2-t1)*m#............#Heat transfer during first stage in kJ/min
Qt2=cv*((ga-n2)/(ga-1))*(t6-t1)*m#............#Heat transfer during second stage in kJ/min
Qt3=cv*((ga-n3)/(ga-1))*(t10-t1)*m#............#Heat transfer during third stage in kJ/min
print"\nHeat transferred during first stage = %0.2f kJ/min"%(Qt1)
print "\nHeat transferred during second stage = %0.2f kJ/min"%(Qt2)
print "\nHeat transferred during third stage = %0.2f kJ/min"%(Qt3)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
p1=1#.....#Intake pressure in bar
p5=125#.....#Pressure of the compressed air in bar
rpr=4#.........#Pressure ratio is restricted to 4
#Calculations
X=(log(p5/p1)/log(rpr))#
if(X>round(X)):
x=round(X)+1#
else:
x=round(X)#
print "No of stages : %d"%x
esrp=(p5/p1)**(1/x)#
print "Exact stage pressure ratio : %0.2f"%esrp
p4=p5/esrp#p3=p4/esrp#p2=p3/esrp#......#Intermediate pressures in bar
print "\nIntermediate pressures\np4=%.2f\np3=%.2f\np2=%.2f"%(p4,p3,p2)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ps=1#.........#Suction pressure in bar
t1=273+125#.......#Delivery temperature in K
pd=160#...........#Delivery pressure in bar
tm=40+273#........#Min temperature
ts=298#........#Suction temperature in K
n=1.25#......#Adiabatic index
cv=0.71#.......#Specific heat at constant volume in kJ/kgK
R=0.287#......#Gas constant in kJ/kgK
ns=3#.......#No of stages
#Calculations
p1=ps*((t1/ts)**(n/(n-1)))#
x=(log(pd/p1))/(((n/(n-1))*(log(t1/tm))))#
print "No of stages: %d"%(round(x)+1)
rp1=p1#...........#Pressure ratio in 1st stage
rp=(pd/rp1)**(1/ns)#.........#Pressure ratio in the following stage
W=(n/(n-1))*R*ts*(((rp1)**((n-1)/n))-1)#.........#Work done in first stage in kJ
Wf=ns*(n/(n-1))*R*tm*(((rp)**((n-1)/n))-1)#.........#Work done in next three stages in kJ
wt=W+Wf#............#Total work done per kg in kJ
print "Total work done = %0.2f kJ/kg"%wt
cp=cv+R#..............#Specific heat at constant pressure in kJ/kgK
Qr=ns*cp*(t1-tm)#.............#Heat rejected in intercoolers in kJ/kg
print "Heat rejected in intercoolers = %0.2f kJ/kg"%Qr
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
Vamb=10.5#........#Free air volume in m**3
Pamb=1.013#...........#Free air presssure in bar
Tamb=273+15#..........#Free air temperature in K
T1=(273+25)#...........#Temperature at the end of suction in all cylinders in K
P1=1#............#Pressure at the suction in bar
pd=95#...........#Delivery presssure in bar
N=100#.........#Compressor rpm
n=1.25#..........#Adiabatic index
k=0.04#.........#Fractional clearances for LP
k1=0.07#.........#Fractional clearances for HP
#Calculations
z=(pd/P1)**(1/3)#.........#Pressure ratio
pi1=z*P1#
pi2=z*pi1#
etavollp=1+k-(k*(z**(1/n)))#
etavolhp=1+k1-(k1*(z**(1/n)))#
v1=(Pamb*Vamb*T1)/(Tamb*P1)#
sclp=(round(v1))/(etavollp*N)#.........#Swept capacity of LP cylinder in m**3
print "Swept capacity of low pressure cylinder = %0.2f m**3"%sclp
vip=(Pamb*Vamb*T1)/(pi1*Tamb)#.........#Volume of free air reduced to suction conditions of IP cylinder
scip=vip/(etavolhp*N)#.........#Swept capacity of IP cylinder in m**3
print "Swept capacity of intermediate pressure cylinder = %0.2f m**3"%scip
vhp=(Pamb*Vamb*T1)/(pi2*Tamb)#.........#Volume of free air reduced to suction conditions of HP cylinder
schp=vhp/(etavolhp*N)#.........#Swept capacity of HP cylinder in m**3
print "Swept capacity of intermediate pressure cylinder = %0.2f m**3"%schp
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
D=0.0635#.......#Engine bore in m
L=0.114#.........#Engine stroke in m
p1=6.3#..........#Supply pressure in bar
t1=273+24#.........#Supply temperature in K
p4=1.013#..........#Exhaust pressure in bar
cv=0.05#............#Clearance volume is 5% of the swept volume
cr=0.5#..........#Cut off ratio
n=1.3#...........#Adiabatic index
R=287#...............#gas constant in kJ/kgK
N=300#.............#Engine rpm
ga=1.4#...........#Ratio of specific heats
#Calculations
Vs=(pi*D*D*L)/4#........#Swept volume in m**3
Vc=cv*Vs#..........#Clearance volume in m**3
v6=Vc#
v5=v6#
v1=(Vs/2)+Vc#
v2=Vs+Vc#
v3=v2#
p3=p4#
v4=v5+(cv*Vs)#
p2=p1*((v1/v2)**n)#.......#Pressure at the end of expansion
t2=t1*((v1/v2)**(n-1))#........#Temperature at the end of expansion in K
print "Temperature at the end of expansion = %0.2f K"%t2
p5=p4*((v4/v5)**n)#
w=((p1*(v1-v6))+(((p1*v1)-(p2*v2))/(n-1))-(p3*(v3-v4))-(((p5*v5)-(p4*v4))/(n-1)))*10**5#.......#Workk done per cycle in Nm
IP=(w*N)/(60*1000)#..........#Indicated power in kW
print "Indicated power of the motor = %0.2f kW"%IP
t3=t2*((p3/p2)**((ga-1)/ga))#
t4=t3#
m4=(p4*v4*10**5)/(R*t4)#
m1=(p1*v1*10**5)/(R*t1)#
ma=(m1-m4)*N#..........#Mass of air supplied per min
print "Mass of air supplied per min = %0.2f kg"%ma
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
v=0.03#..............#Induced volume in m**3/rev
p1=1.013#...........#Inlet pressure in bar
rp=1.5#............#Pressure ratio
ga=1.4#...........#Ratio of specific heats
#Calculations
p2=rp*p1#
wr=(p2-p1)*(10**5)*v/1000#.....#Work input for roots compressor in kJ
print "Work input for roots compressor = %0.2f kJ/rev"%wr
pi=(p2+p1)/2#
wv=((p2-pi)*(10**5)*v*((p1/pi)**(1/ga))*(1/1000))+((ga/(ga-1))*p1*(10**5)*(v/1000)*(((pi/p1)**((ga-1)/ga))-1))#...#Work input required for vane type in kJ/rev
print "Work input for vane compressor = %0.2f kJ/rev"%wv
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
v=0.08#.........#Volume of air compressed in m**3
p1=1#..........#Intake pressure in bar
p2=1.5#........#Pressure after compression in in bar
ga=1.4#.........#Ratio of specific heats
#Calculations
wac=v*(p2-p1)*10**5#........#Actual work done in Nm
wid=(ga/(ga-1))*p1*v*(10**5)*(((p2/p1)**((ga-1)/ga))-1)#...........#Ideal work done per revolution in Nw
etac=wid/wac#................#Compressor efficiency
print "Compressor efficiency = %0.2f %%"%(etac*100)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
m=2.5#..........#Air flow rate in kg/s
p1=1#........#Inlet pressure in bar
t1=290#............#Inlet temperature in bar
C1=80#..........#Inlet Velocity in m/s
p2=1.5#........#pressure after compression in bar
t2=345#............#temperature after compression in bar
C2=220#..........#Velocity after compression in m/s
cp=1.005#...........#Specific heat at constant pressure in kJ/kgK
ga=1.4#............#Ratio of specific heats
R=287#..............#Gas constant for air in kJ/kgK
#Calculations
t21=t1*((p2/p1)**((ga-1)/ga))#
wisen=cp*(t21-t1)+((C2*C2)-(C1*C1))/(2*1000)#.....#Isentropic work done in kJ/kg
w=cp*(t2-t1)+((C2*C2)-(C1*C1))/(2*1000)#.....#Actual work done (in impeller) in kJ/kg
etaisen=wisen/w#...............#Isentropic efficiency
print "Isentropic efficiency = %0.2f %%"%(etaisen*100)
P=m*w#..........#Power required to drive the coompressor in kW
print "Power required to drive the coompressor = %0.2f kW"%P
t3=(((C2*C2)-(C1*C1))/(2*1000*cp))+t2#....#Temperature of air after leaving the diffuser in K
p3=p2*((t3/t2)**(ga/(ga-1)))#..........#Pressure of air after leaving the diffuser in bar
t31=t1*((p3/p1)**((ga-1)/ga))#...........#Delivery temperature from diffuser in K
etao=(t31-t1)/(t3-t1)#...............#Overall efficiency
print "Overall efficiency = %0.2f %%"%(etao*100)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
ma=528#.............#Air flow in kg/min
m=ma/60#.............#Air flow in kg/s
p1=1#........#Inlet pressure in bar
t1=293#............#Inlet temperature in bar
N=20000#..............#Compressor rpm
etaisen=0.8#.........#Isentropic efficiency
po1=1#.........#Static pressure in bar
p02=4#...........#Final total pressure in bar
C1=145#.........#Velocity of air when entering the impeller in m/s
rwt=0.9#..........#Ratio of whirl speed to tip speed
dh=0.12#........#Hub diameter in m
cp=1.005#...........#Specific heat at constant pressure in kJ/kgK
ga=1.4#............#Ratio of specific heats
R=287#..............#Gas constant for air in kJ/kgK
#Calculations
t01=t1+((C1*C1)/(2*cp*1000))#..........#Stagnation temperature at the inlet to the machine in K
p01=p1*((t01/t1)**(ga/(ga-1)))#.....#Stagnation pressure at the inlet to the machine in bar
t021=t01*((p02/p01)**((ga-1)/ga))#
deltisen=t021-t01#.........#Isentropic rise in temperature in K
delt=round(deltisen/etaisen)#........#Actual rise in temperature
print "Actual rise in temperature = %0.2f"%delt
wc=cp*delt#.........#Work consumed by compressor in kJ/kg
Cbl2=sqrt(wc*1000/rwt)#
d2=Cbl2*60/(pi*N)#..........#Tip diameter of the impeller in m
print "Tip diameter of the impeller = %0.2f cm"%(d2*100)
P=m*wc#............#Power required in kW
print "Power required = %0.2f kW"%P
rho1=(p1*10**5)/(R*t1)#.......#Density at entry in kg/m**3
d1=sqrt(((m*4)/(C1*rho1*pi))+(dh**2))#.......#Eye diameter in m
print "Diameter of the eye = %0.2f cm"%(d1*100)
from __future__ import division
from math import pi, sqrt,atan
# Initialisation of Variables
N=10000#.................#Compressor rpm
v=660#............#Volume of air delivered in m**3/min
p1=1#.................#Inlet pressure in bar
t1=293#.............#Inlet temperature in K
rp=4#.............#Pressure ratio
etaisen=0.82#........#Isentropic efficiency
Cf2=62#...............#Flow velocity in m/s
rr=2#.............#Ratio of outer radius of impeller to inner radius of impeller
ka=0.9#..............#Blade area co efficient
fis=0.9#...........#Slip factor
cp=1.005#..............#Specific heat at constant pressure in kJ/kgK
ga=1.4#............#Ratio of specific heats
R=287#..............#Gas constant for air in kJ/kgK
#Calculations
t21=t1*(rp**((ga-1)/ga))#
Cf1=Cf2#
t2=t1+((t21-t1)/etaisen)#..........#Final temperature of air
m=(p1*10**5*v/60)/(R*t1)#...............#Mass flow rate in m**3/s
P=m*cp*(t2-t1)#.........#Theoretical power in kW
print "Final temperature of air = %0.2f Kevin"%t2
print "Theoretical power = %0.2f kW"%P
Cbl2=sqrt(1000*cp*(t2-t1)/fis)#
d2=60*Cbl2/(pi*N)#..........#Impeller diameter at outlet in m
d1=d2/rr#...............#Impeller diameter at inlet in m
print "Impeller diameter at outlet = %0.2f cm"%(d2*100)
print "Impeller diameter at inlet = %0.2f cm"%(d1*100)
b1=(v/60)/(2*pi*(d1/2)*Cf1*ka)#.........#Breadth of impeller at inlet in m
print "Breadth of impeller at inlet = %0.2f cm"%(b1*100)
Cbl1=Cbl2/rr#
beta1=(atan(Cf1/Cbl1))*180/pi#
al2=(atan(Cf2/(fis*Cbl2)))*180/pi#
print "Impeller blade angle at inlet = %0.2f degrees"%(beta1)
print "Diffuser blade angle at inlet = %0.2f degrees"%(al2,)
from __future__ import division
from math import pi, sqrt,atan
# Initialisation of Variables
v1=4.8#......#Volume of air compressed in m**3/s
p1=1#....#Inlet pressure in bar
t1=293#........#Inlet pressure in K
n=1.5#........#Compression index
Cf1=65#......#Air flow velocity at inlet in m/s
Cf2=Cf1#......#Flow velocity is same at inlet and outlet
d1=0.32#..........#Inlet impeller diameter in m
d2=0.62#........#Outlet impeller diameter in m
N=8000#........#Blower rpm
cp=1.005#......#Specific heat at constant pressure in kJ/kgK
#Calculations
t21=t1*((n/p1)**((n-1)/n))#....#Temperature at the outlet of compressor in K
Cbl1=(pi*d1*N)/60#......#Peripheral velocity at inlet in m/s
Cbl2=(pi*N*d2)/60#......#Tip peripheral velocity at outlet in m/s
Cw2=(cp*(t21-t1)*1000)/Cbl2#
be1=(atan(Cf1/Cbl1))*180/pi#
be2=(atan(Cf2/(Cbl2-Cw2)))*180/pi#......#Blade angles at the tip of the impeller
al2= (atan(Cf2/Cw2))*180/pi#
print "\nBlade angles \n\n\t Blade angle at the inlet of the impeller: beta 1=%f \n\t Blade angle at the outlet of the impeller: beta 2=%f \n\t Absolute angle at the tip of impeller: alpha 2=%f\n\n"%(be1,be2,al2)
b1=v1/(2*pi*(d1/2)*Cf1)#........#Breadth of blade at inlet in m
print "Breadth of the blade at inlet = %0.2f cm"%(b1*100)
v2=(v1*t21*p1)/(n*t1)#..............#Discharge at the outlet in m**3/s
b2=v2/(2*pi*(d2/2)*Cf2)#........#Breadth of blade at outlet in m
print "Breadth of the blade at outlet = %0.2f cm"%(b2*100)
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
m=16.5#.......#Air flow in kg/s
rp=4#........#Pressure ratio
N=15000#.........#Compressor rpm
t01=293#.........#Inlet head temperature
fis=0.9#...........#Slip factor
fiw=1.04#.........#Power input factor
etaisen=0.8#.......#Isentropic efficiency
cp=1.005#........#Specific heat at constant pressure in kJ/kgK
ga=1.4#......#Ratio of specific heats
#Calculations
t021=t01*(rp**((ga-1)/ga))#
delt=(t021-t01)/etaisen#
Cbl2=sqrt((1000*cp*delt)/(fiw*fis))#
D=(60*Cbl2)/(pi*N)#..............#Diameter of impeller
print "Diameter of the impeller = %0.2f m"%D
P=m*cp*delt#
print "Power input to compressor = %0.2f kW"%P
# Initialisation of Variables
rp=3.6#..........#Pressure ratio
die=0.35#.......#Diameter of inlet eye of compressor in m
Cf=140#..........#Axial velocity in m/s
m=12#.............#Mass flow in kg/s
Cbl2=120#.........#Velocity in the delivery duct in m/s
Ci=460#..........#The tip speed of the impeller in m/s
N=16000#............#Speed of impeller in rpm
etaisen=0.8#.......#Isentropic efficiency
pc=0.73#........#Pressure co efficient
pa=1.013#..........#Ambient pressure in bar
ta=273+15#................#Ambient temperature in K
ga=1.4#..........#Ratio of specific heats
cp=1.005#.........#Specific heat at constant pressure in kJ/kgK
R=0.287#........#Gas constant in kJ/kgK
#Calculations
delt=((ta*((rp**((ga-1)/ga))-1))/etaisen)#.......#Rise in temperature
t02=ta+delt#............#Total head temperature in K
print "Total head temperature = %0.2f K"%t02
t2=t02-((Cbl2*Cbl2)/(2*cp*1000))#..........#Static temperature at outlet in K
print "Static temperature at outlet = %0.2f K"%t2
p02=pa*rp#
p2=p02/(1+((Cbl2*Cbl2)/(2*R*t2*1000)))#...........#Static pressure at exit in bar
print "Static pressure at exit = %0.2f bar"%p2
t1=ta-((Cf*Cf)/(2*cp*1000))#.............#Static temperature at inlet in K
print "Static temperature at inlet = %0.2f K"%t1
p1=pa/(1+((Cf*Cf)/(2*R*t1*1000)))#...........#Static pressure at inlet in bar
print "Static pressure at inlet = %0.2f bar"%p1
rp=p2/p1#.....#Static pressure ratio
print "Static pressure ratio : %0.4f"%rp
W=cp*delt#...........#Work done on air in kJ/kg of air
print "Work done on air = %0.2f kJ/kg"%W
P=m*cp*delt#..........#Power required to drive the compressor in kW
print "Power required to drive the compressor = %0.2f kW"%P
from __future__ import division
from math import pi, sqrt
# Initialisation of Variables
t1=300#.........#Inlet temperature in K
N=18000#.............#Compressor rpm
etaisen=0.76#.......#Isentropic efficiency
od=0.55#......#Outer diameter of blade tip
sf=0.82#......#Slip factor
cp=1.005#.........#Specific heat capacity at constant pressure in kJ/kgK
ga=1.4#.............#Ratio of specific heats
#Calculations
Cbl2=(pi*od*N)/60#W=Cbl2*Cbl2*sf/1000#...........#Work done per kg of air in kW
delt=W/cp#..............#Temperature rise of air while passing through compressor
print "Temperature rise of air while passing through compressor: %0.2f "%delt
t21=(etaisen*delt)+t1#rp=((t21/t1)**(ga/(ga-1)))#.....#Pressure ratio
print "Pressure ratio : %0.4f"%rp
from __future__ import division
from math import pi, sqrt,tan
# Initialisation of Variables
Cbl=240#........#Mean blade velocity in m/s
Cf=190#.........#Air flow velocity in m/s
al1=45#
al2=14#.........#Blade angels in degrees
rho=1#.........#Density of air in kg/m**3
#Calculations
pr=(1/2)*(rho*Cf*Cf/(10**5))*(((tan(al1*pi/180))**2)-((tan(al2*pi/180))**2))#.......#Pressure rise in bar
print "Pressure rise = %0.2f bar"%pr
W=Cbl*Cf/1000*((tan(al1*pi/180))-(tan(al2*pi/180)))#.............#Work done per kg of air in kW
print "Work done per kg of air = %0.2f kW"%W
from __future__ import division
from math import pi, sqrt,atan
# Initialisation of Variables
etaisen=0.82#.......#Overall isentropic efficiency
N=8#............#No of stages
t1=293#...........#Inlet temperature in K
ga=1.4#............#Ratio of specific heats
rp=4#.............#Pressure ratio
Rd=0.5#................#Reaction factor
Cbl=180#.................#Mean blade speed in m/s
Cf=90#...............#Air flow velocity in m/s
cp=1.005#.........#Specific heat at constant pressure in kJ/kgK
#Calculations
t21=t1*(rp**((ga-1)/ga))#
t2=((t21-t1)/etaisen)+t1#
wrt=cp*(t2-t1)#.........#Work done by the machine in kJ/kg
print "Work done by the machine = %0.2f kJ/kg"%wrt
be1=atan(((cp*(t2-t1)*1000/(Cf*Cbl*N))+(Cbl/Cf))/2)*180/pi#
al1=atan((Cbl/Cf)-tan(be1*pi/180))*180/pi#
print "\nBlade angels are as follows (In degrees)\n\nalpha1=%f\tbeta1=%f\n\nalpha2=%f\tbeta2=%f\n\n"%(al1,be1,be1,al1)
from __future__ import division
from math import pi, sqrt,tan
# Initialisation of Variables
etaisen=0.85#.......#Overall isentropic efficiency
t1=293#...........#Inlet temperature in K
rp=4#.............#Pressure ratio
Rd=0.5#................#Reaction factor
Cbl=180#.................#Mean blade speed in m/s
wip=0.82#..............#Work input factor
al1=12#
be1=42#......#Blade angels in degrees
ga=1.4#............#Ratio of specific heats
cp=1.005#.........#Specific heat at constant pressure in kJ/kgK
#Calculations
t21=t1*(rp**((ga-1)/ga))#
t2=((t21-t1)/etaisen)+t1#
wrt=cp*(t2-t1)#.........#Theoretical work required in kJ/kg
Cf=Cbl/(tan(al1*pi/180)+tan(be1*pi/180))#
Cw1=Cf*tan(al1*pi/180)#Cw2=Cf*tan(be1*pi/180)#
wcps=Cbl*(Cw2-Cw1)*wip/1000#.............#Work consumed per stage in kJ/kg
N=round(wrt/wcps)#.......#No of stages
print "Flow velocity = %0.2f m/s"%Cf
print "No of stages : ",N
from __future__ import division
from math import pi, sqrt,atan,tan
# Initialisation of Variables
rp=5#..........#Stagnation pressure ratio ga
etaisen=0.92#.......#Overall isentropic efficiency
t1=290#.............#Inlet stagnation temperature in K
p1=1#...............#Inlet stagnation pressure in bar
Cbl=160#...........#Mean blade speed in m/s
ga=1.4#...........#Ratio of specific heats
Rd=0.5#............#Degree of reaction
Cf=90#................#Axial velocity of air through compressor in m/s
N=8#.............#No of stages
m=1#.........#Mass flow in kg/s
cp=1.005#............#Specific heat at constant pressure in kJ/kgK
#Calculations
tN1=t1*(rp**((ga-1)/ga))#......#Temperature at the end of compression stage due to isentropic expansion in K
tN=((tN1-t1)/etaisen)+t1#
be1=atan(((cp*(tN-t1)*1000/(Cf*Cbl*N))+(Cbl/Cf))/2)*180/pi#
al1=atan((Cbl/Cf)-tan(be1*pi/180))*180/pi#
print "\nBlade angels are as follows (In degrees)\n\nalpha1=%f\t\tbeta1=%f\n\nalpha2=%f\tbeta2=%f\n\n"%(al1,be1,be1,al1)
P=m*cp*(tN-t1)#..........#Power required by the compressor in kW
print "Power required by the compressor = %0.2f kW"%P
from __future__ import division
from math import pi, sqrt,cos,log,tan,atan
# Initialisation of Variables
rp=4#........#Stagnation pressure ratio
etaisen=0.85#.....#Stagnation isentropic efficiency
p1=1#.............#Inlet stagnation pressure in bar
t1=300#...........#Inlet stagnation temperature in K
Rd=0.5#............#Degree of reaction
Cu=180#...........#Mean blade speed in m/s
Wd=0.9#...........#Work done factor
htr=0.42#.......#Hub tip ratio
al1=12#
be2=al1#.......#Relative air angle at rotor inlet in degrees
al2=32#
be1=al2#........#Relative air angle at rotor at outlet in degrees
ga=1.4#...........#Ratio of specific heats
cp=1.005#..........#Specific heat capacity at constant pressure in kJ/kgK
R=287#..........#Gas constant in J/kgK
m=19.5#..........#Mass flow in kg/s
#Calculations
tN1=t1*(rp**((ga-1)/ga))#......#Temperature at the end of compression stage due to isentropic expansion in K
tN=((tN1-t1)/etaisen)+t1#
etap=log(rp**((ga-1)/ga))/log(tN/t1)#...........#Stagnation polytropic efficiency
print "Stagnation polytropic efficiency = %0.2f %%"%(etap*100)
Cf=Cu/(tan(al1*pi/180)+tan(be1*pi/180))#
Cw1=Cf*tan(al1*pi/180)
Cw2=Cf*tan(al2*pi/180)#
wcps=Cu*(Cw2-Cw1)*Wd/1000#.............#Work consumed per stage in kJ/kg
wc=cp*(tN-t1)#...............#Work consumed by compressor in kJ/kg
N=round(wc/wcps)#.......#No of stages
print "No of stages : ",N
C1=Cf/cos(al1*pi/180)#.......#Absolute velocity at exit from guide vanes in m/s
ti=t1-((C1*C1)/(2*cp*1000))#..........#Inlet temperature in K
print "Inlet temperature = %0.2f K"%ti
pi=p1*((ti/t1)**(ga/(ga-1)))#......#Inlet pressure in bar
print "Inlet pressure = %0.2f bar"%pi
rho1=(pi*10**5)/(R*ti)#.............#Density of air approaching the first stage
r1=sqrt(m/(rho1*pi*Cf*(1-(htr**2))))#
rh=r1*htr#
l=r1-rh#............#Height of the blade in the first stage in m
print "Height of the blade in the first stage = %0.2f cm"%(l*100)
from __future__ import division
from math import pi, sqrt,cos,log,tan,atan,exp
# Initialisation of Variables
ma=20#..........#Air flow rate in kg/s
p1=1#.........#Inlet stagnation pressure in bar
t1=290#.........#Inlet stagnation temperature in Kelvin
t2=305#.........#Temperature at the end of first stage in K
etapc=0.88#.....#Polytropic efficiency of compression
P=4350#......#Power consumed by compressor in kW
ga=1.4#.....#Ratio of specific heats
cp=1.005#......#Specific heat at constant pressure
#Calculations
p2byp1=(exp(etapc*log(t2/t1)))**(ga/(ga-1))#
tN=(P/(ma*cp))+t1#
pN=p1*((tN/t1)**((etapc*ga)/(ga-1)))#......#Delivery pressure in bar
print "Delivery pressure = %0.2f bar"%pN
N=log(pN/p1)/log(p2byp1)#...........#No of stages
print "No of stages : ",round(N)
tN1=t1*((pN/p1)**((ga-1)/ga))#
etao=(tN1-t1)/(tN-t1)#...............#Overall efficiency
print "Overall efficiency = %0.2f %%"%(etao*100)