Coverage for backend/django/flowsheetInternals/unitops/config/objects/energy_storage_config.py: 100%
4 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-06-23 21:51 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2026-06-23 21:51 +0000
1from common.config_types import *
2from common.config_utils import *
3from ..spec_helpers import *
5energy_storage_config: ObjectType = ObjectType(
6 displayType="Battery",
7 displayName="Battery",
9 ports={
10 "inlet": PortType(
11 displayName="Charging",
12 type=ConType.Inlet,
13 streamType="energy_stream",
14 streamName="Charging",
15 ),
16 "outlet": PortType(
17 displayName="Discharging",
18 type=ConType.Outlet,
19 streamType="energy_stream",
20 streamName="Discharging",
21 ),
23 },
24 propertyPackagePorts=default_property_package_ports(),
25 graphicObject=unitop_graphic(),
26 properties=PropertiesType({
27 "charging_efficiency": PropertyType(
28 displayName="Charging Efficiency",
29 type="numeric",
30 unitType="ratio"
31 ),
32 "capacity": PropertyType(
33 displayName="Capacity",
34 type="numeric",
35 unitType="battery_capacity"
36 ),
37 "charging_power_in": PropertyType(
38 displayName="Charging",
39 type="numeric",
40 unitType="heatflow"
41 ),
42 "charging_power_out": PropertyType(
43 displayName="Discharging",
44 type="numeric",
45 unitType="heatflow"
46 ),
47 "initial_SOC": PropertyType(
48 displayName="Initial State of Charge",
49 type="numeric",
50 unitType="ratio"
51 ),
52 "updated_SOC": PropertyType(
53 displayName="Updated State of Charge",
54 type="numeric",
55 unitType="ratio"
56 ),
57 }),
58 propertySetGroups={
59 "default": {
60 "type": "stateVars",
61 "displayName": "Properties",
62 "stateVars": ("charging_efficiency","capacity", "charging_power_out", "initial_SOC",),
63 }
64 },
65 keyProperties=[
66 "updated_SOC"
67 ],
68 idaes_adapter=UnitModelAdapter(
69 args=ArgAdapter({
70 "property_package": ConstantSchemaAdapter(PowerPPArgSchema()),
71 "has_holdup": ConstantArg(False),
72 "dynamic": ConstantArg(False),
73 }),
74 ),
75)