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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ All notable changes to CableDyn are recorded in this file. The format follows
with the same phase start and running-RMS window (`VIVrmsWindow`, default 500 steps of
`dtM`). On a taut 100 m line in a uniform current it follows MoorDyn-F's lock-in amplitude
and frequency to two to three digits through mode-1 and mode-3 lock-in, at any `dtM` from
5e-4 to 1e-2 s. The Python deck tools read and keep the columns.
5e-4 to 1e-2 s. The phases start from the deck's End A as MoorDyn's do, also on a line
written anchor first, which the reader turns around, and at the deck nodes of a refined
finite-EI mesh. MoorDyn-C's own VIV case, the catenary riser of Thorsen et al., reproduces
its mean tension and tension range and the measured lock-in frequency (period within 1 %).
The Python deck tools read and keep the columns.
- Cross-flow VIV of finite-EI cables in the standalone driver: the same LINE TYPES columns on an
`EI > 0` type give a distributed lift, Gauss-integrated over each cubic-Hermite element with
exact tangents, and a shedding phase at each node driven along the node's own tangent. A taut
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,15 @@ if(Python3_Interpreter_FOUND)
PROCESSORS 4
TIMEOUT ${_viv_lockin_timeout}
ENVIRONMENT "${_cabledyn_python_test_environment}")
# MoorDyn-C's VIV test case: the catenary riser of Thorsen et al. in a uniform current
add_test(NAME viv_riser
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_viv_riser.py
--exe $<TARGET_FILE:cabledyn>
--output ${CMAKE_BINARY_DIR}/viv_riser)
set_tests_properties(viv_riser PROPERTIES
LABELS "python;integration;dynamic;viv;validation"
TIMEOUT ${_viv_lockin_timeout}
ENVIRONMENT "${_cabledyn_python_test_environment}")
else()
message(STATUS "viv_lockin: skipped (numpy not importable in ${Python3_EXECUTABLE})")
endif()
Expand Down
3 changes: 2 additions & 1 deletion VALIDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ article's methods, are compared in
| **L2-80** | Lozon 80 m all-chain mooring | catenary (H) / MoorDyn-F (fairlead) | 0.03% / 1.8% | <2% / <5% | Pass |
| **L2-arb** | Closed-form catenary reference check | OrcaFlex VolturnUS-S ref | 0.69% | <2% | Pass |
| **L2-VIV** | Cross-flow VIV lock-in of a taut 100 m line, U = 0.06–0.42 m/s | MoorDyn-F (OpenFAST v5 `moordyn_driver`, `dtM` 5e-4 s) | mode-1 and mode-3 lock-in (U ≤ 0.18 and ≥ 0.36 m/s): mid-span A/D within 1.2%, frequency within one spectral bin; same response at `dtM` 5e-4 to 1e-2 s; at 0.21–0.33 m/s the codes settle on different modes (MoorDyn-F mode 1, CableDyn mode 2) | A/D <3%, frequency within one spectral bin (`viv_lockin`) | Pass scoped |
| **L2-VIV-riser** | Catenary riser of Thorsen et al. in a uniform 0.2 m/s current (MoorDyn-C's VIV test: D 0.024 m, EI 10.5 N m², 100 segments, `Cl` 0.7), deck written anchor first | measured cross-flow frequency 1.04 Hz; MoorDyn-C v2.7.2 (RK4, `dtM` 1e-4 s) | over 20–40 s at `dtM` 1e-3 s: mean fairlead tension 69.92 N against 69.93 N, range 3.73 N against 3.72 N, tension period 0.4853 s against the measured 0.4808 s and MoorDyn-C's 0.4811 s (0.4843 / 0.4829 s at `dtM` 5e-4 / 2.5e-4 s) | mean 0.2%, range 10%, period 1.5% (`viv_riser`) | Pass |
| **L2-VIV-EI** | Cross-flow VIV of a finite-EI cable: the L2-VIV line with EI = 1 N m², and a bending-stiff line (EA 5e9 N, EI 5e7 N m², β = π²EI/(TL²) ≈ 1, neutrally buoyant) against the EI = 0 string of equal first-mode frequency, U = 0.10–0.36 m/s | CableDyn `EI = 0` line (verification) | EI = 1: mid/quarter A/D 0.662/0.421 against 0.663/0.421, same frequency, at `dtM` 5e-4 to 1e-2 s; stiff line: mode-1 lock-in A/D within 2.5% of the string's at the same frequency for U ≤ 0.24 m/s; for U ≥ 0.27 m/s the string jumps to mode 2 while the stiff line stays in mode 1 (bending raises f₂/f₁ to 3.15) | EI = 1: A/D within 1% at `dtM` 0.01 and 0.002 s (5e-4 s run once over 200 s); stiff line at U 0.21 m/s: A/D within 3%; frequency within one spectral bin; at U 0.30 m/s stiff line A/D > 0.6, string < 0.15 (`viv_lockin`, `hermite_viv`) | Pass |
| **L3-1** | WD0050 static | OrcaFlex | 0.15 / 0.85% | <2% | Pass |
| **L3-2** | Regular-wave dynamic | OrcaFlex (pinned, dt-converged) | mean 0.30%, swing 8.4% | <2% / <15% | Pass |
Expand Down Expand Up @@ -793,7 +794,7 @@ stop with a named error.
| 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 |
| VIV (`compVIV`) | Not supported | outside CableDyn's scope |
| Cross-flow VIV (LINE TYPES `Cl`) | Pass verified | `EI = 0` lines and finite-EI cables on the aggregate with the host's fluid field: an `EI = 0` riser and a cable (EI 1 N m²) in a 0.15 m/s host current lock in at A/D 0.6645 / 0.6646 and 0.292 Hz (MoorDyn-F 0.662 at 0.293 Hz; standalone 0.665); the phases, running mean squares and averaging time ride in the checkpoint state and the correction rewind: a rebuild from the checkpoint continues bit for bit, one without the VIV reload does not (`viv_coupled`). OpenFAST (IEA-15 UMaine mixed deck, `Cl` 0.8 on the lazy-wave cable, SeaState 0.5 m/s current, 60 s): `openfast -restart` at 30 s reproduces every later CableDyn and OpenFAST output row bit for bit |

**Standalone mixed aggregate.** `CableDyn_driver.exe` partitions and steps the
same aggregate used by OpenFAST. The IEA-15 three-chain + touchdown-cable deck
Expand Down
5 changes: 4 additions & 1 deletion doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,10 @@ along :math:`\mathbf{e} = \mathbf{q}\times\mathbf{v}_n/U`:
so the shedding frequency locks onto the cross-flow motion inside the band
:math:`c_F \pm d_F` (MoorDyn's defaults 0.18 and 0.08). The running RMS values average over
``VIVrmsWindow`` seconds, by default 500 steps of ``dtM`` as in MoorDyn, and the phases start at
:math:`2\pi i/N` along the line from End A. The static equilibrium carries no lift.
:math:`2\pi i/N` at node :math:`i` counted from the deck's End A (MoorDyn's ``AttachA``), also on
a line written anchor first, which the reader turns around. On a finite-EI mesh the static solve
refined, the deck nodes keep that seed and the nodes it added take the seed interpolated in
arc length. The static equilibrium carries no lift.

In the implicit step the phase is explicit: the step's lift takes the phase predicted at
:math:`t_{n+1}` from the step-start rate (the generalised-α level under the configuration blend),
Expand Down
77 changes: 72 additions & 5 deletions src/CableDyn_DeckDriver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ MODULE CableDyn_DeckDriver
PUBLIC :: CD_Init_Deck_Models
PUBLIC :: CD_Init_Deck_System
PUBLIC :: CD_Init_Deck_HermiteCable
PUBLIC :: CD_Deck_VIV_Phase_Seed
PUBLIC :: CD_Stiffener_Overlay
PUBLIC :: CD_Init_Deck_Aggregate
PUBLIC :: CD_Deck_Query_dtM
Expand Down Expand Up @@ -3189,10 +3190,27 @@ RECURSIVE SUBROUTINE build_one_hermite_cable(ln, sections, types, points, opts,
! coupled host may step the cable at a dt adjusted from the deck dtM.
IF (PRESENT(install_viv)) THEN
IF (install_viv .AND. ANY(viv_cl > CD_ZERO)) THEN
CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, &
MERGE(opts%viv_rms_window, &
REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), &
opts%viv_rms_window > CD_ZERO), es, em)
! MoorDyn's phase seed counts the deck nodes from the deck's End A: a line the reader turned
! around, or a mesh the static solve refined, takes it node by node (CD_Deck_VIV_Phase_Seed)
IF (ln%ends_swapped .OR. ALLOCATED(cable%deck_node)) THEN
BLOCK
REAL(wp) :: seed(cable%line%nn)
IF (ALLOCATED(cable%deck_node)) THEN
CALL CD_Deck_VIV_Phase_Seed(cable%line%l0, ln%ends_swapped, seed, deck_map=cable%deck_node)
ELSE
CALL CD_Deck_VIV_Phase_Seed(cable%line%l0, ln%ends_swapped, seed)
END IF
CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, &
MERGE(opts%viv_rms_window, &
REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), &
opts%viv_rms_window > CD_ZERO), es, em, phase_seed=seed)
END BLOCK
ELSE
CALL CD_HermiteCable_Dyn_Set_VIV(cable%line, viv_cl, viv_cf, viv_df, &
MERGE(opts%viv_rms_window, &
REAL(CD_VIV_NM, wp)*MERGE(opts%dtM, dt, opts%has_dtm), &
opts%viv_rms_window > CD_ZERO), es, em)
END IF
IF (es /= CD_HCDYN_OK) THEN
CALL fail(ErrStat, ErrMsg, 'finite-EI cable VIV wiring failed: '//TRIM(em)); RETURN
END IF
Expand Down Expand Up @@ -9043,7 +9061,17 @@ SUBROUTINE init_one_model(ln, sections, types, points, opts, model, ErrStat, Err
END IF
tw = opts%viv_rms_window
IF (.NOT. (tw > CD_ZERO) .AND. opts%has_dtm) tw = REAL(CD_VIV_NM, wp)*opts%dtM
CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em)
IF (ln%ends_swapped) THEN
! MoorDyn counts the phase seed from the deck's End A, which the reader turned around
BLOCK
REAL(wp) :: seed(model%n_dof/3)
CALL CD_Deck_VIV_Phase_Seed(model%l0, .TRUE., seed)
CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em, &
phase_seed=seed)
END BLOCK
ELSE
CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, hydro_diam, viv_cf, viv_df, tw, es, em)
END IF
IF (es == CD_MODEL_OK) CALL CD_Recompute_Model_Acceleration(model, es, em)
IF (es /= CD_MODEL_OK) THEN
ErrStat = CD_DECKDRV_BADINPUT
Expand Down Expand Up @@ -34966,6 +34994,45 @@ PURE FUNCTION cable_frame_is_identity(cable) RESULT(is_id)
is_id = .NOT. (ABS(cable%frame_s) > CD_ZERO .OR. ABS(cable%frame_c - CD_ONE) > CD_ZERO)
END FUNCTION cable_frame_is_identity

