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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ All notable changes to CableDyn are recorded in this file. The format follows

## [Unreleased]

### Fixed

- Finite-EI node tension, curvature and bend moment next to the touchdown point: the floor
reaction of the first grounded node was spread over its grounded half-element alone, wherever
the touchdown point lay in the touchdown element. The local tension error there fell only at
the first order with the element length (4.3, 1.9, 1.0 N at 1.6, 0.8, 0.4 m elements on a
lazy-wave cable at 270 N) and the node outputs stepped as each node grounded or lifted off.
The touchdown element now takes the reaction of its grounded stretch, from the grounded node
to the touchdown point located from the two nodes' clearances: the error falls at the second
order (2.1, 0.7, 0.2 N) and the outputs vary continuously.

## [0.4.1] - 2026-11-08

### Added
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2779,13 +2779,24 @@ if(Python3_Interpreter_FOUND)
ENVIRONMENT "${_cabledyn_python_test_environment}")
# Node tension through touchdown on a coarse mesh (10 m grounded elements) follows a four
# times finer reference within 3.5 %: the touchdown element, grounded at one end only, takes
# no share of its grounded node's floor reaction.
# the floor reaction of its grounded stretch alone, not half an element's.
add_test(NAME driver_touchdown_recovery
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/check_touchdown_recovery.py
$<TARGET_FILE:cabledyn>)
set_tests_properties(driver_touchdown_recovery PROPERTIES
LABELS "python;driver;integration;static"
ENVIRONMENT "${_cabledyn_python_test_environment}")
# Node tension at touchdown converges at second order wherever the touchdown point falls in
# its element: the local error over a sweep of meshes at 1.6, 0.8 and 0.4 m elements falls
# by at least 2.5 from 0.8 to 0.4 m and stays below 0.35 N there (the touchdown element takes
# the floor reaction of its grounded stretch).
add_test(NAME driver_touchdown_convergence
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/check_touchdown_convergence.py
$<TARGET_FILE:cabledyn>)
set_tests_properties(driver_touchdown_convergence PROPERTIES
LABELS "python;driver;integration;static"
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")
# A hang-off through a tapered bend stiffener follows the planar elastica (scipy solve_bvp)
# within 2 % of the root moment and 1 cm, and node by node on a sweep of element sizes within
# 0.5 % of the local curvature on 0.1 m elements; skipped where scipy is not installed.
Expand Down
13 changes: 13 additions & 0 deletions doc/outputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,19 @@ the channels report that end node (and ``TDP<L>Grd`` reads 0); when the whole li
seabed, the suspended end node. ``TDP<L>Grd`` is the grounded length of the `Anchor uplift`_
check.

The seabed carries the line at its nodes, so the mesh at touchdown sets how finely the touchdown
point and the tension around it are resolved: a node lands on the floor at once, and in a
dynamic run its landing shakes the line. The node tension near touchdown converges at the second
order in the element length there. On the lazy-wave cable of
``lozon_gomex80_power_cable_motion.dat`` (bending length :math:`\sqrt{EI/T}` = 3.9 m at
touchdown, tension 1.3 to 1.9 kN) it departs from a 1024-element solution by at most 140, 55,
19 and 5.8 N with 3.3, 1.6, 0.8 and 0.4 m elements at touchdown over the heave cycle (time step
0.0125 s), and by 4.6, 1.0 and 0.25 N in the static state with 3.3, 1.6 and 0.8 m elements; on
the 3.3 m mesh ``TDP<L>s`` moves at up to 4 m/s while a node lands (0.7 m/s converged) and its
lowest value differs from the converged one by 0.6 m. Elements no longer than about a fifth of
:math:`\sqrt{EI/T}` at touchdown keep the node tension there within about 1.5 % of the
converged value through the motion, and a tenth within 0.5 %.

Point channels
~~~~~~~~~~~~~~

Expand Down
21 changes: 16 additions & 5 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,22 @@ end residual

holds only the element's own distributed loads: consistent submerged weight, the buoyancy lost
above the free surface, drag, Froude-Krylov force, structural and added-mass inertia, and the
seabed reaction of its end nodes, each nodal reaction spread uniformly over the node's tributary
length (the distributed floor reaction it stands for; without it a line resting on the floor
would report the fixed-end moment :math:`w L_0^2/12` of its own weight; at a held line end whose
end element lies on the floor, the reaction of the end half is the floor-support share of the
weight, the share that the static and dynamic residuals carry on the end tangent rows).
seabed reaction of its end nodes, each nodal reaction spread uniformly over the grounded part of
the node's tributary length (the distributed floor reaction it stands for; without it a line
resting on the floor would report the fixed-end moment :math:`w L_0^2/12` of its own weight; at a
held line end whose end element lies on the floor, the reaction of the end half is the
floor-support share of the weight, the share that the static and dynamic residuals carry on the
end tangent rows). A half-element whose far node is on the floor is grounded whole; the
touchdown element, on the floor at one end only, is grounded from that end to the touchdown
point, where the clearance interpolated linearly between its two nodes reaches the contact onset
height (at most its half). The grounded stretch reaches the half-element as the suspended node
reaches the floor, and vanishes with the reaction as the grounded node lifts off, so the node
outputs vary continuously as nodes ground and lift off. With the reaction of the first grounded
node spread over its grounded half-element alone, the tension near touchdown carried a local
error that depended on where the touchdown point fell in its element and fell only at the first
order (at most 4.3, 1.9 and 1.0 N at 1.6, 0.8 and 0.4 m elements on the lazy-wave cable of
``lazy_wave_buoyancy_smeared.dat``, line tension 270 N there; 2.1, 0.7 and 0.2 N with the
grounded stretch), and it stepped as each node grounded.
:math:`\mathbf{g}_e`
is the generalised force the two end nodes exert on the element: its position rows at the
End-B side of the internal arc are the section force :math:`\mathbf{F}_j^-` just before node
Expand Down
113 changes: 77 additions & 36 deletions src/CableDyn_HermiteCableDynamic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7257,22 +7257,26 @@ PURE FUNCTION unit_tangent(model, node) RESULT(t)
END IF
END FUNCTION unit_tangent

