Remove system-level outputs from storage and replace with demand component (follow-on to 631)#666
Conversation
…GreenHEART into dispatch/converter_ol_sync
…GreenHEART into dispatch/converter_ol_sync
|
@elenya-grant Trying to look through this, and wondering if you can put together a diagram or figure showing the inputs/outputs of the current system and proposed solution? Would help a lot to see what the differences are. |
kbrunik
left a comment
There was a problem hiding this comment.
I think this all makes sense for separating out the demand feature into the demand component. I do think a figure highlighting how the demand component works with the storage in this new configuration would be helpful.
There was a problem hiding this comment.
I was looking at the docs for this and I think it could make sense to update example 14 and the outputs in this demonstration to show how the demand to the h2_storage and the h2_load_demand can be different and how that impacts the analysis. I would also recommend updating the tech_config executable block because it doesn't include the h2_load_demand and I think that would be helpful to showcase.
There was a problem hiding this comment.
That's a good idea - I will work on that!
There was a problem hiding this comment.
I think that example 1 or 2 may be a better candidate. Those ones have a battery and we could set the battery demand profile to 10% of the electrolyzer rated capacity and then add/set an electricity component demand profile equal to the electrolyzer rated capacity. There is nothing that hydrogen is going to in example 14 which makes it hard to come up with a storage why the storage demand profile would be different than the demand component demand profile.
… storage/standalone_outputs
Thanks for adding the plots! That definitely helps me understand what the code is doing, which is moving the difference calculations out of the storage model. I think these outputs were originally developed with converters in mind as well and trying to apply the same set of inputs/outputs across technologies to be able to easily know how much of a commodity was consumed and how much, if any, demand is left unmet after sequentially working through each component. My understanding now is that the difference calculations are being moved to demand components, and agree with @kbrunik that it would be helpful to see this built out in an example, so supportive of that! This would help me understand any other impacts to the dispatch/control flow and demand passing through converters as well. |
Remove system-level outputs from storage and replace with demand component (follow-on to 631)
There has been a blurry line distinguishing system-level calculations and calculations done in storage performance models. This PR builds on PR #631 to resolve Issue #521. The storage performance outputs that depend on demand have been removed and the usage of demand components in the examples is more common. The outputs removed from storage performance models are:
unmet_{commodity}_demand_out: demand that has not been metunused_{commodity}_out: production that exceeds the demandstorage_{commodity}_out: charge/discharge profileThe outputs with different calculations in the storage performance models are:
{commodity}_out: this used to be the combined commodity out from storage and whatever was input to storage, minus any production that exceeds the demand. This is now whatstorage_{commodity}_outused to becapacity_factor: used to be the based on the combined commodity out, now it based on the sum of the charge/discharge profileThis PR helps to better distinguish the differences between individual storage performance models and "system-level" performance calculations. This PR also enables the ability for the storage demand to be distinct from the overall demand. For example, if we wanted to use a battery to try to just keep an electrolyzer system on (at 10% power), then the demand profile to the battery would be 10% of the electrolyzer capacity, whereas the demand for the demand component would be equal to the electrolyzer capacity.
Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
storage_baseclass.pyso that demand is only an input if using feedback control (not doing just yet)docs/demand/demand_components.mdType of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Other feedback:
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 3: Related Issues
This would resolve Issue #521
Section 4: Impacted Areas of the Software
Section 4.1: New Files
examples/13_dispatch_for_electrolyzer/: new example that highlights setting the storage demand as a different value than the demand component.resource_files/wind/30.6617_-101.7096_2013_wtk_v2_60min_utc_tz.csv: wind resource file for example 23Section 4.2: Modified Files
h2integrate/core/h2integrate_model.pycreate_finance_model(): Updated logic so that any model without a cost model does not have to be included in the technologies list for a finance group. Was previously hard-coded so that only combiners didn't have to be included in the technologies list.h2integrate/storage/storage_baseclass.py: modifiedStoragePerformanceBasesetup(): removed outputs related to demandrun_storage(): removed calculations of outputs related to demand. Updated calculation of capacity factor.examples/test/test_all_examples.py::test_ng_demand_example: new test for Example 23examples/test/test_all_examples.py::::test_electrolyzer_demand: new test for Example 13Examples that were updated
Tests that were updated
Section 5: Additional Supporting Information
Section 6: Test Results, if applicable
h2integrate/core/test/test_framework.py::test_system_orderh2integrate/core/test/test_framework.py::test_technology_connectionsSection 7 (Optional): New Model Checklist
docs/developer_guide/coding_guidelines.mdattrsclass to define theConfigto load in attributes for the modelBaseConfigorCostModelBaseConfiginitialize()method,setup()method,compute()methodCostModelBaseClasssupported_models.pycreate_financial_modelinh2integrate_model.pytest_all_examples.pydocs/user_guide/model_overview.mddocs/section<model_name>.mdis added to the_toc.yml