PURE SUBROUTINE CD_Deck_VIV_Phase_Seed(l0, swapped, seed, deck_map)
!! MoorDyn's VIV phase seed i/N (phase 2 pi i/N at node i = 0 .. N counted from the deck's
!! End A, N the deck's segment count) at every node of a line, in the model's internal node
!! order (node 1 = End B; element e of length l0(e) joins nodes e and e + 1). swapped: the
!! reader turned the line's ends around, so the deck's End A is the model's End B. deck_map:
!! the mesh node (public order, End A = 1) of each deck node, on a mesh the static solve
!! refined; a node it added takes the seed interpolated linearly in unstretched arc length
!! between its two deck nodes. Without deck_map the mesh is the deck's.
REAL(wp), INTENT(IN) :: l0(:)
LOGICAL, INTENT(IN) :: swapped
REAL(wp), INTENT(OUT) :: seed(:)
INTEGER, INTENT(IN), OPTIONAL :: deck_map(:)
REAL(wp) :: s(SIZE(l0) + 1), f
INTEGER :: ne, nn, p, j, nd
ne = SIZE(l0)
nn = ne + 1
! unstretched arc length from End A at public node p (internal element ne + 1 - p follows it)
s(1) = CD_ZERO
DO p = 1, ne
s(p + 1) = s(p) + l0(ne + 1 - p)
END DO
DO p = 1, nn
IF (PRESENT(deck_map)) THEN
nd = SIZE(deck_map) - 1
f = CD_ONE
DO j = 1, nd
IF (p >= deck_map(j) .AND. p <= deck_map(j + 1)) THEN
f = (REAL(j - 1, wp) + (s(p) - s(deck_map(j)))/(s(deck_map(j + 1)) - s(deck_map(j))))/REAL(nd, wp)
EXIT
END IF
END DO
ELSE
f = REAL(p - 1, wp)/REAL(ne, wp)
END IF
IF (swapped) f = CD_ONE - f
seed(nn + 1 - p) = f
END DO
END SUBROUTINE CD_Deck_VIV_Phase_Seed