SUBROUTINE node_contact_normal(model, node, fc, ErrStat, ErrMsg)
SUBROUTINE node_contact_normal(model, node, fc, ErrStat, ErrMsg, clearance)
!! Frictionless seabed contact force on a node at the committed state, exactly as
!! assemble_contact applies it: the normal force with its damping and, in a rounded crease
!! of the bathymetry, the elastic increment of the penalty potential (crease_contact_increment).
!! clearance is the node's normal distance above the height at which the contact law engages:
!! negative on the floor, positive above it.
TYPE(CD_HermiteCableDynType), INTENT(IN) :: model
INTEGER, INTENT(IN) :: node
REAL(wp), INTENT(OUT) :: fc(3)
INTEGER, INTENT(OUT) :: ErrStat
CHARACTER(*), INTENT(OUT) :: ErrMsg
REAL(wp), INTENT(OUT), OPTIONAL :: clearance
REAL(wp) :: z_floor, gx, gy, xg, yg, gxg, gyg, sfac, nvec(3), gap, normal, normal_gap, vn, gate, gate_gap
REAL(wp) :: curv_g(3), fcrease(3), kcrease(3, 3)
INTEGER :: iz, es
LOGICAL :: creased
CHARACTER(200) :: em2
ErrStat = CD_HCDYN_OK; ErrMsg = ''
fc = CD_ZERO
IF (PRESENT(clearance)) clearance = HUGE(CD_ONE)
iz = 6*(node - 1) + 3
IF (model%has_contact) THEN
z_floor = model%seabed_z
Expand All @@ -7293,6 +7297,7 @@ SUBROUTINE node_contact_normal(model, node, fc, ErrStat, ErrMsg)
sfac = SQRT(CD_ONE + gx*gx + gy*gy)
nvec = [-gx, -gy, CD_ONE]/sfac
gap = (z_floor - model%q(iz))/sfac
IF (PRESENT(clearance)) clearance = -gap - CD_SEABED_CONTACT_BLEND
CALL CD_Seabed_Normal_Law(gap, model%contact_kn(node), normal, normal_gap)
CALL CD_Seabed_Contact_Gate(gap, gate, gate_gap)
IF (normal <= CD_ZERO .AND. gate <= CD_ZERO) RETURN
Expand All @@ -7308,6 +7313,7 @@ SUBROUTINE node_contact_normal(model, node, fc, ErrStat, ErrMsg)
END IF
ELSE IF (model%kn > CD_ZERO) THEN
gap = model%seabed_z - model%q(iz)
IF (PRESENT(clearance)) clearance = -gap
IF (gap > CD_ZERO) fc(3) = model%kn*gap*model%trib(node)
END IF
END SUBROUTINE node_contact_normal
Expand Down Expand Up @@ -7364,7 +7370,7 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg)
INTEGER, PARAMETER :: ZS(4) = [3, 6, 9, 12]
REAL(wp) :: qe(12), ve(12), ae(12), fe(12), fx(12), energy, fdry(4), kdry(4, 4)
REAL(wp) :: dry_wl, dry_b, dry_r, hf_mid(3), l0, fca(3), fcb(3), c, a4(4), m4(4, 4)
REAL(wp) :: support(3), dsupport(3), nin(3)
REAL(wp) :: support(3), dsupport(3), nin(3), xa, xb, ca(4), cb(4)
INTEGER :: es, k, inode
LOGICAL :: dry
CHARACTER(200) :: em2
Expand Down Expand Up @@ -7465,39 +7471,46 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg)
! Seabed contact acts at the nodes; spread over the grounded line next to each node it is the
! distributed floor reaction it stands for. Its consistent share is taken out of the element,
! so a line resting on the floor carries no fixed-end moment of its own weight. A node's
! reaction is shared by the half-elements beside it whose far node is on the floor as well
! (grounded elements), by length. The touchdown element, on the floor at one end only, is
! mostly suspended and takes none of it; spreading the reaction onto it understated the
! tension of the last suspended node by the floor reaction of half an element (5 % on a
! 10 m lazy-wave mesh). A node with no grounded element beside it (a node just touching
! down, or an isolated contact) shares its reaction by tributary length.
! reaction is spread uniformly over the grounded part of its two half-elements and shared
! between them by that length (grounded_share). The touchdown element, on the floor at one
! end only, is grounded from that end to the touchdown point, located on it from the two
! nodes' clearances; it takes the reaction of that stretch alone (spreading the reaction over
! its half understated the tension of the last suspended node by the floor reaction of half
! an element, 5 % on a 10 m lazy-wave mesh). The grounded stretch grows to the half-element
! as the suspended node reaches the floor, so the spread, and the node outputs, change
! continuously as nodes ground and lift off.
IF (model%has_contact .OR. model%kn > CD_ZERO) THEN
CALL node_contact_normal(model, e, fca, es, em2)
IF (es /= CD_HCDYN_OK) GOTO 900
CALL node_contact_normal(model, e + 1, fcb, es, em2)
IF (es /= CD_HCDYN_OK) GOTO 900
CALL grounded_share(e, e, fca, es)
CALL grounded_share(e, e, fca, xa, es)
IF (es /= CD_HCDYN_OK) GOTO 900
CALL grounded_share(e + 1, e, fcb, es)
CALL grounded_share(e + 1, e, fcb, xb, es)
IF (es /= CD_HCDYN_OK) GOTO 900
! A held end whose end element lies on the floor (assemble_residual): the seabed carries the
! element's weight with its consistent end moment, which the held end node's own contact
! (a point reaction at an anchor sitting on the floor) cannot. The floor reaction of the
! end half of that element is the support share of its weight, uniform with the reaction
! of the neighbouring node, so that a laid end element carries no fixed-end moment.
IF (e == 1) THEN
IF (held_end_floor_support(model, model%q, 1, support, dsupport, inode, nin)) &
fca = (model%w(1)*l0)*support
IF (held_end_floor_support(model, model%q, 1, support, dsupport, inode, nin)) THEN
fca = (0.5_wp*model%w(1)*l0)*support; xa = 0.5_wp
END IF
END IF
IF (e == model%ne) THEN
IF (held_end_floor_support(model, model%q, 2, support, dsupport, inode, nin)) &
fcb = (model%w(e)*l0)*support
IF (held_end_floor_support(model, model%q, 2, support, dsupport, inode, nin)) THEN
fcb = (0.5_wp*model%w(e)*l0)*support; xb = 0.5_wp
END IF
END IF
! integrals of the four shapes over xi in [0, 1/2] (fca) and [1/2, 1] (fcb)
g(1:3) = g(1:3) - (0.40625_wp*fca + 0.09375_wp*fcb)
g(4:6) = g(4:6) - l0*(0.0572916666666666667_wp*fca + 0.0260416666666666667_wp*fcb)
g(7:9) = g(7:9) - (0.09375_wp*fca + 0.40625_wp*fcb)
g(10:12) = g(10:12) + l0*(0.0260416666666666667_wp*fca + 0.0572916666666666667_wp*fcb)
! the loads fca and fcb spread uniformly over xi in [0, xa] and [1 - xb, 1]: the integrals
! of the four shapes over those stretches per unit length of xi (spread_shapes)
ca = spread_shapes(xa)
cb = spread_shapes(xb)
g(1:3) = g(1:3) - (ca(1)*fca + cb(3)*fcb)
g(4:6) = g(4:6) - l0*(ca(2)*fca - cb(4)*fcb)
g(7:9) = g(7:9) - (ca(3)*fca + cb(1)*fcb)
g(10:12) = g(10:12) - l0*(ca(4)*fca - cb(2)*fcb)
END IF
ae(1:6) = model%a(6*(e - 1) + 1:6*e); ae(7:12) = model%a(6*e + 1:6*(e + 1))
IF (ANY(ABS(ae) > CD_ZERO)) THEN
Expand Down Expand Up @@ -7529,40 +7542,68 @@ SUBROUTINE element_end_residual(model, e, g, ErrStat, ErrMsg)

