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
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,28 @@ All notable changes to CableDyn are recorded in this file. The format follows
- `CD_HermiteCable_Dyn_Curvature_Exact` and `CD_HFMF_Curvature_Exact`: the exact geometric
nodal curvature of the cubic-Hermite centreline, the larger one-sided trace at a node, which
`CD_HermiteCable_Dyn_Curvature` and `CD_HFMF_Curvature` returned up to 0.1.1.
- `Pinned` and `CoupledPinned`/`VesselPinned` rods in coupled OpenFAST (`CompMooring = 5`) runs.
A `Pinned` rod turns about its fixed End A, which the coupled route previously refused. A
`CoupledPinned` rod (MoorDyn-F's coupled pinned rod) is a node of the coupling mesh at its
End A that takes the platform position only: the rod turns about it with its own rotation,
the pin acceleration loading that rotation through the rod's inertia, and the node returns
the rod's net force less its inertia with zero moment. The angular acceleration in that force
is solved for the node's current acceleration, so an output probe sees the rod's effective
inertia about the pin. `PtfmInit` moves the rod with the platform, the static initial
condition balances it about its pin (a pinned rod that carries no line keeps its deck
orientation), sub-cycled steps move the pin along the host path interpolated linearly as for
every other host node, the sub-step count resolves the rod's own swing about its pin under
its weight, buoyancy and pin acceleration (`|W d_g - B d_b|` and the pin-acceleration load
over the inertia about the pin) as well as its lines, so a short pinned rod that carries no
line stays stable at a coupling step beyond its explicit limit (a `CoupledPinned` rod takes
the stiffer of its step-start and end-of-step wetting, so a pin that crosses the free surface
within a step is covered), and checkpoint restarts and correction iterations reproduce the
run bit for bit with the existing rod state mirror. An end of a `Pinned` or `CoupledPinned` rod that
carries no line needs no `Rod<N>A`/`Rod<N>B` POINT row on the coupled route; other rods still
need one at both ends. The C API runs `Pinned` rods, as its manual page already stated. The
standalone driver and the C API refuse `CoupledPinned` rods by name; FAST.Farm decks still
refuse rods, OpenFAST linearisation still refuses rods, and `CoupledPinned` bodies remain
unsupported. See the manual's OpenFAST page (Lifecycle features).

### Changed

Expand Down Expand Up @@ -251,6 +273,55 @@ All notable changes to CableDyn are recorded in this file. The format follows

### Fixed

- Seabed contact in the explicit object sub-step estimate. The staggered march of free and
pinned rods and Rigid6 bodies (the coupled OpenFAST and C API routes, standalone rod decks and
`bodyScheme staggered`) applies the seabed penalty springs explicitly, but sized its sub-steps
from the lines, hydrostatics and (pinned rods) the swing only, so a rod or body resting on a
stiff seabed at a large coupling step could exceed the central-difference limit and be thrown
off the bed. The estimate now adds the contact springs that can act within the step
(`kBot d dl` per rod contact station, `kBot` over 1 m² at a body's reference point), in
heave, roll and pitch about the reference point, or about the pin of a pinned rod at both pin
poses. A station counts from its complete rigid-body motion: its reach
`dt |v + w x s| + dt² (|a| + |alpha x s| + |w|² |s| + g)/2` bounds its travel in every
direction, and it counts when its height above the highest floor within that horizontal
distance (the depth on a flat seabed; on a `bathymetryFile` grid the highest node of the
overlapped cells, raised for the crease rounding by the new `CD_Bathymetry_Max_Floor`) is at
most the reach plus the rod radius, so a rod sliding or turning towards a shallower bed is
covered as well as one landing. The monolithic scheme, which carries the contact in its
Jacobian, is unchanged. No shipped example or existing test changes its sub-step count.
- Line-free explicit object marches without a sub-step estimate. A standalone deck without lines
marched its bodies and rods by the explicit central difference at `dtM` with no sub-steps, and
the `bodyScheme staggered` multibody march skipped the bodies (and rods) when no `EI = 0` line
was present (finite-EI cables only), so a short pinned rod or a body on a stiff seabed could
exceed the explicit limit there. Both now take the estimate from the objects' own terms
(hydrostatic restoring, seabed contact, a pinned rod's swing about its pin), and the staggered
multibody march sizes a pinned rod as the coupled route does: its line springs through their
arms from the pin on its inertia about the pin, plus its swing and contact about the pin. A 1 m
dry pinned rod at `dtM = 0.6 s` (`omega0 dt = 2.29`) now takes 6 sub-steps on both routes and
equals a `dtM = 0.1 s` run at every row, where it previously turned over. No shipped example
or existing test changes its sub-step count.
- Further terms of the explicit object sub-step estimate (coupled and C API routes, standalone
rod decks, decks without lines and `bodyScheme staggered`; the monolithic scheme is
unchanged): a rod near the free surface adds its waterplane stiffness (`rhoW g D dl` at each
station whose section can cross the surface within the step, `rhoW g pi D^2/4` where its axis
can cross it) and takes its dry inertia, for free and pinned rods and the rods fixed to a
Rigid6 body, so a floating rod (a 5 cm rod at `omega dt = 2.2`) no longer grows; a finite-EI
cable on a body or rod of the staggered march adds its attachment spring (`EA/L` along its end
force, `T/L` across), as the explicit cable end force needs; a rod pinned to a body takes the
body's pin acceleration and a reduced-mass lower bound of its inertia about the pin; a step
that would need more than the 256-sub-step cap is warned about once per run. Of the existing
tests, only the staggered pinned-cable deck of `clamped_cable_ends` changes (10 steps now
sub-cycled 2 to 5 times; printed results unchanged); no shipped example changes.
- Seabed friction of rods and Rigid6 bodies is applied implicitly. The regularised friction
`-mu N v/sqrt(v^2 + vreg^2)` (`vreg = 1e-3 m/s`) is a damper of up to `mu N/vreg`, far stiffer
than any practical step, and was evaluated explicitly, so a rod or body resting on a
frictional bed chattered (velocity and friction flipping every step). It now enters the
implicit velocity derivative of the step as its secant coefficient `mu N/sqrt(v^2 + vreg^2)`,
as the line nodes treat it implicitly: a rod held in a cross current holds still (creep at
`vreg F/(mu N)`) where it slid back and forth at a few mm/s. This changes the results of decks
with rods or bodies on a frictional seabed; none of the shipped examples or existing tests has
one.

- Tension spikes of tension-only (`EI = 0`) lines that go slack. The generalised-α step evaluated
the axial force and the dynamic loads at the blended configuration
`q_α = (1 − α_f) q_{n+1} + α_f q_n`. A segment that was slack at the start of a step and
Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,17 @@ set_tests_properties(openfast_aggregate_touchdown PROPERTIES
set_tests_properties(openfast_aggregate openfast_aggregate_touchdown PROPERTIES
RESOURCE_LOCK openfast_aggregate_files)

# Pinned and CoupledPinned rods on the coupled aggregate: the compound-pendulum period, a held
# host equal to a fixed pin, constant and harmonic pin accelerations against closed forms,
# sub-cycling, snapshot/restore, the output probe, restart, PtfmInit with the static start, a
# step without the staged rods, and rod ends without a line.
add_executable(test_openfast_pinned_rod tests/test_openfast_pinned_rod.f90)
target_link_libraries(test_openfast_pinned_rod PRIVATE cabledyn_core)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/openfast_pinned_rod)
add_test(NAME openfast_pinned_rod COMMAND test_openfast_pinned_rod
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openfast_pinned_rod)
set_tests_properties(openfast_pinned_rod PROPERTIES LABELS "fortran;dynamic;openfast;validation")

# Maintained IEA-15 MW mixed deck: the finite-EI power cable has a genuine multi-node
# grounded run and marches through the OpenFAST aggregate at 40 Hz with host current.
add_executable(test_openfast_touchdown tests/test_openfast_touchdown.f90)
Expand Down Expand Up @@ -2395,6 +2406,7 @@ if(CABLEDYN_ENABLE_COVERAGE)
test_openfast_shell
test_hermite_fmf
test_openfast_aggregate
test_openfast_pinned_rod
test_of_mooring_counters
test_ei0_mesh_scaling_counters
test_c_api
Expand Down
1 change: 1 addition & 0 deletions VALIDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ stop with a named error.
| Active tension (`CtrlChan`) | Pass verified | CONTROL parsing, last-segment length/rate modulation, and exact unit tests; coupled A/B in which a ServoDyn cable-control DLL drives the same pay-out/haul-in `DeltaL` schedule into `=5` (CableDyn) and `=3` (stock MoorDyn) in one binary: hold tensions agree to <0.03% and the tension responses to <0.6% (controlled fairleads) / <0.7% (anchors) ([`validation/scripts/activetension/`](https://github.com/SMI-Lab-Inha/CableDyn/tree/main/validation/scripts/activetension), [`validation/scripts/openfast_activetension_ab.py`](https://github.com/SMI-Lab-Inha/CableDyn/blob/main/validation/scripts/openfast_activetension_ab.py)) |
| Coupled `Rigid6` bodies + `Point3` buoys | Pass verified | 6-DOF `Rigid6` motion with hydrostatic (`C33`/`C44`/`C55`) restoring, checkpoint state (bit-identical `openfast -restart` of a 13.9 MN-swinging tethered body), and SeaState drag / Froude–Krylov / added mass. `Point3` buoys take buoyancy and drag/added-mass/FK; a submerged volume-only buoy takes FK. Tests: `case_coupled_rigid6`/`_mirror`/`_fluid`, `case_coupled_point3_buoy`/`_fluid` |
| Coupled rigid rods | Pass verified | host-driven `Rod<N>A/B` endpoints, correction rewind, bit-identical 24-scalar-per-rod checkpoint state, and two Gauss fluid nodes per rod with SeaState drag/Froude–Krylov/added mass; `case_coupled_rod`, `_mirror`, and `_fluid` pass, and the OpenFAST module compiles with rod decks enabled |
| Coupled pinned rods (`Pinned`, `CoupledPinned`/`VesselPinned`) | Pass verified | `openfast_pinned_rod` on the aggregate: a dry rod (10 m, 500 kg) released at 30° swings with the elliptic-integral compound-pendulum period to 1.6e-4 at `dt = T/100`, End A on the pin to 0 m; a held `CoupledPinned` node reproduces the `Pinned` rod to round-off (1e-12), returns zero moment, and its force equals the analytic pin reaction to 2.0e-13 of `mg`; a pin accelerating at 2 m/s² gives the mean angle `atan(a/g)` to 1e-6 rad and the period of `sqrt(g² + a²)` to 1.6e-4; a harmonic pin motion follows the linear base-excitation solution to 1.5e-3 / 3.7e-4 of the amplitude at `T0/100` / `T0/200` (ratio 4.03); a 0.1 s step sub-cycled 7 times reproduces a run at the sub-step size to 1e-14 rad and 4e-10 N for a drifting pin; a 1 m `Pinned` rod that carries no line (dry and hanging, or buoyant and upright under water) at a 0.6 s step (`omega0 dt` 2.29 / 3.42, beyond the explicit limit 2) sub-cycles it 6 / 9 times from its own swing stiffness `|W d_g - B d_b|`, equals the run at the sub-step size bit for bit, stays within its release angle and keeps the elliptic-integral period to 6.0e-3 / 5.9e-3 (taken whole, the step turns the rod over); a `CoupledPinned` pin crossing the free surface within one step at constant velocity (a 1 kg/m rod lifted from submerged to dry in 0.1 s, `omega dt` 2.13 wet; a 33 kg/m rod lowered from dry to submerged in 0.6 s, 2.29 dry) takes at least 6 sub-steps from its step-start wetting (more from the waterplane near the surface) and ends within 5e-5 / 3e-4 rad of a run at a sixtieth of the step, where the end-of-step wetting alone gives one sub-step and an angle error of 0.20 / 0.69 rad; on a stiff seabed (`kBot` 1e7 N/m³) a `Pinned` rod whose far end rests on the bed (0.1 s step) and a `Free` rod lying on it (0.05 s step) sub-cycle their contact mode (34–36 and 26 sub-steps), stay at rest on the bed over 5 s (angle change 3.8e-3 / 4e-15 rad, the undamped static settlement) and end within 1.9e-6 / 8e-8 of a run at a tenth of the step, where the sub-steps of the lines and swing alone (1 and 4) throw them off the bed (4.2 rad, 0.8 m); an output probe returns `-m (I_c/I_p) a_p` within 1e-10 of `mg` (not `-m a_p`), and its pin force moves by 2e-11 N when the held end acceleration of the attached tethers changes their end load by 8 N; snapshot/restore, probe restore and restart overlay are bit-identical, the restored state's loads before the next step included; a step without the staged rods (the step-start pin carried by the rod) is bit-identical to the staged one; a `Free` or `Coupled` rod with an end without a line is refused by name; with `PtfmInit` the static start leaves 1.4e-8 N·m about the pin. OpenFAST (IEA-15 UMaine, JONSWAP Hs 6 m, 60 s, `dtM = DT = 0.025 s`) with line 1 hung from a 4 m `CoupledPinned` rod at its fairlead: `openfast -restart` at 30 s reproduces every later OpenFAST output row bit for bit (`NumCrctn` 0 and 1), `NumCrctn = 1` equals `NumCrctn = 0` bit for bit, and surge/heave/pitch statistics stay within 0.2 % / 0.4 % / 1.7 % (mean) of the deck with line 1 on a `Coupled` point |
| Coupled finite-EI touchdown/contact | Pass verified | flat `WtrDpth` and equivalent constant structured bathymetry initialise and step with matching loads; friction and checkpoint restore are tested. The IEA-15 mixed example (its power cable on 248 elements, each at most half the bending length) has 149 grounded nodes and completes a 20 s aggregate trajectory at `dtM=0.025 s` with 2 m surge, 1 m heave, and 0.5 m/s host current, without fallback or stall recovery, at most 12 Newton iterations. A full-turbine run of the same model (one hour after a 200 s transient; TurbSim normal turbulence, 10.6 m/s, 17 % TI; JONSWAP Hs 8 m, Tp 12 s, aligned with the wind and the cable; AeroDyn with the rotor held at 7.55 rpm, no controller, rigid blades and tower; SeaState grid covering the lines) completes without recoveries or non-finite values. The cable's hang-off tension is 11.5 ± 1.1 kN (static 11.9 kN, maximum 17.9 kN). The 149 nodes grounded at the static state stay grounded, joined by one more once the platform has drifted (the touchdown moves 2.5 m toward the platform). The peak curvature is 0.156 1/m at the sag bend, 72 m from the hang-off, and 0.109 1/m at the touchdown. On the former 87-element mesh (10 m elements along the laid section) the peak was 0.160 1/m and the touchdown curvature 0.075 1/m, under-resolved by about 30 %. These curvatures were recorded before the `Curv` channels took the curvature recovered from nodal equilibrium: they are the geometric curvature of the centreline (the larger one-sided trace at a node), which `OutputRecovery element` reproduces. The chain-only twin of the run matches stock MoorDyn over 1200 s to 0.3 % in platform motion and fairlead tension statistics. The anchor tension of the laid cable stays at its static 1.23 kN (maximum 1.24 kN): the seabed friction of the 370 m laid section holds the tension changes at the touchdown. On the former mesh it read 1.39 kN (median) with wave-frequency stick-slip peaks up to 4.1 kN lasting under 1 s, which the resolved mesh does not show, and before the anchor-end correction of this release it locked at about 2.75 kN for the whole run. The run takes 27.1 min of wall time (18.8 min on the former mesh) |
| `WaterKin` from file | Pass verified | See [WaterKin and SeaState modes](#waterkin-and-seastate-modes) |
| Syrope polyester (`SYROPE:` syntax; [Falkenberg et al., 2017](https://cabledyn.readthedocs.io/en/latest/references.html#ref-falkenberg2017)) | Pass verified | MoorDyn-F/C `BA_s|BA_d` rate and force equations; analytic position/velocity tangents with finite-difference checks; projected, bracketed backward-Euler slow-state update with a strong-unloading boundary test; OWC running maximum; `SYROPE IC` `Tmax0/Tmean0` history with range/order checks; both states carried through every lifecycle stage and the coupled checkpoint. `BA_s` is kept separate from line axial damping (`BA`) and tested against double counting. Composite, hydrodynamic, finite-EI, current, and wave combinations stop with a named error |
Expand Down
7 changes: 5 additions & 2 deletions doc/capabilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ and ``RODS`` are MoorDyn-compatible deck records that the driver translates; the
alternative discretisation of the line. Supported translations include fixed/coupled/vessel
attachments, free or connecting masses and clumps, ``Point3`` buoys, ``Rigid6`` bodies, and coupled
rigid rods. In OpenFAST, ``Coupled``/``Vessel`` bodies and rods are platform-borne 6-DOF nodes that
return a force and a moment; the C API and Python run free bodies and rods in still water. The
coupled body/rod routes carry checkpoint state and SeaState drag, Froude–Krylov, and added mass.
return a force and a moment, ``CoupledPinned``/``VesselPinned`` rods turn about a platform-borne
node that takes the platform position only and returns a force with zero moment, and ``Pinned``
rods turn about a fixed End A; ``CoupledPinned`` bodies are not supported. The C API and Python
run free, fixed and pinned rods and free bodies in still water. The coupled body/rod routes carry
checkpoint state and SeaState drag, Froude–Krylov, and added mass.
``Rigid6`` also carries the documented hydrostatic restoring terms. Consult :doc:`driver_format`
before using an imported object because unsupported fields fail closed.

Expand Down
8 changes: 5 additions & 3 deletions doc/capi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -862,9 +862,9 @@ Newton settings are taken from the deck. The deck's ``OUTPUTS`` section is parse
but the C ABI writes no output files.

**Finite-EI lines, bodies and rods.** A deck with finite-EI (``EI > 0``) lines or with a
``BODIES`` or ``RODS`` table (``Point3`` buoys, free ``Rigid6`` bodies, free, fixed or pinned
rods, with their lines) runs on the same coupled aggregate as the OpenFAST module, with these
differences from the point-system decks:
``BODIES`` or ``RODS`` table (``Point3`` buoys, free ``Rigid6`` bodies, or free, fixed and
``Pinned`` rods, with their lines; a ``Pinned`` rod turns about its fixed End A) runs on the same
coupled aggregate as the OpenFAST module, with these differences from the point-system decks:

* the coupled DOFs are the ``x, y, z`` of the deck's ``Coupled``/``Vessel`` points only, in
the order of `Coupled DOF layout`_ (anchors are not part of the vector); the bodies and
Expand Down Expand Up @@ -893,6 +893,8 @@ The deck is validated under the standalone-deck rules:
- Where it is supported
* - ``Coupled``/``Vessel`` bodies or rods (6-DOF host nodes)
- the OpenFAST module; the standalone driver with a ``motionFile``
* - ``CoupledPinned``/``VesselPinned`` rods (a pin the host moves)
- the OpenFAST module
* - a ``motionFile`` option
- the standalone driver (prescribe motion through ``CableDyn_Step`` instead)
* - a ``FAILURE`` section (line failures)
Expand Down
3 changes: 2 additions & 1 deletion doc/coupling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ checkpoint-restart, quasi-static linearisation (``dYdu``), FAST.Farm farm-level
``C33``/``C44``/``C55`` hydrostatic restoring, restart state, and SeaState drag / Froude-Krylov /
added-mass), coupled ``Point3`` buoys (buoyancy and SeaState drag / Froude-Krylov / added-mass), and
coupled rigid rods with host-driven endpoints, correction rewind, checkpoint state, and two-point
Gauss SeaState sampling.
Gauss SeaState sampling, including MoorDyn-F's coupled pinned rods (``CoupledPinned``, force only)
and rods pinned to a fixed point.

The input/output Jacobian has two deliberately different contracts. During an ordinary nonlinear
OpenFAST run, CableDyn returns the partial direct-feedthrough derivative at fixed committed internal
Expand Down
Loading
Loading