Coverage for backend/flowsheetInternals/unitops/config/objects/heat_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 

4heat_pump_config: ObjectType = ObjectType.model_validate({ 

5 "displayType": "Heat Pump", 

6 "displayName": "Heat Pump", 

7 "ports": { 

8 "source_inlet": { 

9 "displayName": "Source Inlet", 

10 "type": "inlet", 

11 "streamOffset": 1, 

12 "streamName": "SRC", 

13 }, 

14 "sink_inlet": { 

15 "displayName": "Sink Inlet", 

16 "type": "inlet", 

17 "streamOffset": 1, 

18 "streamName": "SNK", 

19 }, 

20 "source_outlet": { 

21 "displayName": "Source Outlet", 

22 "type": "outlet", 

23 "streamOffset": 1, 

24 "streamName": "SRC_R", 

25 }, 

26 "sink_outlet": { 

27 "displayName": "Sink Outlet", 

28 "type": "outlet", 

29 "streamOffset": 1, 

30 "streamName": "SNK_R", 

31 }, 

32 }, 

33 "propertyPackagePorts": { 

34 "Source": ["source_inlet", "source_outlet"], 

35 "Sink": ["sink_inlet", "sink_outlet"] 

36 }, 

37 "graphicObject": unitop_graphic(), 

38 "properties": { 

39 "work_mechanical": { 

40 "displayName": "Mechanical Work", 

41 "type": "numeric", 

42 "unitType": "heatflow" 

43 }, 

44 "efficiency": { 

45 "displayName": "Carnot Efficiency", 

46 "type": "numeric", 

47 "unitType": "ratio", 

48 "hasTimeIndex": False, 

49 }, 

50 "approach_temperature": { 

51 "displayName": "Approach Temperature", 

52 "type": "numeric", 

53 "unitType": "deltaTemperature", 

54 "value":10, 

55 "hasTimeIndex": False, 

56 }, 

57 "coefficient_of_performance": { 

58 "displayName": "Coefficient of Performance (heating)", 

59 "type": "numeric", 

60 "unitType": "ratio", 

61 "hasTimeIndex": False, 

62 }, 

63 "sink.heat": { 

64 "displayName": "Heating Duty", 

65 "type": "numeric", 

66 "unitType": "heatflow", 

67 }, 

68 "source.heat": { 

69 "displayName": "Cooling Duty", 

70 "type": "numeric", 

71 "unitType": "heatflow", 

72 }, 

73 }, 

74 "propertySetGroups": { 

75 "default": { 

76 "type": "stateVars", 

77 "displayName": "Properties", 

78 "stateVars": ("work_mechanical", "efficiency","approach_temperature") 

79 } 

80 }, 

81 "keyProperties": [ 

82 "work_mechanical", 

83 "coefficient_of_performance", 

84 ] 

85})