Repository navigation
fix(cable): one Newton tolerance for a finite-EI cable on every route - #81
Merged
Merged
Conversation
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>
Owner
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A finite-EI cable on the coupled aggregate (a mixed
EI = 0+ finite-EI standalone deck, OpenFASTCompMooring = 5, FAST.Farm, the C API) stepped to a fixed relative Newton tolerance of 5e-3 (200 iterations), whatever the deck'sdynamic_solverrow 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'srelandmax_iter, and the static startmin(1e-6, rel).What the loose step did
rhoInf1,dtM0.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; atdtM0.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).rhoInf0.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 atrhoInf1 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 atrhoInf0.4, and atrhoInf1).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
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 (gatestep_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
coupled_cable_tolerance(gates 1-3: mixed vs single-line route atrhoInf1 /dtM0.05 andrhoInf0.4 /dtM0.1; C API, OpenFAST and FAST.Farm builds; held and seeded cables atrhoInf0, 0.4, 1), each failing on the old code.-fcheck=all) on the 13 touched tests; example A/B 53 of 53 identical; pre-commit, Sphinx-W, no duplicatePUBLIC.