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

3 statements  

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

3 

4pump_config: ObjectType = ObjectType.model_validate({ 

5 "displayType": "Pump", 

6 "displayName": "Pump", 

7 "ports": 

8 { 

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 

28 }, 

29 "propertyPackagePorts": default_property_package_ports(), 

30 "graphicObject": unitop_graphic(), 

31 "properties": { 

32 "efficiency_pump": { 

33 "displayName": "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 }, 

54 "propertySetGroups": { 

55 "default": { 

56 "type": "stateVars", 

57 "displayName": "Properties", 

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

59 } 

60 }, 

61 "keyProperties": [ 

62 "work_mechanical", 

63 "efficiency_pump", 

64 "deltaP", 

65 "ratioP" 

66 ] 

67})