Skip to content

fix/feat: coupled start in the SeaState current, CurvX/CurvY section curvature, Syrope hydrodynamics - #65

Merged
SMI-Lab-Inha merged 4 commits into
devfrom
feat/twin-correctness
Oct 29, 2026
Merged

SMI-Lab-Inha merged 4 commits into
devfrom
feat/twin-correctness

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

The two remaining correctness items of a user's digital-twin feedback, plus Syrope hydrodynamics. Each is a separate commit.

1. Coupled runs start from the equilibrium in SeaState's current

A coupled OpenFAST run solved its static start in still water, and the SeaState current acted only from t = 0. A standalone deck starts in the equilibrium of its current option, so the twin's coupled lazy-wave cable spent its first minutes drifting into the current, and the user discarded them.

  • Aggregate. CD_Init_Deck_Aggregate and CD_AGG_Init_From_Deck take an optional static_current profile: z, ux, uy, uz, ascending in z.
    • With the host fluid field and the host current on, the profile goes into a copy of the options that only the static builders see: body and rod equilibrium, the EI = 0 system and its points, and the finite-EI cables.
    • The dynamics take the host field alone. The EI = 0 models' fluid field is replaced each step, and the cables' drag carries no deck current, so the current is not counted twice.
    • A deck whose WaterKin CurrentMod 1 file gives its own profile keeps that profile.
    • Without external_fluid, or with levels that don't ascend, the call fails closed.
  • OpenFAST shell.
    • It builds the profile from SeaState's CurrMod 1 current at the levels of SeaState's vertical wave grid (CD_SeaState_Steady_Current).
    • It passes the profile at initialisation, at the checkpoint rebuild (so a restart rebuilds the same mesh) and to the linearization probes.
    • CurrMod 2 and InflowWind currents keep the still-water start, with a console note.
  • Checks:
    • New case_static_current in openfast_aggregate:

      • a pure EI = 0 deck with the static current starts as the same deck with that current as a deck option;
      • on the mixed deck (EI = 0 chain and finite-EI cable) held in a 0.4 / 0.3 m/s current, the start in that current moves its loads by 2.3e-8 over 1 s, against 4.8e-3 for the still-water start;
      • the contract refusals hold.
    • OpenFAST 5 with CompMooring = 5, built against this branch: the IEA-15 MW mixed example in a 0.5 m/s cross current, no waves, 30 s. Cable lateral position (m):

      Node New, t = 0 New, 30 s Old, t = 0 Old, 30 s
      L4N10 5.38 5.69 0.00 2.36
      L4N20 12.21 12.55 0.00 4.66
      L4N38 28.98 29.50 0.00 9.53

2. CurvX<L>N<J>, CurvY<L>N<J>: the curvature on a cable's section axes

Curv<L>N<J> is a magnitude only. Fatigue of an armour wire or conductor at a fixed point of the section needs the curvature's direction.

  • The vector. The new channels resolve the nodal curvature vector on the section axes of a finite-EI line. It points to the centre of curvature and has the length of Curv<L>N<J>.

    • It is the normal part of the recovered section moment over EI, on the side that gives the curvature.
    • Where the recovery falls back to the exact trace, it is that trace's vector (r′ × r″) × r′ / |r′|⁴.
    • node_values and CD_HermiteCable_Curvature now return the vector.
  • The axes.

    • Section axis x starts at End A, normal to the End A → End B tangent. On a line restrained in torsion it follows End A's torsion normal.
    • Otherwise it is the static start's upper normal. That is held in the hang-off's axes when End A is clamped, so it turns with the vessel, and in global axes at a pinned End A.
    • It is carried to every node by parallel transport (eight smallest rotations per element) and, in torsion, turned about the tangent by the twist from End A. y = t × x.
  • Speed. The result is cached per state, so the channels of one output row share one recovery.

  • Refusals. EI = 0 lines and the two-moving-end route refuse the channels by name, both natively and in the Python deck validator.

  • Checks: new section_curvature test.

    Case Result
    Planar line CurvY = 0, and √(CurvX² + CurvY²) = Curv
    Cross current both components appear, with the same norm
    Deck turned 30° about vertical components unchanged to 8e-9
    Clamped hang-off turned 30° about its tangent components turn by −30° to 1e-15
    Line twisted 90° carried axes reach End B within 3e-6 rad of its own pretwisted normal

3. Syrope lines get hydrodynamics, current, waves, host fluid and VIV

MoorDyn applies its line hydrodynamics to Syrope polyester lines as to any other line. CableDyn built a Syrope line on its own path, with gravity, buoyancy and a flat seabed only.

  • Now built through init_one_model. The builder keeps its working-curve initial condition: the secant EA iterated to the rest curve, the per-element running maximum and the slow strain. The line then gets the seabed, hydrodynamics and fluid fields of any EI = 0 line.

  • Static start. It includes the current's drag. The legacy BA is zero, since the working curve's BA_s|BA_d carries the rope's damping.

  • Still refused: composite and finite-EI Syrope lines.

  • Checks: new syrope_hydro test, which also covers a cross current, VIV and waves. A taut 88.5 m polyester line, its fairlead swaying 2 m:

    Value
    Fairlead tension vs MoorDyn-C v2.7.2, over the 44.8 kN range within 10.6 N
    Same, at t = 0 0.5 N
    Mean tension 1.03 MN
    Range growth without drag and added mass 4.8 %

