Coverage for backend/flowsheetInternals/unitops/config/objects/steam_user_config.py: 100%
21 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-11-06 23:27 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2025-11-06 23:27 +0000
1from common.config_types import *
2from common.config_utils import *
3from common.config_generator import generate_config
5#Ports
6inlet_steam = PortType(displayName="Steam Inlet", type = ConType.Inlet, streamType="stream", streamName="S")
8outlet_return = PortType(displayName="Return", type = ConType.Outlet, streamType="stream", streamName="S")
9outlet_drain = PortType(displayName="Drain", type = ConType.Outlet, streamType="stream", streamName="S")
11port_list = [("inlet_steam",inlet_steam),("outlet_return",outlet_return),("outlet_drain",outlet_drain)]
12ports = dict(port_list)
14#Properties:
15heat_demand = PropertyType(displayName="Heat Demand", type = "numeric", unit = "kW", unitType="heatflow")
16cond_return_rate = PropertyType(displayName="Condensate Return Rate", type = "numeric", unitType="ratio")
17cond_return_temperature = PropertyType(displayName="Condensate Return Temperature", type = "numeric", unit= "degC", unitType="temperature")
18deltaT_subcool = PropertyType(displayName="Delta T Subcooling Target", type = "numeric", unit = "K", unitType="deltaTemperature")
19heat_loss = PropertyType(displayName="Heat Loss", type = "numeric", unit = "kW", unitType="heatflow")
20pressure_loss = PropertyType(displayName="Pressure Loss", type = "numeric", unit = "Pa", unitType="pressure")
22properties = [("heat_demand",heat_demand),("cond_return_rate",cond_return_rate),("cond_return_temperature",cond_return_temperature),
23 ("deltaT_subcool",deltaT_subcool),("heat_loss",heat_loss),("pressure_loss", pressure_loss)]
24properties_default = dict(properties)
25default = PropertySetType(type="stateVars", displayName="Properties",stateVars=("cond_return_rate","cond_return_temperature",
26 "deltaT_subcool","heat_loss", "pressure_loss"))
27property_set_groups = [("default",default)]
29_propertypackageports = {"": ["inlet_steam", "outlet_return", "outlet_drain"],}
31key_properties = []
33#Config Creation:
34steam_user_config: ObjectType = generate_config("Steam User", ports=ports,properties=properties_default, property_set_groups= property_set_groups,
35 property_package_ports= _propertypackageports, key_properties=key_properties)