Skip to content

feat(waves): per-component direction and a reference point for wave records - #96

Merged
SMI-Lab-Inha merged 5 commits into
devfrom
feat/wave-record-direction
Nov 7, 2026
Merged

SMI-Lab-Inha merged 5 commits into
devfrom
feat/wave-record-direction

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

Per-component direction. wave_frequencies.txt (WaveKin 7) takes a different beta on each row, so a component file can describe a short-crested sea. This is not an extension: MoorDyn-C v2.7.1 reads a beta per row too, and the earlier refusal was CableDyn's own limit. Short-crested tables use their own branch of the component sum, so the single-direction path is unchanged.

Reference point. New options WaveRefX and WaveRefY (m, default 0) say where a wave record or the component phases are referenced, for WaveKin 3, WaveKin 7 and WaterKin WaveKinMod 1. They extend the MoorDyn-C format, and the docs say so. Vessel RAOs take each row's heading and the vessel position relative to the point.

Python validator. DeckFile now reads the files a deck names (WaterKin, the MoorDyn-C kinematics files, motion and vessel records, the RAO table, bathymetry, Syrope) and refuses what the solver refuses. A file that is not there passes the validator and the solver refuses it by name.

Deck syntax: WaveRefX, WaveRefY; a per-row beta. Both are refused by name where they cannot apply, including on the coupled route.

Checks

  • Two directions equal the two superposed seas to 1e-15, over six direction pairs including angles that are not multiples of 90 degrees.
  • A shifted reference point equals the translated deck within 1e-12, for WaveKin 3, WaveKin 7 and WaveKinMod 1.
  • RAO heave for a WaveKin 7 sea with a reference point matches to 5e-7 m.
  • All 54 decks are bit-identical in printed output to the previous tree, with no slowdown of the single-direction path (5.46 and 5.47 ms per step).
  • test_wave_record_rules_match_the_driver: 160 decks through DeckFile and the driver, the same verdict on all. On 1943 decks the validator's 28 new refusals are all decks the driver refuses too.
  • CTest 360 of 360 on both kernels, Debug 360 of 360, pytest passes, sphinx -W builds.

The CHANGELOG entry lands with the release batch.

WaveKin 7 refused rows of different directions, though MoorDyn-C reads a
beta per row of wave_frequencies.txt and gives each its own direction.
Rows that differ now make a short-crested table in ascending frequency:
CD_Component_Wave_Kinematics takes the direction cosines of each
component (comp_cos, comp_sin) and sums x and y apart, in a branch of
its own, so a long-crested table runs as before. Vessel RAOs take each
row's heading. The beta of the omega = 0 row has no effect.

The new options WaveRefX and WaveRefY give the point that an elevation
record or a component file (WaterKin WaveKinMod 1, WaveKin 3 and 7)
refers to: each phase uses the position relative to it, and a vessel RAO
the vessel's. The default is the origin. They are an extension of
CableDyn, documented as such, and a deck with any other sea, or none, is
refused by name; the Python deck validator mirrors the rule.

Existing decks give the same bits as before. Two directions equal the
two superposed seas to 1e-15, at the depth stretched by the total
elevation, across the quadrants; a shifted reference point equals the
deck translated.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
DeckFile accepted WaveRefX and WaveRefY with a WaterKin file of
WaveKinMod 0, which the solver refuses, and did not read the rows of
wave_frequencies.txt. It now reads the WaveKinMod of a WaterKin file and
the rows of wave_frequencies.txt from the deck's folder, with the rules
of the native reader: directions within 2 pi, the omega = 0 first row,
positive frequencies, component bounds and the effective depth. A
vesselRAO deck is judged by the same WaveKinMod. A file that is not
there passes this check, and the solver, which must open it, refuses it
by name while it is missing.

The bound on WaveRefX and WaveRefY applies to the value in force, as in
the native reader: a later row replaces an earlier one.

A new parity test runs 41 decks through both DeckFile and the driver and
requires the same verdict. The deck format notes record how a non-zero
omega = 0 row differs from MoorDyn-C.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
DeckFile left the contents of the files a deck names to the solver, so
it certified decks the solver refuses. It now reads them from the deck's
folder with the rules of their native readers: the WaterKin file and its
wave record and current table, including a current that doubles a
current row or Currents 1, 2 or 5; the Currents 1, 2 and 5 tables;
motionFile rows on the route the deck takes, with TURBINES records and
the roll column; vesselMotion rows; the vesselRAO table and the headings
of the deck's sea; the bathymetry grid and the Fixed points on it; and
the Syrope settings, OWC table and working-curve admissibility. A file
that is not there passes this check, and the solver, which must open
it, refuses it by name while it is missing.

The parity test now runs 160 decks through DeckFile and the driver and
requires the same verdict. Against the earlier validator, 28 of 1943
decks from the examples and the test suite are newly refused, and the
driver refuses all 28.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T17:37:28.348291Z e913cf6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

read-the-docs-community Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35722156 | 📁 Comparing e913cf6 against latest (3d04008)

  🔍 Preview build  

13 files changed · ± 13 modified

± Modified

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7674f46e8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/cabledyn/deck_file.py Resolved
Comment thread python/cabledyn/deck_file.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7674f46e8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/cabledyn/deck_file.py Resolved
The heading of a wave row missed the ochi_hubble spelling, so it read
lambda1 as the direction and a one-heading RAO table at the sea's
heading was refused. All the spellings the native reader takes now
select the same column.

A standalone static check, TMax = 0 without dtM, was refused with a
WaterKin WaveKinMod 1 file, because the file rules took dtM from the
explicit options. They now run on the nominal clock the native parser
installs, and motion and vessel records follow its start-row rule: the
grid is the t = 0 row, and a later row is not used, whatever its time
step.

The parity test now also takes every wave kind and keyword spelling on
both clocks against a one-heading RAO table, every shipped deck as a
static check without dtM, and every shipped wave deck under each
spelling of the options these rules read: 507 decks through DeckFile and
the driver, with the same verdict on each.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 708caab46a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread python/cabledyn/deck_file.py Resolved
A narrow spreading leaves the outer direction bins without energy, and the RAO synthesis skips their components, so DeckFile refused tables the solver accepts. It now mirrors the bin weights. A weight below the smallest normal number is exactly zero natively too, so which bins carry the sea depends on the spreading and the bin count alone, not on where the product with the spectrum underflows.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: e913cf68db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit 103967d into dev Nov 7, 2026
22 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/wave-record-direction branch November 7, 2026 18:49
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