PURE INTEGER FUNCTION CD_Cable_Deck_Node(cable, node) RESULT(deck_node)
!! The deck node at public node `node` (End A = 1) of a finite-EI cable's final mesh: the
!! node itself when the mesh is the deck mesh, 0 for a node the refinement added (the
Expand Down
14 changes: 12 additions & 2 deletions src/CableDyn_HermiteCableDynamic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -966,20 +966,23 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial(model, mu_axial, ErrStat, ErrM
model%tr_valid = .FALSE.
END SUBROUTINE CD_HermiteCable_Dyn_Set_Friction_Axial

SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg)
SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, ErrMsg, phase_seed)
!! Install the cross-flow VIV synchronisation model (CableDyn_VIV) on a cable with drag:
!! per element the lift coefficient cl (0: no lift) and the band df/cf, and the running-RMS
!! averaging time t_window (s; 0 takes 500 steps of the first step). The lift acts on the
!! wetted Gauss points of every element with cl > 0, its phase lives on the nodes of those
!! elements; the phases start at 2 pi i/N with node i counted from End A (the model's last
!! node), as MoorDyn's. The phase follows the drag's current and a held host field (which
!! node), as MoorDyn's; phase_seed, per node, gives i/N instead (a line whose deck End A the
!! reader turned around, or a mesh refined from the deck's). The phase follows the drag's
!! current and a held host field (which
!! carries any waves); the internal wave families (Set_Waves) are refused with VIV. The
!! committed acceleration is refreshed with the new lift; if that fails, the previous VIV
!! configuration, its state and the acceleration are restored.
TYPE(CD_HermiteCableDynType), INTENT(INOUT) :: model
REAL(wp), INTENT(IN) :: cl(:), cf(:), df(:), t_window
INTEGER, INTENT(OUT) :: ErrStat
CHARACTER(*), INTENT(OUT) :: ErrMsg
REAL(wp), INTENT(IN), OPTIONAL :: phase_seed(:)
INTEGER :: e, k, ne, nn, es
REAL(wp) :: wsum, tw_old
LOGICAL :: had_viv
Expand Down Expand Up @@ -1013,6 +1016,12 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err
ErrStat = CD_HCDYN_BADINPUT
ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: VIV needs the cable''s drag in water (set the drag first)'; RETURN
END IF
IF (PRESENT(phase_seed)) THEN
IF (SIZE(phase_seed) /= nn .OR. .NOT. CD_All_Finite(phase_seed)) THEN
ErrStat = CD_HCDYN_BADINPUT
ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: the phase seed must be finite with one value per node'; RETURN
END IF
END IF
IF (model%has_wave) THEN
ErrStat = CD_HCDYN_BADINPUT
ErrMsg = 'CD_HermiteCable_Dyn_Set_VIV: internal waves are configured; VIV takes waves as a held '// &
Expand Down Expand Up @@ -1057,6 +1066,7 @@ SUBROUTINE CD_HermiteCable_Dyn_Set_VIV(model, cl, cf, df, t_window, ErrStat, Err
model%viv_cf(k) = model%viv_cf(k)/wsum
model%viv_df(k) = model%viv_df(k)/wsum
model%viv_phi(k) = CD_VIV_TWO_PI*REAL(nn - k, wp)/REAL(ne, wp)
IF (PRESENT(phase_seed)) model%viv_phi(k) = CD_VIV_TWO_PI*phase_seed(k)
END DO
CALL viv_drag_terms(model)
model%viv_phi_eval = model%viv_phi
Expand Down
Loading
Loading