Skip to content

fix: CableDyn reader places finite-EI node tangents at their nodes - #25

Merged
SMI-Lab-Inha merged 1 commit into
devfrom
fix/cabledyn-node-tangents
Nov 17, 2026
Merged

SMI-Lab-Inha merged 1 commit into
devfrom
fix/cabledyn-node-tangents

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

CableDyn 0.4.2 and later write each node's own tangent (the cubic-Hermite tangent DOF) in the L<L>N<J>Dec/Azi channels of a finite-EI line (CableDyn CHANGELOG 0.4.2; line_geom_value/cable_node_tangent in CableDyn_DeckDriver.f90). read_cabledyn_sections still placed every value at the mid-arc of the chord between the neighbouring nodes. Because of that:

  • the End-A (hang-off) tangent sat half an element inside the line;
  • on a non-uniform mesh, interior tangents next to a change of element length were shifted too.

This PR places node tangents at their nodes by default. It also removes the known-limitation text that #15 added to the guide.

What CableDyn writes

Line Dec/Azi value Correct abscissa
finite-EI (any section EI > 0), CableDyn >= 0.4.2 node tangent DOF -m, at a Rigid end the clamp direction the node
EI = 0, every version central chord r(j+1) - r(j-1), one-sided at the ends the chord mid-arc
finite-EI, CableDyn <= 0.4.1 chord, as above the chord mid-arc

The output files carry no version marker. The .out, .p.out, .static.out and .elements.out headers were checked on a 0.4.2 build, so the reader does not try to detect the version.

Changes

  • read_cabledyn_sections(..., tangent_placement="auto" | "chord")
    • "auto" (default): node placement on a finite-EI line, chord mid-arc on an EI = 0 line.
    • "chord": reads finite-EI output of CableDyn 0.4.1 and earlier.
  • The placement is recorded in checks["tangent_placement"] and in the provenance limitations.
  • A failed curvature check now:
    • says whether it came from tangents or positions;
    • states the tolerance it applied (end or interior);
    • names the other tangent_placement value on a finite-EI line.
  • SeaStateBatchOptions.tangent_placement passes the option through from the batch.
  • tests/data/cabledyn/lw128 was regenerated with the CableDyn 0.4.2 driver (dev build 4b94321, same deck).
    • The v0.1.0 run is kept as lw128_v010, so the "chord" option is tested on real chord output.
    • The how-to 10 output follows the new run. The mean sag-bend Te goes from 1.75 to 1.33 kN because of CableDyn's nodal tension recovery (0.2.0+), not this reader.
  • Guide: limitation text removed; added the placement rules, a row in the verification table and the 0.4.2 results. CHANGELOG: entry under Changed.

The bug, measured

lw128 from CableDyn 0.4.2: 0.2 m elements over the first 6 m, then 1.24 m. Each value is the error of the reconstructed curvature against CableDyn's Curv1N<J>, relative to that node's largest value.

chord mid-arc (old) node (new)
Curv1N2 52 % 2.3e-4
Curv1N3 15 % 9.4e-5
Curv1N4, N71-N75 (uniform mesh) 9e-5 to 2e-4 same
largest curvature at 0.25 m (hang-off section) 9.59e-3 1/m (+14.5 %) 8.37e-3 1/m
read with default tolerances fails the curvature check passes

The old reader only failed loudly here because the run writes Curv channels next to the hang-off. Without them it silently returned a hang-off curvature 14.5 % too high, i.e. roughly 50-100 % in damage at S-N slopes 3-5.

A local run of the 24-element deck (6.8 m elements at the clamped hang-off) was not committed. On it the old placement gave 2.8 times the hang-off curvature: 2.81e-2 against 1.00e-2 1/m.

The reverse case is also covered. lw128_v010 read with "chord" agrees to 1.4 % (N2) and 1.0 % (N3); read with node placement it is off by 15.5 % and 4.9 %.

Tests

  • test_node_tangents_of_a_finite_ei_line_sit_at_the_nodes: exact arc on a non-uniform mesh, checked at End A, the mesh junction, mid-span and End B. The error is below 1e-4 relative. Read as chords, End A comes out above 1.5 κ.
  • test_chord_tangents_sit_at_the_chord_mid_arcs[EI=0-auto, EI>0-chord].
  • test_tangent_placement_is_checked.
  • test_real_cabledyn_run_from_channels: 0.4.2 output.
    • Every checked node agrees to 1e-3.
    • Read with "chord", it raises with the option named.
  • test_real_cabledyn_v010_run_with_chord_tangents.
  • test_tangent_placement_reaches_the_reader (batch).
  • The synthetic tangent tests now write node tangents, as 0.4.2 does.

With the reader change reverted, 8 reader tests and the how-to 10 recipe test fail.

Gates

Gate Result
ruff check / ruff format --check (CI command) clean
mypy 0 errors (119 files)
pytest with numba 4439 passed, 3 skipped
pytest, CABLEXSEC_DISABLE_NUMBA=1 4325 passed, 117 skipped
run_validation.py --check current after the taxonomy update
Taxonomy analytical_sanity 1180 -> 1183, independent_method 76, full_scale 31 -> 32

Not changed (reported separately)

  • Tension (Ten nodes, .t.out element midpoints), Twist/Torq and CurvX/CurvY station tables already read at the correct locations.
  • Mesh refinement: tensile_safety/adaptive_mesh runs whose static solve refined the mesh (# DeckNode line) are still rejected with "mesh ... differs from the deck sections".
  • Deck parsing: the GJ|K|Bt tokens (CableDyn 0.4.0+) and the EI|Bb / EI|-zeta|f[|f2] tokens (CableDyn dev) are rejected as non-numeric.

CableDyn 0.4.2 and later write the node's own cubic-Hermite tangent in
the L<L>N<J>Dec/Azi channels of a finite-EI line. read_cabledyn_sections
placed every value at the mid-arc of the chord between the neighbouring
nodes, so the hang-off tangent sat half an element inside the line and,
on a non-uniform mesh, interior tangents near a change of element length
were shifted too. On the 128-element lazy-wave run of CableDyn 0.4.2
(0.2 m elements at the hang-off) the curvature at node 2 departed from
CableDyn's Curv by 52 % and at node 3 by 15 %; without Curv channels the
largest curvature 0.25 m from the hang-off came out 14.5 % high. Placed
at the nodes, every checked node agrees to 2.5e-4.

- tangent_placement="auto" (default): node tangents of finite-EI lines at
  the nodes, chords of EI = 0 lines at their mid-arcs; "chord" reads
  finite-EI output of CableDyn 0.4.1 and earlier (the files carry no
  version marker). The placement is recorded in checks and provenance;
  a failed curvature check names the option and the tolerance applied.
- SeaStateBatchOptions.tangent_placement forwards it from the batch.
- tests/data/cabledyn/lw128 regenerated with CableDyn 0.4.2; the v0.1.0
  run is kept as lw128_v010. How-to 10 output follows the new run.
- Guide: known-limitation text removed; placement, verification row and
  0.4.2 results added. CHANGELOG: Changed.

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 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T20:24:34.581354Z 5da42f3 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

📚 CableXSec | 🛠️ Build #35967018 | 📁 Comparing 5da42f3 against latest (240bf9c)

  🔍 Preview build  

18 files changed · ± 18 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 5da42f3bf9

ℹ️ 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 a9fed2a into dev Nov 17, 2026
12 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/cabledyn-node-tangents branch November 17, 2026 21:06
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