Skip to content

fix(dynamics): stop EI=0 tension spikes at slack/taut switching - #20

Merged
SMI-Lab-Inha merged 11 commits into
devfrom
fix/ei0-slack-dynamics
Oct 16, 2026
Merged

SMI-Lab-Inha merged 11 commits into
devfrom
fix/ei0-slack-dynamics

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

Summary

Tension-only (EI = 0) lines produced silent tension spikes of 5x to 360x when parts of a line went slack, at the default rhoInf = 0.4 and every dtM from 0.002 to 0.2 s. The dynamics robustness campaign found them on realistic input:

Case Before Reference (rhoInf = 0, fine dtM, finite-EI)
Light, axially stiff cable (80 kg/m, EA 8e8 N), 3 m heave, dtM 0.0025 s 4.2 MN fairlead, 3.4 MN anchor 0.1–0.18 MN
Same cable, dtM 0.1 s 20 MN anchor
Same cable, JONSWAP Hs 8 m 0.41 MN anchor 0.043 MN
Shipped viscoelastic polyester, 15 m surge 2.69 MN 1.80 MN
Semi-taut chain–polyester leg 9.5 MN anchor 4.6 MN

Two mechanisms, both confirmed:

  • Configuration blend. The axial force was evaluated at q_α = (1 − α_f) q_{n+1} + α_f q_n. A segment slack at the start of a step and taut at q_α then ended the step stretched beyond it, q_{n+1} = (q_α − α_f q_n)/(1 − α_f).
  • Energy-creating release. A segment going from taut to slack within a step returned α_f T_n (e_n − e_{n+1}) of work while it had stored only T_n e_n / 2.

Fix

  • The step now blends forces, (1 − α_f) r(q_{n+1}, v_{n+1}) + α_f r(q_n, v_n), as the finite-EI path does, for the axial force and every dynamic load: damping, viscoelastic and Syrope laws, seabed, drag, Froude–Krylov and buoyancy. Added mass stays at q_α. The step-start force is recomputed at the committed state, so no state is added and restarts stay exact.
  • A segment released from taut to slack within a step carries at most its discrete energy gradient, W_n/(e_n − e_{n+1}), with a consistent tangent. Viscoelastic and Syrope segments are capped the same way with their law tension.
  • Results: at the default rhoInf the reproducers now give 0.14 / 0.08 MN, 0.092 / 0.096 MN, 0.075 / 0.043 MN and 1.80 MN, matching their references. The stiff-seabed line, which failed the plausibility guard, now runs to completion.
  • Opt-out: False alpha_force_blend (until now finite-EI only) selects the former scheme for EI = 0 lines too. Lines built by the C API without a deck always take the force blend.
  • modified_newton on EI = 0 lines now rebuilds the tangent when an iterate reduces the residual by less than a factor four, as the manual states.

Run audit and notes (standalone driver)

On the initial state and at every output step the driver tracks three things:

  • the largest turn of a taut segment's chord;
  • slack→taut snaps;
  • non-physical spikes: a segment above 4x its own tension one step before and after, 10x the line maximum, and the initial maximum.

The first spike per line is a warning. The run ends with notes when:

  • a taut segment turned by more than 1° in one step (tension statistics err by about 1 % above it);
  • snaps happened while the axial wave crosses a segment more than once per step;
  • rhoInf is above 0.95 (no numerical dissipation).

