Skip to content

Expose sampled elevation seas in Python WEC API - #55

Merged
cmccomb merged 3 commits into
masterfrom
parity/imported-elevation-wec-api
Oct 8, 2026
Merged

cmccomb merged 3 commits into
masterfrom
parity/imported-elevation-wec-api

Conversation

@cmccomb

@cmccomb cmccomb commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Scope

Expose WEC-Sim's sampled time/elevation MAT input as ImportedElevationWave through the public Python WEC builder. The generalized linear-subspace solver uses the already paired BodyClass.userDefinedExcitation convolution, accepts named MAT variables, records the file in provenance, and permits an explicit second force ramp for source-compatible comparisons.

Validation

Local Python API and dynamics suite: 29 passed. The imported-elevation API test covers a configurable two-body PTO. actionlint passes.

The new derived Sphere benchmark changes only the pinned Free_Decay/0m sea to a reproducible two-frequency sampled elevation, then compares 4,001 MATLAB and Python samples of wave elevation, six excitation-force components, heave, and speed. The fresh R2025b run with tightened gates passed. Maximum observed differences were 6.7e-15 m wave, 3.7e-9 N or N m force, 0.0243 mm heave, and 0.0323 mm/s speed. Explicit paired gates are 1e-12 m, 1e-6 N or N m, 0.1 mm, and 0.1 mm/s. The tightened test also passes against the downloaded live artifact. The existing RM3 MooringMatrix paired source and trajectory tests pass locally after the refactor. A built wheel imports wecsim.ImportedElevationWave outside the checkout.

This does not alter the source-specific RM3 MooringMatrix floating-joint solver or resolve the separate RM3 state-space Cases 5 and 6 question.

@cmccomb
cmccomb marked this pull request as ready for review October 8, 2026 13:38
@cmccomb
cmccomb merged commit 831b46f into master Oct 8, 2026
2 checks passed
@cmccomb
cmccomb deleted the parity/imported-elevation-wec-api branch October 8, 2026 13:40
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