Skip to content

fix(multibody): couple a finite-EI cable pinned to a moving object implicitly - #78

Merged
SMI-Lab-Inha merged 2 commits into
devfrom
fix/free-rod-pinned-cable
Nov 2, 2026
Merged

SMI-Lab-Inha merged 2 commits into
devfrom
fix/free-rod-pinned-cable

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

What changed

The monolithic multibody step (bodyScheme monolithic, the default) coupled a finite-EI cable pinned to a moving object (a Rigid6 Body<N> point or a free or pinned Rod<N> end, the other end held) at the Newmark predictor: the cable was stepped once per step with the predicted attachment motion and its end force was held through the outer iterations. That is an explicit, partitioned coupling. Its step amplification exceeds 1 once K_e dt^2 / m_e is above about 0.85 (1.5 at 1.3, 2.5 at 2), with K_e the cable's condensed dynamic end stiffness and m_e the object's effective mass along the cable. A light object on a stiff cable therefore left a balanced static start.

A 3 t free rod spar with a 55 m cable (EA 5e8 N, 40 elements) pinned at its upper end, at dtM 0.01 s:

  • the step change of the cable tension alternated in sign and grew 2.3 times per step;
  • the tension rose from 11 kN past 1 MN in 0.7 s;
  • the rod end moved 6.3 m in 2 s.

The start was not at fault. It is a stable equilibrium of the march:

  • the same deck with an EI = 0 cable stays at rest to 1e-10 m;
  • with the cable clamped (Rigid, already coupled implicitly) it stays at rest to 1e-7 m;
  • the staggered scheme holds it.

The fix. In src/CableDyn_DeckDriver.f90, every cable with an end on an object the march moves now sets cab_imp. This covers pinned or connected ends, End A or End B, bodies and free or pinned rods. Such a cable is re-stepped at every outer iteration with its end stiffness in the Newton matrix, as clamped cables and cables between two objects already were. A cable with no moving end is still stepped once. The staggered scheme and the OpenFAST and C-API routes are unchanged.

Docs.

Gates

New CTest pinned_cable_light_object. On dev e760bc6, 14 of its gates fail.

Gate dev e760bc6 this branch
H: spar rod, cable pinned at the upper end (2 s): rod end move / tension change 6.3 m / 161 times the start 1e-10 m / 2.7e-8
H: same, in a 0.5 m/s current 5.4 m / 472 times 6.3e-4 m / 1.2e-4 (a slow swing of the start in the current, the same on the staggered scheme)
H: cable pinned at the lower end 6.5 m / 5596 times 1.8e-10 m / 3.4e-8
D: cable from a fixed rod's end to the free rod (End B on the moving object) 6.1 m / 1190 times 2e-7 m / 9e-8
D: cable written from its anchor the same output byte for byte the same output byte for byte
B: 4 t Rigid6 buoy with a pinned keel cable (4 s) 0.22 m / 38 times 1e-9 m / 3.3e-8
S: monolithic vs staggered, upper / lower end 6.0 / 6.5 m apart 1e-10 / 1.7e-10 m, tensions to 2.7e-8 / 3.4e-8
E: controls (EI = 0 cable; cable clamped at upper / lower end) at rest at rest: 1e-10 m; 1e-7 / 3e-9 m

Gate tolerances:

  • 1e-5 m and 1e-5 of the tension; the positions are written to 8 digits, so 1e-6 m at the rod's depth;
  • 2e-3 m and 1e-3 in the current;
  • 1e-5 m for the staggered comparison.

line_attachments 11 and 12 had to march at dtM 0.002 s on #77 because of this coupling. They are back at dtM 0.01 s, over 1 s instead of 0.3 s:

Gate dev e760bc6 at dtM 0.01 s this branch
11: spar rod, pinned cable with a 1500 kg clump 0.82 m / leg tension 13 times 1e-7 m / 2.9e-7
12: the same without the clump 1.3 m / 4.4 times 0 m / 3.8e-8

Over 3 s the clump deck holds to 1.1e-6 m; dev moves it 15 m.

Example A/B (reference driver built at e760bc6)

52 of 53 example decks are identical. mixed_body_rods_points changes; it is a 150 t buoy with a pinned power cable, the one example with a pinned cable on a moving object:

  • body surge changes by up to 3.5e-5 m (7e-6 of its 5.2 m range);
  • Rod2Ry changes by 2.3e-4 deg;
  • the cable top tension FairTen8 changes by 0.6 N of 8.1 kN.

The new run is the more accurate one. Against the same deck at dtM / 4, the body surge error falls from 3.7e-5 m to 1.6e-6 m and the pitch error from 1.1e-4 to 2.2e-5 deg. The cable tension error, 17 N, comes from the cable's own time step and does not change.

The deck runs about 45 % longer (6.8 s to 9.8 s), because the cable is now stepped once per outer iteration instead of once per step.

