From 5c7b96abd53fea52082665579a0686bd30fe66ae Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 28 Oct 2026 00:09:01 +0900 Subject: [PATCH] feat(viv): cross-flow VIV of finite-EI cables on the multibody march A finite-EI line on a Rigid6 body or rod, or in a deck with Free or Connect points, runs on the multibody march, which refused Cl > 0. That march refreshes each cable's held fluid field every step and steps the cable through the same snapshot and restore the VIV state already rides in, so the builds now install the lift as the Hermite march's do. A taut cable beside a weighted Connect point locks in as on the Hermite route (mid/quarter A/D 0.662/0.421 at 0.300 Hz on both), and a clamped cable on a moving Rigid6 buoy runs with it. Signed-off-by: Jae Hoon Seo --- CHANGELOG.md | 5 +++-- doc/capabilities.rst | 7 +++---- doc/theory.rst | 5 +++-- doc/troubleshooting.rst | 3 +-- python/cabledyn/deck_file.py | 15 --------------- python/tests/test_deck_file.py | 9 ++++----- src/CableDyn_DeckDriver.f90 | 8 ++------ tests/test_viv_lockin.py | 29 +++++++++++++++++++++++++++++ 8 files changed, 45 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1093a611..204025d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,8 +21,9 @@ All notable changes to CableDyn are recorded in this file. The format follows exact tangents, and a shedding phase at each node driven along the node's own tangent. A taut line with `EI` near zero reproduces the `EI = 0` lock-in to three digits, at any `dtM` from 5e-4 to 1e-2 s without smoothing; a bending-stiff line matches the string of equal first-mode - frequency in mode-1 lock-in and stays in mode 1 where that string jumps to mode 2. A finite-EI - line with two moving ends, or beside bodies, rods or free points, refuses `Cl > 0`. + frequency in mode-1 lock-in and stays in mode 1 where that string jumps to mode 2. The + multibody march carries it too (a cable on a Rigid6 body or rod, or beside free points), with + the same lock-in. A finite-EI line with two moving ends refuses `Cl > 0`. - Cross-flow VIV on the coupled routes: OpenFAST (`CompMooring = 5`), FAST.Farm and the standalone runner of a mixed `EI = 0` / finite-EI deck carry the lift on both line kinds, with the host's fluid field. The phases, running mean squares and averaging time are part of the diff --git a/doc/capabilities.rst b/doc/capabilities.rst index c59c3e9c..666b9511 100644 --- a/doc/capabilities.rst +++ b/doc/capabilities.rst @@ -116,10 +116,9 @@ Line and constitutive capability * - Cross-flow VIV (LINE TYPES ``Cl``, ``dF``, ``cF``) - Standalone and coupled - MoorDyn v2's synchronisation model on ``EI = 0`` lines and, as a distributed lift, on - finite-EI cables of the Hermite march (: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; - finite-EI lines with two moving ends and finite-EI lines beside bodies, rods or free - points refuse ``Cl > 0`` by name + 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 Loads and environment --------------------- diff --git a/doc/theory.rst b/doc/theory.rst index 3e6d8682..8cf279c6 100644 --- a/doc/theory.rst +++ b/doc/theory.rst @@ -776,8 +776,9 @@ elements. The phase is explicit with the Heun commit as on ``EI = 0`` lines, and needed: the Hermite tangent and the integrated lift leave no mesh-scale mode for the loop to pump, and the response is the same from ``dtM`` 5e-4 to 1e-2 s. A finite-EI line with :math:`EI \to 0` reproduces the ``EI = 0`` line's lock-in. The standalone Hermite march -carries it, including deck waves and current through its held fluid field; a finite-EI line -with two moving ends, or beside bodies, rods or free points, refuses :math:`C_L > 0`. +and the multibody march (a cable on a body or rod, or beside free points) carry it, including +deck waves and current through the held fluid field; a finite-EI line with two moving ends +refuses :math:`C_L > 0`. VIV runs on every route that carries the line: the standalone driver, the coupled OpenFAST and FAST.Farm routes and the standalone runner of a mixed ``EI = 0`` / finite-EI deck. On the diff --git a/doc/troubleshooting.rst b/doc/troubleshooting.rst index 330469fa..92b59cfb 100644 --- a/doc/troubleshooting.rst +++ b/doc/troubleshooting.rst @@ -847,8 +847,7 @@ aborts with a CableDyn fatal error, check whether the deck uses one of these com - linearise a pinned-hang-off, uncontrolled variant of the deck; time-domain runs support both * - a ``Rigid`` end-connection direction reversed by exactly 180 degrees in one host update - drive the platform through intermediate orientations - * - VIV on a finite-EI line with two moving ends (``needs its End B fixed``) or beside - bodies, rods or free points (``does not run with bodies, rods or free points yet``) + * - VIV on a finite-EI line with two moving ends (``needs its End B fixed``) - fix End B of the line, or set ``Cl = 0`` for its line type * - a host/file fluid combination named as inseparable - select host wave/current and file wave/current independently as documented, or place the diff --git a/python/cabledyn/deck_file.py b/python/cabledyn/deck_file.py index 7150a6a4..f4849988 100644 --- a/python/cabledyn/deck_file.py +++ b/python/cabledyn/deck_file.py @@ -2614,7 +2614,6 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: # Cl > 0 on an EI = 0 row (native init_one_model, which needs the line's Morison drag in # water) has_viv_ei0 = False - viv_type_names: set[str] = set() for row in self.line_types: for index in (1, 2, *range(5, len(row.tokens))): numeric(row.tokens[index], row, f"LINE TYPES column {index + 1}") @@ -2703,8 +2702,6 @@ def numeric(token: str, row: DeckRecord, field: str) -> float: "working-curve model" ) has_viv_ei0 = has_viv_ei0 or (cl > 0.0 and not ei > 0.0) - if cl > 0.0: - viv_type_names.add(row.tokens[0].lower()) if ei > 0.0 and (is_syrope or len(ea_parts) > 1): model = "Syrope" if is_syrope else "viscoelastic stiffness" raise DeckFormatError(f"{self._at(row)}: {model} is not supported with EI > 0") @@ -3592,18 +3589,6 @@ def is_body_kind(kind: str, pinned: bool) -> bool: ) elif has_rigid6: needs_multibody = non_rigid6_points - if deck_driver_route and viv_type_names: - # native run_deck_driver: the finite-EI lift runs on the cubic-Hermite march, which - # builds no bodies, rods or Free/Connect points (a moving End B is refused above) - for line_id in finite_line_ids: - if not viv_type_names.intersection(section_types_by_line[line_id]): - continue - if needs_multibody: - raise DeckFormatError( - f"{self._label}: VIV (LINE TYPES Cl > 0) of a finite-EI line does not run " - "with bodies, rods or free points yet; set Cl = 0 for the finite-EI lines " - "of this deck" - ) if failures and deck_driver_route: # native CD_Run_Deck_Driver: FAILURE runs on the point-system object graph only if not has_dtm: diff --git a/python/tests/test_deck_file.py b/python/tests/test_deck_file.py index bb4319ee..6bec1952 100644 --- a/python/tests/test_deck_file.py +++ b/python/tests/test_deck_file.py @@ -4619,11 +4619,10 @@ def test_viv_needs_water_on_an_ei0_line(): DeckFile.from_text(_edit(_STATIC, ("50.0 WtrDpth\n", ""))) -def test_finite_ei_viv_is_refused_beside_free_points(): - row = "chain 0.252 390.0 1.674e9 -1.0 1.0e4 1.37 0.64 1.0 0.0" - base = _edit(_DYNAMIC, ("2 Coupled 0.0 0.0 0.0 0 0 0 0", "2 Free 0.0 0.0 0.0 1000 0 0 0")) - with pytest.raises(DeckFormatError, match="does not run with bodies, rods or free points"): - DeckFile.from_text(_edit(base, (row, row + " 0.8"))) +def test_finite_ei_viv_is_accepted_on_the_multibody_march(): + # the clamped cable of a moored Rigid6 buoy (native multibody march) + row = "cable 0.20 60.0 5.0e8 -1.0 2.0e4 1.2 0.0 1.0 0.0" + DeckFile.from_text(_example("buoy_clamped_cable.dat", (row, row + " 0.8"))) def test_viv_rms_window_option_is_non_negative(): diff --git a/src/CableDyn_DeckDriver.f90 b/src/CableDyn_DeckDriver.f90 index 49f8f31f..93251c5a 100644 --- a/src/CableDyn_DeckDriver.f90 +++ b/src/CableDyn_DeckDriver.f90 @@ -19879,11 +19879,6 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod pc = points pa = find_point(points, cab_lines(c)%nodeA) IF (TRIM(pc(pa)%ptype) /= 'fixed') pc(pa)%ptype = 'coupled' - IF (line_has_viv(cab_lines(c), types, sections)) THEN - CALL fail(ErrStat, ErrMsg, 'VIV (LINE TYPES Cl > 0) of a finite-EI line does not run with bodies, rods '// & - 'or free points yet; set Cl = 0 for the finite-EI lines of this deck') - GOTO 900 - END IF mb%cab_clamp(c) = (cab_lines(c)%endconn_mode(1) /= CD_ENDCONN_PINNED .OR. line_torsion_active(cab_lines(c))) & .AND. TRIM(points(pa)%ptype) /= 'fixed' IF (mb%cab_clamp(c)) THEN @@ -19899,7 +19894,7 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod lnc%endconn_ez_ref(:, 1) = dclamp CALL build_one_hermite_cable(lnc, sections, types, pc, opts, opts%dtM, mb%cables(c), node, & ErrStat, ErrMsg, standalone_controls=.TRUE., bathymetry=bathymetry, & - fairlead_orientation=TRANSPOSE(rclamp), & + fairlead_orientation=TRANSPOSE(rclamp), install_viv=.TRUE., & fold_support=MERGE(FOLD_FRICTION_NONE, FOLD_FRICTION_NO_AS_LAID, & deck_has_non_rigid6_dynamic_points(points, bodies))) END BLOCK @@ -19909,6 +19904,7 @@ SUBROUTINE write_multibody_dynamic_out(deck_path, out_root, channels, types, bod ELSE CALL build_one_hermite_cable(cab_lines(c), sections, types, pc, opts, opts%dtM, mb%cables(c), node, & ErrStat, ErrMsg, standalone_controls=.TRUE., bathymetry=bathymetry, & + install_viv=.TRUE., & fold_support=MERGE(FOLD_FRICTION_NONE, FOLD_FRICTION_NO_AS_LAID, & deck_has_non_rigid6_dynamic_points(points, bodies))) END IF diff --git a/tests/test_viv_lockin.py b/tests/test_viv_lockin.py index 1e664907..0102c6c3 100644 --- a/tests/test_viv_lockin.py +++ b/tests/test_viv_lockin.py @@ -18,6 +18,9 @@ stiffness: the cubic-Hermite route with the Gauss-integrated lift) locks in with the EI = 0 line's mid-span and quarter-span amplitudes (within 1 %) and frequency, at dtM 0.01 s and at 0.002 s (no smoothing needed on the Hermite route); +* the same finite-EI cable on the multibody march (End A Fixed, and a weighted Connect point on + two chains 300 m away, which puts the deck on that march) locks in as on the Hermite route + (within 1 % and one bin); * a bending-stiff, neutrally buoyant cable (8.1 kg/m, EA 5e9 N, EI 5e7 N m^2, about 51 kN: beta = pi^2 EI/(T L^2) ~ 1) against the EI = 0 string tensioned to T (1 + beta), which has the same first-mode frequency and shape: at U 0.21 m/s both lock into mode 1 with the same @@ -112,6 +115,26 @@ def deck(dtm: float, ei: float = 0.0, ea: float = 5.0e7, mass: float = 10.0, ten """ +def multibody(text: str) -> str: + """The deck with End A Fixed and, 300 m away, a 5 t Connect point hung on two chains: a deck + with a dynamic point runs on the multibody march.""" + for old, new in ( + ("1 Coupled 0.0 0.0 -50.0", "1 Fixed 0.0 0.0 -50.0"), + ("riser 0.10", "chain 0.20 250.0 1.0e9 -1.0 0.0 1.2 1.0 0.0 0.0" + " 0.0 0.08 0.18\nriser 0.10"), + ("2 Fixed 100.0 0.0 -50.0 0 0 0 0", + "2 Fixed 100.0 0.0 -50.0 0 0 0 0\n" + "3 Fixed 0.0 300.0 -20.0 0 0 0 0\n" + "4 Connect 50.0 300.0 -60.0 5000 0 0 0\n" + "5 Fixed 100.0 300.0 -20.0 0 0 0 0"), + (" 50 -\n", " 50 -\n2 chain 3 4 70.0 20 -\n" + "3 chain 5 4 70.0 20 -\n"), + ): + assert text.count(old) == 1, old + text = text.replace(old, new) + return text + + def response(path: Path) -> tuple[float, float, float]: """Mid A/D, mid peak frequency, quarter A/D over 60-120 s.""" hist = read_output(path) @@ -150,6 +173,7 @@ def main() -> int: (0.002, "viv_dt0.002", deck(0.002, waterkin="current_0.15.dat")), ("fei", "viv_fei", deck(0.01, ei=1.0, waterkin="current_0.15.dat")), ("fei_fine", "viv_fei_dt0.002", deck(0.002, ei=1.0, waterkin="current_0.15.dat")), + ("fei_mb", "viv_fei_multibody", multibody(deck(0.01, ei=1.0, waterkin="current_0.15.dat"))), ] for u in (0.21, 0.30): runs.append((("stiff", u), f"viv_stiff_u{u}", deck(0.01, waterkin=f"current_{u}.dat", **stiff))) @@ -196,6 +220,11 @@ def run(name: str) -> subprocess.CompletedProcess[str]: check(abs(a1 - a0) <= 0.01 * a0 and abs(q1 - q0) <= 0.01 * q0 and abs(f1 - f0) <= 1.0 / 60.0, f"finite-EI cable at dtM 0.002 s: mid/quarter A/D {a1:.3f}/{q1:.3f} at {f1:.3f} Hz, EI = 0 " f"line at 0.01 s {a0:.3f}/{q0:.3f} at {f0:.3f} Hz (within 1 % and one bin)") + if "fei" in results and "fei_mb" in results: + (a0, f0, q0), (a1, f1, q1) = results["fei"], results["fei_mb"] + check(abs(a1 - a0) <= 0.01 * a0 and abs(q1 - q0) <= 0.01 * q0 and abs(f1 - f0) <= 1.0 / 60.0, + f"finite-EI cable on the multibody march: mid/quarter A/D {a1:.3f}/{q1:.3f} at {f1:.3f} Hz, " + f"Hermite route {a0:.3f}/{q0:.3f} at {f0:.3f} Hz (within 1 % and one bin)") if ("stiff", 0.21) in results and ("string", 0.21) in results: (a1, f1, _), (a0, f0, _) = results[("stiff", 0.21)], results[("string", 0.21)] check(abs(a1 - a0) <= 0.03 * a0 and abs(f1 - f0) <= 1.0 / 60.0,