Effect on results

  • Taut lines keep their accuracy. On a linear element the scheme is unchanged. Every MoorDyn-C, OrcaFlex, analytic and experimental comparison that runs locally still passes, and its reported error moves by at most 0.35 percentage points. The snap-load peak at 20 ms improves from 2.76 % to 1.6 % (see VALIDATION.md).
  • Bergdahl record rerun: RMSE 1.58 → 1.59 N, MAPE 3.11 → 3.12 %. The waveform metrics need the article's expData.dat; they stay those of the previous executable, as the provenance states.
  • OpenFAST and FAST.Farm records using EI = 0 dynamics were rerun with this branch and are unchanged within their recorded figures: linearisation A/B, FAST.Farm shared mooring 600 s, active tension, settled statics, coupled chain, coupled torsion with restart, Lozon, and the one-hour touchdown run.
  • Every EI = 0 dynamic output changes. Over the shipped examples, tension statistics change by at most 0.23 % (mean) and 0.9 % (max). The exceptions are the two als_volturnus decks, whose pre-failure anchor snap at 250 s is resolved by one or two samples and peaks 10 % lower.
  • Unchanged: static runs and finite-EI lines.
  • Cost: up to 6 % more wall time on EI = 0 dynamic decks.
  • Dynamics campaign (746 decks): 704 complete either way, and none warns.

Tests

  • The force-blended step's free tangent against a central difference on a three-segment chain: banded and dense, all taut, release cap active, and slack at both states (1.5e-10). Removing or flipping the cap's derivative fails it.
  • The cap of a callback-carried law: closed form and FD tangent on both paths.
  • A warm re-solve equals a cold solve bit for bit.
  • The slack-snap reproducers, the viscoelastic and Syrope slack runs, the run audit notes and the spike warning.
  • Full suite, Windows, gfortran, Release, slow tier included: 262/262. Python: 1969 passed. pre-commit run --all-files and the Sphinx build with -W pass.

Checklist

  • pre-commit run --all-files passes
  • ctest --test-dir build --output-on-failure passes
  • python -m pytest tests python/tests passes (if Python or validation records changed)
  • VALIDATION.md updated if a validation result changed
  • CHANGELOG.md updated under [Unreleased] (heading added if missing) for user-visible changes
  • Documentation in doc/ updated for changed inputs, options, or outputs
  • Conventional Commit title (feat:, fix:, docs:, ...)
  • Commits are signed off (git commit -s) under the
    Developer Certificate of Origin

EI=0 lines produced silent tension spikes of 5x to 360x when parts of a
line went slack, at the default rhoInf = 0.4 and every dtM: a light,
axially stiff cable under a 3 m, 10 s heave reached 4.2 MN at the
fairlead against about 0.13 MN, and in a JONSWAP Hs 8 m sea its anchor
read 0.41 MN against 0.043 MN. Two mechanisms, both confirmed:

- The tension-only force was evaluated at the blended state q_alpha, so
  the end-of-step state extrapolated past it and a segment slack at the
  start of a coarse step ended it over-stretched.
- At fine steps, a segment released from taut to slack within a step
  returned alpha_f T_n (e_n - e_{n+1}) of work while it had stored only
  T_n e_n / 2, so any release deeper than 0.75 e_n created energy and
  fed a rattle of one-step spikes.

The EI=0 residual now blends forces, (1 - alpha_f) r(q_{n+1}) +
alpha_f r(q_n), for the axial force and every dynamic load (added mass
stays at q_alpha), with the step-start force recomputed at the committed
state so restarts stay exact; and an element going taut to slack within
a step carries at most the force that returns its stored strain energy.
A linear element reduces to the old scheme. False alpha_force_blend
restores the old scheme byte for byte. modified_newton now refreshes the
tangent when the residual contracts by less than a factor 4, as the
manual states.

All reproducers now agree with their small-dt, rhoInf = 0 or finite-EI
references (light cable at dt 0.1 s: anchor 20 MN -> 0.096 MN; JONSWAP
anchor 0.41 MN -> 0.0431 MN against 0.0429 MN; viscoelastic polyester
under 15 m surge: 2.69 MN -> 1.795 MN against 1.797 MN). New notes: a
time-step advisory for taut EI=0 segments turning more than 1 degree in
a step, a snap note when the step does not resolve the axial wave, a
once-per-line warning for non-physical tension spikes (no warning in
704 completed campaign runs; flags 37 of 49 old spiking runs), and a
note for rhoInf > 0.95, whose loss of dissipation lets a loose Newton
tolerance accumulate.

