Skip to content

fix(viv): MoorDyn's lift direction on either deck order; VIVphaseSeed - #111

Merged
SMI-Lab-Inha merged 3 commits into
devfrom
fix/viv-phase-seed
Nov 8, 2026
Merged

SMI-Lab-Inha merged 3 commits into
devfrom
fix/viv-phase-seed

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

This closes the VIV mode disagreement that VALIDATION.md recorded as "Pass scoped": between 0.21 and 0.33 m/s the taut line of viv_lockin settled on mode 2 in CableDyn and on mode 1 in MoorDyn-F. It also fixes a real parity defect found on the way.

Fix: the lift direction on fairlead-first decks

MoorDyn takes the node tangent from End A to End B, and seeds node i from End A at 2πi/N. CableDyn's model numbers its nodes from End B. On a line kept in the deck order, so the tangent ran B→A, which flips both the lift and the cross-flow axis. That is MoorDyn's model started from its phases plus π.

The t = 0 lift 2 m from End A was −4.68 N, where MoorDyn's is +4.66 N. This held on every route: single line, multibody march, mixed aggregate, refined mesh. CD_Deck_VIV_Phase_Seed now adds the half turn where the tangents disagree, and the deck driver passes it on every line. The lift field and the V line files are now MoorDyn's on either deck order.

The band: two coexisting branches, and a MoorDyn-F seed defect

  • Hysteresis. A line locked in mode 1 at 0.18 m/s and ramped up stays in mode 1. One ramped down from 0.30 m/s stays in mode 2.

  • CableDyn on the mode-1 branch reproduces MoorDyn-F to 0.5 %:

    U (m/s) 0.21 0.24 0.27 0.30 0.33
    CableDyn A/D 0.710 0.701 0.686 0.671 0.662
    MoorDyn-F A/D 0.709 0.699 0.685 0.670 0.659

    The frequencies are identical.

  • From rest, CableDyn settles in mode 2, as MoorDyn-C v2.7.2 does. At 0.21–0.30 m/s the frequencies are identical (0.507 / 0.527 / 0.547 / 0.567 Hz). At 0.24 m/s, A/D at x/L = 0.24 is 0.575 against 0.574.

  • MoorDyn-F v2.3.8 (OpenFAST v5.0.0) never starts from its seed. Line_Initialize sets Line%phi(I) = 2πI/N, but only the positions are copied into the state vector x%states, so every phase starts at zero. The resulting uniform lift excites only the symmetric modes. MoorDyn-C copies its seed into its state.

  • With every phase at zero, CableDyn follows MoorDyn-F's transient to four digits for 12 s, and its mode-1 branch over the whole band.

  • A static side note. MoorDyn-F's default CdScaleIC 4 solves its initial condition with four times the drag. On this line that raises the start tension by up to 2.8 kN. With CdScaleIC 1 its static tension equals CableDyn's to the digit.

Added: OPTION VIVphaseSeed

spread is the default: MoorDyn-C's 2πi/N. zero reproduces MoorDyn-F's start. The Python deck validator mirrors the option.

Effect on results

  • VIV decks written fairlead-first: the transient changes, and where two branches coexist the start can select the other one. Anchor-first decks are unchanged.
  • No example uses VIV.

Tests

viv_lockin gains:

  • the band case at U 0.24 m/s against MoorDyn-C (spread, within 3 % and one bin) and MoorDyn-F (zero, within 1 % and one bin);
  • the t = 0 lift on both deck orders, for EI = 0 lines and finite-EI cables.

viv_coupled and hermite_viv check the new seeds.

Suite Result
Full CTest, Release, default kernel 365/365
Full CTest, Release, Prescott kernel 365/365
pytest 2876 passed
ruff, pre-commit clean

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 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-08T10:35:54.935094Z 182f766 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 8, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35731454 | 📁 Comparing 182f766 against latest (e8f88f5)

  🔍 Preview build  

5 files changed · ± 5 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: b0fa0233dd

ℹ️ 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 src/CableDyn_DeckDriver.f90 Resolved
@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. 👍

Reviewed commit: da9c7a40f0

ℹ️ 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".

MoorDyn takes the node tangent of the synchronisation model from End A to
End B and starts node i from End A at 2 pi i/N. CableDyn's model numbers its
nodes from End B, so on a line the reader keeps in the deck order (written
fairlead first) its tangent ran from End B to End A. That turns the lift and
the cross-flow axis around, which is MoorDyn's model started from the phases
plus pi: the t = 0 lift 2 m from End A was -4.68 N where MoorDyn's is
+4.66 N, on every route (single line, multibody march, mixed aggregate,
refined mesh). The seed now adds that half turn where the model's tangent runs
against MoorDyn's (CD_Deck_VIV_Phase_Seed, which the deck driver now passes on
every line), so the lift field and the V line files are MoorDyn's whichever
end the deck writes first.

The taut line of viv_lockin locks into different modes in CableDyn and
MoorDyn-F between about 0.21 and 0.33 m/s. Two lock-in branches coexist
there: a line locked in mode 1 at 0.18 m/s stays in mode 1 as the current
rises (A/D 0.710/0.701/0.686/0.671/0.662 at 0.21-0.33 m/s, MoorDyn-F's
0.709/0.699/0.685/0.670/0.659), one coming down from 0.30 m/s stays in mode 2.
From rest CableDyn settles in mode 2, as MoorDyn-C v2.7.2 does (U 0.24 m/s:
A/D 0.575 against 0.574 at x/L 0.24, the same frequency). MoorDyn-F v2.3.8
(OpenFAST v5.0.0) sets the seed in Line%phi but never copies it into the
state vector it integrates, so its phases start at zero: a uniform lift that
excites the symmetric modes only. With every phase at zero CableDyn follows
MoorDyn-F's transient to four digits over 12 s and its mode-1 branch over the
whole band. The new OPTION VIVphaseSeed (spread, the default; zero) selects
that start; the Python deck validator mirrors it.

viv_lockin gains the band at U 0.24 m/s against MoorDyn-C (spread) and
MoorDyn-F (zero) and the t = 0 lift on both deck orders, EI = 0 and finite EI;
viv_coupled and hermite_viv check the new seeds.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…'s frame

The phase rate falls back to phi_y = 0 at a node with no cross-flow motion
(a node at rest, a held end of a finite-EI cable, whose phase feeds the lift
of its elements). On a line whose node tangent runs against MoorDyn's, the
seed is MoorDyn's plus pi because turning the tangent around turns the
cross-flow axis and so phi_y by half a turn; the fallback has to turn with
it, or the synchronisation term changes sign there. It now takes pi on such
a line (CD_VIV_Phase_Rate phi_rest, set by the VIV setters from
tangent_reversed, which the deck driver passes as the line's orientation).

On the viv_lockin line at U 0.24 m/s the finite-EI cable written fairlead
first and anchor first drifted 2.3e-4 m apart at mid span within 60 s
(1.4 % of the amplitude); the two now give the same response to the printed
digits, and viv_lockin gates that on both line kinds.

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. 🚀

Reviewed commit: 62b1a5991b

ℹ️ 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".

The [Unreleased] entries of the open changes are added together in one
change, so that they do not conflict with each other.

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. Already looking forward to the next diff.

Reviewed commit: 182f766b26

ℹ️ 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 05f795b into dev Nov 8, 2026
44 of 49 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/viv-phase-seed branch November 9, 2026 08:56
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