Skip to content

Moving from HOPP wave to native H2I pysam wave - #825

Open
johnjasa wants to merge 8 commits into
NatLabRockies:developfrom
johnjasa:move_wave
Open

Moving from HOPP wave to native H2I pysam wave#825
johnjasa wants to merge 8 commits into
NatLabRockies:developfrom
johnjasa:move_wave

Conversation

@johnjasa

@johnjasa johnjasa commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Add PySAM wave energy performance model to replace HOPP wave module

  1. Added PySAMWavePerformanceModel wrapping PySAM MhkWave as an H2I-compatible OpenMDAO component.
  2. Added WaveResource component to read and interpolate DOE WPTO wave resource CSV files.
  3. Registered both new classes in supported_models.py.
  4. Updated example 09 (direct_ocean_capture) to use the new wave model in place of HOPP.

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
  • Complete Section 8: New Model Checklist (if applicable)

TODO:

  • Implement WaveResource component
  • Implement PySAMWavePerformanceModel
  • Register new models in supported_models.py
  • Update example 09 tech/plant configs
  • Add unit tests

Type of Reviewer Feedback Requested (on Draft PR)

Structural feedback: Is the resource_year approach for timestamp generation acceptable, or should timestamps always come from the resource file?

Implementation feedback: N/A

Other feedback: N/A

Section 3: General PR Checklist

  • PR description thoroughly describes the new feature
  • Added tests for new functionality
  • Tests pass (pending CI)
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date (wave model docs page TBD)
    • Documentation has been rebuilt successfully
    • Examples have been updated
  • CHANGELOG.md
    • At least one complete sentence has been provided
    • Hyperlink provided once PR number is known

Section 4: Related Issues

Works towards #824

Section 5: Impacted Areas

5.1 New Files

  • h2integrate/resource/wave.py - WaveResource OpenMDAO component
  • h2integrate/converters/water_power/wave_pysam.py - PySAMWavePerformanceConfig and PySAMWavePerformanceModel
  • h2integrate/converters/water_power/test/test_wave_pysam.py - unit tests

5.2 Modified Files

  • h2integrate/converters/water_power/__init__.py - added PySAMWavePerformanceModel export
  • h2integrate/core/supported_models.py - registered WaveResource and PySAMWavePerformanceModel
  • examples/09_co2/direct_ocean_capture/tech_config.yaml - replaced HOPP with wave model
  • examples/09_co2/direct_ocean_capture/plant_config.yaml - updated resource and technology connections

Section 6: Additional Info

The existing PySAMMarineCostModel (which already supports wave reference models RM3, RM5, RM6) is reused as the cost model for the wave technology. No changes were needed there.

annual_energy and capacity_factor are not available as direct outputs from PySAM MhkWave in time-series mode, so they are computed from the simulated generation time series and the fraction_of_year_simulated base-class property.

Section 8: New Model Checklist

  • Performance model inherits from PerformanceModelBaseClass
  • _time_step_bounds set to (3600, 3600) (hourly, matching wave resource interpolation)
  • _control_classifier set to "flexible"
  • commodity, commodity_rate_units, commodity_amount_units set in initialize
  • Model registered in supported_models.py
  • Unit tests added with @pytest.mark.unit
  • N/A: no_cost_models - cost model is provided via PySAMMarineCostModel
  • Describe the feature that will be added
  • Fill out TODO list steps
  • Describe requested feedback from reviewers on draft PR
  • Complete Section 8: New Model Checklist (if applicable)

@johnjasa
johnjasa requested a review from kbrunik August 5, 2026 21:07
@johnjasa
johnjasa marked this pull request as ready for review August 5, 2026 21:07

@kbrunik kbrunik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a few small changes before I think it's ready to come in. Thanks for pulling this together (especially so quickly)!

+ {py:class}`~h2integrate.converters.steel.steel.SteelCostAndFinancialModel` - An OpenMDAO component for calculating the costs associated with steel production.

- `water_power`: tidal and run-of-river hydropower
- `water_power`: wave, tidal, and run-of-river hydropower

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes glad we are oxford comma people here

Comment thread h2integrate/converters/water_power/test/test_wave_pysam.py
Comment thread h2integrate/converters/water_power/wave_pysam.py Outdated
Comment thread examples/09_co2/direct_ocean_capture/tech_inputs/hopp_config.yaml Outdated
@johnjasa
johnjasa requested a review from kbrunik August 6, 2026 15:37
@johnjasa
johnjasa marked this pull request as draft August 6, 2026 16:38
@johnjasa
johnjasa marked this pull request as ready for review August 6, 2026 16:38

@kbrunik kbrunik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Assuming the tests pass this looks good to me!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants