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
32 changes: 29 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ All notable changes to CableDyn are recorded in this file. The format follows
re-steps such a cable at every outer iteration and couples the junction coordinates of its two
objects through its finite-difference end-to-end stiffness in one Newton matrix (on a stiff taut
cable between light bodies, dropping that coupling took 9.2 mean outer iterations and 300 step
halvings over 100 steps, against 3.9 and none); a pinned cable with one moving end is coupled at
the predictor whichever end that is, and an end on a fixed rod's end is the `Fixed` end there
(byte for byte). `bodyIC static` balances both objects on the cubic-Hermite cable, its passes
halvings over 100 steps, against 3.9 and none); an end on a fixed rod's end is the `Fixed` end
there (byte for byte). `bodyIC static` balances both objects on the cubic-Hermite cable, its passes
accelerated by Anderson mixing: a stiff (EI 1e6 N m^2) clamped cable between two unequal moored
bodies, out of their plane, converges in 8 passes, written in either direction, to the same
equilibrium. Two identical bodies stay mirror images to the output precision, a body joined to
Expand Down Expand Up @@ -354,6 +353,33 @@ All notable changes to CableDyn are recorded in this file. The format follows

### Fixed

- A finite-EI cable pinned to a light moving object no longer throws it off its static start in
the monolithic multibody step. Such a cable (pinned at a Rigid6 body point or a free or pinned
rod end, the other end held) was stepped once per step with the predicted motion of its
attachment and its end force held through the iterations, an explicit coupling that diverges
once the cable's dynamic end stiffness times `dtM^2` exceeds about 0.85 of the object's mass
along the cable. It is now re-stepped at every outer iteration with its end stiffness in the
Newton matrix, as a clamped cable already was. A 3 t free rod spar with a 55 m cable (EA 5e8 N)
pinned at either rod end, at `dtM` 0.01 s: the cable tension rose from 11 kN past 1 MN in
0.7 s and the rod end moved 6.3 to 6.5 m in 2 s (5.4 m in a current, 6.1 m with the cable from
a fixed rod's end); it now holds to 2e-10 m and 3e-8 of the tension (6e-4 m in the current,
as on the staggered scheme), and the monolithic and staggered schemes agree to 2e-10 m. With a
1500 kg clump on that cable the rod moved 15 m in 3 s; it holds to 1.1e-6 m (`line_attachments`
11 and 12 march at `dtM` 0.01 s again). A 4 t buoy with a pinned keel cable moved 0.22 m and
its cable tension reached 38 times its start; it now holds to 1e-9 m. Decks with a pinned cable
on a heavy body change at the accuracy of the old coupling: on the `mixed_body_rods_points`
example (150 t buoy) the body motion changes by 3.5e-5 m, its error against a run at `dtM` / 4
falling from 3.7e-5 m to 1.6e-6 m, and the cable top tension by 0.6 N of 8.1 kN; that deck runs
about 45 % longer.
- A finite-EI cable whose End A rests on the seabed below its End B (a cable written from a seabed
termination, such as a fixed rod's end, up to a floater) takes the catenary-continuation static
route again. Its catenary seed refused the line (the fairlead, End A, must sit above the bed),
so the mesh-sequenced route alone solved it, and its branch depended on platform round-off: a
55 m cable from a fixed rod's end on the seabed to a free spar rod solved on Windows and
reached a kinked state (max h kappa 1.96) on Linux gfortran, which failed the deck. The seed
is now laid from End A, the line seen from its other end, and its nodes put back in order. The
deck starts at the same equilibrium as before on Windows (1e-7 m, 6e-4 N), and moving the fixed
rod by 1 ulp either way or 1e-12 m up leaves the rod's start unchanged (0 m).
- A rod numbered as a body no longer joins the body's attachment points. A `Rod<N>A/B` end point
keeps its rod's id where a `Body<N>` point keeps its body's, and the body's point list took
every point with its id: a rod end POINT row listed before the body's points became the body's
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2214,6 +2214,11 @@ target_link_libraries(test_cable_between_bodies PRIVATE cabledyn_core)
add_test(NAME cable_between_bodies COMMAND test_cable_between_bodies)
set_tests_properties(cable_between_bodies PROPERTIES LABELS "fortran;driver;integration;dynamic;static")

add_executable(test_pinned_cable_light_object tests/test_pinned_cable_light_object.f90)
target_link_libraries(test_pinned_cable_light_object PRIVATE cabledyn_core)
add_test(NAME pinned_cable_light_object COMMAND test_pinned_cable_light_object)
set_tests_properties(pinned_cable_light_object PROPERTIES LABELS "fortran;driver;integration;dynamic")

add_executable(test_section_curvature tests/test_section_curvature.f90)
target_link_libraries(test_section_curvature PRIVATE cabledyn_core)
add_test(NAME section_curvature COMMAND test_section_curvature)
Expand Down
8 changes: 4 additions & 4 deletions doc/driver_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,10 @@ connection moment at every connected end, and at both ends of a cable between tw
spring to its own object, so a stiff cable with both ends on one body (or between two light
objects) is resolved there only as far as `dtM` allows; the monolithic scheme couples it in its
Newton matrix;
- a cable re-stepped at every outer iteration of the monolithic step is one connected at an end
on a moving object or one between two moving objects (Rigid6 bodies, free or pinned rods);
a pinned cable with one moving end is coupled at the predictor, whichever end that is, and an
end on a fixed rod's end is the `Fixed` end there;
- the monolithic step re-steps at every outer iteration every cable with an end, pinned or
connected, on a moving object (a Rigid6 body, a free or pinned rod), with its end stiffness in
the Newton matrix, so a light object on a stiff cable is as stable as a heavy one; an end on a
fixed rod's end is the `Fixed` end there;
- every `Free`/`Connect` point carries at least one EI = 0 line;
- `motionFile` and `Coupled`/`Vessel` rods are rejected by name.

Expand Down
19 changes: 13 additions & 6 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,9 @@ mesh-sequenced route described below first and this route as its fallback):
declared seabed plane (flat ``WtrDpth``, or the least-squares plane of a structured bathymetry
along the chord) or hung in mid-water when there is no seabed. The solve runs in the vertical
plane of the chord, translated to the anchor, so a translated or rotated deck gives the same
numbers to round-off. Over a bathymetry that is not a plane along the chord (a surveyed
numbers to round-off. A line whose End A (the fairlead) rests on the seabed below its End B,
such as a cable written from a seabed termination up to a floater, is seeded from End A, the
same catenary seen from its other end, with its nodes put back in order. Over a bathymetry that is not a plane along the chord (a surveyed
seabed with roughness, bumps or dips), the seed laid on the fitted plane meets the actual bed
wherever the bed rises above that plane: every seed node deeper below the actual bed than its
static penalty penetration (nodal submerged weight over the nodal contact stiffness
Expand Down Expand Up @@ -2571,10 +2573,14 @@ linear spring-mass body conserved to :math:`5\times10^{-10}` at :math:`\Delta t`
:math:`\rho_\infty`; observed order 2 in positions and fairlead tensions on the moored buoy and in
surge, heave and pitch on the V-SP spar; gyroscopic precession of a torque-free symmetric top
at second order; and an error no larger than the staggered scheme's at :math:`\Delta t` = 0.1 s and
0.05 s on the moored buoy and rod spar. A finite-EI cable pinned to its object is stepped once
per step with the attachment motion of the Newmark predictor, and its end force is held
through the iterations; a cable clamped to its object is re-stepped at every outer iteration
(*Cables clamped to bodies and rods*, below). Standalone decks with a ``motionFile``, a
0.05 s on the moored buoy and rod spar. A finite-EI cable with an end on a moving object, pinned
or clamped, is re-stepped at every outer iteration (*Cables clamped to bodies and rods*, below;
a pinned end returns no moment). Coupling a pinned cable at the predictor instead (stepped once
with the predicted end motion, its end force held through the iterations) is explicit: with
:math:`K_e` the cable's condensed dynamic end stiffness and :math:`m_e` the object's effective mass
along it at the attachment, the error grows from step to step once :math:`K_e\Delta t^2/m_e`
exceeds about 0.85, so a light rod or buoy on a stiff cable diverges from a balanced start.
Standalone decks with a ``motionFile``, a
``FAILURE`` section, or Coupled/Vessel rods, and the OpenFAST and C-API coupled routes, use the
staggered scheme.

Expand Down Expand Up @@ -2764,7 +2770,8 @@ stretch) stays free. The cable returns to the object its end force at the attach
connection moment :math:`\mathbf{M}_e = \mathbf{m}\times\mathbf{g}_m`, with
:math:`\mathbf{g}_m` the constraint (or spring) force on the tangent coordinates. In the
monolithic step the cable is re-stepped from the step entry at every outer iteration with the
iterate's end-of-step motion, orientation, angular velocity and angular acceleration, and its
iterate's end-of-step motion, orientation, angular velocity and angular acceleration (a pinned
end, which the monolithic step couples the same way, takes the motion only), and its
end force and moment load the object at the force level
:math:`(1-\alpha_f)\,\mathbf{f}_{n+1} + \alpha_f\,\mathbf{f}_n`. Its condensed dynamic end
stiffness with respect to the object's translation and rotation enters the Newton matrix by
Expand Down
72 changes: 55 additions & 17 deletions src/CableDyn_DeckDriver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,8 @@ MODULE CableDyn_DeckDriver
! End A (cab_kind_b 0: a Fixed End B, held), cab_clamp_b its connection or torsion frame on its
! object, and the *_b loads those of End B on its object. cab_imp: the cable is re-stepped at
! every outer iteration of the monolithic step with its end stiffness in the Newton matrix
! (cab_clamp, or an End B on an object: the cable then couples the groups of its two objects).
! (an end, pinned or connected, on an object the march moves; with both ends on objects the
! cable couples the groups of its two objects).
INTEGER, ALLOCATABLE :: cab_kind_b(:), cab_obj_b(:)
REAL(wp), ALLOCATABLE :: cab_off_b(:, :)
LOGICAL, ALLOCATABLE :: cab_clamp_b(:), cab_imp(:)
Expand Down Expand Up @@ -5595,7 +5596,7 @@ RECURSIVE SUBROUTINE hermite_static_primary(anchor, fairlead, l0, ea, ei, w, dia
INTEGER :: nnode, ne, i, es, cont_iters, polish_iters, budget_cont, cmode, k_walk
! Anchor retreats tried for a line too long for its span (see seed_walk).
INTEGER, PARAMETER :: WALK_MAX_TRIES = 6
LOGICAL :: walk_ok, fold
LOGICAL :: walk_ok, fold, rev_seed
CHARACTER(1024) :: walk_msg_c
REAL(wp) :: walk_d, a_seed(3)
CHARACTER(1024) :: walk_msg
Expand All @@ -5606,6 +5607,7 @@ RECURSIVE SUBROUTINE hermite_static_primary(anchor, fairlead, l0, ea, ei, w, dia
REAL(wp) :: lambda0, ratio, span(2), span_len, t, xg, yg, zf, sx, sz, sxx, sxz, xl, yl
REAL(wp) :: res_cont, cont_tol, phi, penetration, zfit(NFIT), fit_misfit, fine_limit, seed_bed, anchor_bed
REAL(wp), ALLOCATABLE :: pos(:), q_seed(:), q_cont(:), curv_cont(:), knnode(:), tdir(:, :), stretch(:)
REAL(wp), ALLOCATABLE :: pos_r(:), l0_r(:), ea_r(:), w_r(:)
CHARACTER(1024) :: em

ErrStat = CD_HCSTAT_OK
Expand Down Expand Up @@ -5733,6 +5735,7 @@ RECURSIVE SUBROUTINE hermite_static_primary(anchor, fairlead, l0, ea, ei, w, dia
walk_d = CD_ZERO
a_seed = a_l
walk_msg = ''
rev_seed = .FALSE.
seed_walk: DO k_walk = 0, WALK_MAX_TRIES
IF (laid) THEN
ErrStat = CD_HCSTAT_OK
Expand Down Expand Up @@ -5780,7 +5783,33 @@ RECURSIVE SUBROUTINE hermite_static_primary(anchor, fairlead, l0, ea, ei, w, dia
seed_bed = zf
END IF
END IF
IF (contact_enabled) THEN
! A fairlead (End A) on or below the seabed plane under a raised anchor (End B): a cable
! from a seabed termination up to a floater, written from the seabed end. The catenary is
! the same line seen from its other end, so it is seeded with the ends exchanged (End A
! the anchor on the bed, the bed plane and its slope seen from there) and its nodes put
! back in order. Without it the route refused the seed (the fairlead must be above the
! bed) and left the line to the mesh-sequenced route, whose branch on such a line
! depended on platform round-off (a kinked equilibrium on one, the cable's own on
! another). No anchor walk follows a reversed seed.
rev_seed = contact_enabled .AND. k_walk == 0 .AND. .NOT. fold .AND. &
f_l(3) <= seed_bed + seabed_slope*span_len .AND. a_l(3) > seed_bed
IF (rev_seed) THEN
ALLOCATE (pos_r(3*nnode))
l0_r = l0(ne:1:-1)
ea_r = ea(ne:1:-1)
w_r = w(ne:1:-1)
CALL CD_Catenary_Seed(f_l, a_seed, l0_r, ea_r, w_r, pos_r, horizontal_tension, grounded_length, es, em, &
seabed_z=seed_bed + seabed_slope*span_len, seabed_slope=-seabed_slope)
IF (es == CD_CAT_OK) THEN
DO i = 1, nnode
pos(3*(i - 1) + 1:3*i) = pos_r(3*(nnode - i) + 1:3*(nnode - i + 1))
END DO
ELSE
ErrStat = CD_HCSTAT_NOCONVERGE
ErrMsg = 'catenary seed unavailable (the line seeded from its End A on the seabed): '//TRIM(em)
RETURN
END IF
ELSE IF (contact_enabled) THEN
CALL CD_Catenary_Seed(a_seed, f_l, l0, ea, w, pos, horizontal_tension, grounded_length, es, em, &
seabed_z=seed_bed, seabed_slope=seabed_slope)
ELSE
Expand Down Expand Up @@ -21530,9 +21559,7 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod
pc(pb)%ptype = 'coupled'
mb%cab_clamp_b(c) = cab_lines(c)%endconn_mode(2) /= CD_ENDCONN_PINNED .OR. line_torsion_at_b(cab_lines(c))
! re-stepped inside the outer Newton when End A is connected, otherwise set with the
! attachments below: when End B is connected on an object that moves, or both ends' objects
! move; a cable with one moving end on an object is coupled at the predictor (pinned) or
! implicitly (connected) whichever end that is
! attachments below: whenever either end's object moves (implicit coupling, see there)
mb%cab_imp(c) = mb%cab_clamp(c)
BLOCK
TYPE(DeckLine) :: lnc
Expand Down Expand Up @@ -21692,11 +21719,23 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod
'unresolved rod end'); GOTO 900
END IF
END IF
! a cable connected at End B on a moving object, or between two moving objects, couples
! them implicitly
IF (mb%cab_kind_b(c) > 0 .AND. .NOT. mb%cab_imp(c)) THEN
mb%cab_imp(c) = attachment_moves(mb%cab_kind_b(c), mb%cab_obj_b(c)) .AND. &
(mb%cab_clamp_b(c) .OR. attachment_moves(mb%cab_kind(c), mb%cab_obj(c)))
! A cable with an end on an object that the march moves couples it implicitly, pinned or
! connected, at either end: it is re-stepped at every outer iteration with the iterate's
! motion, its end stiffness in the Newton matrix. A pinned cable coupled at the predictor
! instead (stepped once with the predicted attachment motion, its end force held through
! the iterations) is a partitioned explicit coupling: the object sees the end force of the
! predicted end position, F = -K_e x_pred, K_e the cable's condensed dynamic end stiffness
! (the end element's EA/l_e condensed onto the inertia of the nodes behind it). On a mass
! m_e (the object's effective mass along the cable at the attachment) that recurrence, with
! the trapezoidal object update, has a step amplification above 1 once K_e dt^2/m_e exceeds
! about 0.85 (1.5 at 1.3, 2.5 at 2): a light object on a stiff cable diverges whatever its
! static balance (a 3 t free rod spar on a cable of EA 5e8 N in 1.4 m elements, dtM 0.01 s:
! the step change of the cable tension alternated in sign and grew 2.3 times per step, the
! tension rose from 11 kN past 1 MN and the rod top moved 6 m in 2 s).
IF (.NOT. mb%cab_imp(c)) THEN
mb%cab_imp(c) = attachment_moves(mb%cab_kind(c), mb%cab_obj(c))
IF (mb%cab_kind_b(c) > 0) &
mb%cab_imp(c) = mb%cab_imp(c) .OR. attachment_moves(mb%cab_kind_b(c), mb%cab_obj_b(c))
IF (mb%cab_imp(c)) mb%cables(c)%tol = MIN(mb%cables(c)%tol, CLAMPED_CABLE_TOL)
END IF
END DO
Expand Down Expand Up @@ -23665,12 +23704,11 @@ RECURSIVE SUBROUTINE mb_step_implicit(mb, points, opts, time, dt, converged, sta
IF (.NOT. lconv) EXIT
mb%loads = mb%floads
END IF
! finite-EI cables with a pinned End A and a Fixed End B: stepped once, with the attachment
! motion of the Newmark predictor; their end force is held through the outer iterations
! (explicit coupling at the predictor). A cable clamped (or elastically connected) to its
! object, or one between two objects, is re-stepped from the step entry at every outer
! iteration with the iterate's motion and orientation of its objects, and loads the
! junction at both ends at the alpha level (implicit coupling)
! finite-EI cables: a cable with an end on a moving object (cab_imp: pinned or connected,
! at either end) is re-stepped from the step entry at every outer iteration with the
! iterate's motion and orientation of its objects, and loads the junction at both ends at
! the alpha level (implicit coupling). A cable with no moving end (both ends held: on Fixed
! points or rods fixed in place) is stepped once, its end force held
DO c = 1, SIZE(mb%cables)
IF (.NOT. (first .OR. mb%cab_imp(c))) CYCLE
IF (.NOT. first) THEN
Expand Down
Loading
Loading