Standardized Performance Outputs: Generic Storage & Control#493
Open
elenya-grant wants to merge 73 commits intoNatLabRockies:developfrom
Open
Standardized Performance Outputs: Generic Storage & Control#493elenya-grant wants to merge 73 commits intoNatLabRockies:developfrom
elenya-grant wants to merge 73 commits intoNatLabRockies:developfrom
Conversation
…ART into converter_baseclass
…lyzer performance baseclass
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standardized Performance Outputs: Generic Storage & Control
This PR is a follow-on to PR #463 and should not be merged in until after #463 is.
This PR updates the generic storage performance models and the control strategies so storage models have the same outputs as converters. There are 3 storage performance models:
h2integrate/storage/battery/pysam_battery.py: This was updated in PR Standardize performance model outputs #463h2integrate/storage/simple_generic_storage.py: basically did nothingh2integrate/storage/simple_storage_auto_sizing.py: calculates storage capacity and charge rate needed to meet a demand.To be consistent with the
pysam_batterymodel, the generic storage performance models needed to output the standardized outputs (like capacity factor, rated production, etc) but these generic performance models did very minimal calculations and did not outputcommodity_out, most calculations were done in the controllers, not the performance models.Basically, the control strategies have been updated to output
commodity_set_pointinstead ofcommodity_out.commodity_set_pointis what the controller tells the performance model is the "target"commodity_out. Since the performance model may not be able to achieve thecommodity_set_point(due to a variety of possible differences in the control model and the performance model, like losses), the performance model outputcommodity_outmay not equal thecommodity_set_point. Thecommodity_set_pointis the input to the storage performance models, which now outputcommodity_out,annual_commodity_production,capacity_factor, etc. The computations now done in some of the storage performance models may be somewhat duplicative of the performance of some controllers, but this ensures that the storage controllers are compatible with any storage performance model.Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
These TODOs are only if PR #407 gets merged in before this one is ready. Otherwise, a separate PR will include these TODOs after #407 is merged.
commodity_nametocommodityfor the generic storage performance models and control strategiescommodity_unitstocommodity_rate_unitsfor the generic storage performance models and control strategiesType of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
commodity_set_point?Other feedback:
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.mdhas been updated to describe the changes made in this PRSection 3: Related Issues
This partially resolves some of Issue #486, and would resolve a step in Issue #485
New issue made: #498
Section 4: Impacted Areas of the Software
Section 4.1: New Files
N/A
Section 4.2: Modified Files
h2integrate/storage/simple_generic_storage.py: addedcommodity_set_pointas an input, updatedcompute()method to better reflect performance of a "pass through" type storage component (this storage model has no inputs related to capacity, which is why thecompute()method basically now acts like a pass-through component)h2integrate/storage/simple_storage_auto_sizing.py: addedcommodity_set_pointas an input, updatedcompute()method to better reflect simple performance of a storage componenth2integrate/control/control_strategies/demand_openloop_controller.py: changed output variable namecommodity_outtocommodity_set_pointh2integrate/control/control_strategies/passthrough_openloop_controller.py: changed output variable namecommodity_outtocommodity_set_pointh2integrate/postprocess/test/test_sql_timeseries_to_csv.py: updated subtest value, see justification in Section 6pytest examples/test/test_all_examples.py::test_ammonia_synloop_example: added subtest for annual ammonia production and updated 3 subtest values that changed, see justification in Section 6.Section 5: Additional Supporting Information
Section 6: Test Results, if applicable
h2integrate/postprocess/test/test_sql_timeseries_to_csv.py::test_save_csv_all_results: subtest for number of columns increased from 35 to 36 because of the new outputcommodity_set_point.pytest examples/test/test_all_examples.py::test_ammonia_synloop_example: subtests for ammonia OpEx, total adjusted OpEx for ammonia finance subgroup, and the LCOA failed, the test values decreased.cat_opex + h2o_opex - o2_opex, all of these are multipliers of the annual ammonia produced. All these opex values increased, but theo2_opexincreased much more than the increase incat_opexandh2o_opexcombined, meaning a net reduction in OpEx.max_hydrogen_capacityof theammonia_synloopmodel is 10589.36 kg/h, this value has not changed.hydrogen_into theammonia_synloopmodel decreased from 12549 kg/h to 9306 kg/h. This indicates that now more hydrogen is being used to make ammonia rather than being "curtailed". The total hydrogen consumed is the same as before (meaning the totalhydrogen_inis the same), but thehydrogen_outof the ammonia model decreased (likely because more hydrogen is being used)"generic_storage_model"as the performance model since this acts like the pass-through controller. This would make the hydrogen into the ammonia model the same as before (equal to the hydrogen out of the electrolyzer model). But - we would have to set the storage capacity and charge rate so that the hydrogen storage cost is the same as before.Section 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