Checks

  • Test suite: ctest 313/313; Python 2033 passed.
  • Examples: all 52 shipped examples byte-identical to dev.
  • Format: fprettify, ruff and Sphinx are clean.

Signed-off-by: Jae Hoon Seo jaehoon.seo@inha.ac.kr

Curv<L>N<J> gives the curvature as a magnitude only. The fatigue of an
armour wire or conductor at a fixed point of a power cable's cross
section needs its direction in the section, so cross-section analysis
(CableXSec) had to rebuild it from node positions.

CurvX<L>N<J> and CurvY<L>N<J> resolve the nodal curvature vector, toward
the centre of curvature and of length Curv<L>N<J>, on the section axes
of a finite-EI line. The vector is the normal part of the recovered
section moment over EI on the side that gives the curvature, or the
exact trace's (r' x r'') x r'/|r'|^4 where the recovery falls back to it
(both now returned by node_values and CD_HermiteCable_Curvature).

The section axis x starts at End A normal to the End A -> End B tangent:
on a line restrained in torsion along End A's torsion normal; otherwise
along the static start's upper normal, kept in the hang-off's axes when
End A is clamped (it turns with the vessel) and in global axes at a
pinned End A. It is carried to every node by parallel transport (eight
smallest rotations between the Hermite tangents per element) and, in
torsion, turned about the tangent by the twist from End A. The result is
cached per state, so the channels of one output row share one recovery.
EI = 0 lines and the two-moving-end route refuse the channels by name,
natively and in the Python deck validator.

section_curvature: on a planar line CurvY is zero and the norm is Curv;
in a cross current both components appear with the same norm; the deck
turned 30 degrees about the vertical gives the same components to 8e-9;
a clamped hang-off turned 30 degrees about its tangent turns them by
-30 degrees to 1e-15; on a line twisted 90 degrees the carried axes
reach End B within 3e-6 rad of its own pretwisted normal.

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

A coupled OpenFAST run solved its static start in still water and let
the SeaState current act from t = 0, while a standalone deck starts in
the equilibrium of its current OPTION. The twin user's lazy-wave cable
then spent the first minutes of every coupled run drifting into the
current, and those minutes were discarded.

CD_Init_Deck_Aggregate (and CD_AGG_Init_From_Deck) take an optional
static_current profile (z, ux, uy, uz by ascending z). With the host
fluid field and the host current on, it goes into a copy of the options
that only the static builders see: body and rod equilibrium, the EI = 0
system and its points, and the finite-EI cables. The dynamics take the
host field alone (the EI = 0 models' fluid field is replaced, the cables'
drag carries no deck current), so the current is not counted twice. A
deck whose WaterKin CurrentMod 1 file gives its own profile keeps it.

The OpenFAST shell builds the profile from SeaState's CurrMod 1 current
at the levels of its vertical wave grid (CD_SeaState_Steady_Current) and
passes it at the initialisation, the checkpoint rebuild and the
linearization probes. CurrMod 2 and InflowWind currents keep the
still-water start, with a note.

On the mixed deck (EI = 0 chain and finite-EI cable) held in a 0.5 m/s
current, the start in that current moves its loads by 2.3e-8 over 1 s,
the still-water start by 4.8e-3. On the IEA-15 MW mixed example in a
0.5 m/s cross current the cable starts 29 m across at its deepest
monitored node and moves less than 0.6 m in 30 s; from still water it
has covered a third of that offset by then.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…rope lines

MoorDyn applies its line hydrodynamics to Syrope polyester lines as to
any other. CableDyn built a Syrope line on its own path with gravity,
buoyancy and a flat seabed only: no drag, no added mass, and current,
waves, a host's fluid field, a bathymetryFile and VIV refused. The
Syrope builder now keeps its working-curve initial condition (the
secant EA iterated to the rest curve, the per-element running maximum
and slow strain) but builds each probe and the final line through
init_one_model, which takes the secant and the Syrope states as
optional arguments: the line gets the seabed, hydrodynamics and fluid
fields of any EI = 0 line, its static start includes the current's
drag, and its legacy BA is zero (the working curve's BA_s|BA_d carries
the rope's damping). Composite and finite-EI Syrope lines stay refused.

A taut 88.5 m polyester line in water whose fairlead sways 2 m matches
MoorDyn-C v2.7.2's fairlead tension within 10.6 N over a 44.8 kN range
(1.03 MN mean; 0.5 N at t = 0); without drag and added mass the range
grows 4.8 % (syrope_hydro, with a cross current, VIV and waves).

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 Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T05:49:13.597054Z 7a91aec 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 Oct 29, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35490312 | 📁 Comparing 7a91aec against latest (fd1936d)

  🔍 Preview build  

26 files changed · ± 26 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: 2e85ff8c05

ℹ️ 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_OpenFAST_HermiteFMF.f90 Resolved
At a bending-pinned End A restrained in torsion, a host rotation turns
the committed torsion end frames and torque without moving q, v, a, the
time or the load epoch, and the reference normal stays fixed (no parent
end connection). The section-curvature cache then served the components
of the frames before the rotation. The key now holds the torsion end
frames, Theta, Phi and the torque. section_curvature turns the host 30
degrees about the End A tangent of such a line and requires the next
evaluation to equal a fresh one.

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. Swish!

Reviewed commit: 7a91aecbac

ℹ️ 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 a515485 into dev Oct 29, 2026
21 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/twin-correctness branch October 29, 2026 07:41
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