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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,19 @@ All notable changes to CableDyn are recorded in this file. The format follows
the force scale and the correction moves no free coordinate by more than `16 eps` times its
scale. A step that meets the tolerance is unchanged: every example and test deck gives
bit-identical outputs.
- A finite-EI step could converge to a spurious root with every nodal tangent reversed, and the
march then failed: a taut 20 m line locked in by the VIV lift, seeded with unit tangents while
its elements were stretched by 7.6e-5, failed within 13 steps at `rho_inf` 0.8 to 1 at 25 and
50 steps per VIV cycle (and without the lift too). The tangents' stretch is the line's stiffest
motion; with little numerical damping its seed offset rang on with a committed acceleration of
4.9e3 1/s^2, and the constant-acceleration and Newmark guesses carried every tangent across
zero (by 3.4 and 1.7 of its length), from where Newton converged to the folded root (2.4e8 J of
strain energy against 3.5 J). A guess that changes the length of a free tangent by more than a
quarter now holds that tangent at its committed value, and a step that ends with a tangent
turned by 90 degrees or more fails, so the step recovery re-solves it. The line now runs at
`rho_inf` 0.5 to 1 and 25 and 50 steps per cycle, with the response of the same line seeded
at its stretch (largest A/D within 0.75 %). Every other step starts as before: every example
and test deck gives bit-identical outputs.

## [0.4.2] - 2026-11-09

Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,14 @@ target_link_libraries(test_hermite_viv PRIVATE cabledyn_core)
add_test(NAME hermite_viv COMMAND test_hermite_viv)
set_tests_properties(hermite_viv PROPERTIES LABELS "fortran;dynamic;viv")

# The Newton predictor against the ringing stretch of the nodal tangents: a taut line seeded with
# unit tangents (off the elements' stretch) at rho_inf 0.5 to 1 and 25 and 50 steps per VIV cycle,
# with and without the lift, against the same line seeded at the stretch.
add_executable(test_hermite_tangent_predictor tests/test_hermite_tangent_predictor.f90)
target_link_libraries(test_hermite_tangent_predictor PRIVATE cabledyn_core)
add_test(NAME hermite_tangent_predictor COMMAND test_hermite_tangent_predictor)
set_tests_properties(hermite_tangent_predictor PROPERTIES LABELS "fortran;dynamic;viv")

