Coverage for backend/django/flowsheetInternals/unitops/config/objects/steam_user_config.py: 100%
14 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-05-13 02:47 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2026-05-13 02:47 +0000
1from common.config_types import *
2from common.config_utils import *
3from ..spec_helpers import *
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")
11#Properties:
12heat_demand = PropertyType(displayName="Heat Demand", type = "numeric", unit = "kW", unitType="heatflow")
13cond_return_rate = PropertyType(displayName="Condensate Return Rate", type = "numeric", unitType="ratio")
14cond_return_temperature = PropertyType(displayName="Condensate Return Temperature", type = "numeric", unit= "degC", unitType="temperature")
15deltaT_subcool = PropertyType(displayName="Delta T Subcooling Target", type = "numeric", unit = "K", unitType="deltaTemperature")
16heat_loss = PropertyType(displayName="Heat Loss", type = "numeric", unit = "kW", unitType="heatflow")
17pressure_loss = PropertyType(displayName="Pressure Loss", type = "numeric", unit = "Pa", unitType="pressure")
19_propertypackageports = {"": ["inlet_steam", "outlet_return", "outlet_drain"],}
21#Config Creation:
22steam_user_config: ObjectType = ObjectType(
23 displayType="Steam User",
24 displayName="Steam User",
25 ports={
26 "inlet_steam": inlet_steam,
27 "outlet_return": outlet_return,
28 "outlet_drain": outlet_drain,
29 },
30 propertyPackagePorts=_propertypackageports,
31 graphicObject=unitop_graphic(),
32 properties=PropertiesType({
33 "heat_demand": heat_demand,
34 "cond_return_rate": cond_return_rate,
35 "cond_return_temperature": cond_return_temperature,
36 "deltaT_subcool": deltaT_subcool,
37 "heat_loss": heat_loss,
38 "pressure_loss": pressure_loss,
39 }),
40 propertySetGroups={
41 "default": PropertySetType(
42 type="stateVars",
43 displayName="Properties",
44 stateVars=(
45 "cond_return_rate",
46 "cond_return_temperature",
47 "deltaT_subcool",
48 "heat_loss",
49 "pressure_loss",
50 ),
51 )
52 },
53 keyProperties=[],
54 idaes_adapter=UnitModelAdapter(
55 args=ArgAdapter({
56 "property_package": PropertyPackageAdapter(),
57 }),
58 properties=SerialisePropertiesAdapter(),
59 ports=SerialisePortAdapter(),
60 ),
61)