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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions doc/capabilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------
Expand Down
5 changes: 3 additions & 2 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions doc/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions python/cabledyn/deck_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 4 additions & 5 deletions python/tests/test_deck_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
8 changes: 2 additions & 6 deletions src/CableDyn_DeckDriver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
29 changes: 29 additions & 0 deletions tests/test_viv_lockin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)))
Expand Down Expand Up @@ -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,
Expand Down
Loading