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
66 changes: 65 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,40 @@ All notable changes to CableDyn are recorded in this file. The format follows

### Added

- Finite-EI lines with two moving ends on the cubic-Hermite route: a line whose End B is a
`Coupled`/`Vessel` point (a cable shared by two floaters, a FAST.Farm shared line) is driven at
both ends standalone, in OpenFAST, FAST.Farm and the C API (End B on a moving column of its
own), with `END CONNECTIONS` and torsion at both ends (both end frames turn with their
parents) and every Hermite feature. A `Coupled` End B held at rest writes the `Fixed` End B's
files byte for byte; a symmetric cable whose ends move apart stays mirror-symmetric to 4e-11 m;
a rigidly translating line keeps its
end loads to 4e-5 N of 1.6e4 N; driving End B matches the reversed line driven at End A to
1e-3 N, with a turning clamped End B to 2e-5 N and 4e-7 N m; equal rolls of both end frames
keep the torque to 3e-6 N m and opposite rolls change it by `GJ (2 phi)/L` to 5e-6 N m; a
FAST.Farm aggregate driven by prescribed turbine motions reports the standalone deck's end
tensions to 7e-3 N of 1.9e4 N; restarts are bit-identical. The compatibility (Cosserat) route
these decks ran on is retired: on four shared-line decks it failed to converge or reached a
compressive static state (-6.1e8 N), and the Hermite route runs all four.
- A finite-EI line between two objects on the standalone multibody march: End B on a Rigid6
`Body<N>` point or a rod end as well as End A, both ends driven by their objects and their end
forces, connection moments and torques returned to them, with `END CONNECTIONS` and torsion at
both ends (`bodyScheme monolithic`; the staggered scheme takes pinned ends). The monolithic step
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
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
an immobile body (1e15 kg) moves as on a `Fixed` End B to 8e-9, two free bodies keep the total
linear momentum to 3e-5 and the energy to 0.2 %, a cable twisted 90 deg returns equal and
opposite torques (`GJ Phi/L` at the start, their sum below 2e-10 N m), and a moored pair starts
and stays at rest. An End B on a `Free`/`Connect` point, a `Point3` buoy or a `Coupled`/`Vessel`
point stays refused there by name (this march drives no `Coupled` point), and so are, by name,
torsion at an End B on a rod end and a line restrained in torsion at a rod End A with a moving
End B, which no route of this build solves.
- C API host rotations (ABI 1.3): `CableDyn_InitDeckRotating` initialises a handle whose host
passes each coupled point's rotation (`CableDyn_UpdateRotations`: the global-to-body DCM and
the angular velocity and acceleration) with every update and step, so a line restrained in
Expand Down Expand Up @@ -78,7 +112,11 @@ All notable changes to CableDyn are recorded in this file. The format follows
(3 to 11 % in the cases tried) under the coupled Newton tolerance. A straight line rolled
slowly gives `Torq = GJ Phi / L` to 5e-6 N m. A static mixed run (`TMax = 0`) with torsion
takes `False alpha_force_blend`, as the single-line route and the Python reader do.
`vesselRAO` stays refused with the deck waves.
`vesselRAO` stays refused with the deck waves. A line between two moving points there takes the
roll columns of both ends, `Phi = Pretwist(B) − Pretwist(A) − roll(A) − roll(B)`: rolled
oppositely (a rigid roll about its axis) a line twisted 90 deg keeps its twist exactly, and rolled
equally it twists by twice the roll to 5e-7 deg, with `Torq = GJ Phi / L` at both ends to
5e-6 N m.
- OpenFAST linearisation with the line dynamics, as MoorDyn-F's: the continuous states are the
interior-node positions of every `EI = 0` line (MoorDyn's names and order) and the free
degrees of freedom of every finite-EI cable (node positions and tangents), then their
Expand Down Expand Up @@ -247,6 +285,21 @@ All notable changes to CableDyn are recorded in this file. The format follows
the fairlead already moved to row 1. A deck whose row 1 is off the deck fairlead changes
`.static.out` only (a 2 cm offset changed the fairlead x by 0.02 m and its tension from 3.5 MN
back to the static 29 kN); the example decks are unchanged.
- Standalone `TURBINES` decks read the `END CONNECTIONS` direction `Ez` and torsion normal `Nx`
of an end on a `Turbine<J>` point in that turbine's axes, turned by its `PtfmInit` rotation at
the static start, as the FAST.Farm aggregate does (they were global). A deck whose turbines
start rotated and whose finite-EI lines carry end connections or torsion changes; on a clamped
line twisted 90 deg between turbines yawed +15 and -8 deg the standalone run now matches the
FAST.Farm aggregate to 8e-9 in every channel. Decks without a `PtfmInit` rotation, or without
end connections and torsion, are unchanged.
- Standalone `TURBINES` motion rows turn the `END CONNECTIONS` and torsion frames of a finite-EI
line end on a `Turbine<J>` point with the row's rotation, angular velocity and acceleration (End A
and End B), as `vesselMotion` and the OpenFAST and FAST.Farm hosts do; they were held at their
start orientation while the end moved. A `TURBINES` deck whose rows rotate the turbines and whose
finite-EI lines carry end connections or torsion changes: a clamped line twisted 90 deg between
turbines that roll 10 deg in opposite senses over 1 s ends at 613.6 N m of torque (788.1 N m
before; the tensions change by under 5e-7) and matches the FAST.Farm aggregate to 3.4e-8 in every channel.
No example deck uses `TURBINES` rows; the examples are unchanged.
- `TMax = 0` checks the static start of any dynamic deck as it stands: a `motionFile` or
`vesselMotion` record may run past `TMax` (its later rows are checked on the `dtM` grid and
not used, so a long record also serves a shorter run), and `RangeStart` is accepted at
Expand Down Expand Up @@ -294,6 +347,13 @@ All notable changes to CableDyn are recorded in this file. The format follows

