Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,61 @@ All notable changes to CableDyn are recorded in this file. The format follows
`clump_weight_free_point.dat`, whose clump now rests 4.7 cm deep instead of 6.6 cm and whose
anchor tension falls from 186 kN to 92 kN; decks whose points stay clear of the seabed give
identical output. See the manual's theory page (Seabed contact).
- A finite-EI deck mesh that cannot resolve the curvature of its static equilibrium (an
element folded beyond `L0*kappa = 0.7`), and a fragile mesh under `adaptive_mesh True`, are
now refined locally instead of as a whole. The static solve had multiplied every element by
the power of two that the worst one needed, up to 16, even when only one section was coarse:
a 462-element lazy wave whose 180 m top section had two elements was solved on 7392 elements
in 10.0 s, and a 410-element lazy wave with a rigid horizontal hang-off on 6560 elements in
9.2 s. A refinement pass now splits into 2, 4, 8 or 16 equal elements only the elements whose
`L0*kappa` exceeds 0.12 (or the stricter `adaptive_mesh` target), that are longer than half
their bending length `(EI/|w|)^(1/3)`, or, at a line end, longer than the boundary layer
`sqrt(EI/T)`, and the elements about an isolated seabed-contact change, and grades the mesh
into the neighbouring elements (no element more than twice as long as the next, unless the
deck mesh has a larger ratio there). The cap of 16 per deck element, the element limit, the
acceptance checks and the fail-closed messages are unchanged; where a pass would exceed the
element limit, the bending-length splits give way first, then the grading, and only then the
curvature, end-layer and contact splits, and a refinement that stops short of its target
names what stopped it (the cap, the element limit or the limit of 12 passes, 16 for the
axial passes). The two decks above now solve on 492 and 436 elements in 0.33 s and 0.28 s,
with end tensions within 4e-7 and 2e-6 of the whole-line refinement and nodes within 0.7 mm
and 4 mm. The lazy wave of the node-channel entry above (its top section on 4 elements) now
refines to 269 elements instead of 1136, with node tensions within 0.9 N (of 1.2 to 12 kN)
of the same line on 1560 elements of 0.25 to 0.5 m. In the finite-EI statics matrix 61
of the 123 decks refine: their CPU time falls from 65 s to 33 s, the end tensions change by
at most 0.21 % of the line's peak end tension (a 58 m line on 2 m end elements, whose
hang-off tension moves from 1157.5 N to 1155.1 N; 1157.5 N on a mesh 16 times finer) and the
nodes by at most 6.4e-4 of the line length. In a 761-deck statics robustness campaign 57
decks refine: they solve in 18 s instead of 63 s, with the same outcomes and notes (two no
longer need the static residual floor note), end tensions within 1e-5 of the peak end
tension and nodes within 3.2e-5 of the line length.
Decks that do not refine, including every shipped example, give identical output. On a
deck that refines, the dynamics run on the new mesh; the local refinement only splits deck
elements, so every deck node is a node of the new mesh and the node output channels still
name deck nodes (see the node-channel entry above).
- A finite-EI line with discrete buoyancy modules (`ATTACHMENTS`) in a cross current on a
frictional seabed no longer fails its static solve. The lazy wave of
`tests/data/lazy_wave_touchdown_planar_refined_att.dat` (25 modules on 2 m elements) in a
0.3 m/s current across its plane stopped with `finite-EI static solve with discrete
ATTACHMENTS failed at load fraction 0.125 (relative residual 1.304E+02)`. The homotopy from
the smeared to the lumped modules adds the module drag, which the smeared equilibrium does
not carry, and on the frictional seabed the damped Newton update for it overshot and
diverged from the first step, even in steps of 1/64 of the load; the seed and the step size
were not the cause. A step whose damped Newton solve does not converge is now repeated from
the last converged state with pseudo-transient continuation and then with a residual-merit
line search, and halved (down to 1/1024) when neither converges. A halved step doubles
again (up to 1/8) after two consecutive converged steps of its size, and each time a
doubled step fails, the number of converged steps a doubling waits for doubles; at most 64
load steps may fail in all. A discrete state reached this way must pass the checks the
smeared state passed (the kink limit, except on the elements beside an attachment node,
which carry its slope jump as curvature at any mesh size; the tensile contract under
`tensile_safety True`; the physical-branch audit; the stability test), or the solve fails
closed naming the check; a state that passes them is reported in a note. The deck now solves in
1.8 s, its fairlead and anchor tensions within 0.04 % and 0.2 % of the deck with the
equivalent smeared buoyancy section; in 0.6 m/s, and on the coarse mesh, it solved before
and its results are unchanged. A polish whose Newton steps all converge takes the same
solves as before, so every other deck is unchanged. A new test (`attachment_cross_current`)
checks the four cases against their smeared twins.
- The development environment (`environment.yml`) excludes OpenBLAS 0.3.34, which caused the
access violation in the modal analysis tests listed under Known issues for 0.1.1. On AMD
Zen 4 and Zen 5 CPUs that expose AVX-512, OpenBLAS 0.3.34 enlarges the GEMM blocking,
Expand Down
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,19 @@ if(Python3_Interpreter_FOUND)
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")

