Coverage for backend/flowsheetInternals/unitops/config/objects/compressor_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 *
5compressor_config: ObjectType = ObjectType.model_validate({
6 "displayType": "Compressor",
7 "displayName": "Compressor",
8 "ports": {
9 "inlet": {
10 "displayName": "Inlet",
11 "type": ConType.Inlet,
12 "streamType": "stream",
13 "streamName": "S"
14 },
15 "outlet": {
16 "displayName": "Outlet",
17 "type": ConType.Outlet,
18 "streamType": "stream",
19 "streamName": "S"
20 },
21 "power_outlet":{
22 "displayName": "Power Stream",
23 "type": ConType.Outlet,
24 "streamType": "energy_stream",
25 "makeStream": False,
26 }
27 },
29 "propertyPackagePorts": default_property_package_ports(),
30 "graphicObject": unitop_graphic(),
31 "properties": {
32 "efficiency_isentropic": {
33 "displayName": "Isentropic Efficiency",
34 "type": "numeric",
35 "unitType": "ratio"
36 },
37 "deltaP": {
38 "displayName": "Pressure Increase",
39 "type": "numeric",
40 "unitType": "pressure"
41 },
42 "ratioP": {
43 "displayName": "Pressure Ratio",
44 "type": "numeric",
45 "unitType": "ratio"
46 },
47 "work_mechanical": {
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_isentropic", "work_mechanical")
58 }
59 },
60 "keyProperties": [
61 "work_mechanical",
62 "efficiency_isentropic",
63 "deltaP",
64 "ratioP"
65 ]
66})