Repository navigation
fix: CableDyn reader gaps: range and lift files, hang-off rotation, deck records, TMax - #40
Conversation
…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>
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 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".
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>
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
…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>
|
@codex review |
There was a problem hiding this comment.
💡 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>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
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>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 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". |
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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". |
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..Line<L>.range.outread_cabledyn_range_graph; checked against the run byread_cabledyn_sections.Line<L>.V.outread_cabledyn_lift; its mesh checked byread_cabledyn_sectionsFixed,Body<N>channels, orhang_off_rotation); End B-only restraint turns the free End A by-Twist<L>TMaxTMax(orTMax 0) runs static: refused with that reason; a record ending beforeTMaxis refused; OpenFAST runs are not held againstdtM/TMaxDetails
Range graphs and VIV lift
read_cabledyn_range_graph(path)returns aCableDynRangeGraph: line id, sample count and window from the title, node numbers, CableDyn'sArcLength(deformed chord length att = 0), andCableDynRange(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 aCableDynLift: time, the global force(nt, nodes, 3), theDeckNodenumbering of a refined mesh, streamed in chunks with an optional node subset.On the new fixture
lw24v(thelw24deck withCl 0.8in a 0.3 m/s current, flagsptVr, development build of CableDyn 6c469fe), the range extremes at deck nodes 3, 5, 8 and 12 equal the extremes ofCurv1N<J>andTen1N<J>exactly, and the means agree to the printed digit, as CableDyn documents.When either file lies next to a run,
read_cabledyn_sectionsadds it to the node-count andDeckNodeconsistency check of the line's mesh, checks the range window against the output rows (first row at or afterRangeStart, 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'sNx(withEz), carried to the tangent by the smallest rotation (CableDyn's constant-velocity joint; the identity at aRigidend). Withframe="arc":Fixedpoint, end of aFixedrodBody<N>point or body rod endBody<N>Rx/Ry/Rzchannels (intrinsic x-y'-z''), requiredCoupled/Vesselpoint, turbinehang_off_rotationrequired:(n, 3, 3)attitude matrices,(n,)roll about the tangent ("none"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 theTwist<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_rotationcarries it through the batch (JSON:"none"or nested lists; the manifest records its digest).section_channelsadds theBody<N>R*orTwist<L>channels these need.Known answers (
tests/test_cabledyn_outputs.py,analytical_sanity):1e-91/m; the previous transport turned them by the yaw times the vertical tangent component (about 35° at 40°:1e-12;Twist1turns them byTwist(s) - Twist1.lw24gandlw24k(End A restrained on the RAO vessel, whose attitude the output does not record) are now refused withouthang_off_rotation; thelw24gtest 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_defectandappend_end_connection:VORTEX-INDUCED VIBRATION, whose dashes CableDyn drops first, included);CableDynLine.end_connections,CableDynEndConnection: bending mode and stiffness,Ez, torsion mode and stiffness,Nxorthonormalised againstEz,Pretwist) with CableDyn's checks:none/-torsion stiffness (accepted before), zeroEz, a zero or parallelNxat a restrained end, two rows for one end, an unknown line, anEI = 0line. The anchor-first swap negatesEzandPretwist.CableDynLine.end_kindsnames each end's holder.Routes, tables, arguments
SeaStateBatchOptionstakescurvature_check_rtol,curvature_check_end_rtolandcurvature_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 undercurvature_checkand left out of the assessment digests, which they do not change.The route is the main file's: standalone
.outor OpenFAST.CD.out(checks["route"]). A standalone deck withoutTMax, or withTMax 0, is refused with the reason (one static row); a standalone record must end atTMax(a shorter one is a run that stopped early, or another deck's). An OpenFAST.CD.outis no longer held against the deck'sdtM(OpenFAST rounds it to whole glue steps;checks["deck_dtM_s"]records it) orTMax; a coupled run withFalse alpha_force_blendre-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
CableSchemaErrornaming the file and line (wereValueError,IndexError,UnicodeDecodeError).NaN, infinite or negative curvature check tolerances (a NaN made the check pass silently), a non-integer
line_idand 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 atTMax; the real torsion runs assert the hang-off refusal.tests/data/cabledyn/lw24v.*andlw24t.{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.CABLEXSEC_DISABLE_NUMBA=1: 4636 passed, 120 skipped.python -m mypy: no issues in 119 source files.ruff checkandruff format --checkonsrc tests examples validation release doc: clean.--collect-onlyIDs per marker):analytical_sanity1245 → 1248,full_scale58 → 59,independent_method77 unchanged.Coupled OpenFAST runs of a torsion line (added)
<root>.outbeside<root>.CD.out# CableDyntitle) beside it is refusedCurvX/CurvYaxes on the new fixture (91–124° on the VolturnUS-S case withframe="section")Nx(End B's, rolled by itsPretwist, on End-B-only restraint), carried along the line and turned by the twist, as CableDyn's;frame="section"is refused thereread_cabledyn_sectionscurvature_source="components":CurvX/CurvYat the bracketing deck nodes, exact on CableDyn's axes, no positions or angles neededFixture
tests/data/cabledyn/vu_torsion: the lazy-wave power cable of CableDyn's mixed VolturnUS-S example deck alone, linear EI withGJ, restrained in torsion at both ends, 1 s of OpenFAST v5.0.0 with a CableDyn development build (CompMooring = 5;dtM0.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.