Skip to content

fix: CableDyn reader gaps: range and lift files, hang-off rotation, deck records, TMax - #40

Merged
SMI-Lab-Inha merged 7 commits into
devfrom
fix/cabledyn-reader-gaps
Nov 19, 2026
Merged

SMI-Lab-Inha merged 7 commits into
devfrom
fix/cabledyn-reader-gaps

Conversation

@SMI-Lab-Inha

@SMI-Lab-Inha SMI-Lab-Inha commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes the open gaps of the CableDyn readers before 0.2.0. Each item was checked against the CableDyn source (src/CableDyn_DeckDriver.f90, src/CableDyn_RangeOutput.f90, src/CableDyn_Conventions.f90) and manual (doc/outputs.rst, doc/driver_format.md, doc/conventions.rst, doc/options.rst), and, where a run could show it, against the CableDyn driver.

Gap Before Now
.Line<L>.range.out not read read_cabledyn_range_graph; checked against the run by read_cabledyn_sections
.Line<L>.V.out not read read_cabledyn_lift; its mesh checked by read_cabledyn_sections
Hang-off turn about its own tangent ignored: End A frame transported in time without twist held by End A's holder on a line solved in torsion (Fixed, Body<N> channels, or hang_off_rotation); End B-only restraint turns the free End A by -Twist<L>
Unknown section header skipped silently refused with the deck line, as CableDyn refuses it
Deck without TMax taken as a marching deck a standalone deck without TMax (or TMax 0) runs static: refused with that reason; a record ending before TMax is refused; OpenFAST runs are not held against dtM/TMax

Details

Range graphs and VIV lift

read_cabledyn_range_graph(path) returns a CableDynRangeGraph: line id, sample count and window from the title, node numbers, CableDyn's ArcLength (deformed chord length at t = 0), and CableDynRange (min, max, mean, unit) per quantity: tension, curvature, bend moment, declination, with a seabed clearance, on a line solved in torsion torque and twist. The title, every column name and its order, the units row, consecutive nodes, finite values, an arc length from 0 that increases, Min <= Mean <= Max (within the last printed digit) and the line id of the file name are checked.

read_cabledyn_lift(path, nodes=None) returns a CableDynLift: time, the global force (nt, nodes, 3), the DeckNode numbering of a refined mesh, streamed in chunks with an optional node subset.

On the new fixture lw24v (the lw24 deck with Cl 0.8 in a 0.3 m/s current, flags ptVr, development build of CableDyn 6c469fe), the range extremes at deck nodes 3, 5, 8 and 12 equal the extremes of Curv1N<J> and Ten1N<J> exactly, and the means agree to the printed digit, as CableDyn documents.

When either file lies next to a run, read_cabledyn_sections adds it to the node-count and DeckNode consistency check of the line's mesh, checks the range window against the output rows (first row at or after RangeStart, last row, sample count) and records the file's digest.

Hang-off rotation

