Skip to content

Pair OSWEC variable-hydro yaw heading bank with MATLAB - #57

Merged
cmccomb merged 4 commits into
masterfrom
variable-yaw-heading-bank
Oct 8, 2026
Merged

cmccomb merged 4 commits into
masterfrom
variable-yaw-heading-bank

Conversation

@cmccomb

@cmccomb cmccomb commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add the published variable-hydro yaw case's nearest-heading selector to the Python WEC interface as yaw_heading_bank.
  • Reuse the full-direction OSWEC HDF5 data for the source bank's heading-dependent excitation. The published bank generator copies the same rigid, hydrostatic, added-mass, and radiation data into each directional file.
  • Generate and run the pinned MATLAB application's first 2° regular-wave case, then compare heading selection, yaw excitation on MATLAB's saved path, wave, body, and PTO histories.

Evidence and limits

  • Local Python configuration and dynamics suite: 30 passed, one paired test skipped without MATLAB data.
  • Fresh MATLAB source run completed all 60,001 samples. On its saved yaw path, the Python selector chose the same heading at every sample; yaw excitation differed by at most 867 N m. Before the first heading-event split at 64.57 s, independent yaw differed by at most 3.89e-5 rad, speed by 3.32e-5 rad/s, and PTO torque by 3.98 N m.
  • The 2° selector is discontinuous. At 64.57 s a 3.7e-5 rad yaw difference selects opposite sides of a bank boundary for one sample. Subsequent switching offsets grow to a maximum 0.164 rad yaw difference over 600 s. Full trajectory parity remains unestablished; the test does not weaken or fit the solver to that trajectory.
  • Paired run: https://github.com/cmudrc/wec-sim-python/actions/runs/37792909630

This change does not address general variable hydrodynamics, irregular-wave bank switching, or RM3 state-space Cases 5/6.

@cmccomb
cmccomb merged commit 44f389e into master Oct 8, 2026
2 checks passed
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.

1 participant