Coverage for backend/django/flowsheetInternals/unitops/config/objects/pump_config.py: 100%
4 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 *
5pump_config: ObjectType = ObjectType(
6 displayType="Pump",
7 displayName="Pump",
8 ports={
9 "inlet": PortType(
10 displayName="Inlet",
11 type=ConType.Inlet,
12 streamType="stream",
13 streamName="S"
14 ),
15 "outlet": PortType(
16 displayName="Outlet",
17 type=ConType.Outlet,
18 streamType="stream",
19 streamName="S"
20 ),
21 "power_outlet": PortType(
22 displayName="Power Stream",
23 type=ConType.Outlet,
24 streamType="energy_stream",
25 makeStream=False,
26 ),
28 },
29 propertyPackagePorts=default_property_package_ports(),
30 graphicObject=unitop_graphic(),
31 properties=PropertiesType({
32 "efficiency_pump": PropertyType(
33 displayName="Efficiency",
34 type="numeric",
35 unitType="ratio",
36 ),
37 "deltaP": PropertyType(
38 displayName="Pressure Increase",
39 type="numeric",
40 unitType="pressure",
41 ),
42 "ratioP": PropertyType(
43 displayName="Pressure Ratio",
44 type="numeric",
45 unitType="ratio",
46 ),
47 "work_mechanical": PropertyType(
48 displayName="Mechanical Work",
49 type="numeric",
50 unitType="heatflow",
51 )
52 }),
53 propertySetGroups={
54 "default": {
55 "type": "stateVars",
56 "displayName": "Properties",
57 "stateVars": ("efficiency_pump", "work_mechanical"),
58 }
59 },
60 keyProperties=[
61 "work_mechanical",
62 "efficiency_pump",
63 "deltaP",
64 "ratioP"
65 ],
66 idaes_adapter=UnitModelAdapter(
67 args=ArgAdapter({
68 "property_package": PropertyPackageAdapter(),
69 "dynamic": ConstantArg(False),
70 "power_property_package": ConstantSchemaAdapter(PowerPPArgSchema()),
71 }),
72 properties=SerialisePropertiesAdapter(),
73 ports=SerialisePortAdapter(),
74 ),
75)