CONTAINS

SUBROUTINE grounded_share(node, el, fc, esx)
!! Scale the floor reaction fc of node (an end of element el) to el's share of it, as the
!! factor l0(el)/(grounded length beside the node) that the half-element shape integrals
!! below expect: zero when el is not grounded but another element beside the node is, the
!! tributary-length share when no element beside the node is grounded.
SUBROUTINE grounded_share(node, el, fc, x, esx)
!! Element el's share of the floor reaction fc of node (an end of el), and the grounded
!! stretch x of el's half beside the node (a fraction of el, at most 1/2) that it is
!! spread over. Each half-element beside the node is grounded over x = 1/2 when its far
!! node is on the floor as well, and otherwise up to the touchdown point, where the
!! clearance interpolated linearly between the node (on the floor) and the far node (above
!! it) reaches the contact onset; the reaction is shared between the two halves by the
!! grounded length x l0. The touchdown point reaches the far node as that node reaches
!! the floor and the node itself as it lifts off (its reaction then vanishing), so the
!! share and the stretch are continuous in the configuration. A node off the floor with a
!! reaction (a held end the floor supports) keeps the tributary-length share over the
!! half-element.
INTEGER, INTENT(IN) :: node, el
REAL(wp), INTENT(INOUT) :: fc(3)
REAL(wp), INTENT(OUT) :: x
INTEGER, INTENT(OUT) :: esx
REAL(wp) :: grounded_len
LOGICAL :: on_el, grounded
INTEGER :: k
REAL(wp) :: ext, ext_el, grounded_len, c_node, c_far, fdum(3)
LOGICAL :: grounded
INTEGER :: k, far
esx = CD_HCDYN_OK
x = 0.5_wp
IF (.NOT. ANY(ABS(fc) > CD_ZERO)) RETURN
CALL node_contact_normal(model, node, fdum, esx, em2, clearance=c_node)
IF (esx /= CD_HCDYN_OK) RETURN
grounded_len = CD_ZERO
on_el = .FALSE.
ext_el = CD_ZERO
DO k = MAX(1, node - 1), MIN(model%ne, node)
CALL element_on_floor(k, grounded, esx)
IF (esx /= CD_HCDYN_OK) RETURN
IF (grounded) THEN
grounded_len = grounded_len + 0.5_wp*model%l0(k)
IF (k == el) on_el = .TRUE.
ext = 0.5_wp
ELSE
far = MERGE(k, k + 1, k == node - 1)
CALL node_contact_normal(model, far, fdum, esx, em2, clearance=c_far)
IF (esx /= CD_HCDYN_OK) RETURN
ext = CD_ZERO
IF (c_node < CD_ZERO .AND. c_far > c_node) ext = MIN(0.5_wp, -c_node/(c_far - c_node))
END IF
grounded_len = grounded_len + ext*model%l0(k)
IF (k == el) ext_el = ext
END DO
IF (grounded_len > CD_ZERO) THEN
IF (on_el) THEN
fc = fc*model%l0(el)/grounded_len
ELSE
fc = CD_ZERO
END IF
fc = fc*(ext_el*model%l0(el)/grounded_len)
x = ext_el
ELSE IF (model%trib(node) > CD_ZERO) THEN
fc = fc*model%l0(el)/model%trib(node)
fc = fc*(0.5_wp*model%l0(el)/model%trib(node))
END IF
END SUBROUTINE grounded_share

PURE FUNCTION spread_shapes(xs) RESULT(cs)
!! Integrals of the cubic Hermite shapes H1, H2/l0, H3, H4/l0 over xi in [0, xs], divided
!! by xs: the consistent loads of a unit load spread uniformly over that stretch (a point
!! load at xi = 0 as xs goes to zero). A stretch [1 - xs, 1] at the other end takes
!! [cs(3), -cs(4), cs(1), -cs(2)].
REAL(wp), INTENT(IN) :: xs
REAL(wp) :: cs(4)
cs(1) = CD_ONE - xs*xs + 0.5_wp*xs**3
cs(2) = 0.5_wp*xs - 2.0_wp*xs*xs/3.0_wp + 0.25_wp*xs**3
cs(3) = xs*xs - 0.5_wp*xs**3
cs(4) = -xs*xs/3.0_wp + 0.25_wp*xs**3
END FUNCTION spread_shapes

SUBROUTINE element_on_floor(k, grounded, esx)
!! Element k is grounded when both its nodes are on the floor (node_on_floor).
INTEGER, INTENT(IN) :: k
Expand Down
Loading
Loading