Coverage for backend/flowsheetInternals/unitops/config/objects/waterpipe_config.py: 100%
3 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 *
5waterpipe_config: ObjectType = ObjectType.model_validate({
6 "displayType": "Water Pipe",
7 "displayName": "Water Pipe",
8 "ports": {
9 "inlet": {
10 "displayName": "Inlet",
11 "type": ConType.Inlet,
12 "streamType": "stream",
13 },
14 "outlet": {
15 "displayName": "Outlet",
16 "type": ConType.Outlet,
17 "streamType": "stream",
18 }
19 },
20 "propertyPackagePorts": default_property_package_ports(),
21 "graphicObject": unitop_graphic(),
22 "properties": {
23 "number_of_pipes": {
24 "displayName": "Number of Pipes",
25 "type": "numeric",
26 "unitType": "ratio"
27 },
28 "length": {
29 "displayName": "Length",
30 "type": "numeric",
31 "unitType": "head",
32 },
33 "diameter": {
34 "displayName": "Diameter",
35 "type": "numeric",
36 "unitType": "diameter",
37 },
38 "elevation_change": {
39 "displayName": "Elevation Change",
40 "type": "numeric",
41 "unitType": "head",
42 },
43 "fcorrection_dp": {
44 "displayName": "Pressure Drop Correction Factor",
45 "type": "numeric",
46 "unitType": "ratio"
47 },
48 "volume":{
49 "displayName": "Total Volume of all Pipes",
50 "type": "numeric",
51 "unitType": "volume"
52 },
53 "deltaP": {
54 "displayName": "Pressure Drop",
55 "type": "numeric",
56 "unitType": "pressure",
57 },
58 "deltaP_friction":{
59 "displayName": "Pressure Drop due to Friction",
60 "type": "numeric",
61 "unitType": "ratio",
62 },
63 "deltaP_gravity":{
64 "displayName": "Pressure Drop due to Gravity",
65 "type": "numeric",
66 "unitType": "ratio",
67 },
68 "deltaP_area_change":{
69 "displayName": "Pressure Drop due to Area Change",
70 "type": "numeric",
71 "unitType": "ratio",
72 },
75 },
76 "propertySetGroups": {
77 "default": {
78 "type": "stateVars",
79 "displayName": "Properties",
80 "stateVars": (
81 "number_of_pipes",
82 "length",
83 "diameter",
84 "elevation_change",
85 "fcorrection_dp",
86 "volume",
87 "deltaP_friction",
88 "deltaP_gravity",
89 "deltaP_area_change",
90 )
91 }
92 },
93 "keyProperties": [
94 "number_of_pipes",
95 "length",
96 "diameter",
97 "deltaP",
98 ]
99})