Coverage for backend/flowsheetInternals/unitops/config/objects/desuperheater_config.py: 100%
18 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")
7outlet = PortType(displayName="Outlet", type = ConType.Outlet, streamType="stream", streamName="S")
9port_list = [("inlet_steam", inlet_steam),("outlet",outlet)]
10ports = dict(port_list)
12#Properties:
13heat_loss = PropertyType(displayName="Heat Loss", type = "numeric", unit = "kW", unitType="heatflow")
14pressure_loss = PropertyType(displayName="Pressure Loss", type = "numeric", unit = "Pa", unitType="pressure")
15bfw_temperature = PropertyType(displayName="Boiler Feed Water Temperature", type = "numeric", unit= "K", unitType="temperature")
16deltaT_superheat = PropertyType(displayName="Delta T Superheat", type = "numeric", unit = "K", unitType="deltaTemperature")
18properties = [("bfw_temperature",bfw_temperature), ("deltaT_superheat",deltaT_superheat),("heat_loss",heat_loss),("pressure_loss", pressure_loss)]
19properties_default = dict(properties)
20default = PropertySetType(type="stateVars", displayName="Properties",stateVars=("bfw_temperature","deltaT_superheat","heat_loss", "pressure_loss"))
21property_set_groups = [("default",default)]
23_property_package_ports = {"": ["inlet_steam", "outlet"],}
25key_properties = ["bfw_temperature","deltaT_superheat"]
27#Config Creation:
28desuperheater_config: ObjectType = generate_config("DeSuperheater", ports=ports,properties=properties_default, property_set_groups=property_set_groups,
29 property_package_ports= _property_package_ports, key_properties=key_properties)