Repository navigation
fix: CableDyn reader closes the remaining deck and torsion gaps - #30
Merged
Merged
Conversation
EQUIVALENT BUOYANCY rows were ignored, so a line type showed the Diam and MassDenInAir of its LINE TYPES row, not the values CableDyn ran with. A row now replaces the diameter and sets the mass to rhoW pi D^2/4 + w/g, as CableDyn's apply_equivalent_buoyancy does, with its checks; line_types_diameter_m, line_types_mass_kg_m and equivalent_submerged_weight_N_m keep the row's values. CableDyn 0.4.2 gives byte-identical output for the lw24 deck with the row "buoy 0.30 -100.0" and for the deck with buoy written with this diameter and mass. Records are cut and split as CableDyn's scan_comment, is_section_header and token_bounds do: "--" starts a comment at the start of a record or after a separator (a LINES row ending in "-- comment" was refused), a record holding "---" is a header named by its other characters, a byte-order mark is dropped, a repeated section continues (it was refused) and a token opening with a quote runs on to the next separator. "#" and "!" still cut a record inside quotes, as CableDyn does. OUTPUTS rows are split on spaces, tabs and commas with the quotes dropped, and only an unquoted END closes the list. LINE TYPES rows with a negative Cd/Ca, or a 14-column row whose GAs, GJ, Irt and Irn are neither all zero nor all positive, are refused, as by CableDyn. CableDyn solves the torsion of a line restrained at one end only when every section gives GJ, End B is Fixed, a dynamic run is force-blended and a restrained End A on a rod or body is on a Fixed rod or a Rigid6 body (resolve_one_end_torsion); otherwise the line runs as without the torsion columns. CableDynLine.torsion_solved and torsion_note follow these rules (BODIES and RODS rows are read for them), section_channels asks for Twist/Torq only on a solved line, and checks["torsion"] records the case. In the dynamics a solved line twists without torque-tension coupling too (torsional waves of its polar inertia, the roll of the restrained end), so a dynamic run without Twist channels is now refused where it was read twist-free. tests/data/cabledyn/lw24k.* is the lw24g deck with K = 0 run by CableDyn 0.4.2 (development build 4b94321): the line twists by up to -1.7e-3 deg in 1 s (0.18 deg in a 30 s run). Its statics stay twist-free and are read without the channels. The anchor-first swap of a line from a Fixed NodeA to a Free or Connect NodeB applies only when NodeA is not above NodeB, as in CableDyn. run_sea_state_batch compares the deck GJ with the section's lay torsional stiffness K_tt and the coupling ratio K/sqrt(EA GJ) with K_et/sqrt(EA_fixed K_tt), within the new option torsion_rtol (default 25 %), on a 14-column LINE TYPES row. A mismatch stops the batch as one of EA or EI does, unless allow_property_mismatch is set. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
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. |
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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 18, 2026
ci: validation report counts both new full-scale tests #29 and #30 each added one full_scale test and each recorded 35 passed against the 34 on the dev it branched from. On dev with both merged the marker runs 36 passed, 1 skipped; the other two taxonomy lines are unchanged (1190 and 76). 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
Closes the remaining differences between
read_cabledyn_deck/read_cabledyn_sections/ the sea-state batch and what CableDyn actually does with a deck. Each item was checked against the CableDyn source (src/CableDyn_DeckDriver.f90,src/CableDyn_Loads.f90,doc/driver_format.md,doc/theory.rst) and, where a run could show it, against the CableDyn 0.4.2 driver.EQUIVALENT BUOYANCYdiameter_m/mass_kg_mshowed the LINE TYPES row (0.29 m, 59.53 kg/m in the reproduction)line_types_diameter_m/line_types_mass_kg_m,equivalent_submerged_weight_N_m#/!cut everywhere (same as CableDyn); inline-- commentrefused ("UnstrLen is not numeric: '--'"); a repeated section refusedscan_comment,is_section_header,token_bounds,append_channelCd/Caand partialGAs GJ Irt IrnacceptedTwistchannelsresolve_one_end_torsionrules mirrored; a dynamic run of a solved line needs the channelsEAandEIonlyGJand the torque–tension couplingKDetails
Equivalent buoyancy
CableDyn's
apply_equivalent_buoyancyreplaces the type's diameter by the row'sDand its mass bywith
wthe submerged weight [N/m], before it runs. The reader now does the same, with CableDyn's checks (three columns, a known type, one row per type,D > 0,m ≥ 0). Verification: thelw24deck with the rowbuoy 0.30 -100.0and the same deck withbuoywritten asDiam 0.30,MassDenInAir 62.255818443635306(the reader's value) give byte-identical.static.out,.out,.Line1.p.outand.Line1.t.outfrom CableDyn 0.4.2.Records
--starts a comment at the start of a record or after a separator, unless the record holds---;a--bis a token.---is a section header named by its other characters; a section met again continues (CableDyn appends; the reader refused it). Both decks of the reproduction run in CableDyn with the same static state as the base deck.#and!cut a record anywhere, inside quotes too — this is CableDyn's behaviour (doc/options.rst: "A#or!starts a comment even inside a path"), so it is kept and now documented.ENDcloses the list (get_tokenkeeps the quotes, so CableDyn reads"END"as a name).Torsion restrained at one end only
From$A\sin\Omega t$ of the restrained end turns the free end by $A/\cos kL$ . So the twist is not provably zero: it is zero in the statics only (without coupling). The new fixture
doc/theory.rst(a free end): the statics are those of the line without torsion, but "in the dynamics the free end's node has no spring and no held angle ... torsional waves reflect there", and a rolltests/data/cabledyn/lw24k.*(thelw24gdeck withK = 0, CableDyn 0.4.2 build 4b94321) showsTwist1N<J>growing to −1.7e-3° in 1 s; a 30 s run of the deck reaches 0.18° at the sag bend.CableDyn solves such a line only under the rules of
resolve_one_end_torsion(every section givesGJ, End BFixed, a dynamic run force-blended, a restrained End A on a rod or body only on aFixedrod or a Rigid6 body); otherwise it runs it without the torsion columns and refusesTwistchannels. The reader now mirrors those rules (CableDynLine.torsion_solved,torsion_note; BODIES and RODS rows are read for the end types), so:Twistchannels is refused with a message naming the cause; its statics (TMax 0) need none unless the type couples torque and tension;section_channelslistsTwist/Torqonly for solved lines;checks["torsion"]records the case.Also from
normalize_stock_endpoint_order: a line from aFixedNodeA to aFree/ConnectNodeB is swapped only when NodeA is not above NodeB.Batch property check
On a 14-column LINE TYPES row,
GJis compared with CableXSec's lay torsional stiffnessK_tt, andKthrough the coupling ratioagainst$K_{et}/\sqrt{EA_\text{fixed},K_{tt}}$ , both within the new $M = GJ,\tau + K\varepsilon$ , right-handed), the same as CableXSec's
torsion_rtol(default 25 %). The tolerance is wider thanproperty_rtolbecauseK_ttleaves out the components' own torsion and the radial relaxation of the layers (CH-GJ: +26 % and −27 %). The sign ofKis CableDyn's (K_et(a positive twist tightens a right-hand lay). A mismatch is reported and stops the batch exactly as anEA/EIone does; a 10-column row is not compared.Not changed
.V.outand.range.outreading (out of scope).Gates
ruff checkandruff format --checkonsrc tests examples validation release doc(CI command): clean.mypy: no issues in 119 source files.pytest(full suite) with numba: 4546 passed, 3 skipped; withCABLEXSEC_DISABLE_NUMBA=1: 4432 passed, 117 skipped. Three small deck tests (RODS/BODIES row counts, zero-length rods,alpha_force_blendspelling) were added after these runs;tests/test_cabledyn_inputs.py,test_cabledyn_reader.pyandtest_sea_state_batch_inputs.pypass in both modes with them.validation/scripts/run_validation.py --check: report current (58 rows, 5 registered FAIL, 0 REVIEW, 1 PARTIAL). Taxonomy: analytical_sanity 1190, independent_method 76, full_scale 35 (+1, thelw24krun).