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

### Fixed

- A finite-EI dynamic step with bending damping (`EI|Bb`) could fail to converge on a soft line:
the Newton residual stagnated just above the tolerance (1.06 times it on a 20 m riser on a
20 kN/m tensioner, EA_eff 4e5 N, 80 elements, Bb 500 N m^2 s, dt 1e-3 s, in VIV), and the
step recovery's smaller steps only made it worse. The bending damping takes the curvature rate
from the Newmark velocity, so its forces round at about `Bb gamma/(beta dt) eps |r|/l0^3`,
which the tolerance's round-off floor (the axial forces' `(EA + BA gamma/(beta dt)) eps
|r|/l0`) did not cover. The floor now takes the bending forces, `(EI + Bb gamma/(beta dt))
eps |r|/l0^3`, as well; it binds only where that term is the larger.
- 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
Expand Down
10 changes: 6 additions & 4 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2671,10 +2671,12 @@ residual decreases; its convergence norm divides each translational residual by
frozen at the predictor and each tangent-DOF residual additionally by the nodal tributary
length. The force scale is the largest inertial or residual entry, bounded below by 1 N, by the
peak element weight, and by the round-off floor
:math:`16\,\epsilon\,\max\big((EA + BA\,\gamma/(\beta\,\Delta t))/L_0\big)\,x_\text{ref}/\text{tol}`
of the axial forces (:math:`x_\text{ref}` the largest coordinate magnitude or element length;
the axial damping takes the strain rate from the Newmark velocity, whose rounding is
:math:`\gamma/(\beta\,\Delta t)` times that of the coordinates). The
:math:`16\,\epsilon\,\max\big((EA + BA\,\gamma/(\beta\,\Delta t))/L_0,\ (EI + B_b\,\gamma/(\beta\,\Delta t))/L_0^3\big)\,x_\text{ref}/\text{tol}`
of the axial and bending forces (:math:`x_\text{ref}` the largest coordinate magnitude or element
length; the axial and bending damping take the strain and curvature rates from the Newmark
velocity, whose rounding is :math:`\gamma/(\beta\,\Delta t)` times that of the coordinates). The
bending term is the larger on a soft line (a tensioner in series, a fine mesh) with bending
damping at a small time step. The
deck defaults are relative tolerance :math:`10^{-8}`, absolute tolerance :math:`10^{-14}`, 30
iterations, and 12 backtracks (option ``dynamic_solver``). Option ``modified_newton`` reuses the
factorised tangent within a step while each iterate reduces the residual to at most a quarter
Expand Down
13 changes: 12 additions & 1 deletion src/CableDyn_HermiteCableDynamic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5746,7 +5746,7 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash)
REAL(wp), POINTER :: Gout(:)
INTEGER :: ii, nd
INTEGER(INT64) :: ec0, ec1
REAL(wp) :: xref, xd, xc, ea_r, ka, kt, tw_round
REAL(wp) :: xref, xd, xc, ea_r, ka, kb, kt, tw_round
REAL(wp), PARAMETER :: RESID_ROUNDOFF = 16.0_wp
REAL(wp), PARAMETER :: STATE_DIVERGED = 1.0e12_wp
ec0 = 0_INT64 ! defined even with profiling off (see the step-entry note)
Expand Down Expand Up @@ -5873,6 +5873,14 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash)
! held line damped near its first axial mode (BA = 2 zeta EA/omega_1, which at small dt
! puts the damping term well above EA) stagnated at a residual of a few times the
! tolerance and failed its step.
! Bending takes the curvature from the same coordinate differences over l0^2, and its nodal
! forces are the moment over l0, so an element's bending rounding is about eps*|r|/l0^3
! times EI, plus Bb gamma/(beta dt) for the bending damping (the curvature rate from the
! Newmark velocity). Where EA/l0 is small (a soft tensioner in series with the line, a
! fine mesh) this term is the larger: without it a 20 m riser on a 20 kN/m tensioner
! (EA_eff 4e5 N, 80 elements, Bb 500 N m^2 s, dt 1e-3 s) stagnated at 1.06 times the
! tolerance and failed its step, and the step recovery's smaller steps only raised the
! damping term further.
xref = MAXVAL(model%l0)
DO ii = 1, ndof
IF (MOD(ii - 1, 6) < 3) xref = MAX(xref, ABS(qcur(ii)))
Expand All @@ -5884,6 +5892,9 @@ SUBROUTINE eval_res(qcur, use_trial, rn, esx, emx, stash)
ka = ka + model%torsion%couple(ii)**2*model%torsion%gj(ii)
IF (model%has_axial_damping) ka = ka + ABS(model%BA(ii))*gm/(bt*dt)
ea_r = MAX(ea_r, ka/model%l0(ii))
kb = ABS(model%EI(ii))
IF (model%has_bend_damping) kb = kb + ABS(model%Bb(ii))*gm/(bt*dt)
ea_r = MAX(ea_r, kb/model%l0(ii)**3)
END DO
fscale = MAX(fscale, RESID_ROUNDOFF*EPSILON(CD_ONE)*ea_r*xref/tol)
! Nodal twist: the torque scale of the angle rows, frozen with fscale and formed like it
Expand Down
37 changes: 37 additions & 0 deletions tests/test_hermite_bending_damping_dynamic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ PROGRAM test_hermite_bending_damping_dynamic
!! B5 a straight cable moving in its first bending mode with zero acceleration has no elastic
!! curvature: the node recovery reports none although the bending damping acts (its viscous
!! moment is not EI kappa), while the end force carries the damping.
!! B6 the residual's round-off floor: a soft line (EA 4e5 N, as a tensioner in series) with a
!! stiff bending damping (Bb 1e4 N m^2 s) at dt 1e-4 s. The damping takes the curvature
!! rate from the Newmark velocity, whose rounding is gamma/(beta dt) times the coordinates',
!! so its force rounds at about Bb gamma/(beta dt) eps |r|/l0^3, far above the axial floor
!! EA eps |r|/l0 the tolerance scale allowed: every step stagnated just above the
!! tolerance and failed. Every step converges and the motion stays bounded.
USE CableDyn_Precision, ONLY: wp
USE CableDyn_HermiteCableDynamic, ONLY: CD_HermiteCableDynType, CD_HermiteCable_Dyn_Init, &
CD_HermiteCable_Dyn_Step, CD_HermiteCable_Dyn_Set_Bending_Damping, &
Expand All @@ -32,6 +38,7 @@ PROGRAM test_hermite_bending_damping_dynamic
CALL decay_case('B3 undamped', 1.0e4_wp, 0.0_wp)
CALL check_refusals()
CALL check_recovery()
CALL check_roundoff_floor()
IF (nfail > 0) THEN
WRITE (*, '(A,I0,A)') 'FAIL: ', nfail, ' assertion(s) failed'
ERROR STOP 1
Expand Down Expand Up @@ -156,4 +163,34 @@ SUBROUTINE check_recovery()
CALL require(NORM2(f_damped - f_plain) > 0.0_wp, 'B5: the end force carries the damping')
END SUBROUTINE check_recovery

