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

4 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-11-06 23:27 +0000

1from core.auxiliary.enums.unitsOfMeasure import UnitOfMeasure 

2 

3from common.config_types import * 

4from common.config_utils import * 

5 

6solar_config: ObjectType = ObjectType.model_validate({ 

7 "displayType": "Solar", 

8 "displayName": "Solar", 

9 "ports": { 

10 "outlet": { 

11 "displayName": "Generated Power", 

12 "type": ConType.Outlet, 

13 "streamType": "energy_stream", 

14 "streamName": "PS", 

15 } 

16 }, 

17 "propertyPackagePorts": default_property_package_ports(), 

18 "graphicObject": unitop_graphic(), 

19 "properties": { 

20 "efficiency": { 

21 "displayName": "Efficiency", 

22 "type": "numeric", 

23 "unitType": "ratio", 

24 "hasTimeIndex":False, 

25 }, 

26 "irradiation": { 

27 "displayName": "Solar Irradiation", 

28 "type": "numeric", 

29 "unitType": "irradiance" 

30 }, 

31 "area": { 

32 "displayName": "Panel Area", 

33 "type": "numeric", 

34 "unitType": "area", 

35 "hasTimeIndex": False, 

36 }, 

37 "panel_count": { 

38 "displayName": "Number of Panels", 

39 "type": "numeric", 

40 "unitType": "ratio", 

41 "hasTimeIndex": False, 

42 }, 

43 

44 }, 

45 "propertySetGroups": { 

46 "default": { 

47 "type": "stateVars", 

48 "displayName": "Properties", 

49 "stateVars": ("efficiency","irradiation","area","panel_count"), 

50 } 

51 }, 

52 "keyProperties": [ 

53 "efficiency", 

54 "irradiation", 

55 "area", 

56 "panel_count" 

57 ] 

58})