Repository navigation
fix: CableDyn deck reader takes the 0.4.x LINE TYPES grammar - #28
Merged
Merged
Conversation
read_cabledyn_deck rejected GJ|K and GJ|K|Bt in the GJ column (torque-tension coupling and torsional damping, CableDyn 0.4.0) and EI|Bb, EI|-zeta|f and EI|-zeta|f1|f2 in the EI column (bending and Rayleigh damping) as "not numeric", so no deck using them could be read. The line type now keeps the numeric EI and GJ and the extra parts as CableDyn resolves them (bending_damping_Nm2s, mass_damping_1_s, torque_tension_coupling_Nm, torsional_damping, polar_inertia_kg_m, and the columns as written), with CableDyn's checks. The tables are read by position, as CableDyn reads them, instead of by header name: a row without a number token is a header or units row and the token count selects the row form. An 11-column LINE TYPES row is the 10 columns and the VIV Cl, so a header naming its last column GJ no longer turns Cl into a GJ, and stock-MoorDyn headers read. END CONNECTIONS TorsStiffness Free, Zero or 0 now leaves the end free in torsion (any token but none, - and 0 restrained it), EndA/End_A name End A, and the restrained ends follow the anchor-first swap (CableDynLine.torsion_restrained_ends). A finite-EI line from a Fixed point to a rod end is swapped as CableDyn swaps it, an END row closes the OUTPUTS list, a quoted name may hold spaces, exponents may be written with D, and a duplicate line type or line id is refused. A line solved in torsion whose type couples torque and tension twists as it stretches, so read_cabledyn_sections needs its Twist channels even when only one end is restrained, and section_channels lists Twist/Torq for a line restrained at either end. tests/data/cabledyn/lw24g.* is a CableDyn 0.4.2 run (development build 4b94321) of a deck with these tokens: Rayleigh and Kelvin-Voigt bending damping, GJ|K|Bt, End A restrained in torsion, END in OUTPUTS. 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. Delightful! 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
Brings in #28. The full_scale taxonomy count becomes 35 passed: 34 on dev plus the Su 35 kV analytical-model test registered here. 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.
Problem
read_cabledyn_deckrejected LINE TYPES tokens that CableDyn accepts:GJ(14-column row),GJEI,EIEIReproduction
While reading CableDyn's parser (
append_type,parse_ei_column,parse_gj_column,append_end_connection,append_line,has_numeric_token), I also found several places where CableXSec read a deck differently from CableDyn:Cl. CableXSec read a column headedGJin that position asGJ, while CableDyn refuses the row (checked:malformed LINE TYPES row). Stock-MoorDyn headers (Mass/m,Cd Ca CdAx CaAx) failed withlacks column 'massdeninair'.TorsStiffness Free/Zerocounted as restrained. A deck with both endsFreewas then refused for want ofTwistchannels.EndA/End_Awere not recognised as End A.Fixedpoint to a rod end (R<N>A/B) was not swapped, and the restrained torsion ends did not follow a swap.ENDrow as channels.Change
CableDynLineTypekeeps the numericei_Nm2/gj_Nm2and the extra parts as CableDyn resolves them:bending_damping_Nm2s,mass_damping_1_s,torque_tension_coupling_Nm,torsional_damping,polar_inertia_kg_m, plusei_token/gj_tokenas written.0 < ζ < 1and positive frequencies;Btonly on a finite-EI type;Kneeds a linear-elasticEA,GJ > 0andK² < EA·GJ;BtneedsGJ > 0andIrn > 0.Btact inside CableDyn's dynamics, so they are already in the histories the reader reconstructs; they are recorded, not used.Kchanges the material frame: a line solved in torsion twists as it stretches (Twist = −Σ (K/GJ)(l − L)with one end free; CableDyn notesTwist1 = −7.7e-3 degforlw24g). The twist-free frame the reader uses withoutTwistchannels would be wrong, so a coupled line restrained at either end now needs itsTwistchannels, andsection_channelslistsTwist/Torqfor a line restrained at either end. Without coupling, a line restrained at one end keeps the documented behaviour:Twistis used when written.Free/Zero/0leave an end free;Rigid/Infinity/Infor a positive stiffness restrain it; anything else is refused.CableDynLine.torsion_restrained_endsrecords the restrained ends in public order.ENDrow closes OUTPUTS;Dexponent is read as an exponent;NumSegs/ids must be integers, so aCableSchemaErrorreplaces the bareValueError.Validation
tests/data/cabledyn/lw24g.*(about 46 KB) is real CableDyn 0.4.2 output (development build 4b94321). The deck islw24with:EI|-zeta|f1|f2andEI|Bb;GJ|K|Bt(negative and positiveBt);EndA … TorsStiffness Rigid;ENDrow in OUTPUTS.test_real_cabledyn_run_with_damped_coupled_line_typeschecks:Twistchannels;Twistchannels is refused, and is read onceK = 0.Unit tests cover every
EI/GJform and error, positional reading, quoted names, the torsion tokens and the swap.Gates
ruff check/ruff format --check(CI command),mypy: cleanpytestwith numba: 4513 passed, 3 skippedpytestwithCABLEXSEC_DISABLE_NUMBA=1: 4399 passed, 117 skippedrun_validation.py --check: not stale; taxonomyfull_scale33 → 34 (analytical_sanity1190,independent_method76 unchanged); registered FAIL rows as before