import math
#Variable initialization
V1=20.0 #gal volume
P1=20.0 #lbf/in^2 pressure
n=2.0
#CALCULATIONS
V2=V1/n
P2=(P1+14.7)*V1*231.0/(V2*231.0)
P3=P2-14.7
#RESULT
print('Guage pressure = %.3f psi ' %P3)
import math
#Variable initialization
V1=1500.0 #in^3 volume
T=80.0 #F temperature
T1=200.0 #F temperature
#CALCULATIONS
V2=V1*(460.0+T1)/(T+460.0)
#RESULT
print('Volume the heated gas will occupy = %.3f in ^3 ' %V2)
import math
#Variable initialization
P1=2000.0 #in^3
T=80.0 #F temperature
T1=250.0 #F temperature
#CALCULATIONS
P2=(P1+14.7)*(460.0+T1)/(T+460.0)
P3=P2-14.7
#RESULT
print(' Guage pressure = %.3f psi ' %P3)
import math
#Variable initialization
P1=2000.0 #lbf/in^2 pressure
V1=1500.0 #in^3 volume
T2=250.0 #F temperature
T1=75.0 #F temperature
V2=1000.0 #in^3 volume
#CALCULATIONS
P2=(P1+14.7)*V1*(T2+460.0)/((T1+460.0)*V2)
P3=P2-14.7
#RESULT
print('\n Guage pressure = %.3f psi ' %P3)
import math
#Variable initialization
s=10.0 #stroke in
d=2.0 #in diameter
r=40.0 #cpm cycles per rate
P1=80.0 #lbf/in^2 pressure
Ps1=552+101 #kN/m^2 pressure
Ps2=101 #kN/m^2 pressure
#CALCULATIONS
V1=math.pi*d**2*s*r/(4*1728.0)
V2=(P1+14.7)*V1/14.7
# In SI units
Vs1=(20.3*25.4*r)/(1000000)
Vs2=(Ps1*Vs1)/Ps2
#RESULT
print(' Air consumption in cfm of free air = %.3f cfm free air ' %V2)
print(' In SI units Air consumption in cfm of free air = %.3f m^3/min free air ' %Vs2)