### Fixed

- 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
first point, and the list overran its allocation (also in 0.3.0). A free body on three legs with
a pinned arm rod numbered 1, its tether on an explicit `Rod1B` POINT listed first, now writes
the outputs of the same deck with the arm as rod 3 bit for bit; before, the arm turned 172 deg
in pitch, the body 1.06 deg, and a leg tension moved 3.0 kN in 1 s.
- In OpenFAST, Free Rigid6 bodies and Free, Pinned and CoupledPinned rods started their first
step from zero acceleration: the module restores its state mirror after the output call at
`t = 0`, which marked the objects' accelerations as committed before the start accelerations
Expand Down Expand Up @@ -328,6 +388,10 @@ All notable changes to CableDyn are recorded in this file. The format follows
and buoyancy modules had no mass (with `nModes`, the first six frequencies of
`lazy_wave_buoyancy_modules.dat` drop by 13 % to 29 %). The positions and translations of a
line with a heading are written in the deck's axes, not the line's.
- A finite-EI line restrained in torsion whose bending-pinned End A is on a body or a rod is
refused on `bodyScheme staggered`, as a clamped End A is: that scheme passes cable ends as point
forces and held the torsion frame still while the body turned (a body could spin through +-180
deg); `bodyScheme monolithic` turns the frame with the body.
- A deck with a WaterKin elevation history (`WaveKinMod 1`) at `TMax = 0`, a check of the static
start, reduces the record over its own length instead of failing for want of a positive
`TMax`.
Expand Down
33 changes: 28 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,17 @@ if(Python3_Interpreter_FOUND)
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")

# A rod numbered as a body is not one of the body's points: a Rod1B end POINT listed before
# the Body1 points gives the run of the same deck with the rod renumbered, bit for bit.
add_test(NAME body_rod_numbering
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_body_rod_numbering.py
--exe $<TARGET_FILE:cabledyn>
--output ${CMAKE_BINARY_DIR}/body_rod_numbering)
set_tests_properties(body_rod_numbering PROPERTIES
LABELS "python;driver;integration;dynamic"
TIMEOUT 600
ENVIRONMENT "${_cabledyn_python_test_environment}")

