diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a298876..f78f9db1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,12 @@ All notable changes to CableDyn are recorded in this file. The format follows
its static solve, even straight along its chord: the convergence test scaled the residual by
the line's weight alone, far below the round-off of its axial forces. A taut line's scale now
includes the tension its stretched chord implies; slack lines are unchanged.
+- The anchor force of a finite-EI line resting on a sloped seabed (`bathymetryFile`). The floor
+ took the whole downward part of the end force, so a cable laid down the slope from its anchor
+ lost the down-slope pull: on a 10° slope `AnchTen` read 1.5 % low and `AnchFz`/`Point
Fz`
+ read 0. The floor now takes only the part pressing into it along its normal, and on a
+ frictional seabed the along-floor part of the end node's weight up to the friction it can
+ hold; flat seabeds are unchanged.
## [0.3.0] - 2026-10-23
diff --git a/doc/outputs.rst b/doc/outputs.rst
index cfe4e6f2..2bc94bca 100644
--- a/doc/outputs.rst
+++ b/doc/outputs.rst
@@ -610,9 +610,14 @@ In :doc:`tutorial_catenary` (:math:`w` = 3.18 kN/m, :math:`\Delta L` = 10 m,
:math:`\delta` = 0.13 m) this estimate is −18.4 kN, and the run reports ``AnchFz1`` = −18.2 kN
beside ``AnchFH1`` = 191.5 kN (the horizontal tension) and ``AnchTen1`` = 192.4 kN. The share
belongs to the lumped anchor node: it scales with the anchor segment length, vanishes as the mesh
-is refined, and is not uplift. A finite-EI (cubic-Hermite) end resting on the seabed leaves its
-end node's weight to the floor and reads ``AnchFz`` = 0 there. Read the vertical anchor load from
-``AnchFz``, not from the difference between ``AnchTen`` and ``AnchFH``.
+is refined, and is not uplift. A finite-EI (cubic-Hermite) end resting on the seabed leaves the
+part of its end force pressing into the floor (along the floor normal) to the floor: on a flat
+seabed that is the end node's weight, and ``AnchFz`` reads 0 there. On a sloped seabed
+(``bathymetryFile``) the anchor keeps the line's along-floor pull, so a line laid down the slope
+from its anchor reads a negative ``AnchFz``, the down-slope component of its tension; on a
+frictional seabed (``frictionMu``) the floor also holds the along-floor part of the end node's
+own weight, up to the friction coefficient times that normal load. Read the vertical anchor load
+from ``AnchFz``, not from the difference between ``AnchTen`` and ``AnchFH``.
Line-node channels
~~~~~~~~~~~~~~~~~~
diff --git a/src/CableDyn_HermiteCableDynamic.f90 b/src/CableDyn_HermiteCableDynamic.f90
index 05df1ccb..60bcb3ad 100644
--- a/src/CableDyn_HermiteCableDynamic.f90
+++ b/src/CableDyn_HermiteCableDynamic.f90
@@ -5297,13 +5297,13 @@ SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg)
REAL(wp), PARAMETER :: PI_L = 3.14159265358979323846_wp
REAL(wp) :: qe(12), ve(12), fe(12), fdrag(12), fdamp(12), energy, fdry(4), kdry(4, 4), r3(3), gate, gate_gap
REAL(wp) :: dry_wl, dry_b, dry_r, gap, normal, normal_gap, z_floor, xg, yg, gxg, gyg
- REAL(wp) :: gx, gy, sfac, nvec(3), vn, rk(3), jrel(3, 3), jtan(3, 3)
+ REAL(wp) :: gx, gy, sfac, nvec(3), vn, rk(3), jrel(3, 3), jtan(3, 3), fn, wt(3)
REAL(wp) :: curv_e(3), fcrease_e(3), kcrease_e(3, 3)
INTEGER :: e, i0, iz, zslot, es, k
LOGICAL :: dry, has_jac
CHARACTER(1024) :: em2
- ErrStat = CD_HCDYN_OK; ErrMsg = ''; force = CD_ZERO; gap = -HUGE(CD_ONE)
+ ErrStat = CD_HCDYN_OK; ErrMsg = ''; force = CD_ZERO; gap = -HUGE(CD_ONE); nvec = [CD_ZERO, CD_ZERO, CD_ONE]
IF (.NOT. model%initialized) THEN
ErrStat = CD_HCDYN_BADINPUT; ErrMsg = 'CD_HermiteCable_Dyn_End_Force: model not initialised'; RETURN
END IF
@@ -5451,12 +5451,25 @@ SUBROUTINE CD_HermiteCable_Dyn_End_Force(model, node, force, ErrStat, ErrMsg)
force = force + mt*gend(:, MERGE(1, 2, node == 1))
END BLOCK
END IF
- ! An end resting on the seabed (at or inside the contact blend) does not carry the end
- ! node's weight: the floor does, as it does for the grounded nodes beside it. The
- ! downward part of the end force is left to the seabed, so a grounded end reports the
- ! horizontal (grounded-run) tension.
- IF ((model%has_contact .OR. model%kn > CD_ZERO) .AND. .NOT. (gap <= -CD_SEABED_CONTACT_BLEND)) &
- force(3) = MAX(force(3), CD_ZERO)
+ ! An end resting on the seabed (at or inside the contact blend) leaves to the floor the part
+ ! of its end force pressing into it along the upward normal nvec (the end node's weight on a
+ ! flat floor), as the floor carries the grounded nodes beside it: a grounded end on a flat
+ ! floor reports the horizontal (grounded-run) tension, and one on a slope keeps the line's
+ ! along-floor pull, down-slope component included. On a frictional seabed the floor also
+ ! holds the along-floor part of the end node's own weight, up to mu times that normal load
+ ! (the line's pull stays with the anchor); without friction it stays with the line, as in
+ ! the floor's end-element support (held_end_floor_support).
+ IF ((model%has_contact .OR. model%kn > CD_ZERO) .AND. .NOT. (gap <= -CD_SEABED_CONTACT_BLEND)) THEN
+ fn = DOT_PRODUCT(force, nvec)
+ IF (fn < CD_ZERO) THEN
+ force = force - fn*nvec
+ IF (model%fr_active .AND. model%w(e) > CD_ZERO) THEN
+ wt = -model%w(e)*0.5_wp*model%l0(e)*([CD_ZERO, CD_ZERO, CD_ONE] - nvec(3)*nvec)
+ IF (NORM2(wt) > CD_ZERO) &
+ force = force - MIN(CD_ONE, MIN(model%contact_mu, model%contact_mu_axial)*(-fn)/NORM2(wt))*wt
+ END IF
+ END IF
+ END IF
END SUBROUTINE CD_HermiteCable_Dyn_End_Force
SUBROUTINE CD_HermiteCable_Dyn_Set_Output_Recovery(model, element_recovery)
diff --git a/tests/test_anchor_uplift.py b/tests/test_anchor_uplift.py
index 66fd076b..61648c2c 100644
--- a/tests/test_anchor_uplift.py
+++ b/tests/test_anchor_uplift.py
@@ -19,6 +19,8 @@
* dynamics: a fairlead surge lifts the anchor of a catenary; at every output time the channels
are finite and consistent, ``TDPGrd > 0`` implies ``AnchFz < 0`` and ``AnchFz > 0`` implies
``TDPGrd = 0``, and the held end state is the suspended elastic catenary;
+* sloped seabed: a finite-EI cable laid down a slope from its anchor keeps the down-slope pull,
+ so its anchor force runs along the floor and ``AnchTen`` continues the line tension;
* fail-closed contracts: unknown lines and the two-moving-end finite-EI route reject the names.
usage: test_anchor_uplift.py --exe --examples --output
@@ -472,6 +474,63 @@ def main() -> int:
check_anchor_point("multibody march, line 1", out / "rigid6", 1, 4)
check_anchor_point("multibody march, line 2", out / "rigid6", 2, 5)
+ # --- (d) sloped seabed: a finite-EI cable laid down a 10 deg slope from its anchor. The floor
+ # takes only the part of the end force pressing into it, so the anchor keeps the down-slope pull:
+ # the anchor force lies along the floor and AnchTen continues the line tension, where dropping
+ # the whole downward part read cos(10 deg) of it. Up the end element the tension grows by its
+ # along-slope weight w l0 sin(10 deg): on this frictionless floor the along-floor part of the
+ # end node's weight stays with the line.
+ slope = math.radians(10.0)
+ bathy = "".join(f"{x:.1f} {y:.1f} {200.0 + (300.0 - x) * math.tan(slope)!r}\n"
+ for x in range(-200, 701, 100) for y in (-300.0, 300.0))
+ (out / "slope_bathy.txt").write_text(bathy, encoding="utf-8", newline="\n")
+ d_pc, m_pc, l0_pc = 0.16, 36.7, 2.0
+ w_pc = (m_pc - RHO * math.pi / 4.0 * d_pc**2) * G
+ deck = f"""finite-EI cable laid down a 10 deg slope from its anchor
+--- LINE TYPES ---
+TypeName Diam MassDenInAir EA BA EI Cd_n Cd_t Ca_n Ca_t
+(-) (m) (kg/m) (N) (-) (Nm2) (-) (-) (-) (-)
+pc {d_pc} {m_pc} 4.69e8 -1 19900 1.2 0.1 1 0
+--- POINTS ---
+ID Type X Y Z Mass Vol CdA Ca
+(-) (-) (m) (m) (m) (kg) (m3) (m2) (-)
+1 Coupled 0 0 -20 0 0 0 0
+2 Fixed 300 0 -200 0 0 0 0
+--- LINES ---
+ID NodeA NodeB Outputs
+(-) (-) (-) (-)
+1 1 2 -
+--- SECTIONS ---
+LineID LineType Length NumSegs
+(-) (-) (m) (-)
+1 pc 410 {int(410 / l0_pc)}
+--- OPTIONS ---
+9.80665 g
+1025.0 rhoW
+slope_bathy.txt bathymetryFile
+100000.0 kBot
+1.0e4 cBot
+0.05 dtM
+0.0 TMax
+--- OUTPUTS ---
+{" ".join(anchor_channels(1, 2))}
+--- need this line ---
+"""
+ (out / "slope.dat").write_text(deck, encoding="utf-8", newline="\n")
+ run(args.exe, out / "slope.dat", out / "slope", env)
+ check_anchor_point("finite-EI cable on a sloped seabed", out / "slope", 1, 2)
+ hist = read_output(out / "slope.out")
+ ten, fz, fh = (float(hist.column(c)[0]) for c in ("AnchTen1", "AnchFz1", "AnchFH1"))
+ rows = [row.split() for row in (out / "slope.static.out").read_text(encoding="utf-8").splitlines()[3:]]
+ t_next = float(rows[-2][6])
+ angle = math.degrees(math.atan2(-fz, fh))
+ check(abs(angle - 10.0) < 0.2, f"sloped seabed: the anchor force runs {angle:.2f} deg below horizontal, along "
+ "the 10 deg floor (AnchFz < 0: the down-slope pull)")
+ expect = t_next + w_pc * l0_pc * math.sin(slope)
+ check(abs(ten - expect) < 0.05 * w_pc * l0_pc,
+ f"sloped seabed: AnchTen1 {ten:.1f} N continues the next node's tension {t_next:.1f} N plus the end "
+ f"element's along-slope weight (expected {expect:.1f} N)")
+
# --- fail-closed contracts
bad = set_outputs(chain_deck(R3, 550.0, 55, 500.0, 100.0, 0.0, "1.0e5"), ["AnchFz2"])
(out / "bad_line.dat").write_text(bad, encoding="utf-8", newline="\n")
diff --git a/tests/test_static_friction_as_laid.py b/tests/test_static_friction_as_laid.py
index aacf39be..6482c12d 100644
--- a/tests/test_static_friction_as_laid.py
+++ b/tests/test_static_friction_as_laid.py
@@ -29,8 +29,8 @@
plane of the chord (45 degrees) is solved in 3D from the start, so the state is consistent
(friction within mu N, a march from it stays at rest), while 180 degrees keeps the planar solve
and flips the reference (the anchor tension falls below the default one);
-* ``fei_cross`` (a cable on a cross slope, EI = 0 and finite EI): the lateral anchor force stays a
- small fraction of the one a reference without the sink offset of the laid nodes would give, and
+* ``fei_cross`` (a cable on a cross slope, EI = 0 and finite EI): the lateral anchor force stays
+ below the one a reference without the sink offset of the laid nodes would give, and
the finite-EI line, solved in 3D because the seabed slopes across its chord, stays at rest when
marched;
* ``att_cross`` (a finite-EI line with discrete buoyancy modules on a cross slope): the reference
@@ -413,9 +413,11 @@ def main() -> int:
# the friction reference keeps that offset. A reference without it would leave the run shifted
# down the slope by the sink, about w tan(slope)/(kBot d) = 1 cm, which the anchor would carry
# as a lateral force of AnchTen times that shift over an element (about +0.4 kN, down the slope).
- # With it the lateral anchor force is a small fraction of that, up the slope, for the EI = 0
- # line and for the finite-EI one (whose end force follows the cable's end tangent where the
- # EI = 0 line's follows the chord of its first element). The seabed slope across the chord
+ # With it the lateral anchor force stays below that: up the slope for the EI = 0 line, whose end
+ # force follows the chord of its first element, and in the plane of the floor for the finite-EI
+ # one, whose end force follows the cable's end tangent less the part pressing into the floor and
+ # the along-floor part of its end node's weight, which the friction holds.
+ # The seabed slope across the chord
# pushes the run out of its vertical plane against its friction, so the finite-EI line is solved
# in 3D and a march from its static state stays at rest.
cdir = root / "fei_cross"
@@ -428,12 +430,22 @@ def main() -> int:
check(rc == 0, "fei_cross %s converges (rc %d)%s" % (tag, rc, "" if rc == 0 else ": " + log.strip()[-300:]))
if rc == 0:
r0 = table(cdir / (tag + ".out"))[0]
- # the anchor force of a run shifted down the slope by its sink, half of it
- bound = 0.5 * r0["AnchTen1"] * w / (1.0e5 * d) * math.tan(math.radians(5.0)) / 5.0
+ # the anchor force of a run shifted down the slope by its sink
+ ref = r0["AnchTen1"] * w / (1.0e5 * d) * math.tan(math.radians(5.0)) / 5.0
fy[tag] = r0["Point2Fy"]
- check(-bound < fy[tag] < 0.0,
- "fei_cross %s: lateral anchor force %.4g N up the slope, within half the %.4g N of a reference "
- "without the sink" % (tag, fy[tag], 2.0 * bound))
+ if tag == "ei0":
+ check(-0.5 * ref < fy[tag] < 0.0,
+ "fei_cross ei0: lateral anchor force %.4g N up the slope, within half the %.4g N of a "
+ "reference without the sink" % (fy[tag], ref))
+ else:
+ # A finite-EI end resting on the floor leaves the part of its end force pressing into
+ # the floor to it, here the pull of the run sunk into the penalty seabed along the
+ # slope's normal (about AnchTen delta / l0, whose lateral part the EI = 0 line keeps),
+ # and the friction holds its end node's weight across the slope: what is left is the
+ # run's pull in the plane of the floor, below the reference.
+ check(abs(fy[tag]) < ref,
+ "fei_cross fei: lateral anchor force %.4g N in the plane of the floor, below the %.4g N of a "
+ "reference without the sink" % (fy[tag], ref))
if rc == 0 and tag == "fei":
rc, _ = run(a.exe, cdir, "fei_rest", deck("fei cross rest", **cd, tmax=1.0))
check(rc == 0, "fei_cross fei at-rest march runs (rc %d)" % rc)