Repository navigation
Added pysam options input for battery - #903
Merged
Merged
Conversation
kbrunik
reviewed
Oct 6, 2026
Collaborator
There was a problem hiding this comment.
Could you add a test where you change the battery type using pysam_options? I see that as the most likely use case for the options given our user base, and it would be good to see the actual results change based on the inputed pysam_options.
tech_config["technologies"]["battery"]["model_inputs"]["performance_parameters"][
"pysam_options"
] = {"ParamsCell": {"chem": 3}} #iron flow battery
Collaborator
Author
There was a problem hiding this comment.
Good idea, I've added a test that runs the battery with two different chemistries and confirms the results are different!
johnjasa
enabled auto-merge
October 6, 2026 21:43
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.
Allow additional PySAM battery options
pysam_optionsdictionary for the PySAM battery performance modelSection 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
N/A
Type of Reviewer Feedback Requested (on Draft PR)
Structural feedback: N/A
Implementation feedback: N/A
Other feedback: N/A
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.mdSection 4: Related Issues
Resolves #570
Section 5: Impacted Areas of the Software
Section 5.1: New Files
N/A
Section 5.2: Modified Files
h2integrate/storage/battery/pysam_battery.py: Accept and apply grouped PySAM options with checks for wrapper-owned fields.h2integrate/storage/battery/test/test_pysam_battery.py: Cover configured and default operation and invalid options.Section 6: Additional Supporting Information
The technology schema already permits model-specific performance parameters. PySAM rejects unsupported individual parameter names. Existing battery configurations need no changes.
Section 7: Test Results, if applicable
All passed
Section 8 (Optional): New Model Checklist
N/A