Coverage for backend/django/flowsheetInternals/unitops/config/objects/compressor_config.py: 100%

4 statements  

« 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 * 

4 

5 

6compressor_config: ObjectType = ObjectType( 

7 displayType="Compressor", 

8 displayName="Compressor", 

9 ports={ 

10 "inlet": PortType( 

11 displayName="Inlet", 

12 type=ConType.Inlet, 

13 streamType="stream", 

14 streamName="S" 

15 ), 

16 "outlet": PortType( 

17 displayName="Outlet", 

18 type=ConType.Outlet, 

19 streamType="stream", 

20 streamName="S" 

21 ), 

22 "power_outlet": PortType( 

23 displayName="Power Stream", 

24 type=ConType.Outlet, 

25 streamType="energy_stream", 

26 makeStream=False, 

27 ) 

28 }, 

29 

30 propertyPackagePorts=default_property_package_ports(), 

31 graphicObject=unitop_graphic(), 

32 properties=PropertiesType({ 

33 "efficiency_isentropic": PropertyType( 

34 displayName="Isentropic Efficiency", 

35 type="numeric", 

36 unitType="ratio" 

37 ), 

38 "deltaP": PropertyType( 

39 displayName="Pressure Increase", 

40 type="numeric", 

41 unitType="pressure" 

42 ), 

43 "ratioP": PropertyType( 

44 displayName="Pressure Ratio", 

45 type="numeric", 

46 unitType="ratio" 

47 ), 

48 "work_mechanical": PropertyType( 

49 displayName="Mechanical Work", 

50 type="numeric", 

51 unitType="heatflow" 

52 ), 

53 }), 

54 propertySetGroups={ 

55 "default": { 

56 "type": "stateVars", 

57 "displayName": "Properties", 

58 "stateVars": ("efficiency_isentropic", "work_mechanical") 

59 } 

60 }, 

61 keyProperties=[ 

62 "work_mechanical", 

63 "efficiency_isentropic", 

64 "deltaP", 

65 "ratioP" 

66 ], 

67 idaes_adapter=UnitModelAdapter( 

68 args=ArgAdapter({ 

69 "property_package": PropertyPackageAdapter(), 

70 "power_property_package": ConstantSchemaAdapter(PowerPPArgSchema()), 

71 "dynamic": ConstantArg(False), 

72 }), 

73 properties=SerialisePropertiesAdapter(), 

74 ports=SerialisePortAdapter() 

75 ), 

76)