Checks

  • Full ctest (Release): 345 of 345 pass.
  • Checked Debug build (-fcheck=all, --timeout 5400): pinned_cable_light_object, line_attachments, static_dry_weight, cable_between_bodies, monolithic_gates, clamped_cable_ends, body_rod_physics, bodies_rods and driver_clamped_cable_pinned_rod pass, 9 of 9.
  • pytest python/tests and tests: with the native parity tests on (CABLEDYN_TEST_DRIVER), 2179 passed, 75 skipped.
  • ruff check and format are clean. Strict mypy shows only dev's 3 numpy-stub notes.
  • pre-commit and Sphinx -W are clean. dup_public: 0 duplicates.

Notes

  • The slow drift in a current (6.3e-4 m in 2 s, 1.3e-3 m at most over 6 s, then turning back) is the same on the staggered scheme. The EI = 0 cable in the same current holds to 1e-10 m. So it is a small static-versus-dynamic difference of the finite-EI cable in a current, not part of this coupling, and is left for the open list.
  • If the 45 % cost on decks with a pinned cable on a heavy body matters, the old coupling could be kept where K_e dt^2 / m_e is safely below 0.85. That needs estimates of K_e and m_e; this change takes the uniformly implicit coupling for robustness.

…plicitly

The monolithic multibody step stepped a finite-EI cable pinned at a Rigid6
body point or a free or pinned rod end (its other end held) once per step
with the Newmark predictor's attachment motion and held its end force through
the outer iterations. That explicit coupling has a step amplification above 1
once the cable's condensed dynamic end stiffness times dt^2 exceeds about 0.85
of the object's effective mass along the cable, so a light object on a stiff
cable left a balanced static start: a 3 t free rod spar with a 55 m cable
(EA 5e8 N, 40 elements) pinned at its upper end, dtM 0.01 s, had the step
change of the cable tension alternate in sign and grow 2.3 times per step;
the tension rose from 11 kN past 1 MN in 0.7 s and the rod end moved 6.3 m in
2 s. The static pose is a stable equilibrium of the march: the same deck with
an EI = 0 cable, or with the cable clamped (already coupled implicitly),
stays at rest to 1e-7 m, and the staggered scheme holds it too.

Every cable with an end, pinned or connected, on an object the march moves is
now re-stepped at every outer iteration with its end stiffness in the Newton
matrix, as clamped cables and cables between two objects already were.

New CTest pinned_cable_light_object (on dev e760bc6, 14 of its gates fail):
- free rod spar, cable pinned at the upper end, in a 0.5 m/s current, and at
  the lower end: rod end moves 6.3, 5.4, 6.5 m and tension changes of 161,
  472, 5596 times the start before; now 1e-10, 6.3e-4 and 1.8e-10 m and
  2.7e-8, 1.2e-4 and 3.4e-8 (the current case swings slowly about its start,
  as on the staggered scheme);
- the cable from a fixed rod's end to the free rod (End B on the object):
  6.1 m before, now 2e-7 m; written from its anchor: the same output;
- a 4 t Rigid6 buoy with a pinned keel cable: 0.22 m and 38 times before,
  now 1e-9 m and 3.3e-8;
- monolithic vs staggered schemes: 6.0 and 6.5 m apart before, now 1e-10
  and 1.7e-10 m;
- controls (unchanged): EI = 0 cable at rest to 1e-10 m, clamped cable at
  the upper and lower rod ends to 1e-7 m.

line_attachments 11 and 12 (the spar rod with the pinned cable, with and
without a 1500 kg clump) march at dtM 0.01 s again, over 1 s: the rod holds
to 1e-7 and 0 m, leg tensions to 2.9e-7 and 3.8e-8 (on dev at dtM 0.01 s:
0.82 and 1.3 m, 13 and 4.4). Over 3 s the clump deck holds to 1.1e-6 m
(15 m on dev).

Examples: 52 of 53 identical; mixed_body_rods_points (150 t buoy with a
pinned cable) changes by 3.5e-5 m in body motion and 0.6 N of 8.1 kN in cable
top tension, its body error against dtM / 4 falling from 3.7e-5 to 1.6e-6 m;
it runs about 45 % longer (the cable is stepped once per outer iteration).

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 31, 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-11-02T13:04:56.016016Z ef62265 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 31, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35581185 | 📁 Comparing ef62265 against latest (fd1936d)

  🔍 Preview build  

32 files changed · ± 32 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 79144b52e4

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

A finite-EI cable written from a seabed termination up to a floater (End
A on the bed below End B, e.g. a fixed rod's end on the seabed to a free
spar rod) was refused by the catenary seed (the fairlead, End A, must sit
above the bed), so the mesh-sequenced route alone solved it, and its
branch depended on platform round-off: the pinned_cable_light_object
deck pcl_fixrod solved on Windows and reached a kinked state (max h kappa
1.96) on the Linux gfortran Debug CI job, which failed the deck.

The seed is now laid from End A, the same catenary seen from its other
end, with its nodes put back in order; no anchor walk follows a reversed
seed. The deck starts at the same equilibrium as before on Windows, and
new gate R moves the fixed rod by 1 ulp either way in x or 1e-12 m up:
the rod's start is unchanged (0 m). pcl_fixrod holds to 2.0e-7 m and
4.6e-8 in tension.

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. Keep them coming!

Reviewed commit: ef62265428

ℹ️ 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 591acbc into dev Nov 2, 2026
21 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/free-rod-pinned-cable branch November 2, 2026 21:28
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