Skip to content

fix(outputs): node channels report the deck node on refined lines - #23

Merged
SMI-Lab-Inha merged 4 commits into
devfrom
fix/node-channels-deck-nodes
Oct 17, 2026
Merged

SMI-Lab-Inha merged 4 commits into
devfrom
fix/node-channels-deck-nodes

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

On a finite-EI line whose mesh was refined automatically, the node-indexed OUTPUT channels (Ten<L>N<J>, Curv<L>N<J>, BendMom<L>N<J>, L<L>N<J>p/v/a, Dec, Azi, Torq, Twist) read node J of the refined mesh instead of deck node J, silently. Names are validated against the deck node count, so after refinement a channel pointed somewhere else on the line:

Channel (lazy wave, 71 → 1136 elements) Deck node at Reported from Before After (true)
Ten4N5 (sag bend) 80 m 5.0 m 11 137 N 1 378 N
Ten4N34 (touchdown) 220 m 41 m 5 488 N 1 544 N
BendMom4N54 (on the seabed) 420 m 66 m 1 214 N·m 0

Fix

  • Node channels name deck nodes on every route.
    • Refinement bisects elements, so every deck node is a node of the final mesh. The cable builder maps each deck node to its final-mesh node by unstretched arc length from End A, which also works for non-uniform (local) refinement. A deck node not found on the mesh fails closed.
    • The map is rebuilt with every cable build, so restarts, PtfmInit and InitDeckAt carry it.
    • It covers the standalone static and dynamic routes, the mixed aggregate, multibody, the OpenFAST/FAST.Farm aggregate (CD_AGG_EvalChannel) and the C API EvalChannel.
  • Whole-mesh outputs keep the refined mesh, and say where the deck nodes are:
    • .static.out gains a DeckNode column, appended last and only when a line was refined.
    • Per-line .Line<L>.p.out files gain a # DeckNode line, also only when refined.
    • The C API adds the GetLineValues quantity CD_C_LINE_DECK_NODE. An older library rejects it with CD_C_BAD_INPUT; no function is added.
    • Python adds Line.deck_nodes and StaticProfile.deck_node_arc_lengths. profile_at, profiles_at, node_range_graph and line_range_graph place main-output channels at their deck node, and raise rather than guess when no map is available.
  • Unchanged: EI = 0 lines and the compatibility route, which never refine. Every example output is byte-identical.
  • validation/PAPER_REPRODUCTION.md is brought up to date with a re-run of the article's table on dev 71158d5:
    • Paper mode now lists False alpha_force_blend, sequenced cable_statics and element OutputRecovery. It reproduces v0.1.0 in every printed digit except the two-point axial-rule row, which moved with the seabed anchor-end weight moment fix.
    • The defaults columns carry the force-blend changes (snap-load study, one-hour VolturnUS-S, mooring envelope).
    • EI = 0 test programs document a paper-mode switch.

Tests

  • node_channels_refined_line: the reproducer at deck nodes 1, 2, 5, 18, 34, 54 and 72:
    • static channels against the static profile, and arc positions against .elements.out;
    • dynamic L4N<J>p against .p.out at the mapped node, on every row;
    • the mixed (aggregate) route;
    • the C API EvalChannel against GetLineValues, CD_C_LINE_DECK_NODE, and rejection of node 73;
    • Python placement from the main output, a lone per-line file and LinePositions.
      It fails on dev.
  • Python units: test_results.py, test_profiles.py, and test_c_api_shared for the new quantity.
  • seabed_friction_aniso: its gate read refined nodes it took for deck nodes; it now reads deck nodes 20/21 (38/40 m).
  • Full suite (Windows, gfortran, Release, slow tier included): all pass. Python passes. pre-commit run --all-files and the Sphinx build with -W pass.