# Anchor uplift channels (AnchFz/AnchFH, TDP<L>Grd): the analytic laid and suspended elastic
# catenaries, the Point<P>F identity on every standalone route, and a surge that lifts the
# anchor of a catenary (needs numpy).
Expand Down Expand Up @@ -2182,6 +2193,16 @@ add_test(NAME parity_integration
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/parity_integration)
set_tests_properties(parity_integration PROPERTIES LABELS "fortran;driver;integration;dynamic;openfast")

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

add_executable(test_cable_between_bodies tests/test_cable_between_bodies.f90)
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_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 Expand Up @@ -2696,12 +2717,13 @@ cabledyn_msg_test(quiet_catenary ../../examples/chain_catenary_r3_100m.dat 0 ""
cabledyn_msg_test(shared_line msg_shared_line.dat 1
"LINE 1 End B .NodeB, POINT 2, coupled. must be a Fixed .anchor. point;Workaround for this EI=0 line: split it into two lines that meet at a Connect point"
"cannot be split")
# A finite-EI shared line cannot be split at a Connect point: that advice is not given.
# A finite-EI line between two Coupled points has both ends driven: neither the End B refusal nor
# the Connect-point split advice is given; as a static deck it asks for dtM and TMax.
cabledyn_msg_test(shared_line_finite_ei msg_shared_line_finite_ei.dat 1
"finite-EI LINE 1 End B .NodeB, POINT 2, coupled. must be a Fixed .anchor. point;A finite-EI line cannot be split at a Connect point either;anchor it on a Fixed point"
"Workaround")
"finite-EI section .EI>0. requires a dynamic deck with dtM and TMax"
"Workaround;must be a Fixed")
cabledyn_msg_test(pliant_connect_end_b msg_pliant_connect_end_b.dat 1
"finite-EI LINE 1 in a mixed-topology deck needs a Fixed End B;End B is POINT 2 .connect.;Anchor the cable on a Fixed point"
"finite-EI LINE 1 in a mixed-topology deck: End B is POINT 2 .connect.;is not supported on the multibody march;End the cable on a Fixed point"
"")
cabledyn_msg_test(mixed_current msg_mixed_current.dat 1
"the deck current OPTION is not supported for a standalone mixed EI=0/finite-EI deck;runs the mooring in STILL WATER;couple the deck to OpenFAST .CompMooring = 5. with SeaState"
Expand Down Expand Up @@ -2908,7 +2930,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
test_control_torsion
test_endconn_spring
test_torsion_coupling
test_torsion_one_end)
test_torsion_one_end
test_two_moving_ends)
target_compile_options(${_cabledyn_exact_real_test} PRIVATE -Wno-compare-reals)
endforeach()
target_compile_options(test_openfast_aggregate PRIVATE
Expand Down
6 changes: 3 additions & 3 deletions doc/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ follow `CD_[Action]_[Object]`.

## Secondary Cosserat path

The rotation-DOF Cosserat rod path (CTest label `cosserat`) backs the finite-EI compatibility
route for lines with two moving ends.
The rotation-DOF Cosserat rod path (CTest label `cosserat`) is a separate, verified library path;
no deck route runs on it (a finite-EI line with two moving ends runs on the cubic-Hermite route).

```{list-table}
:header-rows: 1
Expand All @@ -95,7 +95,7 @@ route for lines with two moving ends.
* - `CableDyn_CosseratDynamic`, `CableDyn_CosseratEMC`
- generalised-α dynamics and an energy-conserving integrator option
* - `CableDyn_FiniteEIModel`, `CableDyn_FiniteEIStatic`
- the finite-EI compatibility-route model and grounded static equilibrium
- the Cosserat-path line model and its grounded static equilibrium
```

## Hydrodynamics and contact
Expand Down
16 changes: 9 additions & 7 deletions doc/capabilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ Line and constitutive capability
* - Finite-EI bending cable
- Supported
- production cubic-Hermite static/dynamic path for suspended and flat/structured
seabed-contact cables in standalone and OpenFAST-coupled use; the uncommon
two-moving-end standalone topology uses a separate compatibility solver
seabed-contact cables in standalone and OpenFAST-coupled use; a line between two moving
points (End B on a ``Coupled``/``Vessel`` point: a cable shared by two floaters, a
FAST.Farm shared line) has both ends driven, standalone, in OpenFAST, FAST.Farm and the C
API, with end connections and torsion at both ends; on the standalone multibody march
a line between two objects (both ends on Rigid6 bodies or rod ends) is driven by both
objects, coupled in its monolithic step and balanced in its static solve
* - Mixed ``EI = 0`` + finite-EI deck
- Supported with route limits
- a mixed deck of lines between held or coupled points only (no bodies, rods, or
Expand Down Expand Up @@ -116,14 +120,12 @@ Line and constitutive capability
* - Discrete attachments (``ATTACHMENTS``: buoyancy modules, clumps)
- Supported
- lumped at nodes of a finite-EI cable, standalone and coupled, also on a line restrained in
torsion (they add no polar inertia to its twist); rejected on the two-moving-end
compatibility solver
torsion (they add no polar inertia to its twist)
* - Bend stiffeners (``STIFFENERS``)
- Supported with limits
- tapered linear-elastic sleeve over a finite-EI line end, adding bending stiffness, mass,
buoyancy and drag per element, standalone and coupled; nonlinear (moment–curvature)
materials and bend restrictors are not provided; rejected on the two-moving-end
compatibility solver
materials and bend restrictors are not provided
* - Modal analysis (``nModes``)
- Standalone only
- natural frequencies and mode shapes of each line about its static equilibrium (all
Expand All @@ -135,7 +137,7 @@ Line and constitutive capability
- MoorDyn v2's synchronisation model on ``EI = 0`` lines and, as a distributed lift, on
finite-EI cables of the Hermite and multibody marches (:ref:`theory-viv`), with the
host's fluid field on the coupled routes and its state in the checkpoint; in-line VIV is
not provided; a finite-EI line with two moving ends refuses ``Cl > 0`` by name
not provided

Loads and environment
---------------------
Expand Down
9 changes: 6 additions & 3 deletions doc/capi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ initialised.
One ``x, y, z`` block for every host-driven point and nothing else: first the
``Coupled``/``Vessel`` points attached to an ``EI = 0`` line, in ``POINTS`` table order,
then the fairlead (End A, which must be ``Coupled``/``Vessel``) of each finite-EI line, in
``LINES`` table order. ``Fixed`` anchors, ``Free``/``Connect`` points, bodies and rods have
no block.
``LINES`` table order, then the End B of each finite-EI line whose End B is also
``Coupled``/``Vessel`` (a line between two moving points, driven at both ends), in ``LINES``
table order. ``Fixed`` anchors, ``Free``/``Connect`` points, bodies and rods have no block.

``CableDyn_InitLine``
``n_fixed`` entries. Entry ``k`` is the DOF ``fixed_dofs[k]``, in the order the caller
Expand Down Expand Up @@ -1990,7 +1991,9 @@ allocatable data does. There is no serialisation of the state to a caller buffer

The host drives the ``CD_C_POINT_COUPLED`` blocks. On the point route the blocks are the
line-bound points of every type in ``POINTS`` order; on the aggregate route they are the
``Coupled``/``Vessel`` points only (`Coupled DOF layout`_). A handle initialised from raw arrays
``Coupled``/``Vessel`` points only (`Coupled DOF layout`_), and a finite-EI line between two
``Coupled`` points has one block per end, its End B block after the fairleads of all
finite-EI lines, so that point id appears once per line end it carries. A handle initialised from raw arrays
has no deck points, and the call returns ``CD_C_BAD_INPUT``: its coupled vector is the caller's
own ``fixed_dofs`` list. A wrong ``n_block`` returns ``CD_C_BAD_INPUT``.

Expand Down
Loading
Loading