#What is the heat of vaporization of water at 100 psia?
#initialisation of variables
p= 100 #psia
vg= 4.432 #cu ft/lb
vf= 0.01744 #cu ft/lb
T= 327.8 #F
sfg= 1.1286 #Bu/lb R
#CALCULATIONS
Q=(T+460)*sfg #Heat of vaporisation
#RESULTS
print '%s %.2f' %('Heat of vaporisation (Btu/lb) = ',Q)
raw_input('press enter key to exit')
#Saturated Steam has entropy of 1.6315 Btu/lb R; What are its pressure,
#temperature and enthalpy?
#initialisation of variables
S= 1.6315 #Btu/lb R
#CALCULATIONS
print '%s' %('All the values are obtained from the steam tables')
P= 70 #psia
t= 302.92 #F
h= 1180.6 #Btu/lb
#RESULTS
print '%s %.2f' %('Pressure (Psia) = ',P)
print '%s %.2f' % (' \n Temperature (F) = ',t)
print '%s %.2f' % (' \n Enthalpy (Btu/lb) = ',h)
raw_input('press enter key to exit')
#What is the internal energy of saturated water vapor at 250F?
#initialisation of variables
T= 250 #F
hg= 1164.0 #Btu/lb
P= 29.825 #Psia
Vg= 13.821 #cu ft/lb
#CALCULATIONS
ug= hg-(P*Vg*144./778.) #Internal energy
#RESULTS
print '%s %.2f' %('Internal energy (Btu/lb) = ',ug)
raw_input('press enter key to exit')
#Find the properties of a mixture of steam and liquid water at 100 psia, containing 40 percent liquid.
#initialisation of variables
P= 100 #psia
n= 40
vf= 0.01774 #cu ft/lb
vg= 4.432 #cu ft/lb
hf= 298.4 #Btu/lb
hfg= 888.8 #Btu/lb
sg= 1.6026 #Btu/lb R
sfg= 1.1286 #Btu/lb R
#CALCULATIONS
vx= (n/100.)*vf+(1-(n/100.))*vg #Volume of mixture
hx= hf+(1-(n/100.))*hfg #Enthalpy of mixture
sx= sg-(n/100.)*sfg #Entropy of mixture
#RESULTS
print '%s %.2f' %('Volume (cu ft/lb) = ',vx)
print '%s %.2f' %(' \n Entropy (Btu/lb R) = ',sx)
print '%s %.2f' %(' \n Enthalpy (Btu/lb) = ',hx)
raw_input('press enter key to exit')
#Find the enthalpy of wet steam, 0.97 quality, at 100 psia.
#initialisation of variables
P= 100 #psia
n= 0.97
hf= 298.4 #Btu/lb
hfg= 888.8 #Btu/lb
hg= 1187.2 #Btu/lb
#CALCULATIONS
hx= hf+n*hfg #Enthalpy
hx1= hg-(1-n)*hfg #Precise Enthalpy
#RESULTS
print '%s %.2f' % ('Enthalpy (Btu/lb) = ',hx)
print '%s %.2f' % (' \n Precise Enthalpy (Btu/lb) = ',hx1)
raw_input('press enter key to exit')
#Water at 15 psia has entropy of 1.7050 Btu/lb R. Find its enthalpy and volume.
#initialisation of variables
P= 15 #psia
S= 1.7050 #Btu/lb R
sg= 1.7549 #btu/lb R
sfg= 1.4415 #Bru/lb R
hg= 1150.8 #btu/lb
hfg= 969.7 #Btu/lb
vg= 26.29 #cu ft/lb
vfg= 26.27 #cu ft/lb
#CALCULATIONS
n= (sg-S)/sfg #moisture fraction
sx= sg-n*sfg #Entropy
hx= hg-n*hfg #Enthalpy
vx= vg-n*vfg #Volume
#RESULTS
print '%s %.2f' % ('Volume (cu ft/lb) = ',vx)
print '%s %.2f' % (' \n Entropy (Btu/lb R) = ',sx)
print '%s %.2f' % (' \n Enthalpy (Btu/lb) = ',hx)
raw_input('press enter key to exit')
#Find the volume and enthalpy of liquid water at 100 F and 1000 psia.
#initialisation of variables
T= 100 #F
P= 1000 #psia
dv= -5.1/100000. #cu ft/lb
dh= 2.70 #Btu/lb
vf= 0.01613 #cu ft/lb
hf= 67.97 #Btu/lb
#CALCULATIONS
print '%s' %("All the values are obtained from the steam tables")
h= dh+hf #Enthalpy
v= dv+vf #Volume
#RESULTS
print '%s %.5f' %('Volume (cu ft/lb) = ',v)
print '%s %.2f' %(' \n Enthalpy (Btu/lb) = ',h)
raw_input('press enter key to exit')
#A sample of steam at 200 psia flows to a throttling calorimeter in which the
#pressure is 15 psia and the temperature 280 F. Find the quality of the sample.
#At 15 psia and 280 F the enthalpy is found in table 3 to be 1183.2 btu/lb.
#initialisation of variables
h1= 1183.2 #Btu/lb
hg= 1198.4 #Btu/lb
hfg= 843.0 #Btu/lb
#CALCULATIONS
n= 1-((hg-h1)/hfg) #Quality
#RESULTS
print '%s %.3f' %('quality= ',n)
raw_input('press enter key to exit')