Skip to content

Conversation

@akeeste
Copy link
Contributor

@akeeste akeeste commented Apr 29, 2025

This PR adds an example that uses MHKiT and WEC-Sim together to do a power performance assessment:

  • utilize resource characterization in PacWave notebook
  • write MCR cases for WEC-Sim
  • load WEC performance
  • assess WEC performance

Right now I represent the resource using the 32-cluster results in the PacWave notebook and irregular waves in WEC-Sim. I was considering writing all 2000+ wave cases in that example to a WEC-Sim MCR file so that we can demonstrate mhkit.wave.performance.power_performance_workflow() but decided it would be too expensive, even if regular waves were used in WEC-Sim.

I also have a half-finished example that shows how to write a directional spectra (like in directional_waves.ipynb) for WEC-Sim. But the WEC-Sim 'full directional spectra" feature needs documentation and an example first.

The PR also includes a function to make the xarray representation of WEC-Sim data a lot more useful

@akeeste akeeste requested a review from MShabara April 29, 2025 17:32
@MShabara
Copy link
Contributor

I’ve tested the WEC-Sim examples with a variety of WEC-Sim cases, including:

  • Single-body problems
  • Two-body systems
  • Moored and unmoored WECs

Overall, the implementation works well across these scenarios. However, I’ve noticed a few points worth mentioning:

  • Wave spectrum capture: The wave spectrum is not always captured correctly. The accuracy appears to be sensitive to the tuning parameters, particularly the number of lines and the sampling rate.
  • Flexible body compatibility: The current implementation does not support flexible bodies, as the body class for flexible components differs in structure. This could be addressed in future development.

These limitations are not critical for merging but are worth noting for future improvements.

Great work on this feature!

If my final commit works for you, feel free to merge the PR

@akeeste
Copy link
Contributor Author

akeeste commented May 19, 2025

@MShabara understood on GBM as that has an entirely different output structure.--this can be a separate future PR.

On the wave spectrum--where did you see this inconsistency coming in? Is it based in WEC-Sim or MHKiT?

@akeeste
Copy link
Contributor Author

akeeste commented May 27, 2025

Merging this PR as the WEC-Sim example is working as intended. The discrepancies in wave spectra will be addressed in a new issue

@akeeste akeeste merged commit 6139f34 into MHKiT-Software:develop May 27, 2025
45 checks passed
@akeeste akeeste deleted the update_wecsim_example branch May 27, 2025 18:36
akeeste added a commit to akeeste/MHKiT-Python that referenced this pull request Sep 30, 2025
This PR adds an example that uses MHKiT and WEC-Sim together to do a
power performance assessment:
- utilize resource characterization in PacWave notebook
- write MCR cases for WEC-Sim
- load WEC performance
- assess WEC performance

Right now I represent the resource using the 32-cluster results in the
PacWave notebook and irregular waves in WEC-Sim. I was considering
writing all 2000+ wave cases in that example to a WEC-Sim MCR file so
that we can demonstrate
`mhkit.wave.performance.power_performance_workflow()` but decided it
would be too expensive, even if regular waves were used in WEC-Sim.

I also have a half-finished example that shows how to write a
directional spectra (like in `directional_waves.ipynb`) for WEC-Sim. But
the WEC-Sim 'full directional spectra" feature needs documentation and
an example first.

The PR also includes a function to make the xarray representation of
WEC-Sim data a lot more useful

---------

Co-authored-by: Mohamed Shabara <[email protected]>
@akeeste akeeste mentioned this pull request Sep 30, 2025
akeeste added a commit that referenced this pull request Sep 30, 2025
v1.0.0
# MHKiT v1.0.0
## New Features
* Sound Exposure Level by @jmcvey3 in #388
* Add discharge function to MHKiT by @jmcvey3 in #385

## Functionality enhancements
* Fix for corrupted Nortek files by @jmcvey3 in #372
* Update integral length scale function by @jmcvey3 in #376
* Fix ever-changing RDI RiverPro depth bin ranges by @jmcvey3 in #378
* Allow clean functions to handle _avg variables by @jmcvey3 in #377
* IEC TS 62600 updates by @akeeste in #382
* MLER explanation updates/corrections by @rgcoe in #393
* Improve Nortek2 index file creator functions by @jmcvey3 in #397
* Read Sentinel V specific data packets by @jmcvey3 in #396
* Short list of VMDAS updates by @jmcvey3 in #405
* Allow user to specify universal Kolmogorov constant for TKE dissipation rate function by @jmcvey3 in #406
* Nortek Dual Profile Dataset Rotation by @jmcvey3 in #414

## Source code improvements
* Lint Tidal by @ssolson in #386
* Lint river module by @ssolson in #389
* Lint hindcast by @ssolson in #398
* Modernize Package Configuration by @ssolson in #400
* Configure specific warnings by @ssolson in #401

## Bug fixes
* Avoid failing to scan very large files by @jmcvey3 in #371
* Acoustics SPL bugfix by @jmcvey3 in #379
* DOLfYN/RDI: Set  `fs` to NaN when typical calculation methods yield error (#408) by @simmsa in #409

## Testing and Continuous Integration Updates
* Fix Jupyter Notebook tests running Python 3.13 by @ssolson in #380
* CI Test Clean Up: Mock USGS, Acoustic Tolerances by @ssolson in #404
* Speed up tests with concurrency checks to prevent duplicate workflows on PRs from develop into main or from main into develop by @akeeste
* Define MPLBACKEND to decrease intermittent matplotlib errors in tests by @akeeste

## Documentation and Examples
* Add WEC-Sim power performance example  by @akeeste in #395
* Update dolfyn function docstrings and associated notebooks by @jmcvey3 in #412
* Update examples by @akeeste in #417
* Update installation instructions in README.md by @akeeste
* Adjust acoustics test tolerances by @akeeste in #420

**Full Changelog**: v0.9.0...v1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants