Skip to content

Update Natural GeoH2 with Yearly CF#552

Open
kbrunik wants to merge 2 commits intoNatLabRockies:developfrom
kbrunik:geoh2_cf
Open

Update Natural GeoH2 with Yearly CF#552
kbrunik wants to merge 2 commits intoNatLabRockies:developfrom
kbrunik:geoh2_cf

Conversation

@kbrunik
Copy link
Collaborator

@kbrunik kbrunik commented Feb 26, 2026

Update Natural GeoH2 with Yearly CF

This PR updates the NaturalGeoH2PerformanceModel to output yearly metrics for the capacity_factor and annual_hydrogen_produced. The finance model update in PR #543 enabled the ability to use the lifetime performance in the financial calculations.

NOTE: The hydrogen_out is still the average hydrogen output over the well lifetime. This is because of an issue documented in #475.

Section 1: Type of Contribution

  • Feature Enhancement
    • Framework
    • New Model
    • Updated Model
    • Tools/Utilities
    • Other (please describe):
  • Bug Fix
  • Documentation Update
  • CI Changes
  • Other (please describe):

Section 2: Draft PR Checklist

  • Open draft PR
  • Describe the feature that will be added
  • Fill out TODO list steps
  • Describe requested feedback from reviewers on draft PR
  • Complete Section 7: New Model Checklist (if applicable)

TODO:

  • Step 1
  • Step 2

Type of Reviewer Feedback Requested (on Draft PR)

Structural feedback:

Implementation feedback:

Other feedback:

Section 3: General PR Checklist

  • PR description thoroughly describes the new feature, bug fix, etc.
  • Added tests for new functionality or bug fixes
  • Tests pass (If not, and this is expected, please elaborate in the Section 6: Test Results)
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • Examples have been updated (if applicable)
  • CHANGELOG.md has been updated to describe the changes made in this PR

Section 3: Related Issues

#475 still an active issue.

Section 4: Impacted Areas of the Software

Section 4.1: New Files

N/A

Section 4.2: Modified Files

  • h2integrate/converters/hydrogen/geologic/simple_natural_geoh2.py
    • Updated outputs to output an annual capacity_factor and annual_hydrogen_produced. capacity_factor is subsequently used in financial calculations.
  • h2integrate/converters/hydrogen/geologic/test/test_geologic_hydrogen.py
    • Added tests for all outputs from the NaturalGeoH2PerformanceModel.
  • examples/test/test_all_examples.py
    • Test value changed because it now uses yearly capacity factors rather than a lifetime average capacity factor. This means that the future is more discounted and that's when there's less hydrogen production from the well, hence the decrease in LCOH.

Section 5: Additional Supporting Information

Section 6: Test Results, if applicable

Section 7 (Optional): New Model Checklist

  • Model Structure:
    • Follows established naming conventions outlined in docs/developer_guide/coding_guidelines.md
    • Used attrs class to define the Config to load in attributes for the model
      • If applicable: inherit from BaseConfig or CostModelBaseConfig
    • Added: initialize() method, setup() method, compute() method
      • If applicable: inherit from CostModelBaseClass
  • Integration: Model has been properly integrated into H2Integrate
    • Added to supported_models.py
    • If a new commodity_type is added, update create_financial_model in h2integrate_model.py
  • Tests: Unit tests have been added for the new model
    • Pytest-style unit tests
    • Unit tests are in a "test" folder within the folder a new model was added to
    • If applicable add integration tests
  • Example: If applicable, a working example demonstrating the new model has been created
    • Input file comments
    • Run file comments
    • Example has been tested and runs successfully in test_all_examples.py
  • Documentation:
    • Write docstrings using the Google style
    • Model added to the main models list in docs/user_guide/model_overview.md
      • Model documentation page added to the appropriate docs/ section
      • <model_name>.md is added to the _toc.yml

@kbrunik kbrunik added geoh2 ready for review This PR is ready for input from folks labels Feb 26, 2026
Copy link
Collaborator

@jmartin4u jmartin4u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks wonderful. Can we just change the example script, examples\04_geo_h2\run_geo_h2.py, so that it shows the yearly decline curve rather than a flat hourly curve over one year? Paste these lines in over lines 14-20 to see what I'm talking about:

hydrogen_out = h2i_nat.prob.model.plant.geoh2_well_subsurface.NaturalGeoH2PerformanceModel.get_val(
    "annual_hydrogen_produced", units="t/year"
)
plt.plot(hydrogen_out)
plt.xlabel("Year")
plt.ylabel("Hydrogen Production (tonne per annum)")
plt.title("Hydrogen Production over Well Lifetime")

If you can change the X axis to start on the analysis_start_year rather than zero that would be great, I couldn't quickly figure out how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

geoh2 ready for review This PR is ready for input from folks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants