Skip to content

fix(cable): one Newton tolerance for a finite-EI cable on every route - #81

Merged
SMI-Lab-Inha merged 3 commits into
devfrom
fix/coupled-cable-tolerance
Nov 3, 2026
Merged

SMI-Lab-Inha merged 3 commits into
devfrom
fix/coupled-cable-tolerance

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

A finite-EI cable on the coupled aggregate (a mixed EI = 0 + finite-EI standalone deck, OpenFAST CompMooring = 5, FAST.Farm, the C API) stepped to a fixed relative Newton tolerance of 5e-3 (200 iterations), whatever the deck's dynamic_solver row said; the same cable alone in a deck stepped to the deck's tolerance (default 1e-8, 30 iterations). Every route now takes the deck's rel and max_iter, and the static start min(1e-6, rel).

What the loose step did

  • Silent wrong tensions. A lazy cable beside a chain, both fairleads moved 3.5 m: at rhoInf 1, dtM 0.05 s the mixed route's fairlead tension peaked at 4.3e5 N (anchor 5.5e5 N) against 1.9e4 N (2.1e3 N) for the cable alone; at dtM 0.1 s it fell to 8307 N against 10 799 N and the fairlead bend moment rose to 1612 against 3.9 N m (robustness campaign D03).
  • A non-dissipative coupled cable. Held at both ends in still water, the residual each step left grew at rhoInf 0.4 into a sustained oscillation (+-14 N at 8 Hz on 1.2e4 N on the IEA-15 MW mixed cable, also inside OpenFAST), and at rhoInf 1 the march diverged (6.1e5 N within 5 s) (end-to-end validation E2E-D2). On that reproducer the held cable now stays constant (0 N range over the second half of 80 s at rhoInf 0.4, and at rhoInf 1).

Now the routes, and the C API, OpenFAST and FAST.Farm builds driven through the same motion, agree to 5e-8 of the peak tension; a seeded disturbance decays as on the single-line route.

Also

  • The standalone vessel march passed TRANSPOSE(motion%rot(...)) as an orientation argument every step, which the compiler packed into a heap temporary; the DCM is formed in a local array (gate step_allocations_driver_vessel).
  • mixed_route_currents (feat(current): deck currents on the standalone mixed EI=0 + finite-EI deck #79) needed a 2e-3 cable tolerance only because of the loose coupled step; its driver-level comparison now agrees exactly and the gate is at 1e-6.

Cost

About 2.0 tangent factorisations per coupled cable step instead of 1.1: the aggregate step of the IEA-15 MW mixed example takes 38 % more CPU time.

Checks

  • New test coupled_cable_tolerance (gates 1-3: mixed vs single-line route at rhoInf 1 / dtM 0.05 and rhoInf 0.4 / dtM 0.1; C API, OpenFAST and FAST.Farm builds; held and seeded cables at rhoInf 0, 0.4, 1), each failing on the old code.
  • ctest 350 of 350; checked Debug build (-fcheck=all) on the 13 touched tests; example A/B 53 of 53 identical; pre-commit, Sphinx -W, no duplicate PUBLIC.

A finite-EI cable on the coupled aggregate (a mixed EI = 0 + finite-EI
standalone deck, OpenFAST CompMooring = 5, FAST.Farm, the C API) stepped
to a fixed relative Newton tolerance of 5e-3 (200 iterations) whatever
the deck's dynamic_solver row said, while the same cable alone stepped
to the deck's tolerance (default 1e-8, 30). Every route now takes the
deck's rel and max_iter, and the static start min(1e-6, rel).

The loose step was silent wrong physics: a lazy cable beside a chain,
fairleads moved 3.5 m, at rhoInf 1 / dtM 0.05 s peaked at 4.3e5 N
fairlead tension against 1.9e4 N for the cable alone; at dtM 0.1 s it
fell to 8307 N against 10799 N and the fairlead bend moment rose to 1612
against 3.9 N m. It also made the coupled cable non-dissipative: held in
still water, the residual each step left grew at rhoInf 0.4 into a
sustained oscillation (+-14 N at 8 Hz on 1.2e4 N on the IEA-15 MW mixed
cable, in OpenFAST as well) and at rhoInf 1 the march diverged (6.1e5 N
within 5 s). Now the routes, and the C API, OpenFAST and FAST.Farm
builds, agree to 5e-8 of the peak tension; the held cable stays at its
static tensions to 6e-5 N and a seeded one decays as on the single-line
route.

New test coupled_cable_tolerance (gates 1-3; each failed on the old
code). Cost: about 2.0 tangent factorisations per coupled cable step
instead of 1.1; the aggregate step of the IEA-15 MW mixed example takes
38 % more CPU time.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The standalone march of a finite-EI line moved by a vessel passed
TRANSPOSE(motion%rot(:, :, step + 1)) as the u_orientation and
ub_orientation actual arguments of the per-step end update; the
compiler packed that strided view into a heap temporary at every step
(the checked Debug build reports it as an array temporary). The DCM is
now formed in a local array first, in the march and in the matching
static row. New gate step_allocations_driver_vessel runs the driver's
march in process and counts the heap allocations of its step phase.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
With the coupled cable stepping to the deck's Newton tolerance, the
mixed route and the single-line routes of mixed_route_currents gate 1
agree exactly in the driver (measured 0; before 1.1e-3 of the range,
the same 1.2e-3 in still water) and to 1.9e-8 in the library loop
(before 4.9e-6). STATIC_TOL, DRIVER_CABLE_TOL and LIBRARY_CABLE_TOL
go from 1e-5, 2e-3 and 1e-5 to 1e-6; the chain's row-1 transfer keeps
CHAIN_TOL.

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 3, 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-03T03:38:49.675843Z ef77e81 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

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35601677 | 📁 Comparing ef77e81 against latest (fd1936d)

  🔍 Preview build  

33 files changed · ± 33 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ef77e81caa

ℹ️ 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 4fd6a72 into dev Nov 3, 2026
21 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/coupled-cable-tolerance branch November 3, 2026 04:55
SMI-Lab-Inha added a commit that referenced this pull request Nov 3, 2026
….Farm (#83)

## Summary

Findings of the 0.4.0 end-to-end validation in OpenFAST and FAST.Farm (besides E2E-D2, fixed by #81).

- **A standalone `TURBINES` deck of `EI = 0` and finite-EI lines runs.** A power cable shared by two turbines beside their chain legs stopped with the internal message "no farm init was given (pass n_turbines + turbine_ref_pos)": the driver called the aggregate without the deck's `TURBINES` context. It now passes it; the `Turbine<J>` points are placed from the `TURBINES` rows, a finite-EI end on a `Turbine<J>` point starts turned by its turbine's `PtfmInit`, and each turbine's `motionFile` moves its points and turns its columns' frames. A `Turbine<J>` point in a run without a farm is refused by point.
- **A coupled deck takes bodies or rods, not both** (documented; the lift is left for a later release). Such a deck stops at init on the coupled route while MoorDyn-F runs it, and the docs listed coupled bodies and rods without the limit. The message says what the coupled route takes and where such a deck runs; `doc/openfast.rst`, `doc/coupling.rst`, `doc/capabilities.rst` and `doc/troubleshooting.rst` state it, and the Python validator refuses the deck caller-driven.
- **`FAST.Farm.exe` of the CMake route gets a stack reserve on Windows GNU.** With MinGW's 2 MiB default it stopped with `0xC00000FD` while initialising a farm's turbines. New patch `0022` links `openfast.exe` and `FAST.Farm.exe` with a 256 MiB reserve on WIN32 with the GNU compilers; the release's Visual Studio projects keep their own.
- **Console messages that say what happens:** the SeaState-kinematics line is printed only when a SeaState component is taken; the body/rod static start reports the largest turn and the move of every carried point (a pinned rod that only turned read "largest move 0.000E+00 m"); a deck refused for a current names the declaring input (`CurrentMod 1` table or `current` OPTION); the torsion note reports the total twist `Twist<L>` beside `Pretwist(B) - Pretwist(A)`; FAST.Farm names `DT_Mooring`, not a glue `DT`.

## Checks

- ctest 358 of 358 on two OpenBLAS kernels (`Prescott` and the default).
- Checked Debug build (`-fcheck=all`) on the 38 touched tests.
- Example A/B 53 of 53 identical.
- Every example deck on the `Prescott` and `Haswell` kernels: same exit codes, no fallback, stall or relaxed-tolerance note.
- Test needles updated and added (`driver_cli_torsion_nmodes`, `mixed_route_torsion`, `openfast_aggregate`, `msg_pinned_rod_turn`).
- pre-commit, Sphinx `-W`.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
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