Checklist

  • pre-commit run --all-files passes
  • ctest --test-dir build --output-on-failure passes
  • python -m pytest tests python/tests passes (if Python or validation records changed)
  • VALIDATION.md updated if a validation result changed: validation/PAPER_REPRODUCTION.md
  • CHANGELOG.md updated under [Unreleased] (heading added if missing) for user-visible changes
  • Documentation in doc/ updated for changed inputs, options, or outputs
  • Conventional Commit title (feat:, fix:, docs:, ...)
  • Commits are signed off (git commit -s) under the
    Developer Certificate of Origin

The node output channels Ten<L>N<J>, Curv<L>N<J>, BendMom<L>N<J>,
L<L>N<J>p/v/a{x,y,z}, L<L>N<J>Dec/Azi, Torq<L>N<J> and Twist<L>N<J> name a
deck node (1 + the total NumSegs of the line's sections) and are checked
against that count at parse time, but when the static solve refined a
finite-EI line's mesh (adaptive, stability or curvature refinement) they
silently read node J of the refined mesh. On the lazy-wave cable of
tests/data/lazy_wave_touchdown_planar_coarse.dat with the top section cut
from 20 to 4 elements (refined from 71 to 1136 elements), Ten4N34, the deck
node at the 220 m touchdown, reported 5488 N, the tension at 41 m, against
1544 N, and BendMom4N54, on the seabed at 420 m, 1214 N.m against 0.

The cable builder now maps each deck node onto the final mesh by its
unstretched arc length from End A (an exact match within 1e-9 of the line
length, computed from the arc positions, so a non-uniform local refinement
maps too) and stores the map on the cable; a deck node with no mesh node
there fails closed when its channel is evaluated. The finite-EI channel
evaluator reads deck nodes through the map, so every route that reaches it
reports the deck node: the standalone static and dynamic cubic-Hermite
routes, the mixed EI = 0 + finite-EI route, the multibody march, the
OpenFAST aggregate (CD_AGG_EvalChannel) and the C API CableDyn_EvalChannel.
The static profile writers and CableDyn_GetLineValues keep listing every
node of the refined mesh and evaluate by mesh node; the static profile then
carries a DeckNode column naming the deck node of each row (0 for a node the
refinement added). Range graphs, .elements.out and the per-line files are
unchanged. EI = 0 lines and the two-moving-end compatibility route are never
refined and are unchanged. The map is rebuilt with the cable on every
initialisation, so a checkpoint restart, ptfm_init and an InitDeckAt
re-solve carry it.

The Python StaticProfile reads and validates the DeckNode column and gains
deck_node_arc_lengths; node_range_graph, profile_at/profiles_at and
line_range_graph place main-output node channels at their deck node, from a
static profile or from a per-line position file beside a refined profile.

seabed_friction_aniso read the sway of refined-mesh nodes 38 and 42 (37 and
41 m along the line) through L1N38py/L1N42py while meaning deck nodes; its
gate now reads deck nodes 20 and 21 (38 and 40 m), the grounded run it was
written for.

New ctest node_channels_refined_line runs the reproducer on the static,
dynamic and mixed routes and through the C API. Every output file of the
examples is byte-identical (no example refines). doc/outputs.rst documents
the deck-node numbering on a refined line and how to find the deck nodes in
the full-mesh files; doc/capi.rst, the options and post-processing pages and
the CHANGELOG follow.

validation/PAPER_REPRODUCTION.md adds element OutputRecovery to the paper
mode settings: the article reported the element-mean axial force and the
geometric Hermite curvature, which that option restores.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The article's table was re-run in both modes on the development source at
71158d5. The record now gives those values:

- Tension-only lines no longer use the same scheme in both modes: since the
  force-blended EI = 0 step, alpha_force_blend selects it too, and False
  gives the article's scheme. In paper mode every EI = 0 and finite-EI
  result equals v0.1.0 in every printed digit except the two-point axial
  rule row.
- Two-point axial rule: -922.7 / -810.3 / -264.4 kN (80 / 200 / 800 m)
  after the seabed anchor-end weight-moment fix, from -937 / -820 /
  -280.5 kN; the spurious compression under under-integration stands (F).
- Slack-to-taut rows, defaults: changes 0.0010-1.5410 %, peaks 10.2246 ...
  10.3821 MN, no apparent order; a note states that both blends converge to
  the same 0.25 ms peak and that the article's order 2.69 refers to the
  configuration blend (D).
- One-hour VolturnUS-S, defaults: end-element SD / min / max 0.27 / 1.46 /
  1.05 %, end force 0.27 / 0.26 / 0.50 / 0.43 % and its 12 s Fourier
  amplitude 1.14 % (D); the mean and the end-element Fourier values are
  unchanged.
- Mooring motion envelope: with the defaults a different set of motions is
  subdivided at 0.1 s and the severe-motion peaks changed. Known difference
  gives the peaks against converged 0.5 / 0.25 ms references, and says that
  the force blend removes the spurious semitaut spikes but underestimates
  the all-chain heave peaks at that step, so peak tensions need a smaller
  dtM.
- How to reproduce: paper mode for the EI = 0 test programs
  (GenAlphaConfig%force_blend = .FALSE.), and a toolchain note: gfortran
  gives the v0.1.0 paper-mode values, with 0 rather than 1 of 1200 800 m
  intervals subdivided.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The deck-node map of a refined finite-EI line was available only through
the DeckNode column of .static.out, which the multibody march does not
write, and not at all to in-process users. Python then fell back to mesh
numbering when it placed main-output node channels with a per-line
position file, LinePositions read from one, or position arrays.

- .Line<L>.p.out of a refined line carries a second comment line,
  "# DeckNode" with the deck node of each mesh node (0 for an added node),
  on every route that writes it, the multibody march included. Unrefined
  lines write the file unchanged.
- The C API GetLineValues takes a new quantity CD_C_LINE_DECK_NODE (10):
  the deck node of each node of the final mesh, 1 .. n_nodes on a line
  meshed as the deck. No function is added, so the ABI minor level is
  unchanged; an earlier library rejects the code with CD_C_BAD_INPUT. The
  header comments now say that the line arrays cover every node of the
  final mesh while node channels name deck nodes.
- Python: LineNodeHistory.deck_nodes reads and validates the comment line,
  and Line.deck_nodes queries the C API. profile_at, profiles_at and
  line_range_graph place main-output node channels with a per-line file or
  LinePositions read from one through the file's own map, then through the
  static profile beside it. They fail on a LinePositions taken from a
  multi-line refined static profile instead of guessing. The docs state that
  plain position arrays are numbered as given.
- PAPER_REPRODUCTION.md names its value columns after revision 71158d5.
- test_node_channels_refined.py fails when --library is given but is not a
  file. It checks the .p.out map, placement from a lone per-line file and
  from LinePositions, and Line.deck_nodes. test_c_api_shared checks the new
  quantity on an EI = 0 line.
- orcaflex_discrete_modules_reference.py reads .static.out columns by
  header name, since a refined line has 13 columns. The other .static.out
  readers in validation/ and tests/ already read by name or by leading
  index. test_anchor_uplift skips every comment line of a .p.out file.

Examples remain byte-identical (no example refines).

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 17, 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-17T09:35:51.794294Z 460be42 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 17, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35208031 | 📁 Comparing 460be42 against latest (f27c5e3)

  🔍 Preview build  

29 files changed · ± 29 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: 33cc02d7b3

ℹ️ 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 python/cabledyn/profiles.py Resolved
line_positions(profile, line_id=L) on a multi-line static profile with
a DeckNode column kept only the shared source path, so placing
main-output node channels with the result looked up the profile
without a line and raised for every multi-line profile. LinePositions
now carries the selected line_id (also through window), and the
deck-node lookup uses that line's map. A LinePositions built without a
line still refuses a multi-line profile, as it cannot name one map.

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. Another round soon, please!

Reviewed commit: 460be42abd

ℹ️ 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 10a7b14 into dev Oct 17, 2026
18 of 19 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/node-channels-deck-nodes branch October 17, 2026 11:37
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