#initialization
w1 = 2 #lbm
w2 = 1 #lbm
P = 30 #lbm/in^2
T = 60+460 #R
#calculation
R1 = 35.1
R2 = 55.1
Rm = (w1*R1+w2*R2)/(w1+w2)
vm = (w1+w2)*Rm*T/(144*P)
p1 = w1*R1*T/(144*vm)
p2 = w2*R2*T/(144*vm)
#result
print "Gas constant of the mixture = ", round(Rm, 1), "lb/in^2"
print "Volume of the mixture = ", round(vm, 1), "ft^3"
print "Partial pressure of CO2 = ", round(p1, 1), "lb/in^2"
print "Partial pressure of N2 = ", round(p2, 1), "lb/in^2"
import scipy.integrate
#initialization
cpm = 0.2523
Rm = 54.7
T1 = 60+460.0 #R
T2 = 400+460.0 #R
#calculation
cvm = cpm-Rm/778.0
Q = cpm*(T2-T1)
W = Rm*(T2-T1)
#Rm is divided and multiplied by 778.!
def s(T):
cp = cpm/T
return cp
ds = scipy.integrate.quadrature(s, T1, T2)[0]
#result
print "Entropy change = ", round(ds, 3), "B/lbm"
print "specific work = ", W, "ft-lb/lbm"
print "Heat added per pound of mixture = ", round(Q, 1), "B/lbm"
#initialization
P = 14.7 #lb/in^2
T = 80+460.0 #R
#calculation
#From steam tables
Ps = 0.5069 #lb/in^2
v = 633.1 #ft^3/lbm
Pair = P-Ps
vair = 53.3*T/(144*Pair)
wair = 1/(1+vair/v)
wwater = vair/v/(1+vair/v)
#result
print "Partial pressure of air = ", round(Pair, 1), "ft^3/lbm"
print "Partial pressure of water vapor = ", Ps, "ft^3/lbm"
print "Gravimetric analysis of air = ", round(wair, 4)
print "Gravimetric analysis of water = ", round(wwater, 4)
#initialization
P = 14.7 #lb/in^2
T = 80+460.0 #R
M = 18
Ps = 0.5069 #lb/in^2
#calculation
Pair = P-Ps
R = 1544/M
v = R*T/(144*Ps)
vair = 53.3*T/(144*Pair)
wair = 1/(1+vair/v)
wwater = vair/v/(1+vair/v)
#result
print "Partial pressure of air = ", round(Pair, 2), "ft^3/lbm"
print "Specific volume = ", round(v), "ft^3/lbm"
print "Gravimetric analysis of air = ", round(wair, 4)
print "Gravimetric analysis of water = ", round(wwater, 4)
#initialization
RH = 0.62
T = 80+460.0 #R
#calculation
#From stram tables
P = RH*0.5069
#result
print "Partial pressure of water vapor = ", round(P, 4), "lb/in^2"
#initialization
P = 14.5 #lb/in^2
T = 70+460.0 #R
rh = 0.34
#calculation
#From steam tables
Pg = 0.3631 #lb/in^2
Pair = P-Pg
wratio = rh*0.622*Pg/Pair
#result
print "Specific humidity = %.5f lbm/lbm" %wratio
#initialization
T = 100+460.0 #R
rh = 0.6
#calculation
#From steam tables
Pg = 0.9492 #lb/in^2
Pwv = rh*Pg
T = 83 #F
#result
print "Dew point is obtained from saturation pressure table and is equal to %d F" %T
#initialization
T1 = 80+460.0 #R
T2 = 90+460.0 #R
P = 14.5 #lb/in^2
cp = 0.24
#calculation
#From steam tables
hg2 = 1096.6
hf3 = 48.02
Pg2 = 0.5069
hf2 = hf3
Pair = P-Pg2
wg2 = 0.622*Pg2/Pair
hgv1 = 1100.9
wwv1 = (cp*(T1-T2)+wg2*(hg2-hf3))/(hgv1-hf3)
Pg = 0.6982
xi = wwv1*(P-Pg)/(Pg*0.622)
#result
print "Specific humidity = ", round(wwv1, 4), "lbm/lbm"
print "relative humidity = ", round(xi, 3)
#initialization
T1 = 69.0 #F
T2 = 84.0 #F
P = 14.7 #lb/in^2
#calculation
# from wet bulb n dry bulb temperature charts
sh = 82.0/7000.0
rh = 47.0
Pwv = 0.27
T = 62.0 #F
h = 33.3
#result
print "Specific humidity = ", round(sh, 4), "lbm/lbm"
print "Relative humidity = " , rh, "%"
print "Partial pressure = ", round(Pwv, 2), "lb/in^2"
print "Dew point = ", T, "F"
print "Enthalpy per pound of air = ", round(h, 1), "V/lbm dry air"
import math
#initialization
g1 = [0.489, 100, 700, 35.1, 0.154]
g2 = [0.483, 15, 600, 55.2, 0.177]
g3 = [0.028, 30, 500, 386, 0.754]
#calculation
v1 = g1[0] *g1[3] *g1[2] /(144*g1[1])
v2 = g2[0] *g2[3] *g2[2] /(144*g2[1])
v3 = g3[0] *g3[3] *g3[2] /(144*g3[1])
vm = v1+v2+v3
Tm = (g1[0] *g1[4] *g1[2] +g2[0] *g2[4] *g2[2] +g3[0] *g3[4] *g3[2])/(g1[0] *g1[4] +g2[0] *g2[4] +g3[0] *g3[4])
Pm = (g1[0] *g1[3] +g2[0] *g2[3] +g3[0] *g3[3]) *Tm/(vm*144)
ds1 = g1[0] *(g1[4] *math.log(Tm/g1[2]) +g1[3] /778.0 *math.log(vm/v1))
ds2 = g2[0] *(g2[4] *math.log(Tm/g2[2]) +g2[3] /778.0 *math.log(vm/v2))
ds3 = g3[0] *(g3[4] *math.log(Tm/g3[2]) +g3[3] /778.0 *math.log(vm/v3))
ds = ds1+ds2+ds3
#result
print "Pressure = ", round(Pm, 1), "lb/in^2"
print "Temperature = ", round(Tm), "R"
print "Entropy change = ", round(ds, 4), "B/R"
vdot1 = 8500.0 #cfm of air
v1 = 12.775 #from chart
wdot = vdot1/v1
h2 = 20.3 #from chart
h1 = 13.85 #from chart
h4 = 29.0 #from chart
h3 = 20.3 #from chart
#Part a
Q12 = h2 - h1
Q12 = wdot*Q12
print "Capacity of preheater: ", round(Q12, 2), "B/min"
#Part b
Q34 = h4 - h3
Q34 = wdot*Q34
print "Capacity of reheater: ", round(Q34, 2), "B/min"
#Part c
w2 = 20.0/7000.0 #from chart
w3 = 54.0/7000.0 #from chart
W = w3 - w2
W = wdot*W
print "Rate of water addition: ", round(W, 2), "lbm/min"