# Discrete buoyancy modules on a lazy wave in a cross current (the attachment polish falls
# back from diverging Newton steps on the frictional seabed): the static solve converges and
# its end tensions match the equivalent smeared section.
add_test(NAME attachment_cross_current
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_attachment_cross_current.py
--exe $<TARGET_FILE:cabledyn>
--data ${CMAKE_CURRENT_SOURCE_DIR}/tests/data
--output ${CMAKE_BINARY_DIR}/attachment_cross_current)
set_tests_properties(attachment_cross_current PROPERTIES
LABELS "python;hermite;static;robustness;attachments"
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")

# Finite-EI generalised-alpha blends: force-blend dtM convergence under prescribed surge.
add_test(NAME hermite_force_blend_dt
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_hermite_force_blend_dt.py
Expand Down
6 changes: 3 additions & 3 deletions doc/outputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ Node channels on a refined line
``<J>`` is always a node of the **deck** mesh. The static solve of a finite-EI line can refine
its mesh (``OPTIONS adaptive_mesh``, or the automatic refinement after a failed stability test
or an unresolved curvature, which a note of the initialization report names). A refinement splits
deck elements, so each deck node is a node of the refined mesh at the same unstretched arc length
from End A, and ``Ten<L>N<J>``, ``Curv<L>N<J>``, ``BendMom<L>N<J>``, ``L<L>N<J>…``,
``Torq<L>N<J>`` and ``Twist<L>N<J>`` report deck node ``J`` there, on every route (standalone,
deck elements (along the whole line or only where the state needs it), so each deck node is a
node of the refined mesh at the same unstretched arc length from End A, and ``Ten<L>N<J>``,
``Curv<L>N<J>``, ``BendMom<L>N<J>``, ``L<L>N<J>…``, ``Torq<L>N<J>`` and ``Twist<L>N<J>`` report deck node ``J`` there, on every route (standalone,
mixed, multibody, OpenFAST and the C API ``CableDyn_EvalChannel``). ``.static.out``, the range
graphs, the per-line files and the C API ``CableDyn_GetLineValues`` list every node of the
refined mesh instead, and ``.elements.out`` every element. To find deck node ``J`` among them,
Expand Down
44 changes: 40 additions & 4 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1276,9 +1276,28 @@ mesh-sequenced route described below first and this route as its fallback):
does not converge is restarted at full ``EI``.
3. **Polish and diagnosis** on the deck mesh at the static tolerance. A residual floor above it
is accepted at :math:`10^{-6}` (or, for a line on the seabed, :math:`10^{-5}`, nodes
alternating across the 1 µm contact blend) and reported. A deck mesh too coarse for the
bending length (continuation or polish failing, or an element folded beyond
:math:`L_0\kappa = 0.7`) repeats the route on a mesh refined until the elements are at most
alternating across the 1 µm contact blend) and reported. An element folded beyond
:math:`L_0\kappa = 0.7` on the deck mesh is refined locally, from the polished state, until
no element exceeds :math:`L_0\kappa = 0.35`; ``adaptive_mesh`` refines the same way, to its
own target. A refinement pass splits into :math:`2^k` equal elements every element whose
sampled :math:`L_0\kappa` exceeds 0.12 (or the requested target, when stricter), that is
longer than half its bending length :math:`(EI/|w|)^{1/3}`, or, at a line end, longer than
its boundary layer :math:`\sqrt{EI/T}`, and the elements about a node whose seabed contact
differs from both neighbours; :math:`k` is the smallest that meets the criterion, at most 4
(16 elements per deck element). The neighbours are then split until no element is more than
twice as long as the next one (or than the ratio the deck mesh already has there) and none
is left longer than both of its neighbours with fewer splits than either (a single coarser
element between finer ones carries a spurious axial oscillation), the state is carried to
the new mesh by the Hermite interpolant of each element and polished, and the pass is
repeated on the polished state while the target is not met and an element can still be
split (at most 12 passes), within 8192 elements: a pass that would exceed them gives up the
bending-length splits first, then the grading, and only then the curvature, end-layer and
contact splits. Elements the criteria leave alone keep their deck length, so
a single coarse section costs only its own refinement (a 462-element lazy
wave whose 180 m top section has two elements: 492 elements, where refining the whole line
by the factor of its worst element gave 7392). A deck mesh too coarse for the bending length
whose continuation or polish fails, or whose folded element the local refinement does not
resolve, repeats the route on a mesh refined until the elements are at most
half the bending length (when the continuation on that mesh runs out of its iteration
budget, on the coarser powers of two down to twice the deck mesh); a rotationally
restrained end whose boundary layer :math:`\sqrt{EI/T}` is shorter than its element, which
Expand Down Expand Up @@ -2311,7 +2330,24 @@ the nodal tangent :math:`\mathbf{m}_j/\lvert\mathbf{m}_j\rvert` (the line's Mori
and, through :math:`\mathbf{m}_j`, the position tangent exactly. The statics start from the
equilibrium with the net weight smeared over the node's two elements and continue to the lumped
load in warm-started Newton solves; in a deck current the drag at rest is added and the final
solve is repeated with the drag of its own solution until the nodes stop moving. As the pitch :math:`p` of identical modules shrinks, the discrete equilibrium
solve is repeated with the drag of its own solution until the nodes stop moving. The load moves
in eighths; a step whose damped Newton solve does not converge is repeated from the last
converged state with pseudo-transient continuation and then with a residual-merit line search,
and is halved (down to 1/1024) when neither converges. A halved step doubles again (up to 1/8)
after two consecutive converged steps of its size; each time a doubled step fails, the number
of converged steps a doubling waits for doubles, so a homotopy that converges steadily at one
size and fails at twice it keeps advancing and tries the larger size about ten times at most.
At most 64 load steps may fail in all. A discrete state reached this way passes the kink,
tensile, physical-branch and stability checks of the smeared state before it is accepted, the
kink limit :math:`L_0\kappa \le 0.7` applied away from the attachment nodes: a lumped load
turns the line by a slope jump :math:`\theta` at its node, which the :math:`C^1` elements
beside the node carry as :math:`L_0\kappa \approx 2\theta` at any mesh size. The smeared state carries no
attachment drag, and on a frictional seabed, whose regularised friction force turns from its
sticking stiffness to its sliding capacity over a short slip, the Newton update for a
cross-flow drag can overshoot and diverge from the first step (a lazy wave with 25 modules in a
0.3 m/s cross current on 2 m elements, even in steps of 1/64), which the pseudo-transient
regularisation avoids.
As the pitch :math:`p` of identical modules shrinks, the discrete equilibrium
converges to the smeared section at :math:`O(p^2)`.

**Line failure.** A ``FAILURE`` row detaches a line end from its point at a prescribed time or
Expand Down
29 changes: 29 additions & 0 deletions doc/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,19 @@ but a few geometries are genuinely hard:
the mesh-sequenced state is prolongated and polished there. If the message names that refined
mesh as well (``still unstable on the refined mesh``), the instability is physical: check the
layout, the line length and the buoyancy.
- **Discrete buoyancy modules.** ``finite-EI static solve with discrete ATTACHMENTS failed at
load fraction ...`` means the homotopy from the smeared modules to the lumped ones (see
*Discrete attachments* in :doc:`theory`) did not reach the discrete equilibrium: the damped
Newton solve of a load step did not converge, nor did its pseudo-transient and line-search
repetitions, down to steps of 1/1024 of the module loads (or 64 load steps failed in all).
The message names the load fraction of the first failed solve and the load fraction the
homotopy reached. A discrete state reached by those repetitions or smaller steps is checked as
the smeared one was; ``... the discrete equilibrium reached after a failed Newton solve ...``
names the check it failed (the kink limit away from the attachment nodes, the tensile
contract, the physical-branch audit or the stability test), and a state that passes them is
reported in the note ``... was reached after a failed Newton solve ... and passed the
acceptance checks of the smeared state``. Check that the deck with the modules replaced by the equivalent
smeared buoyancy section solves; if it does, the discrete layout itself is the difficulty.
- **A cold start at full load.** The static solve continues the load in stages; if you have
hand-tuned a case into a bad basin, remove the tuning and let the default continuation run
from the catenary/arch seed.
Expand Down Expand Up @@ -754,6 +767,22 @@ Warnings and notes that do not stop a run
:math:`(EI/|w|)^{1/3}` (see :doc:`modeling`, step 5). The run uses
the refined mesh, statics and dynamics alike, and its outputs have that many segments.
Mesh the touchdown and section changes to that rule to keep the deck mesh.
* - ``Note: line ...: the deck mesh (... elements) could not resolve the curvature of the
equilibrium; refined to ... elements``
- the deck mesh is too coarse for the bends of the static state. Either an element folded
beyond :math:`L_0\kappa = 0.7` (a bend shorter than the element), and the static solve
refined the mesh locally where the bend is, and where elements are longer than half the
bending length, at most 16-fold per deck element and graded into the neighbouring
elements; or the continuation or polish failed on a deck mesh with elements longer than
half the bending length :math:`(EI/|w|)^{1/3}`, and the route was repeated on the whole
line refined uniformly by a power of two, up to the factor at which every element meets
that length (or, at a rotationally
restrained end, on end elements halved toward the end down to its boundary layer). See
:doc:`theory`, Static equilibrium. The run uses the refined mesh, statics and dynamics
alike, and its profile and per-line outputs have that many segments; the refinement
only splits deck elements, so the node channels still name deck nodes (see
:ref:`outputs-refined-nodes`). Mesh the line to the bending-length rule to keep the deck
mesh.
* - ``Note: line ... starts the dynamics from a static state solved in its vertical plane that
is unstable out of that plane on its mesh of ... elements, the coarsest ... m long where
half the bending length (EI/|w|)^(1/3) is ... m; ...``
Expand Down
Loading
Loading