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
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ All notable changes to CableDyn are recorded in this file. The format follows
- Wake-oscillator VIV: an optional `WAKE OSCILLATOR` section row `TypeName CL0 [St [eps [A]]]`
replaces the synchronisation lift of a type (which keeps `Cl` 0) by the van der Pol wake
oscillator of Facchinetti et al. (2004) with acceleration coupling (defaults St 0.2, eps 0.3,
A 12), distributed along finite-EI cables, standalone and coupled. The kernel follows the
A 12), distributed along finite-EI cables and at the nodes of `EI = 0` lines, standalone and
coupled. The kernel follows the
published forced-wake lift magnification within 2 %; on the taut example cable the wake locks
the cable in at its first mode (A/D 0.58 against 0.10 uncoupled) and the drag and damping take
out the wake lift's power within 0.3 %. Its state is in the step-recovery, snapshot and
checkpoint state; the Python deck reader and builder take the section.
out the wake lift's power within 0.3 %; the same line with `EI = 0` locks in within 0.1 % of
the cable's A/D at the same frequency. Its state is in the step-recovery, snapshot and
checkpoint state (on an `EI = 0` line, in the slots of the VIV phase and first motion
statistic); the Python deck reader and builder take the section.
- Amplitude-dependent VIV coefficients: an optional `VIV AMPLITUDE` section, rows
`TypeName AD Cv [CdAmp]`, gives a line type a table over the cross-flow amplitude ratio of the
coefficient `Cv` that replaces its `Cl` and a factor `CdAmp` of its normal drag coefficient, read
Expand Down
2 changes: 1 addition & 1 deletion doc/capabilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Line and constitutive capability
* - Wake-oscillator VIV (``WAKE OSCILLATOR`` section ``CL0``, ``St``, ``eps``, ``A``)
- Standalone and coupled
- the van der Pol wake oscillator of Facchinetti et al. (2004) with acceleration coupling,
distributed along finite-EI cables in place of the synchronisation model
on ``EI = 0`` lines and along finite-EI cables in place of the synchronisation model
(:ref:`theory-viv-wake`), its state in the checkpoint
* - Amplitude-dependent VIV coefficients (``VIV AMPLITUDE`` section ``AD``, ``Cv``, ``CdAmp``)
- Standalone and coupled
Expand Down
4 changes: 2 additions & 2 deletions doc/driver_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ Wake-oscillator vortex-induced vibration of a line type, the model of Facchinett
a van der Pol oscillator per node stands for the near wake and drives the cross-flow lift, coupled
to the cable's cross-flow acceleration (see [Wake oscillator](theory.rst)). It replaces the
synchronisation model of the LINE TYPES `Cl` column for that type, so the type keeps `Cl = 0`, and
it acts on finite-EI cables.
it acts on finite-EI cables and `EI = 0` lines alike.

