Skip to content

Commit 9e4114b

Browse files
Sync PySAM Battery and Generic Storage Pyomo Performance models with open-loop controllers (#613)
* refactored pysam battery and storage performance models to be compatible with updated open-loop controllers * updated generic storage pyo to use pass through controller * renamed PassThroughOpenLoopController to SimpleStorageOpenLoopController * removed simple_generic_storage * renamed xx_charge_fraction to xx_soc_fraction --------- Co-authored-by: Genevieve Starke <genevieve.starke@nrel.gov>
1 parent 82c63f0 commit 9e4114b

File tree

51 files changed

+1456
-2224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1456
-2224
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
- Add tidal resource model
1515
- Add pysam tidal performance model
1616
- Add pysam marine hydrokinetic cost model
17+
- Updated the `StoragePerformanceModel` and `PySAMBatteryPerformanceModel` to be compatible with the open-loop storage control strategies [PR 613](https://github.com/NatLabRockies/H2Integrate/pull/613)
18+
- Removed `SimpleGenericStorage` and replaced usage with `StoragePerformanceModel`
19+
- Renamed `PassThroughOpenLoopController` to `SimpleStorageOpenLoopController`
20+
- Bugfix in pyomo control rules so that units such as `kg/h` can be used
21+
- Bugfix in tests of pyomo control strategies with `StoragePerformanceModel` so that the pathname attribute is correct
22+
- Added `demand_profile` as an input to `StoragePerformanceModel` and `PySAMBatteryPerformanceModel`
23+
- Renamed `xx_charge_fraction` to `xx_soc_fraction`
1724

1825
## 0.7.1 [March 13, 2026]
1926

docs/control/control_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ There are two different systematic approaches, or frameworks, in H2Integrate for
77
The first approach, [open-loop control](#open-loop-control), assumes no feedback of any kind to the controller. The open-loop framework does not require a detailed technology performance model and can essentially act as the performance model. The open-loop framework establishes a control component that runs the control and passes out information about `<commodity>_unmet_demand`, `unused_<commodity>`, `<commodity>_out`, and `total_<commodity>_unmet_demand`.
88

99
Supported controllers:
10-
- [`PassThroughOpenLoopController`](#pass-through-controller)
10+
- [`SimpleStorageOpenLoopController`](#pass-through-controller)
1111
- [`DemandOpenLoopStorageController`](#demand-open-loop-storage-controller)
1212
- [`DemandOpenLoopConverterController`](#demand-open-loop-converter-controller)
1313
- [`FlexibleDemandOpenLoopConverterController`](#flexible-demand-open-loop-converter-controller)

docs/control/open-loop_controllers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ The open-loop storage controllers can be attached as the control strategy in the
77
2. Demand Open-Loop Storage Controller - uses simple logic to attempt to meet demand using the storage technology.
88

99
(pass-through-controller)=
10-
### Pass-Through Controller
11-
The `PassThroughOpenLoopController` simply directly passes the input commodity flow to the output without any modifications. It is useful for testing, as a placeholder for more complex controllers, and for maintaining consistency between controlled and uncontrolled frameworks as this 'controller' does not alter the system output in any way.
10+
### Simple Open-Loop Storage Controller
11+
The `SimpleStorageOpenLoopController` passes the input commodity flow to the output, possibly with minor adjustments to meet demand. It is useful for testing and as a placeholder for more complex controllers.
1212

13-
For examples of how to use the `PassThroughOpenLoopController` open-loop control framework, see the following:
13+
For examples of how to use the `SimpleStorageOpenLoopController` open-loop control framework, see the following:
1414
- `examples/01_onshore_steel_mn`
1515
- `examples/02_texas_ammonia`
1616
- `examples/12_ammonia_synloop`

docs/technology_models/simple_generic_storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Simple Generic Storage model provides a flexible framework for modeling vari
66

77
The Simple Generic Storage model consists of two main components:
88

9-
1. **SimpleGenericStorage**: A minimal component that defines the input interface for the storage system
9+
1. **StoragePerformanceModel**: A minimal component that defines the input interface for the storage system
1010
2. **DemandOpenLoopStorageController**: The core logic component that handles storage operations, state of charge calculations, and resource management
1111

1212
This architecture allows the storage system to work with any resource type by simply configuring the resource name and units, making it quite versatile.

docs/user_guide/model_overview.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,14 @@ Below summarizes the available performance, cost, and financial models for each
250250
(storage-models)=
251251
## Storage Models
252252
- `h2_storage`: hydrogen storage
253-
- performance models:
254-
+ `'SimpleGenericStorage'`
255253
- cost models:
256254
+ `'LinedRockCavernStorageCostModel'`
257255
+ `'SaltCavernStorageCostModel'`
258256
+ `'MCHTOLStorageCostModel'`
259257
+ `'PipeStorageCostModel'`
260258
- `generic_storage`: any resource storage
261259
- performance models:
262-
+ `'SimpleGenericStorage'`
260+
+ `'StoragePerformanceModel'`
263261
+ `'StorageAutoSizingModel'`
264262
- cost models:
265263
+ `'GenericStorageCostModel'`
@@ -279,8 +277,8 @@ Below summarizes the available performance, cost, and financial models for each
279277

280278
(control-models)=
281279
## Control Models
282-
- `'PassThroughOpenLoopController'`: open-loop control; directly passes the input resource flow to the output without any modifications
283280
- Storage Controllers:
281+
- `'SimpleStorageOpenLoopController'`: open-loop control; manages resource flow based on demand and input commodity
284282
- `'DemandOpenLoopStorageController'`: open-loop control; manages resource flow based on demand and storage constraints
285283
- `'HeuristicLoadFollowingController'`: open-loop control that works on a time window basis to set dispatch commands; uses Pyomo
286284
- Converter Controllers:

examples/01_onshore_steel_mn/tech_config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ technologies:
8282
max_charge_rate: 375740.4 # kW
8383
max_capacity: 375745.2 # kWh
8484
n_control_window: 24
85-
init_charge_fraction: 0.9
86-
max_charge_fraction: 1.0
87-
min_charge_fraction: 0.2
85+
init_soc_fraction: 0.9
86+
max_soc_fraction: 1.0
87+
min_soc_fraction: 0.2
8888
system_commodity_interface_limit: 1e12
8989
performance_parameters:
9090
system_model_source: pysam
9191
chemistry: LFPGraphite
92+
demand_profile: 720000 # 720 MW
9293
cost_parameters:
9394
cost_year: 2019
9495
energy_capex: 310 # $/kWh from 2024 ATB year 2025
@@ -119,7 +120,7 @@ technologies:
119120
performance_model:
120121
model: StorageAutoSizingModel
121122
control_strategy:
122-
model: PassThroughOpenLoopController
123+
model: SimpleStorageOpenLoopController
123124
cost_model:
124125
model: LinedRockCavernStorageCostModel
125126
model_inputs:
@@ -128,8 +129,8 @@ technologies:
128129
commodity_rate_units: kg/h
129130
set_demand_as_avg_commodity_in: true
130131
performance_parameters:
131-
min_charge_fraction: 0.0
132-
max_charge_fraction: 1.0
132+
min_soc_fraction: 0.0
133+
max_soc_fraction: 1.0
133134
charge_efficiency: 1.0
134135
discharge_efficiency: 1.0
135136
commodity_amount_units: kg

examples/02_texas_ammonia/tech_config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ technologies:
8282
max_charge_rate: 96.0 # kW
8383
max_capacity: 96.0 # kWh
8484
n_control_window: 24
85-
init_charge_fraction: 0.9
86-
max_charge_fraction: 1.0
87-
min_charge_fraction: 0.2
85+
init_soc_fraction: 0.9
86+
max_soc_fraction: 1.0
87+
min_soc_fraction: 0.2
8888
system_commodity_interface_limit: 1e12
8989
performance_parameters:
9090
system_model_source: pysam
9191
chemistry: LFPGraphite
92+
demand_profile: 640000 # 640 MW
9293
cost_parameters:
9394
cost_year: 2019
9495
energy_capex: 310 # $/kWh from 2024 ATB year 2025
@@ -119,7 +120,7 @@ technologies:
119120
performance_model:
120121
model: StorageAutoSizingModel
121122
control_strategy:
122-
model: PassThroughOpenLoopController
123+
model: SimpleStorageOpenLoopController
123124
cost_model:
124125
model: SaltCavernStorageCostModel
125126
model_inputs:
@@ -128,8 +129,8 @@ technologies:
128129
commodity_rate_units: kg/h
129130
set_demand_as_avg_commodity_in: true
130131
performance_parameters:
131-
min_charge_fraction: 0.0
132-
max_charge_fraction: 1.0
132+
min_soc_fraction: 0.0
133+
max_soc_fraction: 1.0
133134
charge_efficiency: 1.0
134135
discharge_efficiency: 1.0
135136
commodity_amount_units: kg

examples/03_methanol/co2_hydrogenation_doc/tech_config_co2h.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ technologies:
7474
replacement_cost_percent: 0.15 # percent of capex - H2A default case
7575
h2_storage:
7676
performance_model:
77-
model: SimpleGenericStorage
77+
model: StoragePerformanceModel
7878
cost_model:
7979
model: GenericStorageCostModel
8080
control_strategy:
@@ -85,9 +85,9 @@ technologies:
8585
commodity_rate_units: kg/h
8686
max_charge_rate: 50000.0 # kg/time step
8787
max_capacity: 103701.401563086 # kg
88-
max_charge_fraction: 1.0 # fraction (0-1)
89-
min_charge_fraction: 0.1 # fraction (0-1)
90-
init_charge_fraction: 0.25 # fraction (0-1)
88+
max_soc_fraction: 1.0 # fraction (0-1)
89+
min_soc_fraction: 0.1 # fraction (0-1)
90+
init_soc_fraction: 0.25 # fraction (0-1)
9191
max_discharge_rate: 5000.0 # kg/time step
9292
charge_equals_discharge: false
9393
charge_efficiency: 1.0 # fraction (0-1)
@@ -129,7 +129,7 @@ technologies:
129129
infrastructure_type: desal
130130
co2_storage:
131131
performance_model:
132-
model: SimpleGenericStorage
132+
model: StoragePerformanceModel
133133
cost_model:
134134
model: GenericStorageCostModel
135135
control_strategy:
@@ -140,9 +140,9 @@ technologies:
140140
commodity_rate_units: kg/h
141141
max_charge_rate: 50000.0 # kg/time step
142142
max_capacity: 961456.376748904 # kg
143-
max_charge_fraction: 1.0 # fraction (0-1)
144-
min_charge_fraction: 0.1 # fraction (0-1)
145-
init_charge_fraction: 0.25 # fraction (0-1)
143+
max_soc_fraction: 1.0 # fraction (0-1)
144+
min_soc_fraction: 0.1 # fraction (0-1)
145+
init_soc_fraction: 0.25 # fraction (0-1)
146146
max_discharge_rate: 50000.0 # kg/time step
147147
charge_efficiency: 1.0 # fraction (0-1)
148148
discharge_efficiency: 1.0 # fraction (0-1)

examples/09_co2/direct_ocean_capture/tech_config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ technologies:
7575
max_charge_rate: 50000 # kW
7676
max_capacity: 200000 # kWh
7777
n_control_window: 24
78-
init_charge_fraction: 0.9
79-
max_charge_fraction: 1.0
80-
min_charge_fraction: 0.2
78+
init_soc_fraction: 0.9
79+
max_soc_fraction: 1.0
80+
min_soc_fraction: 0.2
8181
system_commodity_interface_limit: 1e12
8282
performance_parameters:
8383
system_model_source: pysam
8484
chemistry: LFPGraphite
85+
demand_profile: 340000 # 340 MW
8586
cost_parameters:
8687
cost_year: 2022
8788
energy_capex: 246 # $/kWh from 2024 ATB year 2025

examples/09_co2/ocean_alkalinity_enhancement/tech_config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ technologies:
5151
max_charge_rate: 50000 # kW
5252
max_capacity: 200000 # kWh
5353
n_control_window: 24
54-
init_charge_fraction: 0.9
55-
max_charge_fraction: 1.0
56-
min_charge_fraction: 0.2
54+
init_soc_fraction: 0.9
55+
max_soc_fraction: 1.0
56+
min_soc_fraction: 0.2
5757
system_commodity_interface_limit: 1e12
5858
performance_parameters:
5959
system_model_source: pysam
6060
chemistry: LFPGraphite
61+
demand_profile: 330000 # 330 MW
6162
cost_parameters:
6263
cost_year: 2022
6364
commodity_units: kW

0 commit comments

Comments
 (0)