Example of Mass Connector¶
[8]:
from connector.mass_connector import MassConnector
#------------------Example of a mass connector------------------#
"What you can do with a mass connector:"
# Create an instance of the MassConnector class
point = MassConnector()
point.set_properties(T=500, m_dot=0.5, fluid = 'INCOMP::DowQ', P=101325)
# Print the state of the connector
point.print_resume(unit_T='C', unit_p='bar')
print("------------------------------------------------------------------------------------")
# Reset the pressure to 200000 Pa
point.set_p(200000)
point.print_resume(unit_T='C', unit_p='bar')
Fluid: INCOMP::DowQ
Mass flow rate: 0.5[kg/s]
Volume flow rate: 2.2247889882864467[m^3/h]
Temperature: 226.85000000000002[°C]
Pressure: 1.01325[bar]
Spec. enthalpy: 408385.32146991[J/kg]
Spec. entropy: 1039.0927361604681[J/kg/K]
Mass density: 809.0654931667821[kg/m^3]
Quality: None[-]
------------------------------------------------------------------------------------
Fluid: INCOMP::DowQ
Mass flow rate: 0.5[kg/s]
Volume flow rate: 2.2247889882864467[m^3/h]
Temperature: 226.85000000000002[°C]
Pressure: 2.0[bar]
Spec. enthalpy: 408450.51750404155[J/kg]
Spec. entropy: 1038.9792048360432[J/kg/K]
Mass density: 809.0654931667821[kg/m^3]
Quality: None[-]
[10]:
"What you cannot do with a mass connector:"
# Put three properties at the same time
point = MassConnector()
point.set_properties(T=500, m_dot=0.5, fluid = 'INCOMP::DowQ', P=101325, H=100000)