Untitled
unknown
plain_text
a month ago
1.5 kB
4
Indexable
from pyXSteam.XSteam import XSteam steam_table = XSteam(XSteam.UNIT_SYSTEM_FLS) pressure = 600 # psia saturation_enthalpy_liquid = steam_table.hL_p(pressure) saturation_enthalpy_vapor = steam_table.hV_p(pressure) saturation_temperature = steam_table.tsat_p(pressure) subcooling_temp_offset = 11 # °F specific_heat = steam_table.Cp_pt(pressure, saturation_temperature - subcooling_temp_offset) subcooling_enthalpy = subcooling_temp_offset * specific_heat inlet_temperature = saturation_temperature - subcooling_temp_offset exit_enthalpy = (saturation_enthalpy_liquid - subcooling_temp_offset * specific_heat) + (5e6 / 76000) exit_quality = steam_table.x_ph(pressure, exit_enthalpy) liquid_density = steam_table.rho_ph(pressure, saturation_enthalpy_liquid) vapor_density = steam_table.rho_ph(pressure, saturation_enthalpy_vapor) slip_ratio = 2.67 # From Fig. 12-7 denominator_term = 1 + ((1 - exit_quality) / exit_quality) * (vapor_density / liquid_density) * slip_ratio void_fraction = 1 / denominator_term print(f""" Subcooled Enthalpy: {saturation_enthalpy_liquid - subcooling_enthalpy:.3f} Btu/lbm Saturation Enthalpy: {saturation_enthalpy_liquid:.3f} Btu/lbm Specific Heat: {specific_heat:.2f} Btu/lbm°F Saturation Temp: {saturation_temperature:.2f}°F Inlet Temp: {inlet_temperature:.2f}°F Exit Quality: {exit_quality:.5f} Liquid Density: {liquid_density:.3f} lbm/ft³ Vapor Density: {vapor_density:.3f} lbm/ft³ Void Fraction: {void_fraction:.3%} """)
Editor is loading...
Leave a Comment