SUBROUTINE check_roundoff_floor()
TYPE(CD_HermiteCableDynType) :: model
REAL(wp), PARAMETER :: EA_SOFT = 4.0e5_wp, TENS = 6.0e3_wp, A0 = 1.0e-3_wp, BB = 1.0e4_wp, DT = 1.0e-4_wp
REAL(wp) :: l0(NE), ea_(NE), ei_(NE), rho(NE), w(NE), q(NDOF), eps, lt, x, res, zmax
INTEGER :: k, n, es, it
CHARACTER(512) :: em
eps = TENS/EA_SOFT; lt = (1.0_wp + eps)*LL
l0 = LL/REAL(NE, wp); ea_ = EA_SOFT; ei_ = EI; rho = RHOA; w = 0.0_wp
DO k = 1, NN
x = lt*REAL(k - 1, wp)/REAL(NE, wp)
q(6*k - 5:6*k) = [x, 0.0_wp, A0*SIN(PI*x/lt), (1.0_wp + eps), 0.0_wp, (1.0_wp + eps)*A0*PI/lt*COS(PI*x/lt)]
END DO
CALL CD_HermiteCable_Dyn_Init(model, l0, ea_, ei_, rho, w, q, [1, 2, 3, 6*NE + 1, 6*NE + 2, 6*NE + 3], &
-1.0e4_wp, 0.0_wp, 1.0_wp, es, em)
CALL require(es == CD_HCDYN_OK, 'B6 init: '//TRIM(em))
CALL CD_HermiteCable_Dyn_Set_Bending_Damping(model, [(BB, k=1, NE)], es, em)
CALL require(es == CD_HCDYN_OK, 'B6 set damping: '//TRIM(em))
zmax = 0.0_wp
DO n = 1, 200
CALL CD_HermiteCable_Dyn_Step(model, DT, 50, 1.0e-8_wp, es, em, it, res)
IF (es /= CD_HCDYN_OK) THEN
CALL require(.FALSE., 'B6 round-off floor: step failed: '//TRIM(em)); RETURN
END IF
zmax = MAX(zmax, ABS(model%q(6*(MID - 1) + 3)))
END DO
WRITE (*, '(A,ES11.4,A,ES11.4)') 'B6 round-off floor: 200 steps converged, last residual ', res, &
', largest midspan deflection ', zmax
CALL require(zmax <= A0*(1.0_wp + 1.0e-6_wp), 'B6 round-off floor: the damped motion stays bounded')
END SUBROUTINE check_roundoff_floor

END PROGRAM test_hermite_bending_damping_dynamic
Loading