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

4energy_storage_config: ObjectType = ObjectType.model_validate({ 

5 "displayType": "Battery", 

6 "displayName": "Battery", 

7 

8 "ports": { 

9 "inlet": { 

10 "displayName": "Charging", 

11 "type": ConType.Inlet, 

12 "streamType": "energy_stream", 

13 "streamName": "Charging", 

14 }, 

15 "outlet": { 

16 "displayName": "Discharging", 

17 "type": ConType.Outlet, 

18 "streamType": "energy_stream", 

19 "streamName": "Discharging", 

20 }, 

21 

22 }, 

23 "propertyPackagePorts": default_property_package_ports(), 

24 "graphicObject": unitop_graphic(), 

25 "properties": { 

26 "charging_efficiency": { 

27 "displayName": "Charging Efficiency", 

28 "type": "numeric", 

29 "unitType": "ratio" 

30 }, 

31 "capacity": { 

32 "displayName": "Capacity", 

33 "type": "numeric", 

34 "unitType": "battery_capacity" 

35 }, 

36 "charging_power_in": { 

37 "displayName": "Charging", 

38 "type": "numeric", 

39 "unitType": "heatflow" 

40 }, 

41 "charging_power_out": { 

42 "displayName": "Discharging", 

43 "type": "numeric", 

44 "unitType": "heatflow" 

45 }, 

46 "initial_SOC": { 

47 "displayName": "Initial State of Charge", 

48 "type": "numeric", 

49 "unitType": "ratio" 

50 }, 

51 "updated_SOC": { 

52 "displayName": "Updated State of Charge", 

53 "type": "numeric", 

54 "unitType": "ratio" 

55 }, 

56 }, 

57 "propertySetGroups": { 

58 "default": { 

59 "type": "stateVars", 

60 "displayName": "Properties", 

61 "stateVars": ("charging_efficiency","capacity", "charging_power_out", "initial_SOC",), 

62 } 

63 }, 

64 "keyProperties": [ 

65 "updated_SOC" 

66 ] 

67})