EI=0 dynamic outputs change: example tension means by at most 0.23 %,
maxima by at most 0.9 %, except the anchor snap of the als_volturnus
decks (10 % lower, failure time unchanged). Local validation records
change within their gates (L3-2 swing 8.405 -> 8.411 %, snap-load error
2.76 -> 1.62 %, Bergdahl RMSE 1.580 -> 1.587 N). Cost 1-6 % wall time.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
- A probe of CD_Cable_Gen_Alpha_Step (optional probe_q/probe_R/probe_K,
  used by tests only) returns the residual and free tangent of the
  force-blended step at a given state without iterating. The new test
  compares the tangent with a central difference on a three-segment
  tension-only chain, banded and dense, with all segments taut, with
  the release cap active and with a segment slack at both states
  (1.5e-10 relative); removing or flipping the cap's derivative fails
  it. It also asserts the snap note.
- The turn advisory counts a segment as taut only above 1e-3 of the
  initial line tension, so a nearly slack segment turning freely no
  longer triggers it; the spike warning needs at least three segments.
- The CHANGELOG states that the modified_newton tangent refresh applies
  to every EI = 0 line, also under False alpha_force_blend, and the
  junction query documents that a warm re-solve must start from the
  same committed state.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The 30-condition Bergdahl chain record and its refinement study are
rerun with the force-blended step: RMSE 1.58 -> 1.59 N, MAPE 3.11 ->
3.12 %, mean bias +0.46 -> +0.45 N, Pearson and Lin unchanged; the
spatial and temporal refinement differences fall from 0.49 % and
0.28 % to 0.34 % and 0.22 %, and the T 1.25 s maxima at 0.625 ms and
0.15625 ms move to 71.7 N and 67.9 N. The comparison and refinement
summaries, aggregate metrics and provenance hashes are regenerated.
The waveform metrics need the article's expData.dat, which was not
available, and stay those of the previous executable, as provenance
and the README now state.

The OpenFAST and FAST.Farm records that use EI = 0 dynamics were rerun
with this branch and are unchanged within their recorded figures:
linearisation A/B, the FAST.Farm shared-mooring 600 s A/B, the active
tension A/B, the settled statics, the coupled chain A/B (1200 s,
controller-free), coupled torsion with restart, the Lozon coupled test
and the one-hour coupled touchdown run.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The release cap of the force-blended EI = 0 step bounded only elastic
segments: the viscoelastic and Syrope segments have ea_dyn = 0 (their
law is a load contributor), so their committed tension entered the
alpha_f share uncapped, the energy-creating release the cap exists to
prevent, and the run audit skipped them.

- CD_Cable_Gen_Alpha_Step takes start_tension, the step-start tension of
  the segments whose law a load callback carries; the cap bounds their
  alpha_f share with the same W_n/(e_n - e_{n+1}), W_n = T_n e_n/2 (the
  energy of the viscoelastic springs at rest, an upper bound below a
  stiffening Syrope curve), and the same consistent tangent. The line
  model passes the law tensions of its committed state with the
  step-start load (one law evaluation, model_contributor_force).
  A lightly damped viscoelastic light cable in 3 m heave at dtM 0.1 s:
  anchor peak 0.081 MN, 0.145 MN uncapped, 0.076 to 0.094 MN at 0.5 to
  2.5 ms. A taut Syrope line in 4 m surge going slack: 1.64 MN at 0.1 s
  with or without the cap, 1.78 MN at 1 and 2.5 ms; no spike warning.
- The run audit takes the law tension of viscoelastic and Syrope
  segments (shared with CD_Get_Model_Tension through model_law_tensions)
  and their dynamic stiffness for the snap Courant number.
- Every driver route that audits now audits the initial state before
  its march, so the audit's initial tension is that of t = 0.
