# Variables
P1 = 200. #psia
P2 = 15. #psia
V1 = 1. #ft**3
g = 1.3
# Calculations
V2 = V1*(P1/P2)**(1/g)
W = -(144*(P2*V2 - P1*V1)/(g-1))
# Results
print "Work done = %.2e ft. lbf"%(W)
# Variables
L = 0.305 #m
v = 4.58 #m/s
i = 10. #A
B = 1. #W/m**2
# Calculations
F = i*B*L
W = F*v
# Results
print "Force necessary = %.2f N"%(F)
print " Work per unit time = %.2f W"%(W)
# Variables
U = 2545. #B/hr
m = 50. #lbm
cv = 1.
# Calculations
dT = U/(m*cv)
# Results
print "Change in temperature = %.1f F"%(dT)
# Variables
P1 = 14.7 #psia
V1 = 1. #ft**3
P2 = 14.7 #psia
M = 28.97
T1 = 70.+460 #R
T2 = 500.+460 #R
cp = 0.24 #B/lbm F
# Calculations
m = P1*144*V1*M/(1545*T1)
Qp = m*cp*(T2-T1)
V2 = V1*P1*T2/(P2*T1)
W = P1*144*(V2-V1)
W = -W/778
dU = Qp+W
# Results
print "Work done = %.2f Btu"%(W)
print " Heat added = %.2f Btu"%(Qp)
print " Change in internal energy = %.2f Btu"%(dU)
# Variables
l = 20.
b = 25.
h = 8.
Vp = 2.5
n = 20.
P = 14.7 #psia
T = 530. #R
t = 15. #min
Qp = 375. #B/hr
cv = 0.1715 #B/lbm F
# Calculations
Vroom = l*b*h
Vair = Vroom-Vp*n
m = P*Vair*144/(53.35*T)
dU = n*Qp
U = t*dU/60
dT = U/(m*cv)
# Results
print "Air temperature rise = %d F"%(dT+1)