The Twist<L>N<J> channels start at 0 at End A, and a turn of the hang-off about its own tangent is not visible in the geometry. It turns the material frame when CableDyn solves the line in torsion with End A restrained: End A's frame is held by its holder, which turns the end connection's Nx (with Ez), carried to the tangent by the smallest rotation (CableDyn's constant-velocity joint; the identity at a Rigid end). With frame="arc":

End A holder End A frame
Fixed point, end of a Fixed rod held still
Body<N> point or body rod end Body<N>Rx/Ry/Rz channels (intrinsic x-y'-z''), required
Coupled/Vessel point, turbine hang_off_rotation required: (n, 3, 3) attitude matrices, (n,) roll about the tangent ($\psi=\int\boldsymbol\omega\cdot\mathbf t,dt$), or "none"
free in torsion, or torsion not solved twist-free, as before

A line restrained at End B only turns its free End A by $-$Twist<L> against End B's frame carried along the line (doc/conventions.rst), built from the positions of every node and the Twist<L> channel. frame="section" represents neither and is refused where either applies. checks["hang_off"] records the rule and the extent of the turn; SeaStateRun.hang_off_rotation carries it through the batch (JSON: "none" or nested lists; the manifest records its digest). section_channels adds the Body<N>R* or Twist<L> channels these need.

Known answers (tests/test_cabledyn_outputs.py, analytical_sanity):

  • a line turned rigidly about the vertical with the body holding its restrained End A (60° hang-off dip, yaw 0 to 40°) keeps its curvature components to 1e-9 1/m; the previous transport turned them by the yaw times the vertical tangent component (about 35° at 40°: $k_x$ 0 to −0.028 1/m on a 0.05 1/m bend); attitude matrices give the same result to 1e-12;
  • a given roll $\psi$ turns the components as $(k_x + i k_y)e^{-i\psi}$;
  • End B-only restraint with a growing Twist1 turns them by Twist(s) - Twist1.

lw24g and lw24k (End A restrained on the RAO vessel, whose attitude the output does not record) are now refused without hang_off_rotation; the lw24g test asserts that, and both are read with "none".

Deck records

As CableDyn's next_record, is_section_header, set_section, record_charset_status, real_value_defect and append_end_connection:

  • every section CableDyn knows is accepted (the rows of those the reader does not use are skipped); any other header is refused with the deck line (VORTEX-INDUCED VIBRATION, whose dashes CableDyn drops first, included);
  • a record over 512 bytes without a comment in them, a NUL or non-ASCII whitespace character outside a comment, and a subnormal number are refused with the deck line; bytes that are not UTF-8 are kept (CableDyn reads bytes), and names split on CableDyn's six separators only;
  • END CONNECTIONS rows are parsed whole (CableDynLine.end_connections, CableDynEndConnection: bending mode and stiffness, Ez, torsion mode and stiffness, Nx orthonormalised against Ez, Pretwist) with CableDyn's checks: none/- torsion stiffness (accepted before), zero Ez, a zero or parallel Nx at a restrained end, two rows for one end, an unknown line, an EI = 0 line. The anchor-first swap negates Ez and Pretwist. CableDynLine.end_kinds names each end's holder.

Routes, tables, arguments

  • SeaStateBatchOptions takes curvature_check_rtol, curvature_check_end_rtol and curvature_check_atol_1_m (a coarse run that fails the check at the default could not be read by the batch). They are recorded in the manifest under curvature_check and left out of the assessment digests, which they do not change.

  • The route is the main file's: standalone .out or OpenFAST .CD.out (checks["route"]). A standalone deck without TMax, or with TMax 0, is refused with the reason (one static row); a standalone record must end at TMax (a shorter one is a run that stopped early, or another deck's). An OpenFAST .CD.out is no longer held against the deck's dtM (OpenFAST rounds it to whole glue steps; checks["deck_dtM_s"] records it) or TMax; a coupled run with False alpha_force_blend re-applies CableDyn's torsion rule for a marching run.

  • Malformed history rows, non-numeric or missing profile cells, units rows of the wrong length and files that are not text raise CableSchemaError naming the file and line (were ValueError, IndexError, UnicodeDecodeError).

  • NaN, infinite or negative curvature check tolerances (a NaN made the check pass silently), a non-integer line_id and non-numeric section names or arcs are refused before any file is read.

Tests

  • tests/test_cabledyn_outputs.py (new): range and lift files of real runs, their error paths, CRLF and trailing blank lines, the consistency checks, routes, the hang-off known answers and errors, the batch field.
  • tests/test_cabledyn_inputs.py: CableDyn's sections and refused records, END CONNECTIONS rows, argument checks, malformed tables.
  • tests/test_cabledyn_reader.py: synthetic runs end at TMax; the real torsion runs assert the hang-off refusal.
  • Fixtures: tests/data/cabledyn/lw24v.* and lw24t.{dat,Line1.range.out} (164 kB and 15 kB).

Gates

After merging dev (3a37d3d: #42, #43, #48, #49) at 19f8887:

  • pytest (full suite, venv with the CI wheels, NUMBA_NUM_THREADS=1): 4752 passed, 4 skipped.
  • With CABLEXSEC_DISABLE_NUMBA=1: 4636 passed, 120 skipped.
  • python -m mypy: no issues in 119 source files. ruff check and ruff format --check on src tests examples validation release doc: clean.
  • Taxonomy (from the change in --collect-only IDs per marker): analytical_sanity 1245 → 1248, full_scale 58 → 59, independent_method 77 unchanged.

Coupled OpenFAST runs of a torsion line (added)

Gap Before Now
OpenFAST root: glue-code <root>.out beside <root>.CD.out refused: "both x3.out and x3.CD.out exist" the CableDyn file is read; only a CableDyn driver table (# CableDyn title) beside it is refused
Section axes on a line solved in torsion seeded by the reference vector: 90° from CableDyn's CurvX/CurvY axes on the new fixture (91–124° on the VolturnUS-S case with frame="section") start at End A's torsion normal Nx (End B's, rolled by its Pretwist, on End-B-only restraint), carried along the line and turned by the twist, as CableDyn's; frame="section" is refused there
CableDyn's components not read by read_cabledyn_sections curvature_source="components": CurvX/CurvY at the bracketing deck nodes, exact on CableDyn's axes, no positions or angles needed

Fixture tests/data/cabledyn/vu_torsion: the lazy-wave power cable of CableDyn's mixed VolturnUS-S example deck alone, linear EI with GJ, restrained in torsion at both ends, 1 s of OpenFAST v5.0.0 with a CableDyn development build (CompMooring = 5; dtM 0.025 s runs as 0.02 s). The tangent route now agrees with (-CurvY, CurvX) within 1.15 % at 21 m and 0.33 % at 59 m and 131 m, inside the reader's own tolerance (5 % plus 2e-5 1/m); the components route is exact.

…eck records, TMax

The range graph <root>.Line<L>.range.out (OpenFAST <root>.CD.Line<L>.range.out)
and the VIV lift file <root>.Line<L>.V.out were not read. They are now read
by read_cabledyn_range_graph and read_cabledyn_lift, checked column by column
against CableDyn's layout; on the new lw24v run the range extremes equal the
extremes of the node channels exactly, as CableDyn documents. Next to a run,
read_cabledyn_sections checks either file against it (the mesh and the range
window) and records its digest.

The hang-off's turn about its own tangent did not reach the material frame:
the End A frame was transported in time without twist. On a line CableDyn
solves in torsion with End A restrained it is now held by End A's holder: a
Fixed point or rod holds it, a Body<N> turns it with its Body<N>Rx/Ry/Rz
channels, and a vessel, platform or turbine, whose attitude the output does
not record, needs the new hang_off_rotation (attitude matrices, a roll
history, or "none"; also a SeaStateRun field), or the run is refused. A line
restrained at End B only turns its free End A by -Twist<L> against End B's
frame. A line turned rigidly with its body by 40 deg at a 60 deg hang-off
read its components turned by 35 deg; it now keeps them to round-off.

The deck reader mirrors CableDyn's records: a section header CableDyn does
not know was skipped and is refused with its deck line, as are a record over
512 bytes without a comment, a NUL or non-ASCII whitespace character outside
a comment, a subnormal number and the END CONNECTIONS rows CableDyn refuses
(now kept as CableDynLine.end_connections). Bytes that are not UTF-8 no longer
stop it.

A standalone deck without TMax (or with TMax 0) runs static and writes one
row; it is refused with that reason, and so is a standalone record that ends
before TMax. An OpenFAST .CD.out is no longer held against the deck's dtM,
which OpenFAST rounds to whole glue steps. Malformed rows and cells, files
that are not text, NaN or negative curvature check tolerances, a non-integer
line_id and non-numeric section arcs raise CableSchemaError naming the item.
The sea-state batch takes the curvature check tolerances of the reader.

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 19, 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-19T18:58:25.619550Z 19f8887 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 Nov 19, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableXSec | 🛠️ Build #36022268 | 📁 Comparing 19f8887 against latest (240bf9c)

  🔍 Preview build  

24 files changed · ± 24 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: 7ccce36267

ℹ️ 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 src/cablexsec/io/cabledyn.py Resolved
A read from main-table channels needs only the deck nodes. A range file of a
refined mesh numbers the mesh nodes but names no deck nodes (its arc length
is deformed), so on its own it made the read fail for want of a DeckNode
map. It now joins the node-count check only when another mesh file is
present; checks["range_graph"] records whether it was checked.

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. Hooray!

Reviewed commit: b71b01c065

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

…and reads OpenFAST roots

An OpenFAST root holds the glue-code <root>.out beside CableDyn's
<root>.CD.out, and the reader refused it as two runs. It now reads the
CableDyn file and refuses only a CableDyn driver table there.

On a line CableDyn solves in torsion, the reconstructed section axes started
at the reference vector while CableDyn's CurvX/CurvY axes start at End A's
torsion normal Nx (End B's, rolled by its Pretwist, on a line restrained at
End B only), carried along the line and turned by the twist. On a coupled
VolturnUS-S run of the mixed example's lazy-wave cable restrained at both
ends (new fixture vu_torsion, OpenFAST v5.0.0 with a CableDyn development
build) the axes stood 90 deg away; the arc frame now starts at Nx and the
components agree with (-CurvY, CurvX) within 0.3 to 1.2 %. frame="section",
which cannot carry these axes, is refused on such a line.

curvature_source="components" reads CurvX/CurvY at the deck nodes around a
section: exact on CableDyn's axes, with no node positions or angles.

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 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: 40f8b1252a

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

Two assessments of the same files with different hang_off_rotation values
turn the material frame differently, but had the same inputs_sha256. Each
run's rotation record now enters the digest when any run gives one; without
one the digests of existing inputs are unchanged.

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 it up!

Reviewed commit: 8b8ff9211e

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

Taxonomy recounted: analytical_sanity 1203 (dev 1200 + 3), full_scale 59
(dev 58 + 1).

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 it up!

Reviewed commit: fbe4ada66c

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

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. 🎉

Reviewed commit: d38b08c1f3

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

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. Chef's kiss.

Reviewed commit: 19f888799c

ℹ️ 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 12be20f into dev Nov 19, 2026
14 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/cabledyn-reader-gaps branch November 19, 2026 20:10
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