- A call that is not an armed re-solve drops the step-start data of the
  workspace (and the model's step-start load) before its first return:
  an unarmed call failing early no longer leaves an older step's data to
  a later armed re-solve.
- Tests: the cap of a callback-carried law (closed form, start_tension
  entries of elastic segments ignored, FD tangent on both paths); the FD
  tangent and closed form of the blended dynamic load with drag, a
  position load and added mass; a warm re-solve equals a cold solve bit
  for bit while given wrong start data, and recomputes them after an
  early-failing unarmed call; the viscoelastic and Syrope slack runs.

Shipped examples: outputs bit-identical, no new notes or warnings.
Dynamics robustness campaign (746 decks): 704 runs complete either way
and none warns; the viscoelastic runs change their peaks by at most
0.34 % and now carry the turn and snap notes of their segments, and two
chain runs count one snap fewer (the initial tension of t = 0).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
- theory: an EI = 0 line holds the fluid fields the host samples for
  t_{n+1} over the step, so both shares of the force blend (and the
  configuration blend at q_alpha) use them; the finite-EI path evaluates
  its end share at t_{n+1} and reuses r_n from its own t_n. The release
  cap covers the viscoelastic and Syrope segments; the seabed contact
  lift-off is not capped (its bound is stated). The run audit starts
  from the initial state and audits the law tensions.
- options, capi: the rhoInf note is printed by the standalone driver;
  CableDyn_InitLine(s) always take the force-blended step and cannot
  select the configuration blend (no ABI change).
- VALIDATION, Bergdahl provenance: the two waveform RMSEs come from the
  2026-10-09 executable; the record is labelled as an unreleased
  development build (v0.1.1+dev (unreleased)), which the records test
  accepts until the next version bump. The snap-load figure before the
  force blend is 2.76 %, the value published as 2.7 %.
- CHANGELOG entries updated accordingly.

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 Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T19:31:09.302110Z f227a80 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 Oct 16, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35199578 | 📁 Comparing f227a80 against latest (f27c5e3)

  🔍 Preview build  

21 files changed · ± 21 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 87ee8acda5

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

The viscoelastic light cable in 3 m heave at dtM 0.1 s peaks at the
anchor at 8.1e4 N with gfortran on Windows and 5.6e4 N on Linux: at
that step the snap is not resolved in time (the run notes it), so the
peak depends on round-off. The test's lower bound of 6.5e4 N failed on
Linux; it now only asks that the snap reaches the anchor (4.0e4 N). The
upper bound of 1.0e5 N, which checks the release cap against the
1.45e5 N of the uncapped law segments, is unchanged. The CHANGELOG and
theory quote the range 0.056 to 0.081 MN.

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. More of your lovely PRs please.

Reviewed commit: 9923d96d66

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

The run-audit case drives the light cable with the configuration blend
(False alpha_force_blend), whose non-physical spikes make the run
chaotic: on two Linux CI runners the same commit completed once and was
stopped fail-closed by a later spike once, so the snap note printed at
the end of the run was missing. The configuration-blend run is now
only required to warn at its first spike; the snap note is checked on
the force-blended run of the same cable, which notes its snaps on every
platform. A driver run that stops prints the end of its log.

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: 1d03379c5e

ℹ️ 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/CableDyn_Dynamic.f90 Resolved
The force-blended EI = 0 step keeps alpha_f T_n of a tension-only element
along its step-start chord t_n for the whole step. Over the relative end
displacement d_{n+1} - d_n that constant force returns alpha_f T_n p, with
the projected shortening p = |d_n| - t_n . d_{n+1}, not alpha_f T_n
(e_n - e_{n+1}). The release cap bounded the latter, so a segment that
turns as it goes slack still returned far more than its strain energy
W_n = T_n e_n / 2: a segment stretched 0.1 % that turns by 90 degrees and
ends 0.1 % slack returned 160 J against 0.32 J, and a reversed chord up to
1100 W_n.

The cap now bounds the work of the element's whole blend by W_n. The
element carries along t_n the smaller of alpha_f T_n and
(W_n + (1 - alpha_f) T_{n+1} p_{n+1}) / p, with p_{n+1} = |d_{n+1}| -
t_{n+1} . d_n the displacement the end share works through. An element
that ends slack carries W_n / p and returns exactly W_n. On a taut end
state T_{n+1} = T_n e_{n+1} / e_n (the elastic tension; a secant for the
viscoelastic and Syrope segments), so the cap fades out as the end state
crosses the rest length and the residual stays continuous in q_{n+1}; a
cap on slack end states alone would jump there by up to alpha_f T_n. It
acts on a taut end state only when the element turned and ends below
alpha_f / (1 - alpha_f) T_n, and never on an element that keeps its
direction and ends taut, so taut lines are unchanged. Since the numerator
is at least W_n / 2, 4 alpha_f p <= e_n decides an inactive cap without a
root. The tangent follows from dp/dd_{n+1} = -t_n, dT_{n+1}/dd_{n+1} =
k t_{n+1} and dp_{n+1}/dd_{n+1} = t_{n+1} - (|d_n| / |d_{n+1}|)(t_n -
(t_n . t_{n+1}) t_{n+1}), on the banded and the dense path.

Tests: the blend of a segment turned by 0 to 180 degrees and ending slack
or taut returns at most W_n (1143 W_n before), and its force is continuous
across the rest length; the finite-difference tangent of turning releases
(slack end, taut end capped, taut end uncapped) and of turning law
segments agrees to about 1e-10, now required below 1e-8 for every case.

Every shipped example deck gives byte-identical output except the two
als_volturnus line-break decks, whose tension statistics move by less than
1e-4. On the light-cable reproducer the energy the internal forces create
falls from 0.19 J to 4e-4 J; its unresolved fairlead snap peaks at 0.10 MN
instead of 0.14 MN, within the 0.10 to 0.18 MN it takes at steps down to
0.25 ms. The viscoelastic light cable peaks at 0.072 MN at the anchor
(0.087 to 0.095 MN at 0.5 to 2.5 ms). The snap-load peak at 20 ms moves
from 1.62 % to 1.54 % of its 0.5 ms reference. The Bergdahl matrix, rerun,
moves from RMSE 1.59 N and MAPE 3.12 % to 1.58 N and 3.13 %, its
refinement differences to 0.52 % (mesh) and 0.19 % (step). The theory
page, the changelog, the validation record and the Bergdahl experiment
files carry the new numbers.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The release cap estimates the end tension of a segment that ends taut as
T_n e_{n+1} / e_n. That is the tension of an elastic segment, but the
viscoelastic and Syrope laws are not proportional to the stretch: damping
or the lagged internal state can carry T_n at a vanishing e_n. The secant
then grows without bound, and the cap switches off within a band of width
about e_n, nearly a jump for the Newton iteration.

The step now takes the committed axial stiffness of each law element
(start_stiffness: the viscoelastic EA_D / l0, the Syrope K1 / l0 =
(alpha + beta T_mean) / l0, computed by the line model next to the
committed law tension) and estimates the end tension with
min(T_n / e_n, k_n) e_{n+1}. Elastic elements keep the exact secant, so
their results are unchanged bit for bit. The routine comment and the
theory page now state the energy bound exactly: the blend returns at most
W_n + (1 - alpha_f)(T^_{n+1} - T_{n+1}) p_{n+1} and never more than
without the cap. For an elastic segment that is W_n. A law segment that
ends above l0 with less law tension than the estimate can exceed W_n by
up to (1 - alpha_f) k e_{n+1} p_{n+1}.

Tests: a damped law segment whose step-start tension is almost all
damping at a 1e-6 strain keeps the cap force's slope in the end stretch
at 0.73 k_n (357 k_n, a jump, with the unbounded secant), satisfies the
stated bound over the sweep, and has a finite-difference tangent within
1.2e-10 on both paths. A segment that keeps its direction and ends taut
is checked to keep the plain force blend. The comment of the deep-release
tangent case now names W_n / p, and the options page gives the 0.10 MN
the light-cable reproducer now reaches.

Every shipped example deck gives byte-identical output against the
previous commit. The viscoelastic surge reproducer moves by 1e-6. The
lightly damped viscoelastic light cable peaks at 0.085 MN at the anchor
at dtM 0.1 s (0.072 MN before), against 0.082 to 0.095 MN at 0.5 to
2.5 ms; the documented figures follow.

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. Can't wait for the next one!

Reviewed commit: 43f2a40459

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

The light cable's 3 m heave snaps only just past its initial tension,
so whether a coarse step counts a snap there depends on round-off: on a
Linux CI runner the force-blended run counted none and printed no snap
note, where Windows counts four. The snap note is now checked on the
same cable heaving 6 m at 8 s, which snaps 315 segment steps past the
initial tension.

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: 2d8ccd7c10

ℹ️ 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/CableDyn_Dynamic.f90 Resolved
An elastic EI = 0 segment with axial damping keeps alpha_f of its
step-start dashpot tension T_d,n along its old chord, in the step-start
load, while the release cap bounded only the elastic share. A segment that
extends at t_n and turns and releases within the step then still returned
energy through that force: in the test chain (dashpot tension 1.6 to 62
times the elastic one) the kept share returned up to 7e4 W_n and the whole
blend, dashpot end share included, up to 2750 W_n.

The line model now passes the step its axial damping (BA per element and
the payout rate l0_dot, as its damping contributor evaluates them). The
step computes T_d,n at the committed state. Where the end state lies at or
below the rest length, or above it by less than c e_n with
c = alpha_f / (1 - alpha_f), the cap covers the dashpot with a weight phi:
1 at and below l0, falling linearly to 0 at l0 + c e_n. It replaces the
kept force alpha_f (T_n + phi T_d,n) by N / p when that is smaller, with
N = max(W_n + (1 - alpha_f)(T^_{n+1} + phi T_d,{n+1}) p_{n+1}, 0) and
T_d,{n+1} the dashpot tension the residual carries at (q_{n+1}, v_{n+1}).
The dashpot pushes and pulls, so its end share acts at a slack end too and
is credited. It stores no energy, so the budget stays the elastic W_n.
The tangent carries T_d,{n+1}'s dependence on q_{n+1} through v_{n+1}
(gamma / (beta dt)), on the banded, dense and probe paths.

Over a step with p > 0 the blend then returns at most W_n + (1 - phi) D,
D the work of the uncapped blended dashpot, except when its end share alone
returns more than W_n (the capped kept force is then zero). At and below
l0 that is W_n. Above the band, and on undamped elements, the cap is
unchanged, so taut damped segments keep the standard force blend. phi is
continuous, and so is the capped force. The viscoelastic law keeps its
total tension, dashpots included, as before.

Tests: over turns of 0 to 180 degrees, slack and taut ends and three
extension rates:
- a segment ending slack returns at most W_n (2794 W_n uncapped);
- every row keeps the stated bound to 1.6e-11 W_n;
- non-turning taut rows keep the plain force blend;
- the force jumps by 1e-9 T_d,n across the rest length and the band edge;
- the finite-difference tangent of a slack end and of an end in the band
  agrees to 1.1e-10 on both paths.

Outputs against 2d8ccd7: every shipped example is byte-identical except
the two als_volturnus line-break decks, whose broken line goes slack (tension
statistics move by at most 3.8e-4, maxima by 4e-4). The semi-taut
chain-polyester reproducer's coarse-step anchor snap moves from 5.77 to
5.74 MN; the changelog and troubleshooting page now say 5.7 MN (4.6 MN at
2.5 ms, unchanged). The Bergdahl record (no axial damping) and the
snap-load record (its own callbacks) 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 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: f227a80d68

ℹ️ 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/CableDyn_Dynamic.f90 Resolved
@SMI-Lab-Inha
SMI-Lab-Inha merged commit c66918c into dev Oct 16, 2026
15 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/ei0-slack-dynamics branch October 17, 2026 09:04
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