```text
--------------------- WAKE OSCILLATOR ----------------------------------
Expand Down Expand Up @@ -1270,7 +1270,7 @@ Behaviour:
`VIVPow` carry the wake lift. A row with `CL0 = 0` leaves the run exactly as without it.
- A row fails if it is not `TypeName CL0 [St [eps [A]]]`, names an undefined or already named
type, or holds a value out of range; `CL0 > 0` fails on a type with `Cl > 0`. A line whose types
mix the two models fails, and so does an `EI = 0` line with the wake oscillator.
mix the two models fails.

### VIV AMPLITUDE (optional)

Expand Down
10 changes: 8 additions & 2 deletions doc/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,11 @@ oscillation and the van der Pol damping rate at the start of the interval, so a
:math:`\varepsilon` stays resolved; should the rate exceed :math:`0.2/\delta t` on the way, or the
result not be finite, the interval is redone with twice the sub-steps. The lift is integrated on a finite-EI cable at the Gauss
points of the synchronisation lift, :math:`q` interpolated between the element's end nodes, with
its exact position and velocity derivatives in the tangent at fixed :math:`q`. :math:`q` starts on
its exact position and velocity derivatives in the tangent at fixed :math:`q`. On an ``EI = 0``
line it acts at the free nodes as the synchronisation lift does, over the node's tributary length,
with the node's smoothed cross-flow acceleration (the average with its two neighbours) as the
forcing, and :math:`(q, \dot q)` takes the place of the phase and the first motion statistic in
the line's VIV state. :math:`q` starts on
its limit cycle at the node's phase seed, :math:`q = 2\cos\phi_0`, :math:`\dot q = 0`, and the
state is part of the step-recovery, snapshot and checkpoint state.

Expand All @@ -1326,7 +1330,9 @@ one-harmonic balance leaves out. On the taut cable of ``viv_taut_cable_inline.da
``Cl`` 0 and ``CL0`` 0.3 the cable locks in at 0.282 Hz, below the wake's own 0.30 Hz, at a
steady mid-span A/D of 0.58; with :math:`A` = 0 the uncoupled wake drives it at 0.298 Hz at A/D
0.10, and over the lock-in the drag and damping take out the wake lift's power within 0.3 %. The
wake oscillator acts on finite-EI cables, cross-flow only.
same line with ``EI = 0`` locks in at the same 0.282 Hz and A/D 0.586 (0.1 % from the finite-EI
cable), and 0.099 uncoupled (0.3 %). The wake oscillator acts on finite-EI cables and ``EI = 0``
lines, cross-flow only.

.. _theory-viv-amplitude:

Expand Down
2 changes: 1 addition & 1 deletion python/cabledyn/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class LineType:
reference lift coefficient, the Strouhal number, the van der Pol
parameter and the acceleration coupling. It replaces the
synchronisation lift, so ``cl`` stays ``None`` or 0, and acts on
finite-EI cables. ``None`` leaves a trailing value out of the row (the
``EI = 0`` lines and finite-EI cables. ``None`` leaves a trailing value out of the row (the
solver takes 0.2, 0.3 and 12); a value given writes the ones before it.
viv_amplitude : list of tuples | None
Optional amplitude-dependent VIV coefficients of a type (Thorsen et al.
Expand Down
9 changes: 2 additions & 7 deletions python/cabledyn/deck_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -4789,8 +4789,8 @@ def end_key(token: str) -> str:
for line_id, section_types in section_types_by_line.items()
if {line_type.lower() for line_type in section_types} & amp_type_names
}
# native build_one_hermite_cable and the EI = 0 line wiring: the wake oscillator and the
# cross-flow damping act on finite-EI cables only, and a cable takes one VIV model
# native build_one_hermite_cable and the EI = 0 line wiring: the cross-flow damping acts on
# finite-EI cables only, and a line takes one VIV model
for line_id, section_types in section_types_by_line.items():
types_used = {line_type.lower() for line_type in section_types}
if types_used & damp_type_names and line_id not in finite_line_ids:
Expand All @@ -4800,11 +4800,6 @@ def end_key(token: str) -> str:
)
if not types_used & wake_type_names:
continue
if line_id not in finite_line_ids:
raise DeckFormatError(
f"{self._label}: line {line_id}: the wake oscillator (WAKE OSCILLATOR "
"section) acts on finite-EI cables (EI > 0) only"
)
if types_used & viv_type_names:
raise DeckFormatError(
f"{self._label}: line {line_id}: a line takes one VIV model, but its types mix "
Expand Down
12 changes: 9 additions & 3 deletions python/tests/test_deck_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -4888,15 +4888,15 @@ def test_wake_oscillator_rows_are_read_and_kept(tmp_path, rows, expected):
(None, ("chain 0.3 0.2 0.0",), "St > 0, eps > 0 and A >= 0"),
(None, ("chain 0.3 0.2 0.3 -1",), "St > 0, eps > 0 and A >= 0"),
("lift", ("chain 0.3",), "give the type LINE TYPES Cl 0"),
("ei0", ("chain 0.3",), "acts on finite-EI cables (EI > 0) only"),
("lift ei0", ("chain 0.3",), "give the type LINE TYPES Cl 0"),
],
)
def test_wake_oscillator_rows_follow_the_native_checks(base, rows, message):
text = _DYNAMIC
if base == "lift":
if base and "lift" in base:
row = "chain 0.252 390.0 1.674e9 -1.0 1.0e4 1.37 0.64 1.0 0.0"
text = _edit(text, (row, row + " 0.8"))
elif base == "ei0":
if base and "ei0" in base:
text = _edit(text, ("1.674e9 -1.0 1.0e4 1.37", "1.674e9 -1.0 0.0 1.37"))
with pytest.raises(DeckFormatError, match=re.escape(message)):
DeckFile.from_text(_with_section(text, "WAKE OSCILLATOR", *rows))
Expand Down Expand Up @@ -5066,6 +5066,12 @@ def test_wake_oscillator_cl0_zero_is_off_and_needs_no_finite_line():
DeckFile.from_text(_with_section(text, "WAKE OSCILLATOR", "chain 0.0"))


def test_wake_oscillator_acts_on_an_ei0_line():
# native init_one_model installs the wake oscillator on EI = 0 lines as on finite-EI cables
text = _edit(_DYNAMIC, ("1.674e9 -1.0 1.0e4 1.37", "1.674e9 -1.0 0.0 1.37"))
DeckFile.from_text(_with_section(text, "WAKE OSCILLATOR", "chain 0.3 0.2 0.3 12"))


def test_viv_is_accepted_on_the_coupled_route():
text = _edit(_STATIC, (_VIV_ROW, _VIV_ROW + " 0.8"))
DeckFile.from_text(text)
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def test_generated_study_runs_on_the_real_driver(tmp_path):
(
"wake-ei0-line",
[_WAKE_LIFT, _WAKE_SECTION, ("-0.8 1.0 1.2", "-0.8 0.0 1.2")],
False,
True,
),
]

Expand Down
25 changes: 21 additions & 4 deletions src/CableDyn_DeckDriver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10498,6 +10498,8 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er
REAL(wp), ALLOCATABLE :: ve_ead(:), ve_bas(:), ve_bad(:), ve_ambl(:), ve_vbet(:)
REAL(wp), ALLOCATABLE :: viv_cl(:), viv_cf(:), viv_df(:), viv_clx(:), viv_al(:), viv_hh(:)
REAL(wp), ALLOCATABLE :: viv_tix(:), viv_amp3(:, :, :), viv_dia(:)
! the WAKE OSCILLATOR rows per element (C_L0, St, eps, A; C_L0 0 where none)
REAL(wp), ALLOCATABLE :: viv_wo(:, :)
INTEGER, ALLOCATABLE :: viv_ampn(:)
LOGICAL, ALLOCATABLE :: syr_el(:)
REAL(wp) :: anchor(3), fairlead(3), mode1_omega
Expand Down Expand Up @@ -10538,8 +10540,9 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er
hydro_can(SIZE(l0)), hydro_cat(SIZE(l0)), ve_ead(SIZE(l0)), ve_bas(SIZE(l0)), &
ve_bad(SIZE(l0)), ve_ambl(SIZE(l0)), ve_vbet(SIZE(l0)), viv_cl(SIZE(l0)), viv_cf(SIZE(l0)), &
viv_df(SIZE(l0)), syr_el(SIZE(l0)), viv_clx(SIZE(l0)), viv_al(SIZE(l0)), viv_hh(SIZE(l0)), &
viv_tix(SIZE(l0)), viv_dia(SIZE(l0)))
viv_tix(SIZE(l0)), viv_dia(SIZE(l0)), viv_wo(4, SIZE(l0)))
viv_tix = CD_ZERO
viv_wo = CD_ZERO
viv_dia = CD_ZERO
viv_cl = CD_ZERO
viv_cf = CD_ZERO
Expand Down Expand Up @@ -10604,8 +10607,10 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er
hydro_cat(e) = types(line_section_type(sections, ln%id, i))%cat
viv_cl(e) = types(line_section_type(sections, ln%id, i))%cl
IF (types(line_section_type(sections, ln%id, i))%wo_cl0 > CD_ZERO) THEN
CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(ln%id))//': the wake oscillator (WAKE '// &
'OSCILLATOR section) acts on finite-EI cables (EI > 0) only'); RETURN
viv_wo(:, e) = [types(line_section_type(sections, ln%id, i))%wo_cl0, &
types(line_section_type(sections, ln%id, i))%wo_st, &
types(line_section_type(sections, ln%id, i))%wo_eps, &
types(line_section_type(sections, ln%id, i))%wo_a]
END IF
IF (types(line_section_type(sections, ln%id, i))%cdy_a >= CD_ZERO) THEN
CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(ln%id))//': the cross-flow damping (VIV '// &
Expand Down Expand Up @@ -10633,6 +10638,14 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er
viv_hh = viv_hh(SIZE(viv_hh):1:-1)
viv_tix = viv_tix(SIZE(viv_tix):1:-1)
viv_dia = viv_dia(SIZE(viv_dia):1:-1)
viv_wo = viv_wo(:, SIZE(viv_wo, 2):1:-1)
IF (ANY(viv_wo(1, :) > CD_ZERO) .AND. ANY(viv_cl > CD_ZERO)) THEN
CALL fail(ErrStat, ErrMsg, 'line '//TRIM(int_to_str(ln%id))//': a line takes one VIV model, but its '// &
'types mix the synchronisation lift (LINE TYPES Cl > 0) and the wake oscillator (WAKE '// &
'OSCILLATOR section)'); RETURN
END IF
! the wake oscillator: the lift coefficient passed on is C_L0
IF (ANY(viv_wo(1, :) > CD_ZERO)) viv_cl = viv_wo(1, :)
ba = ba(SIZE(ba):1:-1)
ve_ead = ve_ead(SIZE(ve_ead):1:-1)
ve_bas = ve_bas(SIZE(ve_bas):1:-1)
Expand Down Expand Up @@ -10925,7 +10938,11 @@ RECURSIVE SUBROUTINE init_one_model(ln, sections, types, points, opts, model, Er
! the VIV AMPLITUDE tables, left unallocated (absent below) on a line without one
CALL viv_amp_tables(types, viv_tix, viv_amp3, viv_ampn)
! with the in-line VIV of the VIV section where a type has ClX > 0
IF (ANY(viv_clx > CD_ZERO)) THEN
IF (ANY(viv_wo(1, :) > CD_ZERO)) THEN
! the wake oscillator: cl is C_L0, the band unused
CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, viv_dia, viv_cf, viv_df, tw, es, em, &
phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped, wake=viv_wo(2:4, :))
ELSE IF (ANY(viv_clx > CD_ZERO)) THEN
CALL CD_Set_Model_VIV(model, opts%rhoW, viv_cl, viv_dia, viv_cf, viv_df, tw, es, em, &
phase_seed=seed, tangent_reversed=.NOT. ln%ends_swapped, clx=viv_clx, &
il_alpha=viv_al, chh=viv_hh, amp=viv_amp3, amp_n=viv_ampn)
Expand Down
Loading
Loading