add_executable(test_hermite_viv_inline tests/test_hermite_viv_inline.f90)
target_link_libraries(test_hermite_viv_inline PRIVATE cabledyn_core)
add_test(NAME hermite_viv_inline COMMAND test_hermite_viv_inline)
Expand Down
11 changes: 11 additions & 0 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2899,6 +2899,17 @@ over the translational free DOFs, and from the Newmark predictor otherwise (and
under-resolved mode rings, a loosely converged step would keep the extrapolated acceleration,
whereas the zero guess damps it. A failed constant-acceleration attempt is re-solved from the
Newmark predictor. The test uses only the committed state, so a restart is exact.
On a Hermite step either guess holds a free nodal tangent at its committed value where it
would change the tangent's length, the stretch, by more than a quarter (a strain change of 0.25
in one step). A tangent with some components fixed (a planar model fixes the out-of-plane one)
is held on its free components, by their change of the length. The stretch is the line's stiffest motion (:math:`EA` against the tangents' small
consistent mass), and with little numerical damping (:math:`\rho_\infty` near 1) an offset of it
rings on with a committed velocity and acceleration far larger than the motion they make: a
taut line seeded with unit tangents, :math:`7.6\times10^{-5}` off its elements' stretch, had
every tangent carried across zero at 50 steps per VIV cycle, and Newton converged to the root
with every element folded back along its chord. A guess that only turns a tangent is kept (a
line turning fast is often right). A step that still ends with a tangent turned by 90° or more
fails, and the next attempt or the step recovery re-solves it.
The ``EI = 0`` path uses an Armijo line search on :math:`\tfrac{1}{2}\lVert\mathbf{G}\rVert^2`
and converges when :math:`\lVert\mathbf{G}\rVert_\infty` relative to the larger of the external
load and the initial residual falls below the relative tolerance, or below the absolute
Expand Down
66 changes: 65 additions & 1 deletion src/CableDyn_HermiteCableDynamic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4878,7 +4878,7 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r
INTEGER :: axial_worst_element, iv, attempt, n_attempt
INTEGER :: n_ls_tan ! tangents the step's line searches assembled at their accepted trial
REAL(wp) :: c_a, c_v, c_a2, am, af, bt, gm, rnorm, fscale, rnt, lambda, chosen, lam_ok, cw, t_alpha, dth_lin
REAL(wp) :: e_bal, e_ma, tors_theta_new, tors_mt_new
REAL(wp) :: e_bal, e_ma, tors_theta_new, tors_mt_new, t_inc, t_len
REAL(wp) :: axial_qe(12), axial_min
REAL(wp) :: axial_threshold, axial_margin, axial_worst_margin, axial_worst_force, axial_worst_xi
REAL(wp) :: axial_worst_threshold
Expand All @@ -4901,6 +4901,9 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r
REAL(wp), PARAMETER :: MN_CONTRACT = 0.25_wp
! Constant-acceleration predictor gate: relative force imbalance of the committed state.
REAL(wp), PARAMETER :: PRED_BALANCE = 0.5_wp
! Largest change of the length of a free nodal tangent by the predictor, relative to that
! length; a larger change holds the tangent at its committed value (see the predictor).
REAL(wp), PARAMETER :: PRED_STRETCH_MAX = 0.25_wp
! Cross-step reuse: at most this many accepted iterations on the carried factor per step;
! a solve still short of the tolerance then refreshes (quadratic convergence from there).
INTEGER, PARAMETER :: XS_MAX_STALE = 3
Expand Down Expand Up @@ -5229,6 +5232,46 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r
model%ws_qk(iv) = model%ws_qn(iv) + dt*model%ws_vn(iv) + (0.5_wp - bt)*dt*dt*model%ws_an(iv)
END DO
END IF
! Both guesses assume a resolved motion. The length of a nodal tangent m = dr/ds is the
! line's stretch there, its stiffest motion (EA against the tangent's small consistent mass),
! whose committed velocity and acceleration are those of the generalised-alpha recursion far
! outside its resolved range: with little or no numerical damping (rho_inf near 1) it keeps
! ringing about its balance at the offset it started from, and dt v_n or dt^2 a_n along the
! tangent can exceed the tangent itself. A taut 20 m line of 2 m elements (EA 5e7 N) seeded
! with unit tangents at a strain of 7.6e-5 started that mode 7.6e-5 off its balance, with
! a_n = 4.9e3 1/s^2 along the tangents (omega ~ 8e3 rad/s, omega dt ~ 300 at dt 0.037 s, 50
! steps per cycle of its VIV); at rho_inf 1 both guesses carried every tangent across zero
! (dt^2/2 a_n = 3.4, dt^2/4 a_n = 1.7), and Newton converged quadratically to the root with
! every tangent reversed (each element folded into a Z along its chord, 2.4e8 J of strain
! energy against 3.5 J), from which the march failed a few steps on. A guess that changes
! the length of a free tangent by more than PRED_STRETCH_MAX of it (a strain change of 0.25
! in one step, which no step resolves) took that tangent's committed velocity and
! acceleration from the ringing, so the tangent starts at its committed value: the stiff
! mode's true increment, of the order of the strain, is a Newton step from there. Holding
! only its length and keeping the turn of the guess converged too, but the turn rings as
! well (the tangent's rotation is under-resolved at that step): over 20 cycles at 25 steps
! per cycle and rho_inf 0.9 and 1, 132 steps took more than 12 iterations against 31. The
! test is on the length alone because a guess that turns a tangent fast is often right: a
! seabed cable whose span was lengthened 1.3 times turns two tangents 19 degrees in its
! first 0.01 s step, and does not converge from the held tangents. A node with some tangent
! components fixed (a planar model fixes the out-of-plane one) is guarded on its free
! components: the length change is that of the free components' increment, and only they are
! held. Every other start is unchanged.
DO i = 1, model%nn
iv = 6*(i - 1)
IF (.NOT. ANY(model%freemask(iv + 4:iv + 6))) CYCLE
t_len = NORM2(model%ws_qn(iv + 4:iv + 6))
IF (.NOT. (t_len > CD_ZERO)) CYCLE
t_inc = 0.0_wp
DO ip = iv + 4, iv + 6
IF (model%freemask(ip)) t_inc = t_inc + (model%ws_qk(ip) - model%ws_qn(ip))*model%ws_qn(ip)
END DO
t_inc = t_inc/t_len
IF (ABS(t_inc) <= PRED_STRETCH_MAX*t_len) CYCLE
DO ip = iv + 4, iv + 6
IF (model%freemask(ip)) model%ws_qk(ip) = model%ws_qn(ip)
END DO
END DO
! Hold the prescribed DOFs at their target position for the whole solve (Newton never touches
! them -- they are in fixed_dofs, hence not in fmap).
IF (has_pres) THEN
Expand Down Expand Up @@ -5632,6 +5675,27 @@ SUBROUTINE dyn_step_core(model, dt, max_iter, tol, ErrStat, ErrMsg, iters_out, r
IF (model%tw_active) CALL tw_accept()
rnorm = rnt
END DO
! A nodal tangent turned by 90 degrees or more over one step is a root of the step's
! equations with the element folded back on itself (the reversed-tangent root above), not a
! motion one step resolves: the attempt fails (the next one, or the recovering step's
! subdivision, re-solves the step).
DO i = 1, model%nn
iv = 6*(i - 1)
IF (.NOT. ANY(model%freemask(iv + 4:iv + 6))) CYCLE
IF (DOT_PRODUCT(model%ws_qk(iv + 4:iv + 6), model%ws_qn(iv + 4:iv + 6)) > CD_ZERO) CYCLE
ErrStat = CD_HCDYN_NOCONVERGE
BLOCK
CHARACTER(1024) :: wbuf
INTEGER :: wios
wbuf = ''
WRITE (wbuf, '(A,I0,A)', IOSTAT=wios) 'CD_HermiteCable_Dyn_Step: Newton converged with the tangent of node ', &
i, ' turned by 90 deg or more in one step (a spurious root with the element folded back); '// &
'a smaller dt resolves the step'
ErrMsg = wbuf
END BLOCK
IF (attempt < n_attempt) CYCLE predict
RETURN
END DO
EXIT predict
END DO predict
model%ws_stash_solves = nsolve_step
Expand Down
Loading
Loading