Skip to content

fix(statics): the static start above the surface, in sheared currents, on lines as long as their span and on bodies with pinned cables - #77

Merged
SMI-Lab-Inha merged 12 commits into
devfrom
fix/accuracy-items-pr
Oct 31, 2026
Merged

SMI-Lab-Inha merged 12 commits into
devfrom
fix/accuracy-items-pr

Conversation

@SMI-Lab-Inha

@SMI-Lab-Inha SMI-Lab-Inha commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

What changed

Six accuracy items from the open list, rebased onto dev (#73 torsion linearisation, control and modal analysis, #74 torsion on the mixed deck, at one end and on a rod end, #75 lines with two moving ends, #76), one commit that closes where they meet dev's newer routes, and four fixes from an independent review.

  • Dry weight of an EI = 0 line above the surface. With a seabed the march gives the part of a line above the still-water level its dry weight; the static start kept its buoyancy. CD_Static_Line_Equilibrium now carries the dry part as a fixed point on the wetted lengths. A chain hung from 5 m above the surface starts in the march's equilibrium (holds to 1e-10; before 1e-3 of its fairlead load in the first step), and the coupled and standalone starts agree to 1.4e-8 (before 2.4e-4).
  • The same dry weight in the force balance of Connect/Free points, bodies and rods (solve_body_equilibrium_core, its warm and cold line solves, the new CD_Static_Line_Dry_Load). A 50 t Connect point hung by two chains from 10 m above the surface holds its position over 2 s (before it sank 1.1e-2 m). An EI = 0 chain between two moving objects across the surface, a body point 5 m above it and a Connect clump, holds both (before 5.5e-3 m). In that balance a finite-EI line, carried without its bending stiffness, now takes its dry weight with or without a seabed, as its cubic-Hermite cable does: a body with a light pinned cable 5 m above the surface on a deck without a seabed holds its heave to 7e-6 m (before 2.8e-3 m).
  • ATTACHMENTS above the surface. The march loads an attachment above the free surface with its weight alone, while the attachment polish and the torsion stage after it kept its buoyancy. Each solve now takes every attachment's load for the side of the surface its node is on, and the final solve is repeated until no attachment changes side. A 500 kg, 0.2 m³ module 3 m above the surface held the fairlead load over 1 s to the output's 8 digits, restrained in torsion as well (before it moved by up to 6.1e-2). An attachment carried above and below the surface on alternate solves (a net-buoyant module that would float, which a point attachment cannot represent) fails closed, and the message leads with that attachment's index, Mass and Volume.
  • A pinned cable with ATTACHMENTS in the body static balance. The object solve left a bending-pinned End A free in torsion to its cable without bending stiffness, which carries no attachments. Such a line now takes the static passes of a connected end. On a moored body with a 2 t clump on a pinned cable the body holds its pose (before it drifted by up to 2.9e-2 m and 0.20 deg in 5 s).
  • Current gradient in the finite-EI static tangent. A depth profile is sampled at the node elevations and a current grid at the node positions, so the drag moves with the nodes. The Newton tangent now carries that: the drag tangent matches central differences to 4e-10 to 1.7e-9 (before 5e-2 to 0.2), also at the twisted equilibrium of a line restrained in torsion with GJ|K (4.3e-10, before 5.4e-2). The equilibria do not change beyond the solver tolerance; Newton converges faster in strong shear (16 instead of 23 iterations).
  • Force-scale floor for a finite-EI line as long as its span. The static start of a neutral line whose length equals its span failed with neutral or drag-area ATTACHMENTS: the polish stalled at the round-off of the axial forces. For a line whose chord is at least its length, the convergence scale now includes that floor over the tolerance, as on the EI = 0 path. Such lines now start straight and unloaded, also between two moving ends, restrained in torsion at both ends or at End A only, and with a chord 1e-8 longer than the line (0.1 N to 2.2e-7 N). All of these failed on dev.
  • Docs: the linearisation at an accelerating coupled point (doc/openfast.rst, VALIDATION.md), and the carry spin of a held end section, measured and left out (doc/theory.rst; the modal analysis and the OpenFAST linearisation of feat(torsion): OpenFAST linearisation, active line control and modal analysis of lines restrained in torsion #73 leave it out as well).

Review fixes

  • The attachment with no static side is named (attachment_static_polish, torsion_after_attachments): a 200 kg, 2 m³ module 50 m along a slack cable stopped with only "the homotopy stopped at load fraction 0.625000"; every later failure now leads with the attachment that crossed the surface (static_dry_weight 9). On dev the same deck ran with the module 4.5 m above the surface and its buoyancy kept.
  • A pinned cable with ATTACHMENTS on a Point3 buoy is refused by the existing Point3 message instead of an END CONNECTIONS message for a deck without that row (line_attachments 10).
  • The body passes of a pinned cable with ATTACHMENTS are Anderson-mixed, as the passes of a line between two objects are: on a spar rod with a 1500 kg clump on a pinned cable the plain passes diverged (end-load change 2.9 of the force scale after 60) and the deck stopped; they now converge in 26 and the rod holds to 8 digits over 3 s (line_attachments 11).
  • Every bending-pinned finite-EI line on a Rigid6 body or a rod end takes the (mixed) passes, with or without attachments: the stand-in without bending stiffness put a spar rod's start 5.7e-2 m off equilibrium (7e-2 m drift and a 2.3 % leg tension change in 3 s); it now holds to 8 digits after 4 passes (line_attachments 12; before 1.8e-4 m in 0.1 s). This changes the static start of user decks with a pinned finite-EI cable on a free body or rod by the bending share of the end force; no example deck has one.
  • Body passes that do not hinge on round-off (after the Linux Release job failed line_attachments 11 with no convergence in 60 passes, where Windows took 26): the core solve's stand-in cable now carries the line's ATTACHMENTS smeared as net weight, as the Hermite statics smear them, so the passes correct only the lumped, surface-side, drag and bending differences (the whole 15 kN clump load before); a failed pass set is repeated once on the stand-in without attachments; and the Anderson column-drop bound is 1e-6 instead of 1e-10 (a pinned end's residual spans fewer directions than the history, so later columns were round-off with coefficients near 1e12). Gate 11 converges in 6 passes, geometrically. New gate 13: the same deck with a leg anchor moved 1 ulp either way gives the same rod pose to 1e-9 m in 6 passes each (before 26, no convergence after 60, 26). Across a 45-deck sweep of rod and body decks (clump mass, cable length, rod mass, start offsets, 1-ulp and 1e-14 m moves) 42 converge, 34 before; the two-object decks are unchanged. Gates 11 and 12 march at dtM 0.002 s, because the explicit coupling of a cable to a free rod on this branch is unstable at 0.01 s (fixed separately in the next PR).
  • Known and left: the as-laid friction reference still takes an attachment's net in-water weight, which matters only where the seabed rises above z = 0.

Rebase notes

Gates

  • static_dry_weight 1-8: gates 1-5 as before. Gate 6: a module above the surface, plain and restrained in torsion (0; before 6.1e-2), and a submerged module as guard. Gate 7: a pinned cable above the surface on a body without a seabed (7e-6 m; before 2.8e-3 m). Gate 8: an EI = 0 chain between a body above the surface and a Connect point (0; before 5.5e-3 m).
  • line_attachments 8 (continued) and 9: two moving ends, torsion at one or both ends, and a chord above the length, each of which failed on dev; the pinned cable with a clump on a moored body (1e-9 m; before 2.9e-2 m).
  • hermite_static_current_gradient 1-5, nodal_twist_dynamic (carry spin).

Checks

  • Full ctest (Release): 344 of 344 pass (also after the review fixes; base now dev 1a8a606, ci(wheels): build the macOS wheel on the macOS 15 runner #76 touched only CI and docs). On the checked Debug build (-fcheck=all) the added and touched tests and their neighbours pass, 12 of 12: static_dry_weight, line_attachments, hermite_static_current_gradient, nodal_twist_dynamic, hermite_cable_static, hermite_torsion_static, torsion_attachments, torsion_one_end, rod_end_torsion, clamped_cable_ends, cable_between_bodies, bodies_rods.
  • pytest python/tests and tests, with the native parity tests on (CABLEDYN_TEST_DRIVER): 2179 passed, 75 skipped.
  • ruff check and format are clean. Strict mypy shows only dev's 3 numpy-stub notes. pre-commit and Sphinx -W are clean, and no symbol is both in a PUBLIC list and declared PUBLIC.
  • Example A/B against dev 357f9eb: 53 of 53 identical. No example has a line or attachment above the water, a finite-EI line in a profile or grid current, a line as long as its span, or a pinned cable with ATTACHMENTS on a body.

On the lazy wave of the mixed example held by a 5e4 N m/rad hang-off
spring, the force per unit rotation of D - C A^-1 B read 1.2 % below
the static solutions out of plane (Fy per x-rotation 2.583 against
2.614 N/rad) and 0.08 % / 0.32 % off in plane, while the translations
agreed to 3e-4.

The .lin matrices are right. A probe that differentiates the core's
acceleration recompute as lin_eval does reproduces A, B, C and D to
1e-8. The difference is the operating point: the platform starts out of
balance, so at t = 0 the fairlead accelerates at (-0.019, 0, -0.016)
m/s^2, and the cable's coupled load is its support reaction, which
includes the inertia -M(q) a of the line. Turning the end tangent
changes that reaction. With this acceleration prescribed the probe
reproduces the rotation columns to 2e-5.

With the platform DOFs disabled the OpenFAST reduction is symmetric and
matches the static solutions (Richardson-extrapolated over 0.125 and
0.25 deg) in plane to 1.1e-5 and out of plane to 2.7e-4. The residue is
the O(h^2) truncation of the 1 um state step on the soft sideways mode
of the frictionless laid tail (2.6e-5 at 0.3 um, 2.9e-2 at 10 um), as
in the sway translation column. The moments per unit translation carry
no inertia and match at either operating point.

doc/openfast.rst states when the reduction is the static stiffness;
VALIDATION.md records the numbers.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
With a seabed (WtrDpth or a bathymetry) the EI = 0 dynamic model gives
the part of a line above the still-water level its dry weight (its
buoyancy recovery), but the static start kept the buoyancy everywhere.
The start was therefore not the equilibrium of the march. A chain hung
from 5 m above the surface onto a 200 m seabed moved by 9.7e-4 of its
fairlead load in the first still step and by 1.4e-3 at 1 s. The coupled
aggregate reported the dynamic reaction of that state, so its start
differed from the standalone driver's by 2.4e-4 (Fz 2 434 228 against
2 434 961 N).

CD_Static_Line_Equilibrium takes the dry part's waterline, density,
gravity and diameters. When any element reaches above its waterline it
solves again with the recovery load of the last solution as a constant
load, until the nodes move by less than 1e-9 m. The fixed point
contracts at the ratio of the recovery's stiffness to the line's own,
a few 1e-3 for a hanging chain. A line wholly below the surface is
solved once, as before. CD_Init_Line_Model passes the arguments when its
model carries the buoyancy recovery, and the static-only line solve does
when the deck has a seabed; its end forces include the recovery. The
driver's warning about a line end above the still-water level now
appears only where that part keeps its buoyancy: an EI = 0 line on a
deck without a seabed.

New gate static_dry_weight: a vertical chain hung from 10 m above the
surface sums its end loads to its weight to 1.5e-8 (before 1.4e-2 low);
the chain above the surface starts identically on both routes (1.4e-8,
the driver's 8 digits) and holds its fairlead load to 1e-10 over 1 s; a
finite-EI cable above the surface (already consistent) agrees to 7e-8.
Decks whose lines stay below the surface are unchanged.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The finite-EI static solve samples a depth-profile current at the node
elevations, and a current grid (#72) at the node positions, so the drag
moves with the nodes through the current, but its Newton tangent treated
the current as uniform. The drag part of the tangent was off by 5.4e-2,
6.7e-2 and 0.20 against central differences of the residual in three
sheared profiles on a 260 m cable, and by 3.9e-2 in a grid current.

current_element_load adds the term: the element fluid velocity is
u = R^T (U(x_a) + U(x_b))/2, with R the turn of the solve frame and
x = R (x_l + origin) the global node position (a profile reads only z),
and a uniform velocity of the element is the nodal velocity [c, 0, c, 0],
so d fd/du = -(djv(:, 1:3) + djv(:, 7:9)) and d fd/dx_l = d fd/du R^T G R / 2
at each node, G the field's gradient there (CD_Current_Profile_Gradient,
CD_Current_Grid_Gradient of #72).

New gate hermite_static_current_gradient: the drag tangent matches the
central differences to 4e-10 to 8e-10 in the three profiles, over the
vertical columns, and to 1.7e-9 in a grid varying along x, y and z,
sampled in a solve frame turned by 30 deg and shifted, over every
position column. Newton from the still-water equilibrium takes 7/5/5
iterations instead of 7/5/6 on the heavy cable, and 16/16 instead of
20/23 on a light cable (20 N/m) in a 1.5 times stronger shear; the
equilibria agree within the solver tolerance. No example deck has a
finite-EI line in a profile or grid current.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The static start of a neutral finite-EI line whose unstretched length
equals its span (straight at zero strain, so carrying neither weight nor
tension) failed with neutral ATTACHMENTS (m = rho V) or with attachments
that only carry a drag area, pinned, clamped or restrained in torsion:
"the homotopy stopped at load fraction 0.000000". The attachment polish
stalled at ||R|| = 7.6e-8 N, the round-off of the axial forces formed
from coordinate differences (eps max(EA/l0) |x| = 9e-8 N for EA 1e7,
2.5 m elements and |x| = 100 m), against the tolerance 1e-8 times the
solver's 1 N force floor, at every load step.

For a line held at both ends whose chord is at least its length, the
force scale of the convergence test now includes that round-off floor
over the tolerance, 16 eps max(EA/L0) max(|x|, L0) / tol, the floor the
EI = 0 path already uses. Such a line now starts straight and unloaded
(fairlead tension 1.3e-9 N), and restrained in torsion it carries
GJ Phi / L to 4e-9. Slack lines keep their scale: a weightless slack
line's round-off stall on its straight compressed strut (a saddle) must
still fail over to the weight continuation that accepts the floor on
the bowed equilibrium and writes its note (light_slack_statics,
flagship_compression_note and driver_msg_weightless_finite_ei hold
that). So do lines with an end free to move (hermite_torsion_static's
report of a tolerance below the residual floor) and lines that carry
weight or tension above the floor.

Gate: case 8 of line_attachments (the neutral and drag-area modules
failed before; heavy modules on the same line still solve).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…t out

At an end held rigid in torsion but pinned or elastic in bending, the end
section's director is the frame's normal carried by the smallest rotation
G(d -> t) to the end tangent t. When t moves, that rotation spins about t
at c = (t x d).dt/dt / (1 + d.t), at most tan(theta/2) |dt/dt| for an end
bend angle theta (checked against a finite difference of G). The nodal
twist gives the held section's polar inertia (half the end element's)
the spin of the frame's turn only, in the kinetic energy and in the
support reaction; the carry spin is in neither, nor in the line's
equations of motion.

Including it would add a configuration-dependent rank-one polar mass on
the end tangent, I grad(c) grad(c)^T, with gyroscopic velocity terms, for
an energy of order (d^2 / 2 l^2) tan^2(theta/2) of the end element's
translational kinetic energy. It stays out, consistently in all three
places, and the theory says so.

New check in nodal_twist_dynamic (E pinned): a 10 m line pinned in
bending and rigid in torsion at both ends, twisted by 4 rad and swinging
with a 13 deg end bend angle at rho_inf = 1. The omitted energy, measured
from the end tangents' motion, is 6.1e-8 of the peak kinetic energy at
Irn = 0.02 kg m and 4.1e-6 at an extreme 1 kg m. The step's energy band
is 6.31e-3 and 6.34e-3 of E0 at the two inertias. The modal analysis and
the OpenFAST linearisation of torsion (#73) take the same lumped polar
mass on the angles, a held end's angle not a coordinate, so they leave
the carry spin out too.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The static start of an EI = 0 line now gives its part above the
still-water level its dry weight (CD_Static_Line_Equilibrium), but the
force balance of Connect and Free points and of free bodies and rods
solves its lines in solve_body_equilibrium_core, whose warm solves
(CD_Static_Cable_Solve) and cold solves kept the buoyancy everywhere.
Those objects were placed against loads the march does not apply, and
the lines were then started with the dry weight at the held object, so
the object started out of balance. A 50 t Connect point hung by two
chains from Fixed points 10 m above the surface on a 300 m seabed sank
1.08e-2 m in 2 s of the march and its fairlead tension moved by
9.6e-4; with the buoyancy kept in the line starts as well (dev before
the dry-weight fix) it sank 8.6e-3 m. The driver's warning about a
line end above the surface had been dropped for these decks too.

The line cache of the object solve takes the dry part's diameters and
waterline when the deck has a seabed. The warm solve is repeated with
the recovery of the last solution as a constant load until the nodes
move by less than 1e-9 m or the recovery changes by less than 1e-10 of
the largest nodal load, the fixed point CD_Static_Line_Equilibrium
iterates; the cold solve passes the dry-part arguments, and the end
forces include the recovery. The recovery is the new public
CD_Static_Line_Dry_Load, which CD_Static_Line_Equilibrium now calls
too. The condensed end stiffness leaves the recovery's stiffness out,
as it leaves the current's drag out: the residual is exact. A line
wholly below the surface has no recovery and is solved as before.

Gate 5 of static_dry_weight: the Connect point holds its position over
2 s to 1e-4 m, the output's 8 digits (measured 0; before 1.08e-2 m),
and its fairlead tension to 1e-6 (measured 0; before 9.6e-4). The
example decks are bit-identical (53 of 53 against the reference).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…inned cables

Where the accuracy fixes of this series meet dev's ATTACHMENTS on lines
restrained in torsion (#71), torsion at one end (#74) and finite-EI lines
with two moving ends (#75).

ATTACHMENTS above the still-water level. The march loads an attachment
above the free surface with its weight alone (attachment_residual), but
the attachment polish and the torsion stage after it kept its net weight
-(m - rho V) g, the attachment analogue of the EI = 0 dry part fixed
above. A 500 kg, 0.2 m^3 module 3 m above the surface on a cable hung
from 5 m above it moved the fairlead load by up to 6.1e-2 in the first
second, and as much restrained in torsion. attachment_static_weight gives
each attachment the load of the side of the surface its node is on; the
polish and torsion_after_attachments take it at the incoming state of
every solve and repeat the full-load solve until no attachment changes
side (with the drag fixed point they already had). An attachment at the
surface that its weight sinks and its buoyancy lifts fails closed by
name. Decks whose attachments stay under water take the same loads in
the same order, bit for bit.

Pinned cables with ATTACHMENTS in the body static balance. The object
solve carries a finite-EI line as a cable without bending stiffness and
corrects a connected End A on a body or rod in passes on the
cubic-Hermite end loads, but a bending-pinned End A free in torsion was
left to the surrogate, which carries no attachments. On a moored body
with a 2 t clump 50 m along a pinned cable the body started at the pose
of the line without the clump and drifted by up to 2.9e-2 m and 0.20 deg
in 5 s. Such a line now takes the passes (4 here); the body holds its
pose to the output's 8 digits, with and without an END CONNECTIONS row.

The surrogate's dry weight without a seabed. The line cache of the
object solve gave the part above the surface its dry weight only with a
seabed (the EI = 0 model's buoyancy recovery), but a finite-EI line's
cubic-Hermite cable has its dry buoyancy always. A stiff body with a
light cable (EI 100 N m^2) pinned 5 m above the surface on a deck without
a seabed moved its heave by 2.8e-3 m in 3 s; now 7e-6 m.

New gates (each fails on the code without its fix):
- static_dry_weight 6: the module above the surface holds the fairlead
  load over 1 s to 1e-7 (measured 0; before 6.1e-2), restrained in
  torsion the same (0; before 6.1e-2), a module under water as guard (0).
- static_dry_weight 7: the body's heave above (7e-6 m, limit 1e-4 m;
  before 2.8e-3 m).
- static_dry_weight 8: an EI = 0 chain between two moving objects across
  the surface, a body point 5 m above it and a 3 t Connect clump: both
  hold over 3 s to 1e-4 m (measured 0; dev without the dry-weight fixes
  5.5e-3 m).
- line_attachments 9: the pinned cable with the clump (1e-9 m, 4e-8 deg;
  before 2.9e-2 m, 0.20 deg).
- line_attachments 8, continued: the line as long as its span between
  two moving ends with neutral modules or a drag area alone, restrained
  in torsion at both ends (GJ Phi / L to 1e-6), with a chord 1e-8 longer
  than the line (0.1 N to 2.2e-7 N), and restrained at End A only. Each
  failed on dev ("the homotopy stopped at load fraction 0.000000").
- hermite_static_current_gradient 5: the cable restrained in torsion
  (GJ|K, a quarter turn) in the cross-flow shear: its twisted solve is
  stable and the drag tangent at its out-of-plane equilibrium matches
  central differences to 4.3e-10 (without the gradient term 5.4e-2).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The attachment polish takes every attachment's weight on the side of the
surface its node is on, and a point attachment that its weight in air
takes below the surface and its weight in water above it has no static
position. Only one path of that case was named: the full-load fixed point
running out of passes. A net-buoyant module that would float (200 kg,
2 m^3, 50 m along a slack cable from 20 m below the surface; in water it
lifts its node 4.5 m above the surface) is carried above and below the
surface by the homotopy's load steps in turn until one fails, and the
deck stopped with "the homotopy stopped at load fraction 0.625000",
which says nothing of the surface (dev started the module 4.5 m above
the surface with its buoyancy and ran).

The polish now records the first attachment a solve moved across the
surface, and every failure after it (a stopped homotopy, a failed
full-load solve, the passes running out) leads with that attachment, its
Mass and Volume and the reason, followed by the solver's message. The
torsion stage after the polish does the same. The loads and the order of
the solves are unchanged: every deck that converged converges bit for
bit. The message wording also covers a heavy module, which no buoyancy
lifts but whose node sits nearer the surface than the deflection its
buoyancy gives the line.

New gate static_dry_weight 9: the floating module fails closed and its
message names attachment 1 crossing the still-water level (before: the
homotopy message alone).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…used by name

The body static passes now take a bending-pinned finite-EI line with
ATTACHMENTS, but they took one whose End A is on a Point3 buoy too. Their
end loads turn the End A body frame, which a Point3 buoy does not have,
so the deck stopped with "a clamped or elastic END CONNECTION on a body
needs a Rigid6 body", for a deck without an END CONNECTIONS row, before
the refusal that names the case ("a cable end on a Free/Connect point or
a Point3 buoy is not supported"). Such a line is left to the core solve
again, and the deck is refused by that name, as it is without the
ATTACHMENTS.

New gate line_attachments 10: the pinned cable with the 2 t clump of
case 9 from a Point3 buoy is refused by the Point3 name (before: the
clamped END CONNECTION message).

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…ACHMENTS

A bending-pinned finite-EI line joins the body static passes for its
ATTACHMENTS, but the core solve carries it as a cable without them, so
its pass correction is the attachments' whole load, which turns with the
object as the heavier or lighter cable does and not as the core's. On a
soft object the plain passes then overshoot without bound: a free spar
rod (10 m, 1 m diameter, four taut legs) with a 1500 kg clump 25 m along
a cable pinned at its upper end ended with an end-load change of 2.9 of
the force scale after 60 passes, and the deck stopped. Such a line's
passes are now Anderson-mixed, as those of a line between two objects
already are: 26 passes, and the rod holds its static pose over the march
to the output's 8 digits (the clump moves the rod top by 5.1 m). The
body case of line_attachments 9 still holds (5e-8 deg). A deck without
such a line keeps the plain passes, bit for bit.

New gate line_attachments 11: the spar rod holds its pose over 0.3 s to
1e-6 m (measured 0) and its leg tensions to 1e-6 (measured 1e-8);
before, the static start failed after 60 passes.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…passes

The body static solve carries a finite-EI line as a cable without bending
stiffness and corrects connected ends, lines between two objects and
(since the ATTACHMENTS fix) pinned lines with ATTACHMENTS in passes on
the cubic-Hermite end loads. A bending-pinned line without attachments
was left to that cable, on the ground that the bending's share of a
pinned end force is small. On a soft object it is not: a free spar rod
(10 m, 1 m diameter, four taut legs) with a 55 m cable (EI 2e4 N m^2)
pinned at its upper end started 5.7e-2 m off its equilibrium; with the
implicit object coupling its top drifted 7e-2 m in 3 s and a leg tension
moved by 2.3 %, and without it the top moved 1.8e-4 m in the first 0.1 s.

Every bending-pinned line on a Rigid6 body or a rod end now takes the
passes (Anderson-mixed, as the pinned lines with ATTACHMENTS): 4 here,
and the rod holds its pose to the output's 8 digits. Decks without such
a line are unchanged; none of the 53 example decks has one (the A/B is
identical). This changes the static start of every deck with a pinned
finite-EI cable on a free body or rod, by the bending's share of its end
force.

New gate line_attachments 12: the spar rod with the pinned cable alone
holds its pose over 0.1 s to 1e-6 m (measured 0) and its leg tensions to
1e-6 (measured 0); before, 1.8e-4 m.

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 31, 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-31T08:12:39.525879Z 19fdac8 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 31, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35541943 | 📁 Comparing 19fdac8 against latest (fd1936d)

  🔍 Preview build  

32 files changed · ± 32 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 0fe7b303c2

ℹ️ 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 body static passes of a pinned cable with ATTACHMENTS on a free spar
rod (line_attachments 11) converged in 26 passes on Windows and ran out
after 60 on the Linux build (relative end-load change 3e-3). Two causes,
each enough to make the start depend on round-off:

- The core solve's cable carried the line without its ATTACHMENTS, so
  the pass correction was the 1500 kg clump's whole load, whose change
  with the rod's pose the core's end stiffness did not see: the pass map
  swung by the clump's weight between passes (end-load change 2.9 after
  one plain pass) and the mixing had to model a strongly nonlinear map.
- The Anderson fit kept history columns whose part normal to the kept
  ones was 1e-10 of their length or more. A pinned end's residual spans
  fewer directions than the history (zero moment rows, a force in the
  line's plane), so the later columns were round-off; their coefficients
  reached 1e12 and the mixed loads jumped to 1e6 N, after which the
  passes recovered or not. Moving one leg anchor by 1 ulp turned the 26
  passes into a failure after 60, or a rod turned over.

The core's cable now carries a finite-EI line's ATTACHMENTS smeared over
the elements beside their nodes with their net weight, as the smeared
start of the cubic-Hermite statics, so the passes correct only the
lumped, side-of-the-surface, drag and bending differences; should the
passes fail on that cable (an unstable or missing core equilibrium, or no
convergence), they are repeated once on the cable without them, as
before. The mixing drops columns that add less than 1e-6 of a new
direction. The spar rod converges in 6 passes, geometrically (relative
change 8e-2, 4e-2, 5e-4, 2e-5, 2e-6, 8e-8), the same 6 for every 1-ulp
change of an anchor coordinate tried.

Perturbation sweep of the static start (passes; before -> after):
- spar rod, clump 0 / 300 / 800 / 1500 / 2500 / 4000 kg:
  4 / 5 / 7 / 26 / fail / fail -> 4 / 4 / 4 / 6 / 18 / 5
- cable 50 / 60 / 70 m with the 1500 kg clump: fail / fail / 14 ->
  9 / 9 / 14 (70 m: on the second attempt); without it unchanged
- rod mass 150 / 500 kg/m with the clump: 10 / fail -> 5 / fail;
  700 kg/m fails with and without the clump either way (no stable
  equilibrium found on either core cable)
- clump at 10 / 40 m: 11 / 4 -> 9 / 4; a buoyancy module 6 -> 4;
  EI 2e5 N m^2: 19 -> 13
- start offsets of the rod (3 poses): 41 / 11 / 39 -> 6 / 5 / 6
- 1-ulp and 1e-14 m changes of two anchors (5 decks, with the clump):
  26 / fail / fail / fail / fail -> 6 each; without the clump 4 each
- moored body of line_attachments 9, clump 0 to 4 t, hydrostatic
  stiffness x0.1 / x10, cable 95 / 110 m, 1-ulp anchors: 3-4 -> 3
- the two-object decks of cable_between_bodies (clamped, pinned, stiff,
  both directions) with 1-ulp, 1e-14 m and 0.5-1 m anchor changes:
  4 / 2 / 8 / 8 passes before and after; with a 500 kg to 3 t clump, a
  buoyancy module or a series of modules on the joining cable:
  4-5 -> 3-5, all variants equal.
42 of the 45 rod and body decks converge, 34 before.

line_attachments 11 now marches at dtM 0.002 s (the explicit coupling of
the cable to a free rod on this route needs it to stay stable; at 0.01 s
a start balanced to 1e-7 instead of 5e-11 grows into the integrator's
instability within 0.3 s) and holds the rod to 1e-6 m (measured 0) and
its leg tensions to 1e-5 (measured 3e-7); 12 the same (measured 0).

New gate line_attachments 13: the static start of case 11 with a leg
anchor at x = 25 m and 1 ulp either side converges within 10 passes to
the same rod pose to 1e-9 m (measured 0); before, the unperturbed deck
took 26 passes and one of the 1-ulp decks ran out after 60.

The example A/B is identical (53 of 53): no example has a line with
ATTACHMENTS on a body or rod, or Anderson history columns between the old
and the new drop bounds.

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

Reviewed commit: 19fdac8ac3

ℹ️ 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 e760bc6 into dev Oct 31, 2026
21 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/accuracy-items-pr branch October 31, 2026 09:28
SMI-Lab-Inha added a commit that referenced this pull request Nov 2, 2026
…plicitly (#78)

## What changed

The monolithic multibody step (`bodyScheme monolithic`, the default) coupled a finite-EI cable pinned to a moving object (a Rigid6 `Body<N>` point or a free or pinned `Rod<N>` end, the other end held) at the Newmark predictor: the cable was stepped once per step with the predicted attachment motion and its end force was held through the outer iterations. That is an explicit, partitioned coupling. Its step amplification exceeds 1 once `K_e dt^2 / m_e` is above about 0.85 (1.5 at 1.3, 2.5 at 2), with `K_e` the cable's condensed dynamic end stiffness and `m_e` the object's effective mass along the cable. A light object on a stiff cable therefore left a balanced static start.

A 3 t free rod spar with a 55 m cable (`EA` 5e8 N, 40 elements) pinned at its upper end, at `dtM` 0.01 s:
- the step change of the cable tension alternated in sign and grew 2.3 times per step;
- the tension rose from 11 kN past 1 MN in 0.7 s;
- the rod end moved 6.3 m in 2 s.

The start was not at fault. It is a stable equilibrium of the march:
- the same deck with an `EI = 0` cable stays at rest to 1e-10 m;
- with the cable clamped (`Rigid`, already coupled implicitly) it stays at rest to 1e-7 m;
- the staggered scheme holds it.

**The fix.** In `src/CableDyn_DeckDriver.f90`, every cable with an end on an object the march moves now sets `cab_imp`. This covers pinned or connected ends, End A or End B, bodies and free or pinned rods. Such a cable is re-stepped at every outer iteration with its end stiffness in the Newton matrix, as clamped cables and cables between two objects already were. A cable with no moving end is still stepped once. The staggered scheme and the OpenFAST and C-API routes are unchanged.

**Docs.**
- `doc/driver_format.md`: the multibody route bullet.
- `doc/theory.rst`: the monolithic scheme paragraph, now with the stability criterion of the old coupling, and the clamped-cable paragraph.
- `CHANGELOG.md`: an `[Unreleased]` Fixed entry. The #75 Added entry no longer says a pinned cable is "coupled at the predictor".

## Gates

New CTest `pinned_cable_light_object`. On dev e760bc6, 14 of its gates fail.

| Gate | dev e760bc6 | this branch |
|---|---|---|
| H: spar rod, cable pinned at the upper end (2 s): rod end move / tension change | 6.3 m / 161 times the start | 1e-10 m / 2.7e-8 |
| H: same, in a 0.5 m/s current | 5.4 m / 472 times | 6.3e-4 m / 1.2e-4 (a slow swing of the start in the current, the same on the staggered scheme) |
| H: cable pinned at the lower end | 6.5 m / 5596 times | 1.8e-10 m / 3.4e-8 |
| D: cable from a fixed rod's end to the free rod (End B on the moving object) | 6.1 m / 1190 times | 2e-7 m / 9e-8 |
| D: cable written from its anchor | the same output byte for byte | the same output byte for byte |
| B: 4 t Rigid6 buoy with a pinned keel cable (4 s) | 0.22 m / 38 times | 1e-9 m / 3.3e-8 |
| S: monolithic vs staggered, upper / lower end | 6.0 / 6.5 m apart | 1e-10 / 1.7e-10 m, tensions to 2.7e-8 / 3.4e-8 |
| E: controls (`EI = 0` cable; cable clamped at upper / lower end) | at rest | at rest: 1e-10 m; 1e-7 / 3e-9 m |

Gate tolerances:
- 1e-5 m and 1e-5 of the tension; the positions are written to 8 digits, so 1e-6 m at the rod's depth;
- 2e-3 m and 1e-3 in the current;
- 1e-5 m for the staggered comparison.

`line_attachments` 11 and 12 had to march at `dtM` 0.002 s on #77 because of this coupling. They are back at `dtM` 0.01 s, over 1 s instead of 0.3 s:

| Gate | dev e760bc6 at `dtM` 0.01 s | this branch |
|---|---|---|
| 11: spar rod, pinned cable with a 1500 kg clump | 0.82 m / leg tension 13 times | 1e-7 m / 2.9e-7 |
| 12: the same without the clump | 1.3 m / 4.4 times | 0 m / 3.8e-8 |

Over 3 s the clump deck holds to 1.1e-6 m; dev moves it 15 m.

## Example A/B (reference driver built at e760bc6)

52 of 53 example decks are identical. `mixed_body_rods_points` changes; it is a 150 t buoy with a pinned power cable, the one example with a pinned cable on a moving object:
- body surge changes by up to 3.5e-5 m (7e-6 of its 5.2 m range);
- `Rod2Ry` changes by 2.3e-4 deg;
- the cable top tension `FairTen8` changes by 0.6 N of 8.1 kN.

The new run is the more accurate one. Against the same deck at `dtM` / 4, the body surge error falls from 3.7e-5 m to 1.6e-6 m and the pitch error from 1.1e-4 to 2.2e-5 deg. The cable tension error, 17 N, comes from the cable's own time step and does not change.

The deck runs about 45 % longer (6.8 s to 9.8 s), because the cable is now stepped once per outer iteration instead of once per step.

## Checks

- Full ctest (Release): 345 of 345 pass.
- Checked Debug build (`-fcheck=all`, `--timeout 5400`): `pinned_cable_light_object`, `line_attachments`, `static_dry_weight`, `cable_between_bodies`, `monolithic_gates`, `clamped_cable_ends`, `body_rod_physics`, `bodies_rods` and `driver_clamped_cable_pinned_rod` pass, 9 of 9.
- pytest `python/tests` and `tests`: with the native parity tests on (`CABLEDYN_TEST_DRIVER`), 2179 passed, 75 skipped.
- ruff check and format are clean. Strict mypy shows only dev's 3 numpy-stub notes.
- pre-commit and Sphinx `-W` are clean. `dup_public`: 0 duplicates.

## Notes

- The slow drift in a current (6.3e-4 m in 2 s, 1.3e-3 m at most over 6 s, then turning back) is the same on the staggered scheme. The `EI = 0` cable in the same current holds to 1e-10 m. So it is a small static-versus-dynamic difference of the finite-EI cable in a current, not part of this coupling, and is left for the open list.
- If the 45 % cost on decks with a pinned cable on a heavy body matters, the old coupling could be kept where `K_e dt^2 / m_e` is safely below 0.85. That needs estimates of `K_e` and `m_e`; this change takes the uniformly implicit coupling for robustness.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
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